update code
parent
cdc1171fc5
commit
c485d61db1
|
@ -0,0 +1,25 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const getDict=(dictName)=> {
|
||||||
|
let key='dict_'+dictName;
|
||||||
|
let obj=window.jhcaches[key];
|
||||||
|
if(obj && obj.length>0){
|
||||||
|
return new Promise((resolve)=>{
|
||||||
|
resolve(obj);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
return new Promise(async (resolve)=>{
|
||||||
|
let data=await request({
|
||||||
|
url: `system/dict/data/type/${dictName}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
let obj=data.data||[];
|
||||||
|
if(obj && obj.length>0){
|
||||||
|
window.jhcaches[key]=obj;
|
||||||
|
}
|
||||||
|
resolve(obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getDict;
|
|
@ -6,6 +6,7 @@ import problemmodify from './problemmodify/index'
|
||||||
import workFile from './workFile/index'
|
import workFile from './workFile/index'
|
||||||
import workTrain from './workTrain/index'
|
import workTrain from './workTrain/index'
|
||||||
import special from './special/index'
|
import special from './special/index'
|
||||||
|
import dict from './dict/index'
|
||||||
export default {
|
export default {
|
||||||
project,
|
project,
|
||||||
dept,
|
dept,
|
||||||
|
@ -14,5 +15,6 @@ export default {
|
||||||
problemmodify,
|
problemmodify,
|
||||||
workFile,
|
workFile,
|
||||||
workTrain,
|
workTrain,
|
||||||
special
|
special,
|
||||||
|
dict
|
||||||
}
|
}
|
|
@ -1,30 +1,98 @@
|
||||||
<template>
|
<template>
|
||||||
<MyDialog v-if="show" v-model="show" width="880px" class="problem-modify-detail">
|
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" :class="'font-size-' + fontSize"
|
||||||
|
class="problem-modify-detail">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
{{ row.projectName}}【{{infoType==0?'安全隐患':'质量隐患' }}】
|
{{ row.projectName }}【{{ infoType == 0 ? '安全隐患' : '质量隐患' }}】
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div class="head-title-tab">
|
<div class="font-size-tools">
|
||||||
<div :class="nav==0?'head-nav active':'head-nav'" @click="doNav(0)">待整改({{count['0']}})</div>
|
<i class="set-font-size font-size2" @click="fontSize = 2" :class="fontSize == 2 ? 'active' : ''">
|
||||||
<div :class="nav==1?'head-nav active':'head-nav'" @click="doNav(1)">待复检({{count['1']}})</div>
|
<svg class="icon svg-icon"
|
||||||
<div :class="nav==3?'head-nav active':'head-nav'" @click="doNav(3)">复检驳回({{count['3']}})</div>
|
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
|
||||||
<div :class="nav==4?'head-nav active':'head-nav'" @click="doNav(4)">复检通过({{count['4']}})</div>
|
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>
|
</div>
|
||||||
|
<div class="head-title-tab">
|
||||||
<el-table :data="dataTable" :key="elKey" height="500" widt="100%">
|
<div :class="nav == 0 ? 'head-nav active' : 'head-nav'" @click="doNav(0)">待整改({{ count['0'] }})</div>
|
||||||
<el-table-column label="项目名称" align="center" prop="problemArea" width="200" show-overflow-tooltip/>
|
<div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(1)">待复检({{ count['1'] }})</div>
|
||||||
<el-table-column label="隐患图片" align="center" property="path" width="220">
|
<div :class="nav == 3 ? 'head-nav active' : 'head-nav'" @click="doNav(3)">复检驳回({{ count['3'] }})</div>
|
||||||
<template slot-scope="scope">
|
<div :class="nav == 4 ? 'head-nav active' : 'head-nav'" @click="doNav(4)">复检通过({{ count['4'] }})</div>
|
||||||
<el-image ref="preview"
|
</div>
|
||||||
style="width: 200px; height: 100px"
|
<div class="data-list scroll" style="max-height:712px;overflow-y: auto;margin:12px 0px;">
|
||||||
:src="scope.row.marksPicture"
|
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item" :class="it.checkState!=4 && it.timeout?'time-out':''">
|
||||||
>
|
<div class="item-left">
|
||||||
|
<el-image ref="preview" style="width: 200px; height: 100px" :preview-src-list="[it.marksPicture]"
|
||||||
|
:src="it.marksPicture">
|
||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</div>
|
||||||
</el-table-column>
|
<div class="item-right">
|
||||||
<el-table-column label="隐患描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
<div v-if="it.checkState!=4 && it.timeout" class="text-timeout">超时</div>
|
||||||
<el-table-column label="整改要求" align="center" prop="changeInfo" width="200" show-overflow-tooltip/>
|
<el-col :span="24" class="item-data">
|
||||||
</el-table>
|
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">隐患类型:</span>
|
||||||
|
<div class="div-text">{{ getDangerType(it.dangerType) }}</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.lordSent }}{{ it.lordSentUser }}</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.recheckSend }}{{ it.recheckSendUser }}</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.copySend }}{{ it.copySendUser }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" class="item-data" v-if="1==2">
|
||||||
|
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">流程状态:</span>
|
||||||
|
<div class="div-text">{{ getCheckState(it.checkState) }}</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.createUser }}</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="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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</MyDialog>
|
</MyDialog>
|
||||||
|
@ -39,18 +107,21 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
elKey:0,
|
fontSize: 0,
|
||||||
nav:0,
|
elKey: 0,
|
||||||
infoType:0,
|
nav: 0,
|
||||||
row:null,
|
infoType: 0,
|
||||||
|
row: null,
|
||||||
show: false,
|
show: false,
|
||||||
count:{
|
count: {
|
||||||
"0":0,
|
"0": 0,
|
||||||
"1":0,
|
"1": 0,
|
||||||
"3":0,
|
"3": 0,
|
||||||
"4":0
|
"4": 0
|
||||||
},
|
},
|
||||||
dataTable:[]
|
dataTable: [],
|
||||||
|
dicts: [],
|
||||||
|
checkStateDicts: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -58,31 +129,64 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
doNav(n,init) {
|
getDangerType(v) {
|
||||||
if(n==this.nav && !init){
|
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 : '';
|
||||||
|
},
|
||||||
|
doNav(n, init) {
|
||||||
|
if (n == this.nav && !init) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.nav = n;
|
this.nav = n;
|
||||||
this.$api.problemmodify.listSspProblemmodify({
|
this.$api.problemmodify.listSspProblemmodify({
|
||||||
projectId:this.row.projectId,
|
projectId: this.row.projectId,
|
||||||
infoType:this.infoType,
|
infoType: this.infoType,
|
||||||
checkState:n
|
checkState: n
|
||||||
}).then(d=>{
|
}).then(d => {
|
||||||
this.dataTable=d.data||[];
|
this.dataTable = (d.data || []).map(it=>{
|
||||||
|
if(it.nickedTime){
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
it.timeout=false;
|
||||||
|
}
|
||||||
|
return it;
|
||||||
|
});
|
||||||
this.elKey++;
|
this.elKey++;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showDialog(row,infoType) {
|
showDialog(row, infoType) {
|
||||||
this.row=row;
|
this.row = row;
|
||||||
this.infoType=infoType;
|
this.infoType = infoType;
|
||||||
|
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 || [];
|
||||||
|
});
|
||||||
this.show = true
|
this.show = true
|
||||||
this.doNav(0,true);
|
this.doNav(0, true);
|
||||||
this.$api.problemmodify.groupByInfotypeCheckState({
|
this.$api.problemmodify.groupByInfotypeCheckState({
|
||||||
projectId:this.row.projectId
|
projectId: this.row.projectId
|
||||||
}).then(d=>{
|
}).then(d => {
|
||||||
let tmps=(d.data||[]).filter(it=>it.infoType==this.infoType);
|
let tmps = (d.data || []).filter(it => it.infoType == this.infoType);
|
||||||
tmps.forEach(it=>{
|
tmps.forEach(it => {
|
||||||
this.count[""+it.checkState]=it.id;
|
this.count["" + it.checkState] = it.id;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -91,23 +195,113 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" >
|
<style lang="less" >
|
||||||
.problem-modify-detail{
|
.problem-modify-detail {
|
||||||
.popup-project-introduction-details{
|
.popup-project-introduction-min {
|
||||||
|
transform: translateY(100px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-project-introduction-details {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
.quality-table{
|
position: relative;
|
||||||
|
|
||||||
|
.quality-table {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font-size-tools {
|
||||||
|
position: absolute;
|
||||||
|
top: -40px;
|
||||||
|
right: 100px;
|
||||||
}
|
}
|
||||||
.head-title-tab{
|
}
|
||||||
|
|
||||||
|
&.font-size-2 {
|
||||||
|
.item-data {
|
||||||
|
line-height: 64px;
|
||||||
|
font-size: 32px;
|
||||||
|
line-height: 64px;
|
||||||
|
|
||||||
|
.div-text {
|
||||||
|
line-height: 64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.font-size-1 {
|
||||||
|
.item-data {
|
||||||
|
line-height: 48px;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 48px;
|
||||||
|
.div-text {
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-title-tab {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.head-nav{
|
|
||||||
|
.head-nav {
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
padding:0px 24px;
|
padding: 0px 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
.data-list {
|
||||||
|
.data-item {
|
||||||
|
border-bottom: solid 1px #fff;
|
||||||
|
box-shadow: inset 7px 0px 11px 5px rgb(36 131 167 / 70%);
|
||||||
|
display: flex;
|
||||||
|
&.time-out{
|
||||||
|
box-shadow: inset 7px 0px 11px 5px rgb(167, 36, 36);
|
||||||
|
}
|
||||||
|
.item-left {
|
||||||
|
display: inline-flex;
|
||||||
|
width: 200px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-right {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: calc(100% - 214px);
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.sp-lbl {
|
||||||
|
display: inline-block;
|
||||||
|
color: aquamarine;
|
||||||
|
|
||||||
|
}
|
||||||
|
.text-timeout{
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
font-size: 64px;
|
||||||
|
color: red;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
top: 27px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-data {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: solid 1px rgba(255, 255, 255, 0.1);
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
.div-text {
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(100% - 200px);
|
||||||
|
vertical-align: top;
|
||||||
|
white-space: break-spaces;
|
||||||
|
word-break: break-word;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</style>
|
|
@ -2,6 +2,8 @@ import Vue from 'vue'
|
||||||
import Api from '../api/index'
|
import Api from '../api/index'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import './style/index.less'
|
import './style/index.less'
|
||||||
|
import dayfilter from '@/utils/dayfilter'
|
||||||
|
dayfilter(Vue);
|
||||||
Vue.prototype.$api=Api;
|
Vue.prototype.$api=Api;
|
||||||
Vue.prototype.$bus=new Vue();
|
Vue.prototype.$bus=new Vue();
|
||||||
Vue.prototype.$apiPath="/jhapi"
|
Vue.prototype.$apiPath="/jhapi"
|
||||||
|
|
|
@ -352,7 +352,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doProbleRowClick(a,b,c){
|
doProbleRowClick(a,b,c){
|
||||||
//this.$refs.probDlg.showDialog(a,0);
|
this.$refs.probDlg.showDialog(a,0);
|
||||||
},
|
},
|
||||||
doSpecialRowClick(row){
|
doSpecialRowClick(row){
|
||||||
row.title = row.projectName+"特种作业人员清单";
|
row.title = row.projectName+"特种作业人员清单";
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
|
||||||
|
const filters={
|
||||||
|
formatDate:(dt,fmt)=>{
|
||||||
|
if(dt){
|
||||||
|
return dayjs(dt).format(fmt||"YYYY-MM-DD");
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
formatTime:dt=>{
|
||||||
|
if(dt){
|
||||||
|
return dayjs(dt).format("HH:mm:ss");
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
formatDateTime:dt=>{
|
||||||
|
if(dt){
|
||||||
|
return dayjs(dt).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export default (vm)=>{
|
||||||
|
Object.keys(filters).forEach(k=>{
|
||||||
|
vm.filter(k,filters[k]);
|
||||||
|
})
|
||||||
|
}
|
|
@ -8,6 +8,20 @@ module.exports = defineConfig({
|
||||||
port: 3000,
|
port: 3000,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
'/profile':{
|
||||||
|
target: `http://62.234.3.186/profile`,
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
['^/profile']:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'/jhapi/profile':{
|
||||||
|
target: `http://62.234.3.186/jhapi/profile`,
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
['^/jhapi/profile']:''
|
||||||
|
}
|
||||||
|
},
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
//target: `http://62.234.3.186/jhapi`,
|
//target: `http://62.234.3.186/jhapi`,
|
||||||
target: `http://127.0.0.1:8090/jhapi`,
|
target: `http://127.0.0.1:8090/jhapi`,
|
||||||
|
@ -15,7 +29,7 @@ module.exports = defineConfig({
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pages:{
|
pages:{
|
||||||
|
|
Loading…
Reference in New Issue