Merge branch 'refs/heads/pet' into dev
commit
a3f070819a
|
@ -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 + '¤tPage=' + 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>
|
||||
|
|
@ -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, // 当true时,Video.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>
|
|
@ -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 + '¤tPage=' + 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>
|
|
@ -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: '' // 行的主键id为MD5
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -93,11 +93,11 @@
|
|||
:corp-info-id="CORP_INFO_ID"
|
||||
:area="area"
|
||||
:gangkou="gangkouActive"/>
|
||||
<renyuan
|
||||
v-if="gangkouActive && gangkouActive !== '00004' && gangkouActive !== '00002' && gangkouActive !== '00005' && bottomOptionsIndex === 4"
|
||||
:corp-info-id="CORP_INFO_ID"
|
||||
:area="area"
|
||||
:gangkou="gangkouActive"/>
|
||||
<!-- <renyuan-->
|
||||
<!-- v-if="gangkouActive && gangkouActive !== '00004' && gangkouActive !== '00002' && gangkouActive !== '00005' && bottomOptionsIndex === 4"-->
|
||||
<!-- :corp-info-id="CORP_INFO_ID"-->
|
||||
<!-- :area="area"-->
|
||||
<!-- :gangkou="gangkouActive"/>-->
|
||||
<renyuan-cfd
|
||||
v-if="gangkouActive && gangkouActive === '00004' && bottomOptionsIndex === 1"
|
||||
:corp-info-id="CORP_INFO_ID"
|
||||
|
@ -226,8 +226,8 @@
|
|||
leave-active-class="animate__animated animate__fadeOutUp"
|
||||
>
|
||||
<div v-if="isPeopleTrajectory" class="people_trajectory">
|
||||
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select">
|
||||
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
|
||||
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select" filterable>
|
||||
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.name || item.id"/>
|
||||
</el-select>
|
||||
<el-button class="search_btn" @click="addTrajectory">搜索</el-button>
|
||||
<el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button>
|
||||
|
@ -326,6 +326,8 @@ var PI = 3.1415926535897932384626
|
|||
var a = 6378245.0 // 卫星椭球坐标投影到平面地图坐标系的投影因子。
|
||||
var ee = 0.00669342162296594323 // 椭球的偏心率。//判断是否在国内,在中国国内的经纬度才需要做偏移
|
||||
const iframeObj = null
|
||||
const mqttPoint = {}
|
||||
let trajectoryEntityCollection = {}
|
||||
export default {
|
||||
components: {
|
||||
AnquanCfd,
|
||||
|
@ -478,7 +480,7 @@ export default {
|
|||
],
|
||||
myEntityCollection: {},
|
||||
poinEntity: {},
|
||||
mqttPoint: {},
|
||||
// mqttPoint: {},
|
||||
allOrientationPoint: [],
|
||||
gangkouActive: '',
|
||||
centerOptionsList: [
|
||||
|
@ -1247,7 +1249,7 @@ export default {
|
|||
linkPort: '8093',
|
||||
VIIDPort: '8088'
|
||||
},
|
||||
trajectoryEntityCollection: {},
|
||||
// trajectoryEntityCollection: {},
|
||||
isPeopleTrajectory: false,
|
||||
peopleTrajectoryValue: ''
|
||||
}
|
||||
|
@ -1595,14 +1597,14 @@ export default {
|
|||
const collection = new Cesium.CustomDataSource('trajectoryEntityCollection')
|
||||
collection.entities.add(entity)
|
||||
viewer.dataSources.add(collection)
|
||||
this.trajectoryEntityCollection = collection
|
||||
trajectoryEntityCollection = collection
|
||||
}
|
||||
})
|
||||
},
|
||||
removeTrajectory() {
|
||||
if (Object.keys(this.trajectoryEntityCollection).length === 0) return
|
||||
viewer.dataSources.remove(this.trajectoryEntityCollection)
|
||||
this.trajectoryEntityCollection = {}
|
||||
if (Object.keys(trajectoryEntityCollection).length === 0) return
|
||||
viewer.dataSources.remove(trajectoryEntityCollection)
|
||||
trajectoryEntityCollection = {}
|
||||
},
|
||||
|
||||
getCatesian3FromPX: function(px) {
|
||||
|
@ -2361,7 +2363,7 @@ export default {
|
|||
} else {
|
||||
ry_drag.addEntity(this.perLocArr[i])
|
||||
|
||||
this.mqttPoint['cfdrydw' + this.perLocArr[i].cardNo] = this.perLocArr[i].cardNo
|
||||
mqttPoint['cfdrydw' + this.perLocArr[i].cardNo] = this.perLocArr[i].cardNo
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2715,7 +2717,7 @@ export default {
|
|||
czksPerLoc.push(perLoc)
|
||||
ry_drag.addEntity(perLoc)
|
||||
var qianzhui = 'czksperson'
|
||||
_this.mqttPoint[qianzhui + item.cardId] = item.cardId
|
||||
mqttPoint[qianzhui + item.cardId] = item.cardId
|
||||
}
|
||||
}
|
||||
// 最后更新ninePerLocArr
|
||||
|
@ -2788,7 +2790,7 @@ export default {
|
|||
}
|
||||
this.onePerLocArr.push(perLoc)
|
||||
ry_drag.addEntity(perLoc)
|
||||
this.mqttPoint[this.subscription.topic.substring(0, this.subscription.topic.lastIndexOf('+')) + item.deviceCode] = item.deviceCode
|
||||
mqttPoint[this.subscription.topic.substring(0, this.subscription.topic.lastIndexOf('+')) + item.deviceCode] = item.deviceCode
|
||||
}
|
||||
}
|
||||
} else if (topic.indexOf('alarm') !== -1) {
|
||||
|
@ -2803,20 +2805,20 @@ export default {
|
|||
})
|
||||
},
|
||||
clearMqttPoint(prefix) {
|
||||
for (const mqttPointKey in this.mqttPoint) {
|
||||
const key = prefix ? prefix + this.mqttPoint[mqttPointKey] : mqttPointKey
|
||||
viewer.entities.removeById(this.mqttPoint[key])
|
||||
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== this.mqttPoint[key])
|
||||
delete this.mqttPoint[key]
|
||||
for (const mqttPointKey in mqttPoint) {
|
||||
const key = prefix ? prefix + mqttPoint[mqttPointKey] : mqttPointKey
|
||||
viewer.entities.removeById(mqttPoint[key])
|
||||
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== mqttPoint[key])
|
||||
delete mqttPoint[key]
|
||||
}
|
||||
},
|
||||
clearRYDWPoint(prefix) {
|
||||
this.fwebsocket.close()
|
||||
for (const mqttPointKey in this.mqttPoint) {
|
||||
const key = prefix ? prefix + this.mqttPoint[mqttPointKey] : mqttPointKey
|
||||
viewer.entities.removeById(this.mqttPoint[key])
|
||||
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== this.mqttPoint[key])
|
||||
delete this.mqttPoint[key]
|
||||
for (const mqttPointKey in mqttPoint) {
|
||||
const key = prefix ? prefix + mqttPoint[mqttPointKey] : mqttPointKey
|
||||
viewer.entities.removeById(mqttPoint[key])
|
||||
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== mqttPoint[key])
|
||||
delete mqttPoint[key]
|
||||
}
|
||||
},
|
||||
// 删除人员定位点
|
||||
|
@ -3001,6 +3003,7 @@ export default {
|
|||
console.info('接收消息')
|
||||
const peopleList = JSON.parse(message.data)
|
||||
console.log(peopleList)
|
||||
viewer.entities.suspendEvents()
|
||||
for (let i = 0; i < peopleList.length; i++) {
|
||||
const item = peopleList[i]
|
||||
if ((!item)) continue
|
||||
|
@ -3019,6 +3022,7 @@ export default {
|
|||
} else {
|
||||
const perLoc = {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
x: x,
|
||||
y: y,
|
||||
icon_type: 'img4_0' + pointColor,
|
||||
|
@ -3029,9 +3033,10 @@ export default {
|
|||
}
|
||||
_this.onePerLocArr.push(perLoc)
|
||||
ry_drag.addEntity(perLoc)
|
||||
_this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id
|
||||
mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id
|
||||
}
|
||||
}
|
||||
viewer.entities.resumeEvents()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3743,7 +3748,7 @@ export default {
|
|||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
.people_trajectory{
|
||||
.people_trajectory{
|
||||
position: absolute;
|
||||
top: -60px;
|
||||
left: 0;
|
||||
|
@ -3760,21 +3765,21 @@ export default {
|
|||
color: #fff;
|
||||
border-color: #558be5;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.cesium-viewer-toolbar, .cesium-viewer-fullscreenContainer, .cesium-infoBox-visible {
|
||||
display: none !important;
|
||||
}
|
||||
.people_trajectory .el-input__inner{
|
||||
.people_trajectory .el-input__inner{
|
||||
background-color: #100693 !important;
|
||||
border-color: #100693 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
.people_trajectory_select{
|
||||
}
|
||||
.people_trajectory_select{
|
||||
background-color: #100693 !important;
|
||||
border-color: #100693 !important;
|
||||
}
|
||||
}
|
||||
.people_trajectory_select .el-select-dropdown__item{
|
||||
color: #fff !important;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,355 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="60px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="文件名">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入关键字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<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 prop="NAME" label="文件名" />
|
||||
<el-table-column prop="imgPatn" label="图片" >
|
||||
<template slot-scope="{row}">
|
||||
<el-tooltip placement="top">
|
||||
<template slot="content">
|
||||
<viewer>
|
||||
<img :src="config.fileUrl + row.FILEPATH" width="100" height="100">
|
||||
</viewer>
|
||||
</template>
|
||||
<el-tag>预览</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="downloadFile(row.RISKWARNING_ID)">下载</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.RISKWARNING_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel">批量删除</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogForm" title="上传文件" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="文件名" prop="NAME">
|
||||
<el-input v-model="form.NAME" placeholder="这里输入名称..." />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="FILE">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChangeIMG"
|
||||
:before-upload="beforeFileUpload"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img :src="dialogImageUrl" width="100%" alt="">
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogForm = false">取 消</el-button>
|
||||
<el-button type="primary" @click="upload">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import { upload } from '@/utils/upload'
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
listLoading: true,
|
||||
dialogForm: false,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
add: true,
|
||||
del: true,
|
||||
edit: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
dates: [],
|
||||
varList: [],
|
||||
hideUpload: false,
|
||||
form: {
|
||||
NAME: '', //
|
||||
FFILE: []
|
||||
},
|
||||
rules: {
|
||||
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
FILE: [{ required: true, message: '附件不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.RISKWARNING_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
TYPE: '1'
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.hideUpload = false
|
||||
this.resetForm()
|
||||
if (this.$refs.upload) {
|
||||
this.$refs.upload.clearFiles()
|
||||
}
|
||||
this.dialogForm = true
|
||||
},
|
||||
beforeFileUpload(file) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
return false
|
||||
} else {
|
||||
this.form.FFILE = file
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file, fileList) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleChangeIMG(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.pop()
|
||||
}
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
// 保存
|
||||
upload() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (this.$refs.upload.uploadFiles.length < 1) {
|
||||
this.$message({
|
||||
message: '请上传图片',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.$refs.upload.submit()
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '上传中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const formData = new FormData()
|
||||
Object.keys(this.form).map(key => {
|
||||
formData.append(key, this.form[key])
|
||||
})
|
||||
formData.append('TYPE', '1')
|
||||
upload(
|
||||
'/riskdisclaimer/add',
|
||||
formData
|
||||
).then((data) => {
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
loading.close()
|
||||
}).catch((e) => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
downloadFile(RISKWARNING_ID) {
|
||||
this.$confirm('确定要下载此文件吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = false
|
||||
// '/mfolder/download?RISKWARNING_ID=' + RISKWARNING_ID,
|
||||
window.location.href = config.httpurl + 'riskdisclaimer/goDownload?RISKWARNING_ID=' + RISKWARNING_ID
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
this.listLoading = false
|
||||
},
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/delete',
|
||||
{
|
||||
RISKWARNING_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
batchDel() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.RISKWARNING_ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/deleteAll',
|
||||
{
|
||||
DATA_IDS: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.$message({
|
||||
message: '批量删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'riskwarning:add,riskwarning:del,riskwarning:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.riskwarningfhadminadd // 新增权限
|
||||
this.del = data.riskwarningfhadmindel // 删除权限
|
||||
this.edit = data.riskwarningfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
NAME: '', //
|
||||
FFILE: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,355 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="60px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="文件名">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入关键字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<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 prop="NAME" label="文件名" />
|
||||
<el-table-column prop="imgPatn" label="图片" >
|
||||
<template slot-scope="{row}">
|
||||
<el-tooltip placement="top">
|
||||
<template slot="content">
|
||||
<viewer>
|
||||
<img :src="config.fileUrl + row.FILEPATH" width="100" height="100">
|
||||
</viewer>
|
||||
</template>
|
||||
<el-tag>预览</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="downloadFile(row.RISKWARNING_ID)">下载</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.RISKWARNING_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel">批量删除</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogForm" title="上传文件" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="文件名" prop="NAME">
|
||||
<el-input v-model="form.NAME" placeholder="这里输入名称..." />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="FILE">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChangeIMG"
|
||||
:before-upload="beforeFileUpload"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img :src="dialogImageUrl" width="100%" alt="">
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogForm = false">取 消</el-button>
|
||||
<el-button type="primary" @click="upload">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import { upload } from '@/utils/upload'
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
listLoading: true,
|
||||
dialogForm: false,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
add: true,
|
||||
del: true,
|
||||
edit: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
dates: [],
|
||||
varList: [],
|
||||
hideUpload: false,
|
||||
form: {
|
||||
NAME: '', //
|
||||
FFILE: []
|
||||
},
|
||||
rules: {
|
||||
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
FILE: [{ required: true, message: '附件不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.RISKWARNING_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
TYPE: '4'
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.hideUpload = false
|
||||
this.resetForm()
|
||||
if (this.$refs.upload) {
|
||||
this.$refs.upload.clearFiles()
|
||||
}
|
||||
this.dialogForm = true
|
||||
},
|
||||
beforeFileUpload(file) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
return false
|
||||
} else {
|
||||
this.form.FFILE = file
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file, fileList) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleChangeIMG(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.pop()
|
||||
}
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
// 保存
|
||||
upload() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (this.$refs.upload.uploadFiles.length < 1) {
|
||||
this.$message({
|
||||
message: '请上传图片',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.$refs.upload.submit()
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '上传中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const formData = new FormData()
|
||||
Object.keys(this.form).map(key => {
|
||||
formData.append(key, this.form[key])
|
||||
})
|
||||
formData.append('TYPE', '4')
|
||||
upload(
|
||||
'/riskdisclaimer/add',
|
||||
formData
|
||||
).then((data) => {
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
loading.close()
|
||||
}).catch((e) => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
downloadFile(RISKWARNING_ID) {
|
||||
this.$confirm('确定要下载此文件吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = false
|
||||
// '/mfolder/download?RISKWARNING_ID=' + RISKWARNING_ID,
|
||||
window.location.href = config.httpurl + 'riskdisclaimer/goDownload?RISKWARNING_ID=' + RISKWARNING_ID
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
this.listLoading = false
|
||||
},
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/delete',
|
||||
{
|
||||
RISKWARNING_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
batchDel() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.RISKWARNING_ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/deleteAll',
|
||||
{
|
||||
DATA_IDS: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.$message({
|
||||
message: '批量删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'riskwarning:add,riskwarning:del,riskwarning:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.riskwarningfhadminadd // 新增权限
|
||||
this.del = data.riskwarningfhadmindel // 删除权限
|
||||
this.edit = data.riskwarningfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
NAME: '', //
|
||||
FFILE: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,355 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="60px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="文件名">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入关键字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<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 prop="NAME" label="文件名" />
|
||||
<el-table-column prop="imgPatn" label="图片" >
|
||||
<template slot-scope="{row}">
|
||||
<el-tooltip placement="top">
|
||||
<template slot="content">
|
||||
<viewer>
|
||||
<img :src="config.fileUrl + row.FILEPATH" width="100" height="100">
|
||||
</viewer>
|
||||
</template>
|
||||
<el-tag>预览</el-tag>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="downloadFile(row.RISKWARNING_ID)">下载</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.RISKWARNING_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel">批量删除</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogForm" title="上传文件" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="文件名" prop="NAME">
|
||||
<el-input v-model="form.NAME" placeholder="这里输入名称..." />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="FILE">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChangeIMG"
|
||||
:before-upload="beforeFileUpload"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img :src="dialogImageUrl" width="100%" alt="">
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogForm = false">取 消</el-button>
|
||||
<el-button type="primary" @click="upload">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import { upload } from '@/utils/upload'
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
listLoading: true,
|
||||
dialogForm: false,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
add: true,
|
||||
del: true,
|
||||
edit: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
dates: [],
|
||||
varList: [],
|
||||
hideUpload: false,
|
||||
form: {
|
||||
NAME: '', //
|
||||
FFILE: []
|
||||
},
|
||||
rules: {
|
||||
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
FILE: [{ required: true, message: '附件不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.RISKWARNING_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
TYPE: '3'
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.hideUpload = false
|
||||
this.resetForm()
|
||||
if (this.$refs.upload) {
|
||||
this.$refs.upload.clearFiles()
|
||||
}
|
||||
this.dialogForm = true
|
||||
},
|
||||
beforeFileUpload(file) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
return false
|
||||
} else {
|
||||
this.form.FFILE = file
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file, fileList) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleChangeIMG(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.pop()
|
||||
}
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
// 保存
|
||||
upload() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (this.$refs.upload.uploadFiles.length < 1) {
|
||||
this.$message({
|
||||
message: '请上传图片',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.$refs.upload.submit()
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '上传中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const formData = new FormData()
|
||||
Object.keys(this.form).map(key => {
|
||||
formData.append(key, this.form[key])
|
||||
})
|
||||
formData.append('TYPE', '3')
|
||||
upload(
|
||||
'/riskdisclaimer/add',
|
||||
formData
|
||||
).then((data) => {
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
loading.close()
|
||||
}).catch((e) => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
downloadFile(RISKWARNING_ID) {
|
||||
this.$confirm('确定要下载此文件吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = false
|
||||
// '/mfolder/download?RISKWARNING_ID=' + RISKWARNING_ID,
|
||||
window.location.href = config.httpurl + 'riskdisclaimer/goDownload?RISKWARNING_ID=' + RISKWARNING_ID
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
this.listLoading = false
|
||||
},
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/delete',
|
||||
{
|
||||
RISKWARNING_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
batchDel() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.RISKWARNING_ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/riskdisclaimer/deleteAll',
|
||||
{
|
||||
DATA_IDS: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.$message({
|
||||
message: '批量删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'riskwarning:add,riskwarning:del,riskwarning:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.riskwarningfhadminadd // 新增权限
|
||||
this.del = data.riskwarningfhadmindel // 删除权限
|
||||
this.edit = data.riskwarningfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
NAME: '', //
|
||||
FFILE: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue