Compare commits

...

2 Commits

Author SHA1 Message Date
d00c90d557 Merge remote-tracking branch 'origin/master' 2026-02-27 11:38:52 +08:00
2b49a59174 删除 2026-02-27 11:38:33 +08:00
9 changed files with 1 additions and 161 deletions

View File

@@ -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 }
}

View File

@@ -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'

View File

@@ -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 }
}

View File

@@ -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 }
}

View File

@@ -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 }
}

View File

@@ -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 }
}

View File

@@ -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 }
}

View File

@@ -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 }
}

View File

@@ -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 },
}, },
], ],
}, },