比对检测计划
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<!-- 真正的首页 -->
|
||||
<template>
|
||||
<div class='static'>
|
||||
<div class='static' ref='popupBaseView'>
|
||||
<el-row :gutter='10'>
|
||||
<el-col :lg='4' :xl='4' :md='4' :sm='4'>
|
||||
<div class='left_tree'>
|
||||
<!-- <tree ref='treeRef' :updateSelectedTreeNode='getPieData || (() => {})' /> -->
|
||||
<tree ref='treeRef' :updateSelectedTreeNode='updateData|| (() => {})' />
|
||||
<tree ref='treeRef' :updateSelectedTreeNode='updateData|| (() => {})' :width="viewWidth" :height="viewHeight" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :lg='20' :xl='20' :md='20' :sm='20'>
|
||||
@@ -29,8 +29,8 @@
|
||||
</div>
|
||||
<!--检测计划统计 饼图统计-->
|
||||
<div class='container_pieShow'>
|
||||
<el-collapse model-value='1' accordion @change='handleCollapseChange'>
|
||||
<el-collapse-item name='1'>
|
||||
<el-collapse model-value='1' accordion @change='handleCollapseChange' >
|
||||
<el-collapse-item name='1' >
|
||||
<template #title>
|
||||
<div class='container_pieShow_title'>
|
||||
<span>检测计划统计</span>
|
||||
@@ -118,6 +118,8 @@ import { type Plan } from '@/api/plan/interface'
|
||||
import type { CollapseModelValue } from 'element-plus/es/components/collapse/src/collapse.mjs'
|
||||
import { type Device } from '@/api/device/interface/device'
|
||||
import { ResultData } from '@/api/interface'
|
||||
import { useViewSize } from '@/hooks/useViewSize'
|
||||
import { map } from 'lodash'
|
||||
|
||||
const planName = ref('')
|
||||
const dictStore = useDictStore()
|
||||
@@ -148,6 +150,7 @@ const tableHeight = ref('calc(100% - 50px)') // 初始高度
|
||||
const planList = ref<ResultData<Plan.ReqPlan[]>>()
|
||||
const select_Plan = ref<Plan.ReqPlan>()
|
||||
const isLabelLineShow = ref(true)
|
||||
const { popupBaseView,viewWidth, viewHeight } = useViewSize()
|
||||
const handleCollapseChange = (val: CollapseModelValue) => {
|
||||
|
||||
// 计算新的高度
|
||||
@@ -302,7 +305,7 @@ const getPieData = async (id: string) => {
|
||||
|
||||
select_Plan.value = plan
|
||||
|
||||
const pqDevList_Result2 = await getBoundPqDevList({ 'planId': id, 'checkStateList': [0, 1, 2, 3] })
|
||||
const pqDevList_Result2 = await getBoundPqDevList({ 'planIdList': [id], 'checkStateList': [0, 1, 2, 3] })
|
||||
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[]
|
||||
// 遍历 boundPqDevList 并更新计数对象
|
||||
boundPqDevList.value.forEach(t => {
|
||||
@@ -409,7 +412,6 @@ const planDetail = () => {
|
||||
|
||||
//功能选择css切换
|
||||
const handleCheckFunction = (val: any) => {
|
||||
|
||||
editableTabsValue.value = '0'
|
||||
form.value.activeChildTabs = 0
|
||||
tabsList.value.map((item: any, index: any) => {
|
||||
@@ -454,8 +456,7 @@ const handleCheckFunction = (val: any) => {
|
||||
const resizeObserver = new ResizeObserver(entries => {
|
||||
for (let entry of entries) {
|
||||
chartsWidth.value = entry.contentRect.width
|
||||
//console.log('Charts Info Width:', chartsWidth.value);
|
||||
|
||||
|
||||
pieRef1.value?.reSize(chartsWidth.value * 0.95, 180, true)
|
||||
pieRef2.value?.reSize(chartsWidth.value * 0.95, 180, true)
|
||||
pieRef3.value?.reSize(chartsWidth.value * 0.95, 180, true)
|
||||
@@ -485,11 +486,21 @@ const initPlan = async () => {
|
||||
result: 0,
|
||||
code: 0,
|
||||
state: 0,
|
||||
standardDevNameStr: '',
|
||||
associateReport: 0,
|
||||
reportTemplateName: '',
|
||||
reportTemplateVersion: '',
|
||||
dataRule: '',
|
||||
testItemNameStr:'',
|
||||
testItems: [],
|
||||
standardDevIdList:[],
|
||||
standardDevMap: new Map<string, number>(),
|
||||
}
|
||||
planList.value = (await getPlanListByPattern(reqPlan)) as ResultData<Plan.ReqPlan[]>
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
await initPlan()
|
||||
for (let i = 0; i < planList.value.data.length; i++) {
|
||||
if (Array.isArray(planList.value.data[i].children) && planList.value.data[i].children.length > 0) {
|
||||
@@ -646,7 +657,7 @@ const handleBatchGenerate = async () => {
|
||||
justify-content: space-between;
|
||||
padding: 0 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
width: 99%;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user