左侧树点击刷新饼图和表格

This commit is contained in:
sjl
2024-12-16 16:33:18 +08:00
parent 5da07d8631
commit a027dc75c3
3 changed files with 49 additions and 97 deletions

View File

@@ -175,7 +175,6 @@ const handleTabsChange = (val: any) => {
form.value.activeTabs = 0;
form.value.activeTabs = 3;
form.value.activeChildTabs = Number(val);
console.log(val)
}
localStorage.setItem("color", "red");
@@ -222,8 +221,6 @@ watch(
() => form.value,
(val, oldVal) => {
if (val) {
console.log(form.value.activeTabs,111);
if(form.value.activeTabs === 0 )//设备检测
{
@@ -252,7 +249,6 @@ watch(
(val, oldVal) => {
if (val) {
tableRef2.value && tableRef2.value.changeActiveTabs(form.value.activeTabs,form.value.activeChildTabs);
console.log(form.value.activeTabs,form.value.activeChildTabs);
}
},
{
@@ -271,8 +267,8 @@ const chartsData1: any = ref([]),
chartsData2: any = ref([]),
chartsData3: any = ref([]);
const getPieData = async (id: string) => {
console.log('1qaz')
currentId.value = id; // 设置当前ID
handleCheckFunction(0)//切换左侧树默认css功能是设备检测
const boundPqDevList=ref<Device.ResPqDev[]>([])//根据检测计划id查询出所有已绑定的设备
const pqDevList_Result2 = await getBoundPqDevList({'planId': id, 'checkStateList':[0,1,2]});
@@ -346,7 +342,6 @@ const planDetail = () => {
};
//功能选择css切换
const handleCheckFunction = (val: any) => {
console.log('点击了css切换');
editableTabsValue.value = '0';
form.value.activeChildTabs = 0;
tabsList.value.map((item: any, index: any) => {
@@ -361,7 +356,6 @@ console.log('点击了css切换');
switch (val) {
case 0://自动检测
getPieData(currentId.value);
tabLabel1.value = "设备检测";
break;
case 1://手动检测