微调
This commit is contained in:
@@ -328,11 +328,15 @@ const checkStatus: Dict[] = [
|
|||||||
const checkReportStatus: Dict[] = [
|
const checkReportStatus: Dict[] = [
|
||||||
{
|
{
|
||||||
id: "0",
|
id: "0",
|
||||||
label: '已生成',
|
label: '未生成',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "1",
|
id: "1",
|
||||||
label: '未生成',
|
label: '已生成',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
label: '未检',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
//检测结果数组
|
//检测结果数组
|
||||||
@@ -379,8 +383,9 @@ const proTable = ref<ProTableInstance>();
|
|||||||
const boundPqDevList=ref<Device.ReqPqDevParams[]>([])//根据检测计划id查询出所有已绑定的设备
|
const boundPqDevList=ref<Device.ReqPqDevParams[]>([])//根据检测计划id查询出所有已绑定的设备
|
||||||
|
|
||||||
const getTableList = async (params: any) => {
|
const getTableList = async (params: any) => {
|
||||||
<<<<<<< HEAD
|
console.log('activeTabs',form.activeTabs)
|
||||||
const checkStateList = ref<any>()
|
if(props.id){
|
||||||
|
const checkStateList = ref<any>()
|
||||||
if(form.value.checkStatus != null){
|
if(form.value.checkStatus != null){
|
||||||
checkStateList.value = [form.value.checkStatus]
|
checkStateList.value = [form.value.checkStatus]
|
||||||
}else{
|
}else{
|
||||||
@@ -389,17 +394,11 @@ const getTableList = async (params: any) => {
|
|||||||
return getBoundPqDevList({'planId': props.id,
|
return getBoundPqDevList({'planId': props.id,
|
||||||
'checkStateList': checkStateList.value,
|
'checkStateList': checkStateList.value,
|
||||||
'checkResult': form.value.checkResult,
|
'checkResult': form.value.checkResult,
|
||||||
'reportState ': form.value.checkReportStatus,
|
'reportState': form.value.checkReportStatus,
|
||||||
'name':form.value.search
|
'name':form.value.search
|
||||||
});
|
});
|
||||||
=======
|
|
||||||
debugger
|
|
||||||
if(props.id) {
|
|
||||||
// const pqDevList_Result2 = await getBoundPqDevList({'planId': props.id,'checkStateList':[0,1,2]});
|
|
||||||
// boundPqDevList.value = pqDevList_Result2.data as Device.ReqPqDevParams[];
|
|
||||||
return getBoundPqDevList({'planId': props.id,'checkStateList':[0,1,2]});
|
|
||||||
}
|
}
|
||||||
>>>>>>> 07d02307e2507c32fc2b3c8b745b074d7a9bb74d
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -478,10 +477,20 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
sortable:true,
|
sortable:true,
|
||||||
render: scope => {
|
render: scope => {
|
||||||
return (
|
if (scope.row.reportState === 0)
|
||||||
scope.row.checkState === 0 ? '已生成' : '未生成'
|
{
|
||||||
)
|
return '未生成';
|
||||||
},
|
}
|
||||||
|
else if (scope.row.reportState === 1)
|
||||||
|
{
|
||||||
|
return '已生成';
|
||||||
|
}
|
||||||
|
else if (scope.row.reportState === 2)
|
||||||
|
{
|
||||||
|
return '未检';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'documentState',
|
prop: 'documentState',
|
||||||
@@ -491,7 +500,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
isShow: documentStateShow,
|
isShow: documentStateShow,
|
||||||
render: scope => {
|
render: scope => {
|
||||||
return (
|
return (
|
||||||
scope.row.documentState === 0 ? '未归档' : '归档'
|
scope.row.documentState === 0 ? '未归档' : '已归档'
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ import Table from "../components/table.vue";
|
|||||||
//import { data } from "@/api/plan/static.json";
|
//import { data } from "@/api/plan/static.json";
|
||||||
import deviceDataList from '@/api/device/device/deviceData'
|
import deviceDataList from '@/api/device/device/deviceData'
|
||||||
import {getPlanListByPattern } from '@/api/plan/plan.ts'
|
import {getPlanListByPattern } from '@/api/plan/plan.ts'
|
||||||
import { onMounted, onUnmounted, ref, watch } from "vue";
|
import { onBeforeMount, onMounted, onUnmounted, ref, watch } from "vue";
|
||||||
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import { type Plan } from "@/api/plan/interface";
|
import { type Plan } from "@/api/plan/interface";
|
||||||
@@ -272,13 +272,10 @@ const getPieData = async (id: string) => {
|
|||||||
currentId.value = id; // 设置当前ID
|
currentId.value = id; // 设置当前ID
|
||||||
//handleCheckFunction(0)//切换左侧树,默认css功能是设备检测
|
//handleCheckFunction(0)//切换左侧树,默认css功能是设备检测
|
||||||
const boundPqDevList=ref<Device.ResPqDev[]>([])//根据检测计划id查询出所有已绑定的设备
|
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,3]});
|
||||||
=======
|
|
||||||
const pqDevList_Result2 = await getBoundPqDevList({'planId': id,'checkStateList':[0,1,2]});
|
|
||||||
>>>>>>> 07d02307e2507c32fc2b3c8b745b074d7a9bb74d
|
|
||||||
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[];
|
boundPqDevList.value = pqDevList_Result2.data as Device.ResPqDev[];
|
||||||
console.log('饼图列',boundPqDevList)
|
console.log('饼图列',boundPqDevList)
|
||||||
// 初始化计数对象
|
// 初始化计数对象
|
||||||
const checkStateCount: { [key: number]: number } = { 0: 0, 1: 0, 2: 0, 3: 0 };
|
const checkStateCount: { [key: number]: number } = { 0: 0, 1: 0, 2: 0, 3: 0 };
|
||||||
// 遍历 boundPqDevList 并更新计数对象
|
// 遍历 boundPqDevList 并更新计数对象
|
||||||
@@ -314,14 +311,14 @@ console.log('饼图列',boundPqDevList)
|
|||||||
{ value: checkStateCount[3], name: "归档", itemStyle: { color: '#5470c6' } },
|
{ value: checkStateCount[3], name: "归档", itemStyle: { color: '#5470c6' } },
|
||||||
];
|
];
|
||||||
chartsData2.value = [
|
chartsData2.value = [
|
||||||
{ value: checkResultCount[0], name: "未检" , itemStyle: { color: '#fac858' } },
|
{ value: checkResultCount[2], name: "未检" , itemStyle: { color: '#fac858' } },
|
||||||
{ value: checkResultCount[1], name: "不符合" , itemStyle: { color: '#ee6666' } },
|
{ value: checkResultCount[0], name: "不符合" , itemStyle: { color: '#ee6666' } },
|
||||||
{ value: checkResultCount[2], name: "符合", itemStyle: { color: '#91cc75' } },
|
{ value: checkResultCount[1], name: "符合", itemStyle: { color: '#91cc75' } },
|
||||||
];
|
];
|
||||||
chartsData3.value = [
|
chartsData3.value = [
|
||||||
{ value: reportStateCount[0], name: "未检" , itemStyle: { color: '#fac858' } },
|
{ value: reportStateCount[2], name: "未检" , itemStyle: { color: '#fac858' } },
|
||||||
{ value: reportStateCount[1], name: "未生成" , itemStyle: { color: '#ee6666' } },
|
{ value: reportStateCount[0], name: "未生成" , itemStyle: { color: '#ee6666' } },
|
||||||
{ value: reportStateCount[2], name: "已生成", itemStyle: { color: '#91cc75' } },
|
{ value: reportStateCount[1], name: "已生成", itemStyle: { color: '#91cc75' } },
|
||||||
];
|
];
|
||||||
|
|
||||||
pieRef1.value.init();
|
pieRef1.value.init();
|
||||||
@@ -425,15 +422,12 @@ onBeforeMount(async () => {
|
|||||||
code: 0,
|
code: 0,
|
||||||
state: 0
|
state: 0
|
||||||
};
|
};
|
||||||
<<<<<<< HEAD
|
|
||||||
const planList = await getPlanListByPattern(reqPlan);
|
|
||||||
=======
|
|
||||||
// debugger;
|
// debugger;
|
||||||
const planList = await getPlanListByPattern(reqPlan);
|
const planList = await getPlanListByPattern(reqPlan);
|
||||||
if (planList.data[0].children[0]) {
|
if (planList.data[0].children[0]) {
|
||||||
currentId.value = planList.data[0].children[0].id;
|
currentId.value = planList.data[0].children[0].id;
|
||||||
}
|
}
|
||||||
>>>>>>> 07d02307e2507c32fc2b3c8b745b074d7a9bb74d
|
|
||||||
if (chartsInfoRef.value) {
|
if (chartsInfoRef.value) {
|
||||||
resizeObserver.observe(chartsInfoRef.value);
|
resizeObserver.observe(chartsInfoRef.value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user