默认选中第一条检测计划
This commit is contained in:
@@ -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 }">-->
|
||||
<!-- <!– 列表数据 –>-->
|
||||
<!-- <div class="container_table" :style="{ height: tableHeight }">-->
|
||||
<!-- <Table ref="tableRef2" :id='currentId'></Table>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
@@ -271,7 +271,7 @@ const getPieData = async (id: string) => {
|
||||
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]});
|
||||
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[];
|
||||
|
||||
// 初始化计数对象
|
||||
@@ -392,7 +392,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,
|
||||
@@ -415,7 +415,11 @@ onMounted(async () => {
|
||||
code: 0,
|
||||
state: 0
|
||||
};
|
||||
// debugger;
|
||||
const planList = await getPlanListByPattern(reqPlan);
|
||||
if (planList.data[0].children[0]) {
|
||||
currentId.value = planList.data[0].children[0].id;
|
||||
}
|
||||
if (chartsInfoRef.value) {
|
||||
resizeObserver.observe(chartsInfoRef.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user