This commit is contained in:
sjl
2024-11-21 14:42:26 +08:00
parent 4de59336b2
commit 0d063e887c
8 changed files with 271 additions and 28 deletions

View File

@@ -42,7 +42,9 @@ import { useDictStore } from '@/stores/modules/dict'
import { getPqDevList, deletePqDev, exportPqDev, downloadTemplate, importPqDev } from '@/api/device/device/index.ts'
import { ElMessageBox } from 'element-plus'
import { computed, reactive, ref } from 'vue'
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
const modeStore = useModeStore();
const dictStore = useDictStore()
// ProTable 实例
const proTable = ref<ProTableInstance>()
@@ -53,6 +55,8 @@ const getTableList = (params: any) => {
let newParams = JSON.parse(JSON.stringify(params))
newParams.searchEndTime = endDate.value
newParams.searchBeginTime = startDate.value
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
newParams.pattern = patternId
return getPqDevList(newParams)
}
@@ -131,7 +135,7 @@ const handleDateChange = (startDateTemp: string, endDateTemp: string) => {
}
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
devicePopup.value?.open(titleType, row)
devicePopup.value?.open(titleType, row,modeStore.currentMode)
}