1、隐患重复次数统计,包含重复隐患图片的列表、每一个重复隐患图片的详情列表、每一个隐患信息的详情信息

hyx_temporaryAccess
fufeifei 2024-10-24 17:13:35 +08:00
parent dfd8d9289c
commit 9f0703e91a
4 changed files with 877 additions and 0 deletions

View File

@ -0,0 +1,148 @@
<template>
<div id="app-container">
<el-table v-loading="listLoading" ref="multipleTable" :row-key="getRowKey" :data="varList" border tooltip-effect="dark" style="width: 100%">
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
<el-table-column type = "index" label="序号" width="50" align = "center" />
<el-table-column prop="CORP_NAME" label="所属单位" align="center" />
<el-table-column :formatter="formatHiddenSource" prop="SOURCE" label="隐患来源" width="130" align="center" />
<el-table-column :formatter="formatRectificationType" prop="RECTIFICATIONTYPE" label="整改类型" width="100" align="center" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" width="260" align="center" />
<el-table-column prop="HIDDENLEVEL_NAME" label="隐患级别" width="130" align="center" />
<el-table-column prop="FIND_USER_NAME" label="隐患发现人" width="110" align="center" />
<el-table-column prop="HIDDENREGION" label="隐患部位" width="130" align="center" />
<el-table-column prop="CREATTIME" label="隐患发现时间" align="center" />
<el-table-column :formatter="formatHiddenState" prop="STATE" label="隐患状态" width="100" align="center" />
<el-table-column prop="CONFIRM_USER_NAME" label="确认人" width="110" align="center" />
<el-table-column prop="RECTIFICATIONTIME" label="整改时间" align="center" />
<el-table-column prop="RECTIFICATIONOR_NAME" label="整改人" width="110" align="center" />
<el-table-column prop="CHECK_USER_NAME" label="验收人" width="110" align="center" />
<el-table-column label="操作" align="left" width="100">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" size="mini" @click="handleShow(row.HIDDEN_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div style="padding-left: 10px;">
<el-button plain type="info" @click="back"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getPageList" />
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
HIDDEN_ID: '', // ID
detail: true,
listLoading: true,
listQuery: {
page: 1,
limit: 20
},
total: 0,
varList: [],
hiddenlevelList: [], //
hiddenPartList: [], // ,
hiddenTypeList: [], // ,
/** 条件中的字段,没有放在form表单中,是因为怕动态加载中出现问题 **/
//
sourceList: [
{ ID: '1', NAME: '隐患快报' },
{ ID: '2', NAME: '清单排查' },
{ ID: '4', NAME: '安全环保检查(监管端)' },
{ ID: '5', NAME: '安全环保检查(企业端)' },
{ ID: '6', NAME: '消防检查' }
],
//
rectificationTypeList: [
{ ID: '1', NAME: '立即整改' },
{ ID: '2', NAME: '限期整改' }
],
isrelevantList: [
{ ID: '1', NAME: '是' },
{ ID: '2', NAME: '否' }
],
statusList: [
{ ID: '1', NAME: '未整改' },
{ ID: '2', NAME: '已整改' },
{ ID: '4', NAME: '已验收' },
{ ID: '5', NAME: '忽略隐患' },
{ ID: '6', NAME: '重大隐患' },
{ ID: '7', NAME: '待处理的特殊隐患' },
{ ID: '8', NAME: '已处理的特殊隐患' },
{ ID: '-1', NAME: '已过期' },
{ ID: '-2', NAME: '待确认' },
{ ID: '16', NAME: '确认打回' },
{ ID: '10', NAME: '验收打回' }
]
}
},
created() {
this.getPageList(this.$parent.MD5) //
// this.getDict() //
},
methods: {
getRowKey(row) { // id
return row.HIDDEN_ID
},
getPageList(MD5) {
this.varList = []
this.listLoading = true
requestFN(
'/duplicatehazard/findByMD5?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
MD5: MD5
}
).then((data) => {
console.info(data)
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
handleShow(hiddenID) {
this.$parent.activeName = 'Info'
this.$parent.HIDDEN_ID = hiddenID
},
//
getDict: function() {
//
requestFN(
'/hiddenRegion/listAll'
).then((data) => {
this.hiddenPartList = JSON.parse(data.zTreeNodes)
}).catch((e) => {
this.listLoading = false
})
},
//
formatHiddenSource(row) {
const dictItem = this.sourceList.find(item => item.ID == row.SOURCE)
return dictItem ? dictItem.NAME : ''
},
//
formatRectificationType(row) {
const dictItem = this.rectificationTypeList.find(item => item.ID == row.RECTIFICATIONTYPE)
return dictItem ? dictItem.NAME : ''
},
//
formatHiddenState(row) {
const dictItem = this.statusList.find(item => item.ID == row.STATE)
return dictItem ? dictItem.NAME : ''
},
back() {
this.$parent.activeName = 'List'
}
}
}
</script>

View File

@ -0,0 +1,602 @@
<template>
<div>
<div id="printTest" class="app-container">
<div class="print-break">
<div class="level-title">
<h1>隐患信息</h1>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<td class="tbg">隐患来源</td>
<template v-if="pd.SOURCE">
<td> {{ translate(pd.SOURCE.toString() =='3'?'2':pd.SOURCE.toString(), sourceList) }}</td>
</template>
</tr>
<tr>
<td class="tbg">隐患描述</td>
<td>{{ pd.HIDDENDESCR }}</td>
</tr>
<template v-if="pd.SOURCE=='2'"> <!-- -->
<tr >
<td class="tbg">风险点单元</td>
<td>{{ pd.RISK_UNIT }}</td>
</tr>
<tr >
<td class="tbg">辨识部位</td>
<td>{{ pd.IDENTIFICATION }}</td>
</tr>
<tr >
<td class="tbg">存在风险</td>
<td>{{ pd.RISK_DESCR }}</td>
</tr>
<tr>
<td class="tbg">风险分级</td>
<td>{{ pd.LEVEL }}</td>
</tr>
<tr>
<td class="tbg">检查内容</td>
<td>{{ pd.CHECK_CONTENT }}</td>
</tr>
</template>
<tr>
<td class="tbg">隐患级别</td>
<td >{{ pd.editLevelName?pd.editLevelName:pd.HIDDENLEVELNAME }}</td>
</tr>
<tr>
<td class="tbg">隐患类型</td>
<td>{{ pd.HIDDENTYPENAME }}</td>
</tr>
<tr>
<td class="tbg">隐患状态</td>
<td>
<template v-if="pd.STATE">
{{ translate(pd.STATE.toString(), statusList) }}
</template>
</td>
</tr>
<tr>
<td class="tbg">隐患部位</td>
<td>{{ pd.hregionName?pd.hregionName:pd.HIDDENPART }}</td>
</tr>
<tr>
<td class="tbg">隐患上报位置</td>
<td>经度:{{ pd.LONGITUDE }} , 纬度:{{ pd.LATITUDE }}</td>
</tr>
<tr>
<td class="tbg">隐患位置描述</td>
<td>{{ pd.POSITIONDESC }}</td>
</tr>
<tr>
<td class="tbg">隐患图片</td>
<td class="img-select">
<viewer :images="hImgs">
<img v-for="item in hImgs" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" width="100" height="100">
</viewer>
</td>
</tr>
<tr>
<td class="tbg">重复的隐患图片</td>
<td class="img-select">
<viewer :images="[config.fileUrl + this.$parent.repeatedHiddenUrl]">
<img :src="config.fileUrl + this.$parent.repeatedHiddenUrl" width="100" height="100">
</viewer>
</td>
</tr>
<tr v-if="playerOptions.sources[0].src">
<td class="tbg">隐患视频</td>
<td>
<span style="color: #4395ff;cursor: pointer" @click="dialogVideoVisible = true">隐患视频</span>
</td>
</tr>
<tr v-for="item in hiddenFindPeople" :key="item.USER_ID">
<td class="tbg">隐患发现人 </td>
<td>{{ item.NAME }}</td>
</tr>
<tr>
<td class="tbg">隐患发现时间</td>
<td>{{ formatDate(pd.DISCOVERYTIME,'YYYY-MM-DD HH:mm:ss') }}</td>
</tr>
<tr>
<td class="tbg">整改类型</td>
<td>
<template v-if="pd.RECTIFICATIONTYPE=='1'">
立即整改
</template>
<template v-else-if="pd.RECTIFICATIONTYPE=='2'">
限期整改
</template>
</td>
</tr>
<tr v-if="pd.editDeptName ?pd.editDeptName :pd.RECTIFICATIONDEPTNAME">
<td class="tbg">整改负责部门</td>
<td >{{ pd.editDeptName ?pd.editDeptName :pd.RECTIFICATIONDEPTNAME }}</td>
</tr>
<tr v-if="pd.editUserName ?pd.editUserName :pd.RECTIFICATIONORNAME">
<td class="tbg">整改负责人</td>
<td >{{ pd.editUserName ?pd.editUserName :pd.RECTIFICATIONORNAME }}</td>
</tr>
<tr v-if="pd.RECTIFICATIONTYPE=='2' && pd.RECTIFICATIONDEADLINE">
<td class="tbg">整改期限</td>
<td>{{ pd.RECTIFICATIONDEADLINE }}</td>
</tr>
<tr>
<td class="tbg">是否相关方</td>
<td>{{ pd.ISRELEVANT=='1'?'是':'否' }}</td>
</tr>
<template v-if="repulsecause">
<tr v-for="item in repulsecause" :key="item.USER_ID">
<td class="tbg">打回原因</td>
<td>{{ item.REPULSE_CAUSE }}</td>
</tr>
</template>
<template v-if="repulsecause">
<tr v-for="item in repulsecause" :key="item.USER_ID">
<td class="tbg">打回时间</td>
<td>{{ item.OPERATTIME }}</td>
</tr>
</template>
</table>
</div>
</div>
<div v-for="(item,index) in hiddenExamineList" :key="index">
<div class="level-line" />
<table v-if="item.TYPE === 4" class="table-ui print-break">
<div class="level-title">
<h1 >确认信息</h1>
</div>
<tr>
<td class="tbg">隐患级别</td>
<td >{{ item.editLevelName }}</td>
</tr>
<tr v-if="item.editUserName">
<td class="tbg">整改负责人</td>
<td >{{ item.editUserName }}</td>
</tr>
<tr v-if="item.spare3">
<td class="tbg">整改完成期限</td>
<td >{{ item.spare3 }}</td>
</tr>
<tr>
<td class="tbg">隐患确认人</td>
<td>{{ pd.conUserName }}</td>
</tr>
<tr >
<td class="tbg">隐患确认时间</td>
<td>{{ pd.CONFIRM_TIME }}</td>
</tr>
</table>
<table v-else-if="item.TYPE === 2" class="table-ui print-break">
<div class="level-title">
<h1 >延期信息</h1>
</div>
<tr>
<td class="tbg">申请延期日期</td>
<td >{{ item.DELAY_TIME }}</td>
</tr>
<tr>
<td class="tbg">审核人</td>
<td>{{ pd.conUserName }}</td>
</tr>
<tr>
<td class="tbg">处置方案</td>
<td >{{ item.DISPOSAL_PLAN }}</td>
</tr>
<tr v-if="item.DISPOSAL_FILE">
<td class="tbg">方案附件</td>
<td><a style="color: #1e9fff" @click="goViewPdf(item.DISPOSAL_FILE)">[]</a> </td>
</tr>
<tr>
<td class="tbg">延期审核状态</td>
<template v-if="item.STATE===-1">
<td>待审核</td>
</template>
<template v-else-if="item.STATE===1">
<td>通过</td>
</template>
<template v-else-if="item.STATE===2">
<td>未通过</td>
</template>
</tr>
<tr v-if="item.STATE===1">
<td class="tbg">审核时间</td>
<td>{{ item.OPERATTIME }}</td>
</tr>
</table>
<table v-else-if="item.TYPE === 1" class="table-ui print-break">
<div class="level-title">
<h1 >特殊处理审核信息</h1>
</div>
<tr>
<td class="tbg">无法整改原因</td>
<td >{{ item.EXAMINE }}</td>
</tr>
<tr>
<td class="tbg">特殊处置审核状态</td>
<template v-if="item.STATE===-1">
<td>待审核</td>
</template>
<template v-else-if="item.STATE===2">
<td>通过</td>
</template>
<template v-else-if="item.STATE===1">
<td>未通过</td>
</template>
</tr>
<tr v-if="item.STATE===2">
<td class="tbg">处置方案</td>
<td>{{ item.DISPOSAL_PLAN }}</td>
</tr>
<tr v-if="item.STATE===2 && item.DISPOSAL_FILE">
<td class="tbg">处置方案附件</td>
<td><a style="color: #1e9fff" @click="goViewPdf(item.DISPOSAL_FILE)">[]</a> </td>
</tr>
<tr v-if="item.STATE!==-1">
<td class="tbg">审核时间</td>
<td>{{ item.OPERATTIME }}</td>
</tr>
<tr v-if="item.STATE!==-1">
<td class="tbg">审核人</td>
<td>{{ pd.conUserName }}</td>
</tr>
<tr v-if="item.TYPE ==='2'">
<td class="tbg">是否更换整改负责人</td>
<td v-if="item.spare1==='1'"></td>
<td v-if="item.spare1==='0'"></td>
</tr>
<tr v-if="item.STATE!==-1">
<td class="tbg">是否更换整改负责人</td>
<td v-if="item.spare2 == undefined"></td>
<td v-else></td>
</tr>
<tr v-if="item.NEWRECTIFICATIONOR != undefined" >
<td class="tbg">更换整改负责人姓名</td>
<td>{{ item.NEWRECTIFICATIONOR }}</td>
</tr>
</table>
</div>
<div v-if="pd.STATE ==2 || pd.STATE ==4 || pd.STATE == 10 || pd.RECTIFICATIONTYPE == 1" class="print-break">
<div class="level-line" />
<div class="level-title">
<h1>整改信息</h1>
</div>
<table class="table-ui">
<tr>
<td class="tbg">整改描述</td>
<td>{{ pd.RECTIFYDESCR }}</td>
</tr>
<tr v-if="pd.RECTIFICATIONDEPTNAME">
<td class="tbg">整改部门</td>
<td>{{ pd.RECTIFICATIONDEPTNAME }}</td>
</tr>
<tr v-if="pd.RECTIFICATIONORNAME">
<td class="tbg">整改人</td>
<td>{{ pd.RECTIFICATIONORNAME }}</td>
</tr>
<tr v-if="pd.RECTIFICATIONTIME">
<td class="tbg">整改时间</td>
<td>{{ pd.RECTIFICATIONTIME }}</td>
</tr>
<tr v-if="pd.INVESTMENT_FUNDS">
<td class="tbg">投入资金</td>
<td>{{ pd.INVESTMENT_FUNDS }}</td>
</tr>
<tr>
<td class="tbg">整改后图片</td>
<td class="img-select">
<viewer :images="rImgs">
<img v-for="item in rImgs" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" width="100" height="100">
</viewer>
</td>
</tr>
<tr v-if="pd.HAVESCHEME">
<td class="tbg">整改方案</td>
<td v-if="pd.HAVESCHEME==0"></td>
<td v-else-if="pd.HAVESCHEME==1"></td>
<td v-else/>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">排查日期</td>
<td>{{ hs.SCREENINGDATE }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1 && hs.LISTNAME">
<td class="tbg">隐患清单</td>
<td>{{ hs.LISTNAME }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">治理标准要求</td>
<td>{{ hs.GOVERNSTANDARDS }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">治理方法</td>
<td>{{ hs.GOVERNMETHOD }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">经费和物资的落实</td>
<td>{{ hs.EXPENDITURE }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">负责治理人员</td>
<td>{{ hs.PRINCIPAL }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">工时安排</td>
<td>{{ hs.PROGRAMMING }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">时限要求</td>
<td>{{ hs.TIMELIMITFOR }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">工作要求</td>
<td>{{ hs.JOBREQUIREMENT }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">其他事项</td>
<td>{{ hs.OTHERBUSINESS }}</td>
</tr>
<tr v-if="hs && pd.HAVESCHEME==1">
<td class="tbg">方案图片</td>
<td class="img-select">
<viewer :images="sImgs">
<img v-for="item in sImgs" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" width="100" height="100">
</viewer>
</td>
</tr>
</table>
</div>
<div v-show="pd.STATE ==4" class="print-break">
<div class="level-line" />
<div class="level-title">
<h1>验收信息</h1>
</div>
<template v-if="pd.RECTIFICATIONTYPE!='1'">
<table v-for="(data) in checkList" :key="data.value" class="table-ui">
<tr>
<td class="tbg">验收描述</td>
<td>{{ data.CHECKDESCR }}</td>
</tr>
<tr>
<td class="tbg">是否合格</td>
<td>
<template v-if="data.STATUS=='1'">
</template>
<template v-else-if="data.STATUS=='0'">
</template>
</td>
</tr>
<tr>
<td class="tbg">验收部门</td>
<td>{{ data.CHECKDEPTNAME }}</td>
</tr>
<tr>
<td class="tbg">验收人</td>
<td>{{ data.CHECKORNAME }}</td>
</tr>
<tr>
<td class="tbg">验收时间</td>
<td>{{ data.CHECK_TIME }}</td>
</tr>
<tr>
<td class="tbg">验收图片</td>
<td class="img-select">
<viewer :images="data.cImgs">
<img v-for="item in data.cImgs" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" width="100" height="100">
</viewer>
</td>
</tr>
</table>
</template>
<template v-if="pd.RECTIFICATIONTYPE=='1'">
<table class="table-ui">
<tr>
<td class="tbg">验收人</td>
<td>{{ pd.CHECKORNAME }}</td>
</tr>
</table>
</template>
</div>
<div v-show="returnInformation != ''" class="print-break">
<div class="level-line" />
<div class="level-title">
<h1>验收打回信息</h1>
</div>
<table class="table-ui">
<tr>
<td class="tbg">验收打回意见</td>
<td>{{ returnInformation.EXAMINE }}</td>
</tr>
<tr>
<td class="tbg">验收人</td>
<td>{{ returnInformation.CREATORNAME }}</td>
</tr>
<tr>
<td class="tbg">验收时间</td>
<td>{{ returnInformation.CREATTIME }}</td>
</tr>
</table>
</div>
</div>
<div class="ui-height" />
<div class="ui-foot">
<el-button v-print="'#printTest'" type="primary"> </el-button>
<el-button plain type="info" @click="back"> </el-button>
</div>
<el-dialog :visible.sync="dialogVideoVisible" title="隐患视频">
<div>
<video-player
ref="videoPlayer"
:playsinline="true"
:options="playerOptions"
style="width: 100%;"
class="video-player vjs-custom-skin"/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVideoVisible = false"> </el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="dialogViewPdf" title="文档" width="600px">
<div>
<iframe :src="pdfUrl" width="500px" height="500px" frameborder="1" />
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import formatDate from '@/utils/dateformat'
import { requestFN } from '@/utils/request'
import 'video.js/dist/video-js.css'
import { videoPlayer } from 'vue-video-player'
export default {
components: { Pagination, videoPlayer },
data() {
return {
HIDDEN_ID: '', // ID
pd: [], //
hs: [],
checkList: [],
msg: 'add',
pageType: '',
config: config,
pdfUrl: '',
hImgs: [], //
rImgs: [],
sImgs: [],
hiddenFindPeople: [], //
repulsecause: [], //
sourceList: [
{ ID: '1', NAME: '隐患快报' },
{ ID: '2', NAME: '清单排查' },
{ ID: '4', NAME: '安全环保检查(监管端)' },
{ ID: '5', NAME: '安全环保检查(企业端)' },
{ ID: '6', NAME: '消防检查' }
],
statusList: [
{ ID: '1', NAME: '未整改' },
{ ID: '2', NAME: '已整改' },
{ ID: '4', NAME: '已验收' },
{ ID: '5', NAME: '忽略隐患' },
{ ID: '6', NAME: '重大隐患' },
{ ID: '7', NAME: '待处理的特殊隐患' },
{ ID: '8', NAME: '已处理的特殊隐患' },
{ ID: '-1', NAME: '已过期' },
{ ID: '-2', NAME: '待确认' },
{ ID: '16', NAME: '确认打回' },
{ ID: '10', NAME: '验收打回' }
],
playerOptions: {
playbackRates: [0.5, 1.0, 1.5, 2.0], //
autoplay: false, // true,
muted: false, //
loop: false, //
preload: 'auto', // <video>auto,
language: 'zh-CN',
aspectRatio: '16:9', // 使 - "16:9""4:3"
fluid: true, // trueVideo.js player
sources: [{
type: 'video/mp4', //
src: '' // url
}],
poster: '', //
notSupportedMessage: '此视频暂无法播放,请稍后再试', // Video.js
controlBar: {
timeDivider: true, //
durationDisplay: true, //
remainingTimeDisplay: false, //
fullscreenToggle: true //
}
},
dialogVideoVisible: false,
dialogViewPdf: false,
hiddenExamineList: [],
returnInformation: ''
}
},
created() {
if (this.$parent.HIDDEN_ID) {
this.getData(this.$parent.HIDDEN_ID)
}
},
methods: {
getData(hiddenId) {
this.listLoading = true
requestFN(
'/hiddenlist/getHiddenById',
{
HIDDEN_ID: hiddenId,
tm: new Date().getTime()
}
).then((data) => {
var vm = this
vm.pd = data.hidden//
this.hiddenExamineList = data.hiddenExa //
// hiddenExamineList
if (this.hiddenExamineList.length > 0) {
for (let i = 0; i < this.hiddenExamineList.length; i++) {
if (this.hiddenExamineList[i].TYPE === 3) {
this.returnInformation = this.hiddenExamineList[i]
if (this.returnInformation != '' && new Date(this.hiddenExamineList[i].CREATTIME).getTime() > new Date(this.returnInformation.CREATTIME).getTime()) {
this.returnInformation = this.hiddenExamineList[i]
}
}
}
}
vm.hs = data.hs //
vm.checkList = data.checkList //
this.hImgs = data.hImgs //
this.rImgs = data.rImgs //
this.sImgs = data.sImgs //
this.repulsecause = data.repulsecause //
this.hiddenFindPeople = data.hiddenFindPeople //
if (data.hiddenVideoSrc) {
this.playerOptions.sources[0].src = config.fileUrl + data.hiddenVideoSrc
}
}).catch((e) => {
this.listLoading = false
})
},
goViewPdf(filePath) {
this.pageNum = 1
this.pdfUrl = this.config.fileUrl + filePath
this.dialogViewPdf = true
},
back() {
this.$parent.activeName = 'Detail'
},
formatDate(date, format) {
return formatDate(date, format)
},
//
translate(id, list) {
for (let i = 0; i < list.length; i++) {
if (list[i].BIANMA === id || list[i].value === id || list[i].id === id || list[i].ID === id) return list[i].NAME || list[i].label || list[i].name
}
}
}
}
</script>
<style lang="sass" scoped>
.table-ui
.tbg
width: 150px
.img-flex
display: flex
.img-ui
width: 240px
height: 240px
margin-right: 20px
& img
width: 100%
height: 100%
</style>

View File

@ -0,0 +1,100 @@
<template>
<div class="app-container">
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row>
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
<el-table-column type = "index" label="序号" width="50" align = "center" />
<el-table-column label="隐患图片预览" align = "center">
<template slot-scope="scope">
<el-tooltip placement="top">
<div slot="content">
<viewer v-if="scope.row.FILEPATH" :images="[config.fileUrl + scope.row.FILEPATH]">
<img v-show="!imageError" :src="config.fileUrl + scope.row.FILEPATH" width="100" height="100" @error="imageError = true">
</viewer>
<div v-else></div>
</div>
<el-tag>预览</el-tag>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="TOTALNUM" label="隐患重复次数" width="120" align="center" />
<el-table-column label="查看重复隐患列表" width="150" align="center">
<template slot-scope="scope">
<el-button v-if="detail" icon="el-icon-view" size="mini" @click="handleView(scope.row.MD5, scope.row.FILEPATH)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
imageError: false,
detail: true,
listQuery: {
page: 1,
limit: 20
},
total: 0,
dates: [],
varList: []
}
},
created() {
console.info('dhggh')
this.getList()
},
methods: {
getRowKey(row) { // id
return row.MD5
},
//
getList() {
this.varList = []
this.listLoading = true
requestFN(
'/duplicatehazard/dangerPictureCountList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
console.info('data: ' + data)
console.info('data.page.totalResult: ' + data.page.totalResult)
console.info('this.total' + this.total)
// this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
//
handleView(MD5, url) {
this.$parent.activeName = 'Detail'
this.$parent.MD5 = MD5
this.$parent.repeatedHiddenUrl = url //
}
}
}
</script>

View File

@ -0,0 +1,27 @@
<template>
<div>
<List v-show="activeName=='List'" ref="list" />
<Detail v-if="activeName=='Detail'" />
<Info v-if="activeName=='Info'" />
</div>
</template>
<script>
import List from './components/list'
import Detail from './components/detail'
import Info from './components/info'
export default {
components: {
List: List,
Detail: Detail,
Info: Info
},
data() {
return {
activeName: 'List',
HIDDEN_ID: '',
repeatedHiddenUrl: '',
MD5: '' // idMD5
}
}
}
</script>