dev-login
姜玉琦 2023-08-27 00:17:58 +08:00
commit 16203203d9
5 changed files with 157 additions and 40 deletions

View File

@ -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
})
}

View File

@ -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,

View File

@ -6,9 +6,14 @@
<div class="screen-content-max">
<screen-header :nav="4" ></screen-header>
<div class="screen-content">
<el-row :key="elKey">
<el-col :span="12">
<el-row>
<el-col :span="12" style="position: relative;">
<module-one-3-1 label="质量隐患检查" class="hide-scroll">
<div style="position: absolute;right:0px;top:4px;">
<el-date-picker class="bg-date-picker" v-model="selDate" type="daterange" popper-class="bg-date-picker-pop" :editable="false" @change="dtChange"
:picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div :key="'a'+elSummaryKey">
<div class="warning-info-title" style="padding-left: 20px;">
<div :class="safeNav==0?'active':''" @click="doSafeNav(0,'汇总总数')"></div>
<div :class="safeNav==3?'active':''" @click="doSafeNav(3,'集团总数')"></div>
@ -17,8 +22,9 @@
<div :class="safeNav==6?'active':''" @click="doSafeNav(6,'监理单位')"></div>
<div :class="safeNav==7?'active':''" @click="doSafeNav(7,'总包单位')"></div>
</div>
<project-overview-chart2 :key="safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)" :typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
<div style="padding:0px 20px">
<project-overview-chart2 :key="'b'+safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)" :typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
</div>
<div style="padding:0px 20px" :key="'c'+elSummaryPrjKey">
<el-row>
<el-col :span="12" v-if="1==2">
<div class="rank-chart-title bottom-line">质量隐患类型分析</div>
@ -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();
},

View File

@ -6,9 +6,14 @@
<div class="screen-content-max">
<screen-header :nav="3"></screen-header>
<div class="screen-content">
<el-row :key="elKey">
<el-col :span="12">
<el-row>
<el-col :span="12" style="position: relative;">
<module-one-3-1 label="安全隐患检查">
<div style="position: absolute;right:0px;top:4px;">
<el-date-picker class="bg-date-picker" v-model="selDate" type="daterange" popper-class="bg-date-picker-pop" :editable="false" @change="dtChange"
:picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div :key="'a'+elSummaryKey">
<div class="warning-info-title" style="padding-left: 20px;">
<div :class="safeNav == 0 ? 'active' : ''" @click="doSafeNav(0, '汇总总数')">汇总</div>
<div :class="safeNav == 3 ? 'active' : ''" @click="doSafeNav(3, '集团总数')">集团</div>
@ -17,9 +22,10 @@
<div :class="safeNav == 6 ? 'active' : ''" @click="doSafeNav(6, '监理单位')">监理单位</div>
<div :class="safeNav == 7 ? 'active' : ''" @click="doSafeNav(7, '总包单位')">总包单位</div>
</div>
<project-overview-chart2 :key="safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)"
<project-overview-chart2 :key="'b'+safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)"
:typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
<div style="padding:0px 20px">
</div>
<div style="padding:0px 20px" :key="'c'+elSummaryPrjKey">
<el-row>
<el-col :span="12" v-if="1 == 2">
<div class="rank-chart-title bottom-line">安全隐患类型分析</div>
@ -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++;
})
},
//

View File

@ -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':'/'