|
|
@ -197,6 +197,7 @@ import type { Type } from '@/api/gas/gastype' |
|
|
import { useHandDetectorStore } from '@/store/modules/handDetector' |
|
|
import { useHandDetectorStore } from '@/store/modules/handDetector' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { handleTree } from '@/utils/tree' |
|
|
import { handleTree } from '@/utils/tree' |
|
|
|
|
|
|
|
|
/** GAS手持探测器 列表 */ |
|
|
/** GAS手持探测器 列表 */ |
|
|
defineOptions({ name: 'HandDetector' }) |
|
|
defineOptions({ name: 'HandDetector' }) |
|
|
const handDetectorStore = useHandDetectorStore() |
|
|
const handDetectorStore = useHandDetectorStore() |
|
|
@ -257,12 +258,11 @@ const resetQuery = () => { |
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm = (type: string, id?: number) => { |
|
|
const openForm = (type: string, id?: number) => { |
|
|
if (fences.value.length === 0) { |
|
|
|
|
|
|
|
|
|
|
|
getAllFences() |
|
|
getAllFences() |
|
|
} |
|
|
|
|
|
if (gasTypes.value.length === 0) { |
|
|
|
|
|
|
|
|
|
|
|
getAllGasTypes() |
|
|
getAllGasTypes() |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
formRef.value.open(type, id) |
|
|
formRef.value.open(type, id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -325,7 +325,7 @@ const getAllGasTypes = async () => { |
|
|
gasTypes.value = await handDetectorStore.getAllGasTypes() |
|
|
gasTypes.value = await handDetectorStore.getAllGasTypes() |
|
|
} |
|
|
} |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(() => { |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
getList() |
|
|
getList() |
|
|
getAllFences() |
|
|
getAllFences() |
|
|
getAllGasTypes() |
|
|
getAllGasTypes() |
|
|
|