刷新饼图

This commit is contained in:
sjl
2025-01-13 21:06:24 +08:00
parent 8b9abba74b
commit 1f3024eb91
9 changed files with 69 additions and 66 deletions

View File

@@ -43,7 +43,6 @@ import { getPqDevList, deletePqDev, exportPqDev, downloadTemplate, importPqDev,g
import { ElMessageBox } from 'element-plus'
import { computed, onBeforeMount, onMounted, reactive, ref } from 'vue'
import { useModeStore , useAppSceneStore} from '@/stores/modules/mode'; // 引入模式 store
import { forEach } from 'lodash'
const modeStore = useModeStore();
const dictStore = useDictStore()
@@ -51,19 +50,11 @@ const appSceneStore = useAppSceneStore()
// ProTable 实例
const proTable = ref<ProTableInstance>()
const devicePopup = ref()
const ConditionsIsShow = ref(false)
const boundPqDevList=ref<Device.ReqPqDevParams[]>([])//根据检测计划id查询出所有已绑定的设备
// 存储设备类型选项
const devTypeOptions = ref<{
id: string;
name: string ,
icd:string ,
power:string,
devVolt:number,
devCurr:number,
devChns:number,
}[]>([])
const devTypeOptions = ref<Device.ResDev[]>([])
const getTableList = async (params: any) => {
let newParams = JSON.parse(JSON.stringify(params))
@@ -158,7 +149,7 @@ const handleDateChange = (startDateTemp: string, endDateTemp: string) => {
}
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
devicePopup.value?.open(titleType, row,modeStore.currentMode,appSceneStore.currentScene)
devicePopup.value?.open(titleType, row,modeStore.currentMode,appSceneStore.currentScene,devTypeOptions.value)
}
@@ -209,7 +200,7 @@ const importFile = async () => {
onBeforeMount(async () => {
const response = await getPqDev()
devTypeOptions.value = response.data.map(item => ({
devTypeOptions.value = (response.data as Device.ResDev[]).map(item => ({
id: item.id,
name: item.name,
icd: item.icd,