From 52c3ea0a75259b1ff33e84c4fe96d0983fd94bff Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 10 Sep 2023 15:43:47 +0800 Subject: [PATCH] update code --- src/api/schedule/index.js | 4 ++-- src/pages/index.vue | 4 ++-- src/pages/index/indexDlg2.vue | 21 +++++++++++++-------- src/pages/projectProgress.vue | 4 ++-- vue.config.js | 4 ++-- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/api/schedule/index.js b/src/api/schedule/index.js index 8ebf4b3..c672870 100644 --- a/src/api/schedule/index.js +++ b/src/api/schedule/index.js @@ -8,9 +8,9 @@ const projectConstructionProgress=(projectId)=> { } -const selectByProjectType=type=>{ +const selectByProjectType=(type,deptId)=>{ return request({ - url: `bgscreen/schedule/selectByProjectType?type=${type}`, + url: `bgscreen/schedule/selectByProjectType?type=${type}&deptId=${deptId}`, method: 'get' }) } diff --git a/src/pages/index.vue b/src/pages/index.vue index 487816d..8880ffa 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -519,7 +519,7 @@ export default { } if(idx==1||idx==2){ - this.$refs.dlg2.showDetailDialog(this.prjProcessNav,idx); + this.$refs.dlg2.showDetailDialog(this.prjProcessNav,idx,this.deptInfo); } }, sumCostOutByDeptId() { @@ -606,7 +606,7 @@ export default { this.$refs.dlg1.showDialog() }, doShowDlg2() { - this.$refs.dlg2.showDialog(this.prjProcessNav, [this.getPrjCateCount(0), this.getPrjCateCount(1), this.getPrjCateCount(3)]) + this.$refs.dlg2.showDialog(this.prjProcessNav, [this.getPrjCateCount(0), this.getPrjCateCount(1), this.getPrjCateCount(3)],this.deptInfo) }, getPrjCateCount(n) { if (this.projectCategory.length < n + 1) { diff --git a/src/pages/index/indexDlg2.vue b/src/pages/index/indexDlg2.vue index fbfe3c7..e0f55ec 100644 --- a/src/pages/index/indexDlg2.vue +++ b/src/pages/index/indexDlg2.vue @@ -134,6 +134,7 @@ export default { }, data() { return { + dept:null, title:'', dataState:0, showType:'', @@ -179,12 +180,13 @@ export default { this.$api.quarterlyAssess.queryByProjectType({ id:n, year:y, - quarterly:q + quarterly:q, + deptId:this.dept?.id||0 }), - this.$api.schedule.selectByProjectType(n) + this.$api.schedule.selectByProjectType(n,this.dept?.id||0) ]; this.loading=true; - this.$api.http.all(ajaxs).then(res=>{ + this.$api.http.all(ajaxs).then(res=>{debugger this.loading=false; let prjs=res[0].data||[]; let tmps=res[1].data||[]; @@ -215,9 +217,10 @@ export default { this.$api.quarterlyAssess.queryByProjectType({ id:n, year:y, - quarterly:q + quarterly:q, + deptId:this.dept?.id||0 }), - this.$api.schedule.selectByProjectType(n), + this.$api.schedule.selectByProjectType(n,this.dept?.id||0), this.$api.buildNode.queryByProjectTypeNoTree(n) ]; this.loading=true; @@ -251,7 +254,7 @@ export default { }, loadData4(n){ this.loading=true; - this.$api.schedule.selectByProjectType(n).then(d=>{ + this.$api.schedule.selectByProjectType(n,this.dept?.id||0).then(d=>{ this.loading=false; let objs=(d.data||[]).map(it=>{ it.projectName=it.surProject?.projectName||'' @@ -269,7 +272,8 @@ export default { } }) }, - showDialog(n,cnts) { + showDialog(n,cnts,dept) { + this.dept=dept; this.loading=true; this.tableData=[] this.showType="all"; @@ -278,7 +282,8 @@ export default { this.toggleNav(n); this.show = true }, - showDetailDialog(n,type){ + showDetailDialog(n,type,dept){ + this.dept=dept; this.loading=true; this.tableData=[] this.showType="detail"; diff --git a/src/pages/projectProgress.vue b/src/pages/projectProgress.vue index fada666..dff08ff 100644 --- a/src/pages/projectProgress.vue +++ b/src/pages/projectProgress.vue @@ -494,11 +494,11 @@ export default { idx=p.seriesIndex; } if(idx==1||idx==2){ - this.$refs.prjSummary.showDetailDialog(this.pushNav,idx); + this.$refs.prjSummary.showDetailDialog(this.pushNav,idx,this.dept); } }, showPrjSummary(){ - this.$refs.prjSummary.showDialog(this.pushNav,[this.getPrjCateCount(0),this.getPrjCateCount(1),this.getPrjCateCount(3)]) + this.$refs.prjSummary.showDialog(this.pushNav,[this.getPrjCateCount(0),this.getPrjCateCount(1),this.getPrjCateCount(3)],this.dept) }, loadPlan(){ this.$api.plan.listAllTop3().then(d=>{ diff --git a/vue.config.js b/vue.config.js index ea1f844..d46c312 100644 --- a/vue.config.js +++ b/vue.config.js @@ -23,8 +23,8 @@ module.exports = defineConfig({ } }, '/jhapi':{ - target: `http://62.234.3.186/jhapi/`, - //target: `http://127.0.0.1:8090/jhapi/`, + //target: `http://62.234.3.186/jhapi/`, + target: `http://127.0.0.1:8090/jhapi/`, changeOrigin: true, pathRewrite: { '^/jhapi':'/'