Prechádzať zdrojové kódy

fix: 系统租户车间列表为空,但是平台统计应该显示

sunhongyao341504 1 rok pred
rodič
commit
23eb1e14d4

+ 2 - 6
src/views/datamanager/platformdata/components/query/Query.vue

@@ -3,7 +3,7 @@
     <el-button type="primary" @click="showWorkshopData()">车间统计数据</el-button>
     <el-button type="primary" @click="showCameraData()">相机统计数据</el-button>
     <QueryTable
-      v-if="flattenedWorkshops.length > 0 && tableData !== undefined"
+      v-if="tableData !== undefined"
       :department-list="departmentList"
       :workshop-list="flattenedWorkshops"
       :table-data="tableData"
@@ -62,11 +62,7 @@
   onMounted(() => {
     getScenesTree({ level: 1, valueKey: 'code', labelKey: 'name', disabled: true });
     getAllDepartments().then((res) => {
-      departmentList.value = calculateTreeData(
-        res,
-        { level: 3, valueKey: 'id', labelKey: 'deptName' },
-        1,
-      );
+      departmentList.value = calculateTreeData(res, { level: 3, valueKey: 'id', labelKey: 'deptName' }, 1);
     });
   });