update code

dev
haha 2024-05-08 23:30:14 +08:00
parent b2325f84f3
commit d64d9f6606
3 changed files with 34 additions and 5 deletions

View File

@ -72,9 +72,17 @@ const selectTop12Month=(data,pageNum,pageSize)=>{
data:data
})
}
const selectByApprove=(data,pageNum,pageSize)=>{
return request({
url: `bgscreen/materialSeal/selectByApprove?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'post',
data:data
})
}
export default{
selectTop20,
groupTop12Month,
selectTop12Month,
groupByApprove
groupByApprove,
selectByApprove
}

View File

@ -472,6 +472,7 @@ export default {
this.$refs.msListDlg.showDialog({
deptId: this.dept?.id || 0,
projectId: this.projectInfo?.id || 0,
data:this.materialData
});
},
initMe() {

View File

@ -1,7 +1,11 @@
<template>
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" class="JhbigscreenMaterialSealListDlg">
<template slot="title">材料封样</template>
<el-table :data="tableData" class="mytable" height="700" style="width: 100%;background: transparent;">
<div class="head-title-tab" style="padding: 10px 0px;max-width: unset;">
<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>
<el-table :data="tableData" class="mytable" height="670" style="width: 100%;background: transparent;">
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="单位名称" align="center" prop="deptName" />
<el-table-column label="封样主图" align="center" prop="mainImage" width="220">
@ -56,12 +60,14 @@ export default {
return {
show: false,
tableData: [],
nav: 1,
nav: 0,
index: 1,
size: 10,
deptId: 0,
projectId: 0,
total: 0,
total1:0,
total2:0,
checkStateDicts:[],
};
},
@ -102,15 +108,24 @@ export default {
this.loadData();
},
showDialog(data) {
const func=t=>{
let tmps=data.data.filter(it=>it.name==t);
return tmps.length>0?tmps[0].value:0;
}
this.total1=func("审批中");
this.total2=func("审批通过");
this.deptId = data.deptId;
this.projectId = data.projectId;
this.nav = 1;
this.nav = 0;
this.index = 1;
this.loadData();
this.show = true
},
loadData() {
this.$api.materialSeal.selectTop12Month({ projectId: this.projectId, deptId: this.deptId }, this.index, this.size).then(d => {
this.$api.materialSeal.selectByApprove({
projectId: this.projectId, deptId: this.deptId,
approveStatus:this.nav==0?0:4
}, this.index, this.size).then(d => {
let tmps= d.rows || [];
this.total = d.total;
let func=()=>{
@ -169,5 +184,10 @@ export default {
border-bottom: solid 1px rgba(255,255,255,0.2);
}
}
.head-title-tab{
.head-nav{
padding:0px 16px;
}
}
}
</style>