删除
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import type { EquipmentQuery } from '@/apis/equipment/equipment'
|
|
||||||
import { getEquipmentNameList } from '@/apis/equipment/equipment'
|
|
||||||
import type { LabelValueState } from '@/types/global'
|
|
||||||
|
|
||||||
/** 设备名称列表 */
|
|
||||||
export function equipmentName(query: EquipmentQuery, options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const equipmentNameList = ref<LabelValueState[]>([])
|
|
||||||
|
|
||||||
const getEquipmentName = async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await getEquipmentNameList(query)
|
|
||||||
equipmentNameList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { equipmentNameList, getEquipmentName, loading }
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
export * from './useMenu'
|
export * from './useMenu'
|
||||||
export * from './useDept'
|
export * from './useDept'
|
||||||
export * from './useBranch'
|
|
||||||
export * from './useRole'
|
export * from './useRole'
|
||||||
export * from './useDict'
|
export * from './useDict'
|
||||||
export * from './space'
|
|
||||||
export * from './point'
|
|
||||||
export * from './equipmentName'
|
|
||||||
export * from './productName'
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import type { LabelValueState } from '@/types/global'
|
|
||||||
import { type PeopleQuery, getPeopleNameList } from '@/apis/sysPeople/people'
|
|
||||||
|
|
||||||
/** 设备名称列表 */
|
|
||||||
export function peopleName(query: PeopleQuery, options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const peopleNameList = ref<LabelValueState[]>([])
|
|
||||||
|
|
||||||
const getPeopleName = async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await getPeopleNameList(query)
|
|
||||||
peopleNameList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { peopleNameList, getPeopleName, loading }
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import type { TreeNodeData } from '@arco-design/web-vue'
|
|
||||||
import { listPointTree } from '@/apis'
|
|
||||||
|
|
||||||
/** 部门模块 */
|
|
||||||
export function point(options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const pointList = ref<TreeNodeData[]>([])
|
|
||||||
|
|
||||||
const getPointList = async (name?: string) => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await listPointTree({ description: name })
|
|
||||||
pointList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { pointList, getPointList, loading }
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import { getProductNameList } from '@/apis/equipment/product'
|
|
||||||
import type { LabelValueState } from '@/types/global'
|
|
||||||
|
|
||||||
/** 设备名称列表 */
|
|
||||||
export function productName(options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const productNameList = ref<LabelValueState[]>([])
|
|
||||||
|
|
||||||
const getProductName = async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await getProductNameList()
|
|
||||||
productNameList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { productNameList, getProductName, loading }
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import type { LabelValueState } from '@/types/global'
|
|
||||||
import { getRuleNameList } from '@/apis/rule/rule'
|
|
||||||
|
|
||||||
/** 设备名称列表 */
|
|
||||||
export function ruleName(options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const ruleNameList = ref<LabelValueState[]>([])
|
|
||||||
|
|
||||||
const getRuleName = async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await getRuleNameList()
|
|
||||||
ruleNameList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { ruleNameList, getRuleName, loading }
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import type { TreeNodeData } from '@arco-design/web-vue'
|
|
||||||
import { listSpaceTree } from '@/apis'
|
|
||||||
|
|
||||||
/** 部门模块 */
|
|
||||||
export function space(options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const spaceList = ref<TreeNodeData[]>([])
|
|
||||||
|
|
||||||
const getSpaceList = async (name?: string) => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await listSpaceTree({ description: name })
|
|
||||||
spaceList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { spaceList, getSpaceList, loading }
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { ref } from 'vue'
|
|
||||||
import type { TreeNodeData } from '@arco-design/web-vue'
|
|
||||||
import { listBranchTree } from '@/apis'
|
|
||||||
|
|
||||||
/** 部门模块 */
|
|
||||||
export function useBranch(options?: { onSuccess?: () => void }) {
|
|
||||||
const loading = ref(false)
|
|
||||||
const branchList = ref<TreeNodeData[]>([])
|
|
||||||
|
|
||||||
const getBranchList = async (name?: string) => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await listBranchTree({ description: name })
|
|
||||||
branchList.value = res.data
|
|
||||||
// eslint-disable-next-line ts/no-unused-expressions
|
|
||||||
options?.onSuccess && options.onSuccess()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { branchList, getBranchList, loading }
|
|
||||||
}
|
|
||||||
@@ -28,7 +28,7 @@ export const systemRoutes: RouteRecordRaw[] = [
|
|||||||
path: '/dashboard/analysis',
|
path: '/dashboard/analysis',
|
||||||
name: 'Analysis',
|
name: 'Analysis',
|
||||||
component: () => import('@/views/dashboard/analysis/index.vue'),
|
component: () => import('@/views/dashboard/analysis/index.vue'),
|
||||||
meta: { title: '分析页', icon: 'insert-chart', hidden: false, affix: true },
|
meta: { title: '首页', icon: 'insert-chart', hidden: false, affix: true },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user