diff --git a/src/api/problemmodify/index.js b/src/api/problemmodify/index.js
index b37f5e1..4a28eaf 100644
--- a/src/api/problemmodify/index.js
+++ b/src/api/problemmodify/index.js
@@ -3,35 +3,39 @@ import request from '@/utils/request'
//质量整改-安全分类汇总(按分类)
-const safetySummary=(deptId,roleType,projectId)=>{
+const safetySummary=(data)=>{
return request({
- url: `bgscreen/problemmodify/safetySummary?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
- method: 'get'
+ url: `bgscreen/problemmodify/safetySummary`,
+ method: 'post',
+ data:data
})
}
//质量整改-质量分类汇总(按分类)
-const qualitySummary=(deptId,roleType,projectId)=>{
+const qualitySummary=(data)=>{
return request({
- url: `bgscreen/problemmodify/qualitySummary?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
- method: 'get'
+ url: `bgscreen/problemmodify/qualitySummary`,
+ method: 'post',
+ data:data
})
}
//质量整改-安全分类汇总(按项目)
-const safetySummaryByProject=(deptId,roleType,projectId)=>{
+const safetySummaryByProject=(data)=>{
return request({
- url: `bgscreen/problemmodify/safetySummaryByProject?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
- method: 'get'
+ url: `bgscreen/problemmodify/safetySummaryByProject`,
+ method: 'post',
+ data:data
})
}
//质量整改-安全分类汇总(按项目)
-const qualitySummaryByProject=(deptId,roleType,projectId)=>{
+const qualitySummaryByProject=(data)=>{
return request({
- url: `bgscreen/problemmodify/qualitySummaryByProject?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
- method: 'get'
+ url: `bgscreen/problemmodify/qualitySummaryByProject`,
+ method: 'post',
+ data:data
})
}
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 397fcbd..32a0d45 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -485,7 +485,11 @@ export default {
this.qualityNav=n;
if(n==0){
this.qualityNavTitle="安全隐患总数";
- this.$api.problemmodify.safetySummary(this.deptInfo.id,0).then(d=>{
+ let postData={
+ deptId:this.deptInfo?.id||0,
+ roleType:0
+ };
+ this.$api.problemmodify.safetySummary(postData).then(d=>{
this.dangersDatas=(d||[]).map(it=>{
return {
text:it.problemArea,
@@ -502,8 +506,12 @@ export default {
this.elKey++;
})
}else{
+ let postData={
+ deptId:this.deptInfo?.id||0,
+ roleType:0
+ };
this.qualityNavTitle="质量隐患总数";
- this.$api.problemmodify.qualitySummary(this.deptInfo.id,0).then(d=>{
+ this.$api.problemmodify.qualitySummary(postData).then(d=>{
this.dangersDatas=(d||[]).map(it=>{
return {
text:it.problemArea,
diff --git a/src/pages/projectQuality.vue b/src/pages/projectQuality.vue
index fa47508..79c51b0 100644
--- a/src/pages/projectQuality.vue
+++ b/src/pages/projectQuality.vue
@@ -6,9 +6,14 @@
-
-
+
+
+
+
+
+
汇总
集团
@@ -17,8 +22,9 @@
监理单位
总包单位
-
-
+
质量隐患类型分析
@@ -218,7 +224,10 @@ export default {
},
data() {
return {
+ selDate:'',
elKey:0,
+ elSummaryKey:0,
+ elSummaryPrjKey:0,
elCheck:0,
dept:null,
projectInfo:null,
@@ -277,6 +286,33 @@ export default {
},
},
},
+ pickerOptions: {
+ shortcuts: [{
+ text: '最近一周',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ picker.$emit('pick', [start, end]);
+ }
+ }, {
+ text: '最近一个月',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ picker.$emit('pick', [start, end]);
+ }
+ }, {
+ text: '最近三个月',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ picker.$emit('pick', [start, end]);
+ }
+ }]
+ },
}
},
created() {
@@ -335,8 +371,22 @@ export default {
n=""+n;
return " ".substring(0,3-n.length)+n;
},
+ dtChange(){
+ this.doDeptChane();
+ },
doDeptChane(){
- this.$api.problemmodify.qualitySummary(this.dept?.id||0,this.safeNav,this.projectInfo?.id||0).then(d=>{
+ let postData={
+ deptId:this.dept?.id||0,
+ roleType:this.safeNav,
+ projectId:this.projectInfo?.id||0
+ };
+ if(this.selDate.length>0){
+ postData.startDate=this.$dt(this.selDate[0]).format("YYYY-MM-DD");
+ }
+ if(this.selDate.length>1){
+ postData.endDate=this.$dt(this.selDate[1]).format("YYYY-MM-DD");
+ }
+ this.$api.problemmodify.qualitySummary(postData).then(d=>{
this.summary=(d||[]).map(it=>{
return {
text:it.problemArea,
@@ -356,10 +406,10 @@ export default {
it.prop=(it.value*100.0/this.summaryTotal).toFixed(1);
}
});
- this.elKey++;
+ this.elSummaryKey++;
});
- this.$api.problemmodify.qualitySummaryByProject(this.dept?.id||0,this.safeNav,this.projectInfo?.id||0).then(d=>{
+ this.$api.problemmodify.qualitySummaryByProject(postData).then(d=>{
this.summaryPrj=(d||[]).map(it=>{
return {
...it,
@@ -380,7 +430,7 @@ export default {
}
it.rate = (it.checkState * 100.0 / it.value).toFixed(1);
})
- this.elKey++;
+ this.elSummaryPrjKey++;
});
this.doProjectChecking();
},
diff --git a/src/pages/projectSafety.vue b/src/pages/projectSafety.vue
index f14f21c..a8699fb 100644
--- a/src/pages/projectSafety.vue
+++ b/src/pages/projectSafety.vue
@@ -6,9 +6,14 @@
-
-
+
+
+
+
+
+
汇总
集团
@@ -17,9 +22,10 @@
监理单位
总包单位
-
-
+
+
安全隐患类型分析
@@ -294,6 +300,9 @@ export default {
},
data() {
return {
+ selDate:'',
+ elSummaryKey:0,
+ elSummaryPrjKey:0,
elKey: 0,
dept: null,
projectInfo:null,
@@ -336,7 +345,34 @@ export default {
summary: [],
summaryTotal: 0,
summaryPrj: [],
- summaryPrjTotal: 0
+ summaryPrjTotal: 0,
+ pickerOptions: {
+ shortcuts: [{
+ text: '最近一周',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ picker.$emit('pick', [start, end]);
+ }
+ }, {
+ text: '最近一个月',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ picker.$emit('pick', [start, end]);
+ }
+ }, {
+ text: '最近三个月',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ picker.$emit('pick', [start, end]);
+ }
+ }]
+ },
}
},
created() {
@@ -463,8 +499,22 @@ export default {
n = "" + n;
return " ".substring(0, 3 - n.length) + n;
},
- doDeptChane() {
- this.$api.problemmodify.safetySummary(this.dept.id, this.safeNav,this.projectInfo?.id||0).then(d => {
+ dtChange(){
+ this.doDeptChane();
+ },
+ doDeptChane() {
+ let postData={
+ deptId:this.dept?.id||0,
+ roleType:this.safeNav,
+ projectId:this.projectInfo?.id||0
+ };
+ if(this.selDate.length>0){
+ postData.startDate=this.$dt(this.selDate[0]).format("YYYY-MM-DD");
+ }
+ if(this.selDate.length>1){
+ postData.endDate=this.$dt(this.selDate[1]).format("YYYY-MM-DD");
+ }
+ this.$api.problemmodify.safetySummary(postData).then(d => {
this.summary = (d || []).map(it => {
return {
@@ -484,11 +534,10 @@ export default {
} else {
it.prop = (it.value * 100.0 / this.summaryTotal).toFixed(1);
}
- })
- this.elKey++;
- });
-
- this.$api.problemmodify.safetySummaryByProject(this.dept.id, this.safeNav,this.projectInfo?.id||0).then(d => {
+ })
+ this.elSummaryKey++;
+ });
+ this.$api.problemmodify.safetySummaryByProject(postData).then(d => {
this.summaryPrj = (d || []).map(it => {
return {
...it,
@@ -509,7 +558,7 @@ export default {
}
it.rate = (it.checkState * 100.0 / it.value).toFixed(1);
})
- this.elKey++;
+ this.elSummaryPrjKey++;
})
},
// 获取图片映射
diff --git a/vue.config.js b/vue.config.js
index d4bf516..7b5d4ae 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -7,18 +7,24 @@ module.exports = defineConfig({
host: '0.0.0.0',
port: 3000,
open: true,
- proxy: {
+ proxy: {
+ '/jhapi/profile':{
+ target: `http://62.234.3.186/jhapi/profile/`,
+ changeOrigin: true,
+ pathRewrite: {
+ '^/jhapi/profile':'/'
+ }
+ },
'/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':'/'
}
},
'/profile':{
- target: `http://62.234.3.186/profile/`,
- //target: `http://127.0.0.1:8090/jhapi`,
+ target: `http://62.234.3.186/profile/`,
changeOrigin: true,
pathRewrite: {
'^/profile':'/'