update code
parent
4e136ec744
commit
8642883461
|
@ -0,0 +1,53 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
const selectYearAndMonth=(data)=> {
|
||||||
|
return new Promise(reslove=>{
|
||||||
|
request({
|
||||||
|
url: `/bgscreen/costOut/selectYearAndMonth`,
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
}).then(d=>{
|
||||||
|
const getValue=(tmps,type)=>{
|
||||||
|
let objs=tmps.filter(d=>d.costType==type);
|
||||||
|
return objs.length>0?objs[0]:{};
|
||||||
|
}
|
||||||
|
let tmps=(d.data||[]).map(it=>{
|
||||||
|
it.money=it.money?it.money/10000.0:0;
|
||||||
|
return it;
|
||||||
|
});
|
||||||
|
let y=data.year;
|
||||||
|
let m=data.month;
|
||||||
|
let curM=tmps.filter(it=>it.costType==9 && it.year==y && it.month==m);
|
||||||
|
curM=curM.length>0?curM[0]:{};
|
||||||
|
let totalObjs=tmps.filter(it=>it.costType==9);
|
||||||
|
let total=0;
|
||||||
|
totalObjs.forEach(it=>{
|
||||||
|
total+=(it.money?it.money:0)
|
||||||
|
});
|
||||||
|
totalObjs=tmps.filter(it=>it.costType==9 && it.year==y);
|
||||||
|
let totalY=0;
|
||||||
|
totalObjs.forEach(it=>{
|
||||||
|
totalY+=(it.money?it.money:0)
|
||||||
|
});
|
||||||
|
let obj={
|
||||||
|
totalInv:getValue(tmps,1).money||0,//总投资
|
||||||
|
curYear:getValue(tmps,2).money||0,//年总投资
|
||||||
|
contract1:getValue(tmps,3).money||0,//合同金额
|
||||||
|
contract2:getValue(tmps,4).money||0,//合同支付金额
|
||||||
|
contract3:getValue(tmps,5).money||0,//合同挂账金额
|
||||||
|
safety1:getValue(tmps,6).money||0,//安措金额
|
||||||
|
safety2:getValue(tmps,7).money||0,//安措支付金额
|
||||||
|
safety3:getValue(tmps,8).money||0,//安措挂账金额
|
||||||
|
curMonth:curM.money||0,//当月投资
|
||||||
|
totalMonth:total,//开累投资
|
||||||
|
totalYear:totalY,//本年完成
|
||||||
|
}
|
||||||
|
reslove(obj);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default{
|
||||||
|
selectYearAndMonth
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ import buildNode from './buildNode'
|
||||||
import projectChecking from './projectChecking/index'
|
import projectChecking from './projectChecking/index'
|
||||||
import measure from './measure/index'
|
import measure from './measure/index'
|
||||||
import materialSeal from './materialSeal/index'
|
import materialSeal from './materialSeal/index'
|
||||||
|
import costOut from './costOut/index'
|
||||||
import checkDetection from './checkDetection/index'
|
import checkDetection from './checkDetection/index'
|
||||||
import video from './video/index'
|
import video from './video/index'
|
||||||
import {axios} from '@/utils/request'
|
import {axios} from '@/utils/request'
|
||||||
|
@ -27,6 +28,7 @@ export default {
|
||||||
workTrain,
|
workTrain,
|
||||||
special,
|
special,
|
||||||
dict,
|
dict,
|
||||||
|
costOut,
|
||||||
attendance,
|
attendance,
|
||||||
insurance,
|
insurance,
|
||||||
journalism,
|
journalism,
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" :key="'co'+elCostOut">
|
||||||
<div class="modify-project-amount" @mouseout="costMouseout" @mouseover="costMouseover">
|
<div class="modify-project-amount" @mouseout="costMouseout" @mouseover="costMouseover">
|
||||||
<div class="modify-btn"><img src="images/foot_left.png" @click="modifyLeftBtn"></div>
|
<div class="modify-btn"><img src="images/foot_left.png" @click="modifyLeftBtn"></div>
|
||||||
<div class="modify-content" id="modifyContent">
|
<div class="modify-content" id="modifyContent">
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
工程造价
|
工程造价
|
||||||
</p>
|
</p>
|
||||||
<div><span>10.8</span> 亿元</div>
|
<div><span>{{ getCurProject().totalInvestment||'' }}</span> 万元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
fill="#070102" p-id="15830"></path>
|
fill="#070102" p-id="15830"></path>
|
||||||
</svg>
|
</svg>
|
||||||
本月完成</p>
|
本月完成</p>
|
||||||
<div><span>400</span> 万元</div>
|
<div><span>{{costOut.curMonth||0}}</span> 万元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
本年完成
|
本年完成
|
||||||
</p>
|
</p>
|
||||||
<div><span>2400</span> 万元</div>
|
<div><span>{{costOut.totalY||0}}</span> 万元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
开累完成
|
开累完成
|
||||||
</p>
|
</p>
|
||||||
<div><span>6500</span> 万元</div>
|
<div><span>{{costOut.totalMonth||0}}</span> 万元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
计划开工日期
|
计划开工日期
|
||||||
</p>
|
</p>
|
||||||
<div><span>2022-10-18</span></div>
|
<div><span>{{ getCurProject().scheduledStartTime||'' }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -299,7 +299,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
计划竣工日期
|
计划竣工日期
|
||||||
</p>
|
</p>
|
||||||
<div><span>2025-10-17</span></div>
|
<div><span>{{ getCurProject().plannedCompletionTime||'' }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -344,7 +344,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
实际开工日期
|
实际开工日期
|
||||||
</p>
|
</p>
|
||||||
<div><span>2022-3-22</span></div>
|
<div><span>{{ getCurProject().actualOperatingTime|formatDate }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -389,7 +389,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
合同工期
|
合同工期
|
||||||
</p>
|
</p>
|
||||||
<div><span>1095</span> 天</div>
|
<div><span>{{ getCurProject().projectTimeLimit||'-' }}</span> 天</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -584,6 +584,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
elCostOut:0,
|
||||||
prjs: [],
|
prjs: [],
|
||||||
dept: null,
|
dept: null,
|
||||||
project: null,
|
project: null,
|
||||||
|
@ -699,6 +700,9 @@ export default {
|
||||||
warningTypeInterval: undefined,
|
warningTypeInterval: undefined,
|
||||||
warningTypeIndex: 0,
|
warningTypeIndex: 0,
|
||||||
mapName:'',
|
mapName:'',
|
||||||
|
costOut:{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -810,8 +814,20 @@ export default {
|
||||||
this.getProjectBuildNode();
|
this.getProjectBuildNode();
|
||||||
this.getDeptWorksList();
|
this.getDeptWorksList();
|
||||||
this.getProjectUser();
|
this.getProjectUser();
|
||||||
|
this.getCostOut(id);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getCostOut(id){
|
||||||
|
let dt=this.$dt(new Date())
|
||||||
|
this.$api.costOut.selectYearAndMonth({
|
||||||
|
projectId:id,
|
||||||
|
year:dt.$y,
|
||||||
|
month:dt.$M
|
||||||
|
}).then(d=>{
|
||||||
|
this.costOut=d;
|
||||||
|
this.elCostOut++;
|
||||||
|
})
|
||||||
|
},
|
||||||
getProjectUser(){
|
getProjectUser(){
|
||||||
this.getProjectId(id => {
|
this.getProjectId(id => {
|
||||||
this.$api.project.getProjectUser(id).then(d=>{
|
this.$api.project.getProjectUser(id).then(d=>{
|
||||||
|
|
|
@ -23,8 +23,8 @@ module.exports = defineConfig({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'/jhapi':{
|
'/jhapi':{
|
||||||
target: `http://62.234.3.186/jhapi/`,
|
//target: `http://62.234.3.186/jhapi/`,
|
||||||
//target: `http://127.0.0.1:8090/jhapi/`,
|
target: `http://127.0.0.1:8090/jhapi/`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/jhapi':'/'
|
'^/jhapi':'/'
|
||||||
|
|
Loading…
Reference in New Issue