update code

dev
haha 2024-05-09 00:25:51 +08:00
parent d64d9f6606
commit cc39bab608
3 changed files with 23 additions and 8 deletions

View File

@ -409,7 +409,7 @@ export default {
d.percent = (d.value * 100.0 / sum).toFixed(2); d.percent = (d.value * 100.0 / sum).toFixed(2);
}); });
} }
this.label2 = `项目审批排名 (${sum})` this.label2 = `工程审批排名 (${sum})`
let objs = []; let objs = [];
let prjIds = this.prjs.map(d => d.id).filter(d => d > 0); let prjIds = this.prjs.map(d => d.id).filter(d => d > 0);
tmps.forEach(d => { tmps.forEach(d => {
@ -421,10 +421,10 @@ export default {
let out = objs.filter(d => d.id == this.project.id); let out = objs.filter(d => d.id == this.project.id);
if (out.length == 0) { if (out.length == 0) {
this.flowList = [{ id: this.project.id, name: this.project.projectName, value: 0, percent: 0, no: '-' }]; this.flowList = [{ id: this.project.id, name: this.project.projectName, value: 0, percent: 0, no: '-' }];
this.label2 = `项目审批排名 (0)` this.label2 = `工程审批排名 (0)`
} else { } else {
this.flowList = out; this.flowList = out;
this.label2 = `项目审批排名 (${out[0].value})` this.label2 = `工程审批排名 (${out[0].value})`
} }
} else { } else {
this.flowList = objs; this.flowList = objs;

View File

@ -489,6 +489,7 @@ export default {
deptId: this.dept?.id || 0, deptId: this.dept?.id || 0,
projectId: this.projectInfo.id, projectId: this.projectInfo.id,
checkType: this.samplingNav, checkType: this.samplingNav,
data:this.chkDetection
}); });
}, },
doShowMeasuredDlg() { doShowMeasuredDlg() {

View File

@ -34,8 +34,12 @@
</svg> </svg>
</i> </i>
</div> </div>
<div class="head-title-tab" style="padding: 10px 0px;max-width: unset;margin-top:10px;margin-left:40px;">
<div :class="nav == 0 ? 'head-nav active' : 'head-nav'" @click="doNav(0)">({{ total1}})</div>
<div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(1)">({{ total2}})</div>
</div>
<template v-if="dataTable.length>0"> <template v-if="dataTable.length>0">
<div class="data-list scroll" style="max-height:730px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;" > <div class="data-list scroll" style="max-height:670px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;" >
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item" <div v-for="(it, idx) in dataTable" :key="idx" class="data-item"
:class="it.timeout ? 'time-out' : ''"> :class="it.timeout ? 'time-out' : ''">
<div class="item-left"> <div class="item-left">
@ -168,10 +172,13 @@ export default {
title:'', title:'',
size: 10, size: 10,
index: 1, index: 1,
nav:0,
total: 0, total: 0,
show: false, show: false,
dataTable: [], dataTable: [],
opt:{} opt:{},
total1:0,
total2:0,
}; };
}, },
@ -192,13 +199,21 @@ export default {
toggleNav(n) { toggleNav(n) {
this.nav = n; this.nav = n;
}, },
doNav(n){
this.nav=n;
this.loadData();
},
showDialog(opt) { showDialog(opt) {
this.show = true this.show = true
this.nav=0;
this.opt=opt; this.opt=opt;
this.total1=opt.data.chk1*1-opt.data.chk3*1;
this.total2=opt.data.chk3;
this.loadData(); this.loadData();
}, },
loadData(){ loadData(){
this.$api.checkDetection.getList({ this.$api.checkDetection.getList({
detectionResult:this.nav==0?0:1,
...this.opt ...this.opt
},this.size,this.index).then(d=>{ },this.size,this.index).then(d=>{
this.total=d.total||0; this.total=d.total||0;
@ -232,8 +247,7 @@ export default {
top: 20px; top: 20px;
right: 100px; right: 100px;
} }
} }
&.font-size-2 { &.font-size-2 {
.head-title-tab { .head-title-tab {
.head-nav { .head-nav {
@ -286,7 +300,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
display: inline-block; display: inline-block;
width: auto; width: auto;
padding: 0px 24px; padding: 0px 32px;
} }
} }