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 workTrain from './workTrain/index'
|
||||
import special from './special/index'
|
||||
import dict from './dict/index'
|
||||
export default {
|
||||
project,
|
||||
dept,
|
||||
|
@ -14,5 +15,6 @@ export default {
|
|||
problemmodify,
|
||||
workFile,
|
||||
workTrain,
|
||||
special
|
||||
special,
|
||||
dict
|
||||
}
|
|
@ -1,30 +1,98 @@
|
|||
<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">
|
||||
{{ row.projectName }}【{{ infoType == 0 ? '安全隐患' : '质量隐患' }}】
|
||||
</template>
|
||||
<div>
|
||||
<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>
|
||||
<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"
|
||||
>
|
||||
<div class="data-list scroll" style="max-height:712px;overflow-y: auto;margin:12px 0px;">
|
||||
<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>
|
||||
</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>
|
||||
<div class="item-right">
|
||||
<div v-if="it.checkState!=4 && it.timeout" class="text-timeout">超时</div>
|
||||
<el-col :span="24" class="item-data">
|
||||
<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>
|
||||
|
||||
</MyDialog>
|
||||
|
@ -39,6 +107,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
fontSize: 0,
|
||||
elKey: 0,
|
||||
nav: 0,
|
||||
infoType: 0,
|
||||
|
@ -50,7 +119,9 @@ export default {
|
|||
"3": 0,
|
||||
"4": 0
|
||||
},
|
||||
dataTable:[]
|
||||
dataTable: [],
|
||||
dicts: [],
|
||||
checkStateDicts: []
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -58,6 +129,14 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
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 : '';
|
||||
},
|
||||
doNav(n, init) {
|
||||
if (n == this.nav && !init) {
|
||||
return;
|
||||
|
@ -68,13 +147,38 @@ export default {
|
|||
infoType: this.infoType,
|
||||
checkState: n
|
||||
}).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++;
|
||||
})
|
||||
},
|
||||
showDialog(row, infoType) {
|
||||
this.row = row;
|
||||
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.doNav(0, true);
|
||||
this.$api.problemmodify.groupByInfotypeCheckState({
|
||||
|
@ -92,16 +196,54 @@ export default {
|
|||
|
||||
<style lang="less" >
|
||||
.problem-modify-detail {
|
||||
.popup-project-introduction-min {
|
||||
transform: translateY(100px);
|
||||
}
|
||||
|
||||
.popup-project-introduction-details {
|
||||
padding: 0px !important;
|
||||
position: relative;
|
||||
|
||||
.quality-table {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.font-size-tools {
|
||||
position: absolute;
|
||||
top: -40px;
|
||||
right: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
&.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;
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
.head-nav {
|
||||
background-size: 100% 100%;
|
||||
display: inline-block;
|
||||
|
@ -109,5 +251,57 @@ export default {
|
|||
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;
|
||||
&.time-out{
|
||||
box-shadow: inset 7px 0px 11px 5px rgb(167, 36, 36);
|
||||
}
|
||||
</style>
|
||||
.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 dayjs from 'dayjs'
|
||||
import './style/index.less'
|
||||
import dayfilter from '@/utils/dayfilter'
|
||||
dayfilter(Vue);
|
||||
Vue.prototype.$api=Api;
|
||||
Vue.prototype.$bus=new Vue();
|
||||
Vue.prototype.$apiPath="/jhapi"
|
||||
|
|
|
@ -352,7 +352,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doProbleRowClick(a,b,c){
|
||||
//this.$refs.probDlg.showDialog(a,0);
|
||||
this.$refs.probDlg.showDialog(a,0);
|
||||
},
|
||||
doSpecialRowClick(row){
|
||||
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,
|
||||
open: true,
|
||||
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]: {
|
||||
//target: `http://62.234.3.186/jhapi`,
|
||||
target: `http://127.0.0.1:8090/jhapi`,
|
||||
|
@ -15,7 +29,7 @@ module.exports = defineConfig({
|
|||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
pages:{
|
||||
|
|
Loading…
Reference in New Issue