jhbigscreen/src/pages/components/ProblemmodifyDetail.vue

443 lines
18 KiB
Vue
Raw Normal View History

2023-08-15 00:47:59 +08:00
<template>
2023-10-03 21:31:40 +08:00
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" :class="'font-size-' + fontSize" :loading="loading"
2023-08-15 23:08:27 +08:00
class="problem-modify-detail">
2023-08-15 00:47:59 +08:00
<template slot="title">
2023-08-15 23:08:27 +08:00
{{ row.projectName }}{{ infoType == 0 ? '安全隐患' : '质量隐患' }}
2023-08-15 00:47:59 +08:00
</template>
<div>
2023-08-15 23:08:27 +08:00
<div class="font-size-tools">
<i class="set-font-size font-size2" @click="fontSize = 2" :class="fontSize == 2 ? 'active' : ''">
<svg class="icon svg-icon"
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3686">
<path
d="M839 875H735.3l-74.1-198.7H358.6L288.7 875H185l276.8-726h100.4L839 875zM632.1 594.3L522.3 292.4c-3.4-9.7-7.2-26.6-11.3-50.6h-2.3c-3.4 21.9-7.4 38.7-11.7 50.6L388.1 594.3h244z"
fill="#fff" p-id="3687"></path>
</svg>
</i>
<i class="set-font-size font-size1" @click="fontSize = 1" :class="fontSize == 1 ? 'active' : ''">
<svg class="icon svg-icon"
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3686">
<path
d="M839 875H735.3l-74.1-198.7H358.6L288.7 875H185l276.8-726h100.4L839 875zM632.1 594.3L522.3 292.4c-3.4-9.7-7.2-26.6-11.3-50.6h-2.3c-3.4 21.9-7.4 38.7-11.7 50.6L388.1 594.3h244z"
fill="#fff" p-id="3687"></path>
</svg>
</i>
<i class="set-font-size font-size0" @click="fontSize = 0" :class="fontSize == 0 ? 'active' : ''">
<svg class="icon svg-icon"
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3686">
<path
d="M839 875H735.3l-74.1-198.7H358.6L288.7 875H185l276.8-726h100.4L839 875zM632.1 594.3L522.3 292.4c-3.4-9.7-7.2-26.6-11.3-50.6h-2.3c-3.4 21.9-7.4 38.7-11.7 50.6L388.1 594.3h244z"
fill="#fff" p-id="3687"></path>
</svg>
</i>
</div>
2023-08-15 00:47:59 +08:00
<div class="head-title-tab">
2023-08-15 23:08:27 +08:00
<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>
2023-08-16 23:39:05 +08:00
<div :class="nav == 5 ? 'head-nav active' : 'head-nav'" @click="doNav(5)">({{ count['5'] }})</div>
2023-08-19 13:08:03 +08:00
2023-08-15 00:47:59 +08:00
</div>
2024-05-25 21:59:19 +08:00
<div class="data-list scroll" style="max-height:690px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;"
v-if="dataTable.length > 0" :key="elKey">
2023-09-30 23:04:00 +08:00
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item" :class="it.timeout ? 'time-out' : ''">
2023-08-15 23:08:27 +08:00
<div class="item-left">
2023-08-26 22:19:33 +08:00
<el-image ref="preview" style="width: 400px; " :preview-src-list="[it.marksPicture]"
2023-08-30 00:45:30 +08:00
:src="it.marksPicture + '.1000.jpg'">
2023-08-15 23:08:27 +08:00
</el-image>
</div>
<div class="item-right">
2023-09-30 23:04:00 +08:00
<div v-if="it.timeout && it.checkState != 4" class="text-timeout"></div>
<div class="text-state" :class="'state' + it.checkState">{{ getCheckState(it.checkState) }}</div>
2023-09-14 00:59:01 +08:00
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">总包单位:</span>
<div class="div-text">{{ it.deptName }}</div>
</el-col>
2023-08-15 23:20:25 +08:00
<el-col :span="12" class="item-data">
2023-08-15 23:08:27 +08:00
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">隐患类型:</span>
<div class="div-text">{{ getDangerType(it.dangerType) }}</div>
</el-col>
2023-08-15 23:20:25 +08:00
<el-col :span="12" class="item-data">
2023-08-15 23:08:27 +08:00
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">隐患整改人:</span>
2023-08-15 23:20:25 +08:00
<div class="div-text">{{ it.lordSent }}</div>
2023-08-15 23:08:27 +08:00
</el-col>
2023-08-15 23:20:25 +08:00
<el-col :span="12" class="item-data">
2023-08-15 23:08:27 +08:00
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">复检人:</span>
2023-08-15 23:20:25 +08:00
<div class="div-text">{{ it.recheckSend }}</div>
2023-08-15 23:08:27 +08:00
</el-col>
2023-08-15 23:20:25 +08:00
<el-col :span="12" class="item-data">
2023-08-15 23:08:27 +08:00
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">抄送人:</span>
2023-08-15 23:20:25 +08:00
<div class="div-text">{{ it.copySend }}</div>
2023-08-15 23:08:27 +08:00
</el-col>
2023-09-30 23:04:00 +08:00
<template v-if="it.checkState == 4">
2023-08-19 13:08:03 +08:00
<el-col :span="12" class="item-data">
2023-09-14 00:59:01 +08:00
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交用户:</span>
<div class="div-text">{{ it.createBy }}</div>
</el-col>
<el-col :span="8" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交时间:</span>
<div class="div-text">{{ it.createTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
<el-col :span="8" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">截止时间:</span>
<div class="div-text">{{ it.nickedTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
<el-col :span="8" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">完成时间:</span>
<div class="div-text">{{ it.updateTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
2023-08-19 13:08:03 +08:00
</template>
<template v-else>
2023-09-30 23:04:00 +08:00
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交用户:</span>
<div class="div-text">{{ it.createBy }}</div>
</el-col>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交时间:</span>
<div class="div-text">{{ it.createTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">截止时间:</span>
<div class="div-text">{{ it.nickedTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
</template>
2023-08-15 23:08:27 +08:00
<el-col :span="24" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">隐患描述:</span>
<div class="div-text">{{ it.workParts }}
</div>
</el-col>
<el-col :span="24" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">整改要求:</span>
<div class="div-text">{{ it.changeInfo }}</div>
</el-col>
</div>
</div>
</div>
2024-05-25 21:59:19 +08:00
<el-pagination v-if="dataTable.length > 0" layout="total,prev, pager, next" :hide-on-single-page="false"
@current-change="handleCurrentChange" :total="total" :page-size="size" :current-page.sync="index"
class="bg-pagination"></el-pagination>
<div v-if="dataTable.length == 0" style="text-align: center;margin-top: 200px;">
2023-08-20 19:25:29 +08:00
<img src="images/nodata.png" style="width: 240px;">
<div style="text-align: center;">暂无数据</div>
</div>
2023-08-15 23:08:27 +08:00
</div>
2023-08-15 00:47:59 +08:00
</MyDialog>
</template>
<script>
2023-09-17 23:29:27 +08:00
2023-08-15 00:47:59 +08:00
import MyDialog from '../components/MyDialog'
export default {
components: {
MyDialog
},
data() {
return {
2023-10-03 21:31:40 +08:00
loading:false,
2023-08-15 23:08:27 +08:00
fontSize: 0,
elKey: 0,
nav: 0,
infoType: 0,
2023-09-30 23:04:00 +08:00
roleType: 0,
2023-08-15 23:08:27 +08:00
row: null,
2023-08-15 00:47:59 +08:00
show: false,
2023-08-15 23:08:27 +08:00
count: {
"0": 0,
"1": 0,
"3": 0,
2023-08-16 23:39:05 +08:00
"4": 0,
"5": 0
2023-08-15 00:47:59 +08:00
},
2023-08-15 23:08:27 +08:00
dataTable: [],
dicts: [],
2023-08-27 17:53:33 +08:00
checkStateDicts: [],
2024-05-25 21:59:19 +08:00
selDate: [],
size: 10,
index: 1,
total: 0,
2023-08-15 00:47:59 +08:00
};
},
mounted() {
},
methods: {
2023-08-15 23:08:27 +08:00
getDangerType(v) {
let tmps = this.dicts.filter(d => d.dictValue == v);
return tmps.length > 0 ? tmps[0].dictLabel : '';
},
getCheckState(v) {
let tmps = this.checkStateDicts.filter(d => d.dictValue == v);
return tmps.length > 0 ? tmps[0].dictLabel : '';
},
2024-05-25 21:59:19 +08:00
handleCurrentChange(n) {
this.index = n;
this.getData();
},
2023-08-15 23:08:27 +08:00
doNav(n, init) {
if (n == this.nav && !init) {
2023-08-15 00:47:59 +08:00
return;
}
2024-05-25 21:59:19 +08:00
this.nav = n;
this.index=1;
this.getData();
},
getData(){
2023-08-19 13:08:03 +08:00
let postData = {
2023-08-15 23:08:27 +08:00
projectId: this.row.projectId,
2023-08-19 13:08:03 +08:00
infoType: this.infoType,
2023-08-20 19:11:18 +08:00
roleType: this.roleType
2023-08-16 23:39:05 +08:00
};
2024-05-25 21:59:19 +08:00
if (this.nav == 5) {
2023-08-19 13:08:03 +08:00
postData.activeName = 'zgcs'
} else {
2024-05-25 21:59:19 +08:00
postData.checkState = this.nav
2023-08-16 23:39:05 +08:00
}
2023-09-30 23:04:00 +08:00
if (this.selDate.length > 0) {
postData.startDate = this.$dt(this.selDate[0]).format("YYYY-MM-DD");
2023-08-27 17:53:33 +08:00
}
2023-09-30 23:04:00 +08:00
if (this.selDate.length > 1) {
postData.endDate = this.$dt(this.selDate[1]).format("YYYY-MM-DD");
2023-08-27 17:53:33 +08:00
}
2023-10-03 21:31:40 +08:00
this.loading=true;
2024-05-25 21:59:19 +08:00
this.$api.problemmodify.listSspProblemmodify(postData,this.size,this.index).then(d => {
2023-10-03 21:31:40 +08:00
this.loading=false;
2024-05-25 21:59:19 +08:00
this.total=d.total;
this.dataTable = (d.rows || []).map(it => {
2023-09-30 23:04:00 +08:00
if (it.updateTime) {
2023-08-19 13:08:03 +08:00
let dt1 = +this.$dt(this.$dt(it.nickedTime).format("YYYY-MM-DD"));
let dt2 = +this.$dt(this.$dt(it.updateTime).format("YYYY-MM-DD"));
if (dt1 < dt2) {
it.timeout = true;
} else {
it.timeout = false;
}
2023-09-30 23:04:00 +08:00
} else if (it.nickedTime) {
2023-08-19 13:08:03 +08:00
let dt1 = +this.$dt(this.$dt(it.nickedTime).format("YYYY-MM-DD"));
let dt2 = +this.$dt(this.$dt(new Date()).format("YYYY-MM-DD"));
if (dt1 < dt2) {
it.timeout = true;
} else {
it.timeout = false;
2023-08-15 23:08:27 +08:00
}
2023-08-19 13:08:03 +08:00
} else {
it.timeout = false;
2023-09-30 23:04:00 +08:00
}
2023-08-15 23:08:27 +08:00
return it;
});
2023-08-15 00:47:59 +08:00
this.elKey++;
})
},
2023-09-30 23:04:00 +08:00
showDialog(row, infoType, roleType, selDate) {
this.selDate = selDate;
2023-08-15 23:08:27 +08:00
this.row = row;
this.infoType = infoType;
2023-09-30 23:04:00 +08:00
this.roleType = roleType;
2023-08-15 23:08:27 +08:00
if (infoType == 0) {
this.$api.dict('ssp_aqyhlx').then(d => {
this.dicts = d || [];
})
} else {
this.$api.dict('ssp_zlyhlx').then(d => {
this.dicts = d || [];
})
}
this.$api.dict('smz_ssp_checkstate').then(d => {
this.checkStateDicts = d || [];
});
2023-08-15 00:47:59 +08:00
this.show = true
2023-08-15 23:08:27 +08:00
this.doNav(0, true);
2023-09-30 23:04:00 +08:00
let postData = {
2023-08-16 23:39:05 +08:00
projectId: this.row.projectId,
2023-08-20 19:11:18 +08:00
infoType: this.infoType,
2023-09-30 23:04:00 +08:00
roleType: this.roleType
2023-08-27 17:53:33 +08:00
};
2023-09-30 23:04:00 +08:00
if (this.selDate.length > 0) {
postData.startDate = this.$dt(this.selDate[0]).format("YYYY-MM-DD");
2023-08-27 17:53:33 +08:00
}
2023-09-30 23:04:00 +08:00
if (this.selDate.length > 1) {
postData.endDate = this.$dt(this.selDate[1]).format("YYYY-MM-DD");
2023-08-27 17:53:33 +08:00
}
this.$api.problemmodify.groupByInfotypeCheckState(postData).then(d => {
2023-08-19 13:08:03 +08:00
for (let i = 0; i <= 5; i++) {
this.count["" + i] = 0;
}
2023-08-15 23:08:27 +08:00
let tmps = (d.data || []).filter(it => it.infoType == this.infoType);
tmps.forEach(it => {
this.count["" + it.checkState] = it.id;
2023-08-15 00:47:59 +08:00
})
})
}
},
};
</script>
<style lang="less" >
2023-08-15 23:08:27 +08:00
.problem-modify-detail {
.popup-project-introduction-min {
transform: translateY(100px);
}
.popup-project-introduction-details {
2023-08-15 00:47:59 +08:00
padding: 0px !important;
2023-08-15 23:08:27 +08:00
position: relative;
.quality-table {
padding: 0px !important;
}
.font-size-tools {
position: absolute;
top: -40px;
right: 100px;
}
}
&.font-size-2 {
2023-08-19 13:08:03 +08:00
.head-title-tab {
.head-nav {
2023-08-15 23:20:25 +08:00
font-size: 32px;
height: 48px;
line-height: 48px;
padding: 0px 48px;
}
}
2023-08-19 13:08:03 +08:00
2023-08-15 23:08:27 +08:00
.item-data {
line-height: 64px;
font-size: 32px;
line-height: 64px;
.div-text {
line-height: 64px;
}
2023-08-15 00:47:59 +08:00
}
}
2023-08-15 23:08:27 +08:00
&.font-size-1 {
2023-08-19 13:08:03 +08:00
.head-title-tab {
.head-nav {
2023-08-15 23:20:25 +08:00
font-size: 24px;
height: 30px;
line-height: 30px;
padding: 0px 30px;
}
}
2023-08-19 13:08:03 +08:00
2023-08-15 23:08:27 +08:00
.item-data {
line-height: 48px;
font-size: 24px;
line-height: 48px;
2023-08-19 13:08:03 +08:00
2023-08-15 23:08:27 +08:00
.div-text {
line-height: 48px;
}
}
}
.head-title-tab {
2023-08-15 00:47:59 +08:00
padding-top: 12px;
display: block;
width: 100%;
2023-08-15 23:08:27 +08:00
.head-nav {
2023-08-15 00:47:59 +08:00
background-size: 100% 100%;
display: inline-block;
width: auto;
2023-08-15 23:08:27 +08:00
padding: 0px 24px;
}
}
.data-list {
.data-item {
border-bottom: solid 1px #fff;
box-shadow: inset 7px 0px 11px 5px rgb(36 131 167 / 70%);
display: flex;
2023-08-15 23:20:25 +08:00
padding-left: 8px;
2023-08-19 13:08:03 +08:00
&.time-out {
2023-08-15 23:08:27 +08:00
box-shadow: inset 7px 0px 11px 5px rgb(167, 36, 36);
2023-09-30 23:04:00 +08:00
2023-08-19 13:08:03 +08:00
.text-state {
2023-09-30 23:04:00 +08:00
color: rgba(167, 36, 36, 0.6) !important;
2023-08-19 13:08:03 +08:00
}
2023-08-15 23:08:27 +08:00
}
2023-08-19 13:08:03 +08:00
2023-08-15 23:08:27 +08:00
.item-left {
display: inline-flex;
2023-08-26 22:19:33 +08:00
width: 400px;
min-height: 220px;
2023-08-15 23:08:27 +08:00
align-items: center;
}
2023-08-19 13:08:03 +08:00
.text-state {
font-size: 32px;
position: absolute;
color: rgba(200, 200, 200, 0.2);
transform: rotate(45deg);
top: 60px;
left: calc(50% - 100px);
2023-09-30 23:04:00 +08:00
&.state4 {
2023-08-19 13:08:03 +08:00
color: rgba(5, 248, 5, 0.5);
}
}
2023-08-15 23:08:27 +08:00
.item-right {
display: inline-block;
margin-left: 10px;
2023-08-26 22:19:33 +08:00
width: calc(100% - 414px);
2023-08-15 23:08:27 +08:00
position: relative;
2023-09-30 23:04:00 +08:00
2023-08-15 23:08:27 +08:00
.sp-lbl {
display: inline-block;
color: aquamarine;
}
2023-08-19 13:08:03 +08:00
.text-timeout {
2023-08-15 23:08:27 +08:00
position: absolute;
2023-09-30 23:04:00 +08:00
right: -4px;
font-size: 24px;
color: #fff;
display: block;
padding: 20px;
background: linear-gradient(-135deg, red, red 50%, transparent 50%, transparent 100%);
height: 50px;
width: 50px;
&::after {
content: "超时";
transform: rotate(45deg);
display: block;
position: absolute;
left: 42px;
top: 15px;
}
2023-08-15 23:08:27 +08:00
}
.item-data {
display: flex;
align-items: center;
border-bottom: solid 1px rgba(255, 255, 255, 0.1);
2023-08-26 22:19:33 +08:00
line-height: 36px;
2023-08-15 23:08:27 +08:00
.div-text {
display: inline-block;
width: calc(100% - 200px);
vertical-align: top;
white-space: break-spaces;
word-break: break-word;
}
}
}
2023-08-15 00:47:59 +08:00
}
}
2023-08-15 23:08:27 +08:00
}</style>