update code

prv
haha 2024-04-08 01:54:38 +08:00
parent 5a81054d06
commit 1b4bde84fe
5 changed files with 17 additions and 14 deletions

View File

@ -7,7 +7,7 @@ const selectYearAndMonth=(data)=> {
url: `/bgscreen/costOut/selectYearAndMonth`,
method: 'post',
data:data
}).then(d=>{
}).then(d=>{
const getValue=(tmps,type)=>{
let objs=tmps.filter(d=>d.costType==type);
return objs.length>0?objs[0]:{};

View File

@ -46,7 +46,14 @@
<div class="glr-login-number analyse-login-numbe">
<div><img src="images/text_red_spot.png" />{{ item.name }}</div>
<div class="glr-rate-value glr-rate-red-value">
<span>{{ item.data }}/{{ item.total }}</span>
<template v-if="idx==0">
<span style="color: #c0dafb">{{ item.total }}</span>
</template>
<template v-else>
<span>{{ item.data }}</span>/
<span style="color: #c0dafb">{{item.total }}</span>
</template>
</div>
</div>
</div>

View File

@ -495,6 +495,7 @@ export default {
this.elKey++;
this.onWarningInfoNav(0);
this.sumCostOutByDeptId();
this.groupByProjectCategory(this.deptInfo.id);
}));
this.$bus.$on("deptChange", debounce(dept => {
@ -591,7 +592,7 @@ export default {
this.$refs.dlg2.showDetailDialog(this.prjProcessNav,idx,this.deptInfo);
}
},
sumCostOutByDeptId() {
sumCostOutByDeptId() {
let dt = this.$dt(new Date());
let postData = {
year: dt.$y,
@ -602,13 +603,7 @@ export default {
postData.projectId = this.prj.id;
} else {
postData.id = this.deptInfo.id;
}
if (this.callSumCostTime) {
if (+new Date() - this.callSumCostTime < 400) {
return;
}
}
this.callSumCostTime = +new Date();
}
this.$api.costOut.sumByDeptId(postData).then(d => {
this.sumCost = d;
});

View File

@ -883,12 +883,13 @@ export default {
}
return "";
},
getCurProject() {
getCurProject() {
if (!this.project) {
return {};
}
if (this.project.id == 0) {
if (this.prjs.length > 1) {
return this.prjs[1];
}
return {};
@ -992,7 +993,7 @@ export default {
this.$api.costOut.selectYearAndMonth({
projectId: id,
year: dt.$y,
month: dt.$M
month: dt.$M+1
}).then(d => {
d.totalMonth = d.totalMonth.toFixed(2);
d.totalYear = d.totalYear.toFixed(2);

View File

@ -38,8 +38,8 @@ module.exports = defineConfig({
},
'/jhapi':{
//target: `http://62.234.3.186/jhapi/`,
//target: `http://127.0.0.1:8090/jhapi/`,
target: `http://szgc.jhncidg.com/jhapi/`,
target: `http://127.0.0.1:8090/jhapi/`,
//target: `http://szgc.jhncidg.com/jhapi/`,
changeOrigin: true,
pathRewrite: {
'^/jhapi':'/'