update code
parent
17fb41850d
commit
7a22ca579b
|
@ -36,6 +36,35 @@ const groupTop12Month=data=>{
|
|||
});
|
||||
});
|
||||
}
|
||||
const groupByApprove=data=>{
|
||||
return new Promise(resolve=>{
|
||||
return request({
|
||||
url: `bgscreen/materialSeal/groupByApprove`,
|
||||
method: 'post',
|
||||
data:data
|
||||
}).then(d=>{
|
||||
let sum1=0;//审批中 非4
|
||||
let sum2=0;//审批通过 4
|
||||
let sum3=0;//合计
|
||||
(d.data||[]).forEach(it=>{
|
||||
let cnt=(it.id||0);
|
||||
sum3+=cnt;
|
||||
if(it.projectId==4){
|
||||
sum2+=cnt;
|
||||
}else{
|
||||
sum1+=cnt;
|
||||
}
|
||||
});
|
||||
resolve( {
|
||||
sum:sum3,
|
||||
data:[
|
||||
{name:"审批中",value:sum1},
|
||||
{name:"审批通过",value:sum2},
|
||||
]
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
const selectTop12Month=(data,pageNum,pageSize)=>{
|
||||
return request({
|
||||
url: `bgscreen/materialSeal/selectTop12Month?pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||
|
@ -46,5 +75,6 @@ const selectTop12Month=(data,pageNum,pageSize)=>{
|
|||
export default{
|
||||
selectTop20,
|
||||
groupTop12Month,
|
||||
selectTop12Month
|
||||
selectTop12Month,
|
||||
groupByApprove
|
||||
}
|
|
@ -49,8 +49,8 @@
|
|||
<el-table-column type="index" width="40">
|
||||
<template slot-scope="scope">
|
||||
<div :class="scope.$index < 3 && +scope.row.value > 0
|
||||
? 'idle-list-color'
|
||||
: ''
|
||||
? 'idle-list-color'
|
||||
: ''
|
||||
">
|
||||
{{ scope.$index + 1 }}
|
||||
</div>
|
||||
|
@ -61,8 +61,8 @@
|
|||
<el-table-column prop="prop" label="占比">
|
||||
<template slot-scope="scope">
|
||||
<idle-list-chart :prop="Number(scope.row.prop)" :color="scope.$index < 3 && +scope.row.id > 0
|
||||
? '#f05e35'
|
||||
: '#6ab9fe'
|
||||
? '#f05e35'
|
||||
: '#6ab9fe'
|
||||
"></idle-list-chart>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -90,8 +90,8 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<module-one-1-1 label="材料进场取样复试" style="position: relative">
|
||||
<img v-if="prjs.length>1" src="images/icon2001.png" style="position: absolute; cursor: pointer; right: 12px; top: 12px"
|
||||
@click="doShowCheckDetectionDlg" />
|
||||
<img v-if="prjs.length > 1" src="images/icon2001.png"
|
||||
style="position: absolute; cursor: pointer; right: 12px; top: 12px" @click="doShowCheckDetectionDlg" />
|
||||
<div class="warning-info">
|
||||
<div class="warning-info-title">
|
||||
<div :class="samplingNav == 0 ? 'active' : ''" @click="checkDetection(0)">
|
||||
|
@ -204,14 +204,15 @@
|
|||
</div>
|
||||
</module-one-1-1>
|
||||
<module-one-1-1 label="材料封样" style="position: relative">
|
||||
<materialSealChart :height="280" :optData="materialSealList" :key="'ms' + materialSealEl">
|
||||
</materialSealChart>
|
||||
<img src="images/icon2001.png" v-if="prjs.length>1" style="position: absolute; cursor: pointer; right: 12px; top: 12px"
|
||||
@click="showMaterialSealDlg" />
|
||||
<img src="images/icon2001.png" v-if="prjs.length > 1"
|
||||
style="position: absolute; cursor: pointer; right: 12px; top: 12px" @click="showMaterialSealDlg" />
|
||||
<project-overview-chart :key="materialKey" :sp="'\n'" :maintitle="materialTotal"
|
||||
:legend-opt="materialLegendOpt" txtTop="12" :typedata="materialData" :text="'封样总数'" :height="260"
|
||||
gifTop="77px" style="top: 30px"></project-overview-chart>
|
||||
</module-one-1-1>
|
||||
<module-one-1-1 label="实测实量" :key="elCheck" style="position: relative">
|
||||
<img src="images/icon2001.png" v-if="prjs.length>1" style="position: absolute; cursor: pointer; right: 12px; top: 12px"
|
||||
@click="doShowMeasuredDlg" />
|
||||
<img src="images/icon2001.png" v-if="prjs.length > 1"
|
||||
style="position: absolute; cursor: pointer; right: 12px; top: 12px" @click="doShowMeasuredDlg" />
|
||||
<div class="warning-info-title warning-info-title_div measured-data-list"
|
||||
style="padding-left: 2px; position: relative; z-index: 9">
|
||||
<div :class="measuredNav == 0 ? 'active' : ''" @click="doMeasuredNav(0, '汇总')">
|
||||
|
@ -346,6 +347,10 @@ export default {
|
|||
sum: 0,
|
||||
okSum: 100,
|
||||
},
|
||||
//材料封样
|
||||
materialKey: 0,
|
||||
materialTotal: "0",
|
||||
materialData: [],
|
||||
acceptanceData: [],
|
||||
summary: [],
|
||||
summaryTotal: 0,
|
||||
|
@ -356,31 +361,12 @@ export default {
|
|||
chk2: 0,
|
||||
chk3: 0,
|
||||
percent: 100,
|
||||
},
|
||||
materialLegendOpt: {
|
||||
|
||||
},
|
||||
legendOptCheck: {
|
||||
icon: "rect",
|
||||
orient: "horizontal",
|
||||
itemWidth: "50%",
|
||||
left: 240,
|
||||
right: "10%",
|
||||
itemWidth: 20,
|
||||
itemGap: 20,
|
||||
itemHeight: 20,
|
||||
textStyle: {
|
||||
padding: [0, 0, 2, 0],
|
||||
fontSize: 10,
|
||||
color: "#c3dbfd",
|
||||
rich: {
|
||||
name: {
|
||||
color: "#c3dbfd",
|
||||
padding: [5, 2, 5, 2],
|
||||
},
|
||||
percent: {
|
||||
color: "#4676FD",
|
||||
padding: [0, 2, 0, 2],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
|
@ -418,11 +404,39 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.init();
|
||||
let obj = {
|
||||
icon: "rect",
|
||||
orient: "horizontal",
|
||||
itemWidth: "50%",
|
||||
left: 240,
|
||||
right: "10%",
|
||||
itemWidth: 20,
|
||||
itemGap: 20,
|
||||
itemHeight: 20,
|
||||
textStyle: {
|
||||
padding: [0, 0, 2, 0],
|
||||
fontSize: 10,
|
||||
color: "#c3dbfd",
|
||||
rich: {
|
||||
name: {
|
||||
color: "#c3dbfd",
|
||||
padding: [5, 2, 5, 2],
|
||||
},
|
||||
percent: {
|
||||
color: "#4676FD",
|
||||
padding: [0, 2, 0, 2],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
this.legendOptCheck = {...obj};
|
||||
this.materialLegendOpt = {...obj};
|
||||
this.materialLegendOpt.itemWidth=50;
|
||||
},
|
||||
mounted() {
|
||||
let dt1=this.$dt((+new Date())-30*24*3600*1000);
|
||||
let dt2=this.$dt(new Date());
|
||||
this.selDate=[dt1,dt2];
|
||||
let dt1 = this.$dt((+new Date()) - 30 * 24 * 3600 * 1000);
|
||||
let dt2 = this.$dt(new Date());
|
||||
this.selDate = [dt1, dt2];
|
||||
this.$bus.$on(
|
||||
"loadProjects",
|
||||
debounce((prjs) => {
|
||||
|
@ -436,7 +450,7 @@ export default {
|
|||
this.doDeptChane();
|
||||
this.checkDetection(0);
|
||||
this.doMeasuredNav(0, "汇总");
|
||||
this.selectTop20materialSeal();
|
||||
this.groupByApprove();
|
||||
})
|
||||
);
|
||||
this.$bus.$on(
|
||||
|
@ -446,7 +460,7 @@ export default {
|
|||
this.doDeptChane();
|
||||
this.checkDetection(0);
|
||||
this.doMeasuredNav(0, "汇总");
|
||||
this.selectTop20materialSeal();
|
||||
this.groupByApprove();
|
||||
})
|
||||
);
|
||||
if (this.$root.hasInitHeader) {
|
||||
|
@ -467,7 +481,7 @@ export default {
|
|||
this.doDeptChane();
|
||||
this.checkDetection(0);
|
||||
this.doMeasuredNav(0, "汇总");
|
||||
this.selectTop20materialSeal();
|
||||
this.groupByApprove();
|
||||
},
|
||||
doShowCheckDetectionDlg() {
|
||||
this.$refs.chkDetectionDlg.showDialog({
|
||||
|
@ -486,6 +500,16 @@ export default {
|
|||
showMaterialSeal(it) {
|
||||
this.$refs.msDlg.showDialog(it);
|
||||
},
|
||||
groupByApprove() {
|
||||
let postData = {};
|
||||
postData.deptId = this.dept?.id || 0;
|
||||
postData.projectId = this.projectInfo?.id || 0;
|
||||
this.$api.materialSeal.groupByApprove(postData).then((d) => {
|
||||
this.materialTotal = "" + d.sum;
|
||||
this.materialData = d.data;
|
||||
this.materialKey++;
|
||||
});
|
||||
},
|
||||
selectTop20materialSeal() {
|
||||
let postData = {};
|
||||
postData.deptId = this.dept?.id || 0;
|
||||
|
|
Loading…
Reference in New Issue