微调
This commit is contained in:
@@ -145,6 +145,7 @@ const activeNames = ref(['2'])
|
||||
const tabShow= ref(false);
|
||||
const tabLabel1 = ref('设备检测')
|
||||
const editableTabsValue = ref('0')
|
||||
const checkStateTable = ref<number[]>([0,1,2])
|
||||
const tabsHeight = ref('calc(100vh - 538px)'); // 初始高度
|
||||
|
||||
const tabPaneHeight = ref('calc(100% - 5px)'); // 初始高度
|
||||
@@ -267,13 +268,13 @@ const chartsData1: any = ref([]),
|
||||
chartsData2: any = ref([]),
|
||||
chartsData3: any = ref([]);
|
||||
const getPieData = async (id: string) => {
|
||||
console.log('饼图变了');
|
||||
currentId.value = id; // 设置当前ID
|
||||
handleCheckFunction(0)//切换左侧树,默认css功能是设备检测
|
||||
|
||||
//handleCheckFunction(0)//切换左侧树,默认css功能是设备检测
|
||||
const boundPqDevList=ref<Device.ResPqDev[]>([])//根据检测计划id查询出所有已绑定的设备
|
||||
const pqDevList_Result2 = await getBoundPqDevList({'planId': id, 'checkStateList':[0,1,2]});
|
||||
const pqDevList_Result2 = await getBoundPqDevList({'planId': id,'checkStateList':[0,1,2,3]});
|
||||
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[];
|
||||
|
||||
console.log('饼图列',boundPqDevList)
|
||||
// 初始化计数对象
|
||||
const checkStateCount: { [key: number]: number } = { 0: 0, 1: 0, 2: 0, 3: 0 };
|
||||
// 遍历 boundPqDevList 并更新计数对象
|
||||
@@ -282,6 +283,7 @@ const getPieData = async (id: string) => {
|
||||
checkStateCount[t.checkState]++;
|
||||
}
|
||||
});
|
||||
console.log("Check", checkStateCount)
|
||||
|
||||
// 统计检测结果的数量
|
||||
const checkResultCount: { [key: number]: number } = { 0: 0, 1: 0, 2: 0 };
|
||||
@@ -342,6 +344,7 @@ const planDetail = () => {
|
||||
};
|
||||
//功能选择css切换
|
||||
const handleCheckFunction = (val: any) => {
|
||||
|
||||
editableTabsValue.value = '0';
|
||||
form.value.activeChildTabs = 0;
|
||||
tabsList.value.map((item: any, index: any) => {
|
||||
@@ -353,9 +356,10 @@ const handleCheckFunction = (val: any) => {
|
||||
});
|
||||
|
||||
tabShow.value = false;
|
||||
|
||||
|
||||
switch (val) {
|
||||
case 0://自动检测
|
||||
checkStateTable.value = [0,1,2]
|
||||
tabLabel1.value = "设备检测";
|
||||
break;
|
||||
case 1://手动检测
|
||||
@@ -365,17 +369,19 @@ const handleCheckFunction = (val: any) => {
|
||||
tabLabel1.value = "设备复检";
|
||||
break;
|
||||
case 3://报告生成
|
||||
checkStateTable.value = [2,3]
|
||||
tabLabel1.value = "报告生成";
|
||||
//tabShow.value = true;
|
||||
break;
|
||||
case 4://设备归档
|
||||
checkStateTable.value = [2]
|
||||
tabLabel1.value = "设备归档";
|
||||
break;
|
||||
case 5://数据查询
|
||||
checkStateTable.value = [2,3]
|
||||
tabLabel1.value = "数据查询";
|
||||
break;
|
||||
}
|
||||
|
||||
form.value.activeTabs = val;
|
||||
};
|
||||
|
||||
@@ -397,7 +403,7 @@ onMounted(async () => {
|
||||
const reqPlan: Plan.ReqPlan = {
|
||||
pattern: patternId,
|
||||
datasourceIds: "",
|
||||
sourceIds: [],
|
||||
sourceIds: "",
|
||||
planId: "",
|
||||
scriptName: "",
|
||||
errorSysName: "",
|
||||
@@ -415,12 +421,12 @@ onMounted(async () => {
|
||||
code: 0,
|
||||
state: 0
|
||||
};
|
||||
const planList = await getPlanListByPattern(reqPlan);
|
||||
const planList = await getPlanListByPattern(reqPlan);
|
||||
if (chartsInfoRef.value) {
|
||||
resizeObserver.observe(chartsInfoRef.value);
|
||||
}
|
||||
getTree(planList.data);
|
||||
|
||||
console.log('挂载')
|
||||
//getPieData('');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user