通道配对
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
<el-tab-pane :label='tabLabel1' :style='{ height: tabPaneHeight}'>
|
||||
<!-- 列表数据 -->
|
||||
<div class='container_table' :style='{ height: tableHeight }'>
|
||||
<Table ref='tableRef1' :id='currentId' :plan = 'select_Plan' @batchGenerateClicked="handleBatchGenerate"></Table>
|
||||
<Table ref='tableRef1' :id='currentId' :plan ='select_Plan' :planArray = 'planList2?.data' @batchGenerateClicked="handleBatchGenerate"></Table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -148,6 +148,7 @@ const tabPaneHeight = ref('calc(100% - 5px)') // 初始高度
|
||||
const tableHeight = ref('calc(100% - 50px)') // 初始高度
|
||||
|
||||
const planList = ref<ResultData<Plan.ReqPlan[]>>()
|
||||
const planList2 = ref<ResultData<Plan.ReqPlan[]>>()//备份含子计划的结构
|
||||
const select_Plan = ref<Plan.ReqPlan>()
|
||||
const isLabelLineShow = ref(true)
|
||||
const { popupBaseView,viewWidth, viewHeight } = useViewSize()
|
||||
@@ -205,7 +206,6 @@ const tableRef1 = ref()
|
||||
const tableRef2 = ref()
|
||||
const currentId = ref('')
|
||||
|
||||
|
||||
watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {
|
||||
@@ -244,15 +244,13 @@ watch(
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
||||
const pieRef1 = ref(),
|
||||
pieRef2 = ref(),
|
||||
pieRef3 = ref()
|
||||
pieRef2 = ref(),
|
||||
pieRef3 = ref()
|
||||
|
||||
const chartsData1: any = ref([]),
|
||||
chartsData2: any = ref([]),
|
||||
chartsData3: any = ref([])
|
||||
chartsData2: any = ref([]),
|
||||
chartsData3: any = ref([])
|
||||
|
||||
const findPlanById = (plans: Plan.ReqPlan[], id: string): Plan.ReqPlan | undefined => {
|
||||
for (const plan of plans) {
|
||||
@@ -301,10 +299,12 @@ const getPieData = async (id: string) => {
|
||||
if (id) {
|
||||
const boundPqDevList = ref<Device.ResPqDev[]>([])//根据检测计划id查询出所有已绑定的设备
|
||||
const plan = findPlanById(planList.value, id)
|
||||
console.log('所选计划:',plan)
|
||||
|
||||
planName.value = '所选计划:' + plan.name
|
||||
|
||||
|
||||
|
||||
select_Plan.value = plan
|
||||
console.log('所选计划:',plan)
|
||||
|
||||
const pqDevList_Result2 = await getBoundPqDevList({ 'planIdList': [id], 'checkStateList': [0, 1, 2, 3] })
|
||||
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[]
|
||||
@@ -325,7 +325,6 @@ const getPieData = async (id: string) => {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// 检查 checkStateCount 是否全为 0
|
||||
if(boundPqDevList.value.length != 0){
|
||||
|
||||
@@ -379,12 +378,7 @@ const getPieData = async (id: string) => {
|
||||
{ value: 0 , itemStyle: { color: '#eeeeee' } },
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
planName.value = '所选计划:'
|
||||
}
|
||||
|
||||
@@ -497,8 +491,8 @@ const initPlan = async () => {
|
||||
standardDevIds:[],
|
||||
standardDevMap: new Map<string, number>(),
|
||||
}
|
||||
planList.value = (await getPlanListByPattern(reqPlan)) as ResultData<Plan.ReqPlan[]>
|
||||
|
||||
planList2.value = (await getPlanListByPattern(reqPlan)) as ResultData<Plan.ReqPlan[]>
|
||||
planList.value = JSON.parse(JSON.stringify(planList2.value));
|
||||
planList.value = planList.value.data.map((item: any) => {
|
||||
if (item.children) {
|
||||
item.children = item.children.filter(child => child.pid === '0');
|
||||
|
||||
Reference in New Issue
Block a user