# Conflicts:
#	src/pages/projectSafety.vue
dev-login
姜玉琦 2023-08-15 00:57:51 +08:00
commit 27e88aa5f0
4 changed files with 196 additions and 31 deletions

View File

@ -44,8 +44,23 @@ const getMonitAndWarning=(deptId,projectId=0)=>{
} }
const listSspProblemmodify=data=>{
return request({
url: `bgscreen/problemmodify/listSspProblemmodify`,
method: 'post',
data:data
})
}
const groupByInfotypeCheckState=data=>{
return request({
url: `bgscreen/problemmodify/groupByInfotypeCheckState`,
method: 'post',
data:data
})
}
export default{ export default{
safetySummary,qualitySummary,safetySummaryByProject,qualitySummaryByProject,getMonitAndWarning safetySummary,qualitySummary,safetySummaryByProject,qualitySummaryByProject,getMonitAndWarning,listSspProblemmodify,groupByInfotypeCheckState
} }

View File

@ -0,0 +1,113 @@
<template>
<MyDialog v-if="show" v-model="show" width="880px" class="problem-modify-detail">
<template slot="title">
{{ row.projectName}}{{infoType==0?'安全隐患':'质量隐患' }}
</template>
<div>
<div class="head-title-tab">
<div :class="nav==0?'head-nav active':'head-nav'" @click="doNav(0)">({{count['0']}})</div>
<div :class="nav==1?'head-nav active':'head-nav'" @click="doNav(1)">({{count['1']}})</div>
<div :class="nav==3?'head-nav active':'head-nav'" @click="doNav(3)">({{count['3']}})</div>
<div :class="nav==4?'head-nav active':'head-nav'" @click="doNav(4)">({{count['4']}})</div>
</div>
<el-table :data="dataTable" :key="elKey" height="500" widt="100%">
<el-table-column label="项目名称" align="center" prop="problemArea" width="200" show-overflow-tooltip/>
<el-table-column label="隐患图片" align="center" property="path" width="220">
<template slot-scope="scope">
<el-image ref="preview"
style="width: 200px; height: 100px"
:src="scope.row.marksPicture"
>
</el-image>
</template>
</el-table-column>
<el-table-column label="隐患描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
<el-table-column label="整改要求" align="center" prop="changeInfo" width="200" show-overflow-tooltip/>
</el-table>
</div>
</MyDialog>
</template>
<script>
import '@/components/module/module-one-1-1'
import MyDialog from '../components/MyDialog'
export default {
components: {
MyDialog
},
data() {
return {
elKey:0,
nav:0,
infoType:0,
row:null,
show: false,
count:{
"0":0,
"1":0,
"3":0,
"4":0
},
dataTable:[]
};
},
mounted() {
},
methods: {
doNav(n,init) {
if(n==this.nav && !init){
return;
}
this.nav = n;
this.$api.problemmodify.listSspProblemmodify({
projectId:this.row.projectId,
infoType:this.infoType,
checkState:n
}).then(d=>{
this.dataTable=d.data||[];
this.elKey++;
})
},
showDialog(row,infoType) {
this.row=row;
this.infoType=infoType;
this.show = true
this.doNav(0,true);
this.$api.problemmodify.groupByInfotypeCheckState({
projectId:this.row.projectId
}).then(d=>{
let tmps=(d.data||[]).filter(it=>it.infoType==this.infoType);
tmps.forEach(it=>{
this.count[""+it.checkState]=it.id;
})
})
}
},
};
</script>
<style lang="less" >
.problem-modify-detail{
.popup-project-introduction-details{
padding: 0px !important;
.quality-table{
padding: 0px !important;
}
}
.head-title-tab{
padding-top: 12px;
display: block;
width: 100%;
.head-nav{
background-size: 100% 100%;
display: inline-block;
width: auto;
padding:0px 24px;
}
}
}
</style>

View File

@ -20,27 +20,47 @@
<project-overview-chart2 :key="safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)" :typedata="summary" :text="safeText" :height="230"></project-overview-chart2> <project-overview-chart2 :key="safeNav" :sp="'\n'" :maintitle="fmt(summaryTotal)" :typedata="summary" :text="safeText" :height="230"></project-overview-chart2>
<div style="padding:0px 20px"> <div style="padding:0px 20px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12" v-if="1==2">
<div class="rank-chart-title bottom-line">质量隐患类型分析</div> <div class="rank-chart-title bottom-line">质量隐患类型分析</div>
<rank-chart :data="summary" :showval="true" :height="600"></rank-chart> <rank-chart :data="summary" :showval="true" :height="600"></rank-chart>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="24">
<div class="rank-chart-title bottom-line">项目质量隐患占比</div> <div class="rank-chart-title bottom-line">
<div class="idle-list" style="padding-top:20px;"> <span style="position: relative;top: -4px;">项目质量隐患占比({{ summaryPrjTotal }})</span></div>
<el-table style="width: 100%" ref="wgzp" :data="summaryPrj" height="600" :row-style="rowStyle" class="elTable"> <div class="idle-list problemmodify_list" style="padding-top:20px;">
<el-table style="width: 100%" ref="wgzp" :data="summaryPrj" height="600"
:row-style="rowStyle" class="elTable">
<el-table-column type="index" width="40"> <el-table-column type="index" width="40">
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.$index < 3 && +scope.row.value>0 ? 'idle-list-color':''">{{scope.$index + 1}} </div> <div
:class="scope.$index < 3 && +scope.row.value > 0 ? 'idle-list-color' : ''">
{{ scope.$index + 1 }} </div>
</template></el-table-column> </template></el-table-column>
<el-table-column prop="name" label="项目名称" width="120" class-name="text-left" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="projectName" label="项目名称" width="120"
class-name="text-left" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="prop" label="占比"> <el-table-column prop="prop" label="占比">
<template slot-scope="scope"> <template slot-scope="scope">
<idle-list-chart :prop="Number(scope.row.prop)" :color="scope.$index < 3 && +scope.row.value>0 ? '#f05e35':'#6ab9fe'"></idle-list-chart> <idle-list-chart :prop="Number(scope.row.prop)"
:color="scope.$index < 3 && +scope.row.id > 0 ? '#f05e35' : '#6ab9fe'"></idle-list-chart>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="number" label="隐患数" width="60" align="center"> <el-table-column prop="id" label="隐患数" width="60" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{scope.row.value}} </div> <div>{{ scope.row.id }} </div>
</template>
</el-table-column>
<el-table-column prop="id" label="超时隐患数" width="100" align="center">
<template slot-scope="scope">
<div>{{ scope.row.infoType }} </div>
</template>
</el-table-column>
<el-table-column prop="id" label="整改率">
<template slot-scope="scope">
<idle-list-chart :prop="Number(scope.row.rate)"
color="#6ab9fe"></idle-list-chart>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -266,10 +286,10 @@ export default {
this.$api.problemmodify.qualitySummaryByProject(this.dept.id,this.safeNav).then(d=>{ this.$api.problemmodify.qualitySummaryByProject(this.dept.id,this.safeNav).then(d=>{
this.summaryPrj=(d||[]).map(it=>{ this.summaryPrj=(d||[]).map(it=>{
return { return {
text:it.problemArea, ...it,
prop: '0.0', prop: '0.0',
name:it.problemArea, value: it.id || 0,
value:it.roleType||0 rate: 0,
} }
}); });
this.summaryPrjTotal=0; this.summaryPrjTotal=0;
@ -282,6 +302,7 @@ export default {
} else { } else {
it.prop = (it.value * 100.0 / this.summaryPrjTotal).toFixed(1); it.prop = (it.value * 100.0 / this.summaryPrjTotal).toFixed(1);
} }
it.rate = (it.checkState * 100.0 / it.value).toFixed(1);
}) })
this.elKey++; this.elKey++;
}); });
@ -314,6 +335,22 @@ export default {
<style lang="less"> <style lang="less">
.project-quality{ .project-quality{
.problemmodify_list{
.el-table__body-wrapper {
&::-webkit-scrollbar {
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-thumb {
background-color: rgb(1, 169, 255);
border-radius: 4px;
}
tr{
cursor: pointer;
}
}
}
.center-image .screen-one-2-1{ .center-image .screen-one-2-1{
overflow: hidden; overflow: hidden;
} }