# frontend/src/views/home/components/table.vue

#	frontend/src/views/home/tabs/dashboard.vue
This commit is contained in:
sjl
2024-12-17 11:36:02 +08:00
6 changed files with 76 additions and 27 deletions

View File

@@ -96,12 +96,12 @@
</div>
</el-tab-pane>
<el-tab-pane label="已检设备" v-if="tabShow" :style="{ height: tabPaneHeight }">
<!-- 列表数据 -->
<div class="container_table" :style="{ height: tableHeight }">
<Table ref="tableRef2" :id='currentId'></Table>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="已检设备" v-if="tabShow" :style="{ height: tabPaneHeight }">-->
<!-- &lt;!&ndash; 列表数据 &ndash;&gt;-->
<!-- <div class="container_table" :style="{ height: tableHeight }">-->
<!-- <Table ref="tableRef2" :id='currentId'></Table>-->
<!-- </div>-->
<!-- </el-tab-pane>-->
</el-tabs>
</div>
</div>
@@ -272,7 +272,11 @@ const getPieData = async (id: string) => {
currentId.value = id; // 设置当前ID
//handleCheckFunction(0)//切换左侧树默认css功能是设备检测
const boundPqDevList=ref<Device.ResPqDev[]>([])//根据检测计划id查询出所有已绑定的设备
<<<<<<< HEAD
const pqDevList_Result2 = await getBoundPqDevList({'planId': id,'checkStateList':[0,1,2,3]});
=======
const pqDevList_Result2 = await getBoundPqDevList({'planId': id,'checkStateList':[0,1,2]});
>>>>>>> 07d02307e2507c32fc2b3c8b745b074d7a9bb74d
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[];
console.log('饼图列',boundPqDevList)
// 初始化计数对象
@@ -398,7 +402,7 @@ const resizeObserver = new ResizeObserver(entries => {
}
});
onMounted(async () => {
onBeforeMount(async () => {
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id ?? ''//获取数据字典中对应的id
const reqPlan: Plan.ReqPlan = {
pattern: patternId,
@@ -421,7 +425,15 @@ onMounted(async () => {
code: 0,
state: 0
};
<<<<<<< HEAD
const planList = await getPlanListByPattern(reqPlan);
=======
// debugger;
const planList = await getPlanListByPattern(reqPlan);
if (planList.data[0].children[0]) {
currentId.value = planList.data[0].children[0].id;
}
>>>>>>> 07d02307e2507c32fc2b3c8b745b074d7a9bb74d
if (chartsInfoRef.value) {
resizeObserver.observe(chartsInfoRef.value);
}