Merge branch 'dev' into limingyu-20240425-消防和重点工程更新

pet_li_6.6
limingyu 2024-05-06 08:45:40 +08:00
commit 0c88ca43d7
56 changed files with 10756 additions and 151 deletions

View File

@ -9,7 +9,7 @@
<!-- <link href="./static/map/cesium109/Widgets/widgets.css" rel="stylesheet"/>-->
<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.16.0/skins/default/aliplayer-min.css" />
<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.16.0/aliplayer-min.js"></script>
<script type="text/javascript" charset="utf-8" src="http://10.30.20.54:8093/static/imosPlayer.min.js"></script>
<!-- <script type="text/javascript" charset="utf-8" src="http://10.30.20.54:8093/static/imosPlayer.min.js"></script>-->
<script type="text/javascript" charset="utf-8" src="https://api.tianditu.gov.cn/api?v=4.0&tk=e8a16137fd226a62a23cc7ba5c9c78ce"></script>
<script type="text/javascript" src="./static/map/cesium91/CesiumUnminified/Cesium.js"></script>

View File

@ -17,7 +17,7 @@
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves' // waves directive
import uploadFile from '../uploadFile/index.vue'
import uploadFile from '../upload-file/index.vue'
export default {
components: { Pagination, uploadFile },

View File

@ -64,7 +64,7 @@
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import uploadFile from '../../../components/uploadFile'
import uploadFile from '../../../components/upload-file'
import { requestFN } from '@/utils/request'
import editSonLabel from './editSonLabel'

View File

@ -27,7 +27,7 @@
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import uploadFile from '../../../components/uploadFile'
import uploadFile from '../../../components/upload-file'
export default {
components: { uploadFile, Pagination },

View File

@ -56,7 +56,7 @@
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import uploadFile from '../../../components/uploadFile'
import uploadFile from '../../../components/upload-file'
import { requestFN } from '@/utils/request'
import editSonLabel from './editSonLabel'

View File

@ -35,6 +35,12 @@
<td class="bbg">动火人及证书编号</td>
<td colspan="3">{{ pd.WORK_USER }}</td>
</tr>
<tr>
<td class="bbg">动火操作人图片</td>
<td colspan="3">
<img v-viewer v-for="(item,index) in pd.dongHuoCaoZuoRenPic" :src="pd.dongHuoCaoZuoRenPic[index]" :key="index" alt="" width="100" height="100">
</td>
</tr>
<tr>
<td class="bbg">作业单位</td>
<td>{{ pd.CONFIRM_DEPARTMENT_NAME }}</td>
@ -52,7 +58,7 @@
<tr :key="index">
<td class="bbg">分析结果/%</td>
<td>{{ item.ANALYZE_RESULT }}</td>
<td class="bbg">分析人</td>
<td class="bbg">气体分析单位负责</td>
<td>{{ item.ANALYZE_USER }}</td>
</tr>
</template>
@ -97,28 +103,30 @@
{{ item.CONFIRM_NAME }}
</td>
</tr>
<tr v-if="pd.CONFIRM_USER_MEASURES || pd.LEADER_USER_MEASURES || pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES">
<tr
v-if="pd.SAFETY_USER_MEASURES || pd.CONFIRM_OTHER_CONTENT || pd.BELONGING_USER_MEASURES || pd.GUARDIAN_USER_MEASURES || pd.LEADER_USER_MEASURES|| pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES">
<td>{{ measuresList.length + 1 }}</td>
<td colspan="3">
<div v-if="pd.CONFIRM_USER_MEASURES" style="display: flex;justify-content: space-between;">
<span>其他安全措施{{ pd.CONFIRM_USER_MEASURES }}</span>
<span>编制人{{ pd.CONFIRM_USER_NAME }}</span>
<div v-if="pd.SAFETY_USER_MEASURES" style="display: flex;justify-content: space-between;">
<span>安全措施确认人{{ pd.SAFETY_USER_MEASURES }}</span>
</div>
<div v-if="pd.CONFIRM_OTHER_CONTENT" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>作业负责人{{ pd.CONFIRM_OTHER_CONTENT }}</span>
</div>
<div v-if="pd.BELONGING_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>项目责任负责人{{ pd.BELONGING_USER_MEASURES }}</span>
</div>
<div v-if="pd.LEADER_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.LEADER_USER_MEASURES }}</span>
<span>编制人{{ pd.LEADER_USER_NAME }}</span>
<span>属地监管单位{{ pd.LEADER_USER_MEASURES }}</span>
</div>
<div v-if="pd.AUDIT_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.AUDIT_USER_MEASURES }}</span>
<span>编制人{{ pd.AUDIT_USER_NAME }}</span>
<span>安全管理部门{{ pd.AUDIT_USER_MEASURES }}</span>
</div>
<div v-if="pd.APPROVE_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.APPROVE_USER_MEASURES }}</span>
<span>编制人{{ pd.APPROVE_USER_NAME }}</span>
<span>动火审批人{{ pd.APPROVE_USER_MEASURES }}</span>
</div>
<div v-if="pd.MONITOR_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.MONITOR_USER_MEASURES }}</span>
<span>编制人{{ pd.MONITOR_USER_NAME }}</span>
<span>动火前验票{{ pd.MONITOR_USER_MEASURES }}</span>
</div>
</td>
</tr>
@ -128,10 +136,10 @@
<tr>
<td class="bbg">安全交底人</td>
<td colspan="10">
<div v-if="pd.CONFESS_USER_SIGNER_PATH" style="text-align: right">
<div v-for="item in confessList" :key="item.USER_ID" style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
<span>{{ pd.CONFESS_USER_SIGNER_TIME }}</span>
<img v-viewer :src="config.fileUrl + item.APPROVAL_SIGNATURE" alt="" width="100" height="100">
<span>{{ item.APPROVAL_SIGNATURE_TIME }}</span>
</div>
</td>
</tr>
@ -155,6 +163,16 @@
</div>
</td>
</tr>
<tr>
<td class="bbg">安全措施确认人</td>
<td colspan="3">
<div v-if="pd.SAFETY_SIGNATURE" style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.SAFETY_SIGNATURE" alt="" width="100" height="100">
<span>{{ pd.SAFETY_SIGNATURE_TIME }}</span>
</div>
</td>
</tr>
<tr v-if="pd.CONFIRM_USER_SIGNER_PATH">
<td colspan="6">
<div>作业负责人意见{{ pd.CONFIRM_CONTENT }}</div>
@ -165,6 +183,16 @@
</div>
</td>
</tr>
<tr v-if="pd.BELONGING_SIGNATURE">
<td colspan="6">
<div>项目主管部门负责人意见{{ pd.BELONGING_OPINIONS }}</div>
<div style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.BELONGING_SIGNATURE" alt="" width="100" height="100">
<span>{{ pd.BELONGING_SIGNATURE_TIME }}</span>
</div>
</td>
</tr>
<tr v-if="pd.LEADER_USER_SIGNER_PATH">
<td colspan="6">
<div>所在单位意见{{ pd.LEADER_CONTENT }}</div>
@ -197,7 +225,7 @@
</tr>
<tr v-if="pd.MONITOR_USER_SIGNER_PATH">
<td colspan="6">
<div>动火前岗位当班班长验票情况{{ pd.MONITOR_CONTENT }}</div>
<div>动火前验票负责人{{ pd.MONITOR_CONTENT }}</div>
<div style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.MONITOR_USER_SIGNER_PATH" alt="" width="100" height="100">
@ -238,7 +266,8 @@ export default {
gasList: [],
imgList: [],
imgList1: [],
otherProtectiveMeasures: []
otherProtectiveMeasures: [],
confessList: []
}
},
created() {
@ -278,6 +307,11 @@ export default {
this.pd = data.pd // map
this.imgList = data.imgList
this.imgList1 = data.imgList1
data.pd.confessList.forEach(item => {
if (item.APPROVAL_SIGNATURE_TIME !== undefined && item.APPROVAL_SIGNATURE_TIME.trim() !== '') {
this.confessList.push(item)
}
})
for (let i = 0; i < data.measuresList.length; i++) {
//
const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('')
@ -313,6 +347,13 @@ export default {
this.pd.APPROVE_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[3]
this.pd.MONITOR_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[4]
}
const dongHuoCaoZuoRenPic = data.imgList2
if (dongHuoCaoZuoRenPic && dongHuoCaoZuoRenPic.length > 0) {
this.pd.dongHuoCaoZuoRenPic = []
for (let i = 0; i < dongHuoCaoZuoRenPic.length; i++) {
this.pd.dongHuoCaoZuoRenPic.push(this.config.fileUrl + dongHuoCaoZuoRenPic[i].FILEPATH)
}
}
}).catch((e) => {
this.listLoading = false
})

View File

@ -52,12 +52,14 @@
<template slot-scope="{row}">
<span v-if="row.APPLY_STATUS==0"></span>
<span v-else-if="row.APPLY_STATUS==1">作业负责人待审核</span>
<span v-else-if="row.APPLY_STATUS==2">所在单位待审核</span>
<span v-else-if="row.APPLY_STATUS==1.5">项目负责人待审核</span>
<span v-else-if="row.APPLY_STATUS==2">属地监管单位待审核</span>
<span v-else-if="row.APPLY_STATUS==4">安全管理部门待审核</span>
<span v-else-if="row.APPLY_STATUS==5">动火审批人待审核</span>
<span v-else-if="row.APPLY_STATUS==6">班长待验票</span>
<span v-else-if="row.APPLY_STATUS==7">待验收</span>
<span v-else-if="row.APPLY_STATUS==8">验收归档</span>
<span v-else-if="row.APPLY_STATUS==-1.5">项目负责人审核打回</span>
<span v-else-if="row.APPLY_STATUS==-2">作业负责人审核打回</span>
<span v-else-if="row.APPLY_STATUS==-4">所在单位审核打回</span>
<span v-else-if="row.APPLY_STATUS==-5">安全管理部门审核打回</span>
@ -72,12 +74,14 @@
<template slot-scope="{row}">
<span v-if="row.APPLY_STATUS==0">{{ row.CONFIRM_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==1">{{ row.CONFIRM_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==1.5">{{ row.BELONGING_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==2">{{ row.LEADER_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==4">{{ row.AUDIT_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==5">{{ row.APPROVE_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==6">{{ row.MONITOR_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==7">{{ row.ACCEPT_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==8">{{ row.ACCEPT_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==-1.5">{{ row.BELONGING_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==-2">{{ row.CONFIRM_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==-4">{{ row.LEADER_USER_NAME }}</span>
<span v-else-if="row.APPLY_STATUS==-5">{{ row.AUDIT_USER_NAME }}</span>
@ -144,8 +148,7 @@ export default {
statusList: [
{ ID: '0', NAME: '特级' },
{ ID: '1', NAME: '一级' },
{ ID: '2', NAME: '二级' },
{ ID: '4', NAME: '三级' }
{ ID: '2', NAME: '二级' }
],
STATUS: '',
DEPTIDS: ''

View File

@ -27,6 +27,12 @@
<td class="bbg-transparent">动火人及证书编号</td>
<td colspan="3">{{ pd.WORK_USER }}</td>
</tr>
<tr>
<td class="bbg-transparent">动火操作人图片</td>
<td colspan="3">
<img v-viewer v-for="(item,index) in pd.dongHuoCaoZuoRenPic" :src="pd.dongHuoCaoZuoRenPic[index]" :key="index" alt="" width="100" height="100">
</td>
</tr>
<tr>
<td class="bbg-transparent">作业单位</td>
<td>{{ pd.CONFIRM_DEPARTMENT_NAME }}</td>
@ -44,7 +50,7 @@
<tr :key="index">
<td class="bbg-transparent">分析结果/%</td>
<td>{{ item.ANALYZE_RESULT }}</td>
<td class="bbg-transparent">分析</td>
<td class="bbg-transparent">气体单位负责</td>
<td>{{ item.ANALYZE_USER }}</td>
</tr>
</template>
@ -89,28 +95,33 @@
{{ item.CONFIRM_NAME }}
</td>
</tr>
<tr v-if="pd.CONFIRM_USER_MEASURES || pd.LEADER_USER_MEASURES || pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES">
<tr v-if="pd.SAFETY_USER_MEASURES || pd.CONFIRM_OTHER_CONTENT || pd.BELONGING_USER_MEASURES || pd.GUARDIAN_USER_MEASURES || pd.LEADER_USER_MEASURES
|| pd.AUDIT_USER_MEASURES || pd.APPROVE_USER_MEASURES || pd.MONITOR_USER_MEASURES">
<td>{{ measuresList.length + 1 }}</td>
<td colspan="3">
<div v-if="pd.CONFIRM_USER_MEASURES" style="display: flex;justify-content: space-between;">
<span>其他安全措施{{ pd.CONFIRM_USER_MEASURES }}</span>
<span>编制人{{ pd.CONFIRM_USER_NAME }}</span>
<div v-if="pd.SAFETY_USER_MEASURES" style="display: flex;justify-content: space-between;">
<span>安全措施确认人{{ pd.SAFETY_USER_MEASURES }}</span>
</div>
<div v-if="pd.CONFIRM_OTHER_CONTENT" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>作业负责人{{ pd.CONFIRM_OTHER_CONTENT }}</span>
</div>
<div v-if="pd.BELONGING_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>项目责任负责人{{ pd.BELONGING_USER_MEASURES }}</span>
</div>
<!-- <div v-if="pd.GUARDIAN_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">-->
<!-- <span>属地监管单位{{ pd.GUARDIAN_USER_MEASURES }}</span>-->
<!-- </div>-->
<div v-if="pd.LEADER_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.LEADER_USER_MEASURES }}</span>
<span>编制人{{ pd.LEADER_USER_NAME }}</span>
<span>属地监管单位{{ pd.LEADER_USER_MEASURES }}</span>
</div>
<div v-if="pd.AUDIT_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.AUDIT_USER_MEASURES }}</span>
<span>编制人{{ pd.AUDIT_USER_NAME }}</span>
<span>安全管理部门{{ pd.AUDIT_USER_MEASURES }}</span>
</div>
<div v-if="pd.APPROVE_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.APPROVE_USER_MEASURES }}</span>
<span>编制人{{ pd.APPROVE_USER_NAME }}</span>
<span>动火审批人{{ pd.APPROVE_USER_MEASURES }}</span>
</div>
<div v-if="pd.MONITOR_USER_MEASURES" style="display: flex;justify-content: space-between;margin-top: 10px;">
<span>其他安全措施{{ pd.MONITOR_USER_MEASURES }}</span>
<span>编制人{{ pd.MONITOR_USER_NAME }}</span>
<span>动火前验票{{ pd.MONITOR_USER_MEASURES }}</span>
</div>
</td>
</tr>
@ -120,10 +131,10 @@
<tr>
<td class="bbg-transparent">安全交底人</td>
<td colspan="10">
<div v-if="pd.CONFESS_USER_SIGNER_PATH" style="text-align: right">
<div v-for="item in confessList" :key="item.USER_ID" style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
<span>{{ pd.CONFESS_USER_SIGNER_TIME }}</span>
<img v-viewer :src="config.fileUrl + item.APPROVAL_SIGNATURE" alt="" width="100" height="100">
<span>{{ item.APPROVAL_SIGNATURE_TIME }}</span>
</div>
</td>
</tr>
@ -147,6 +158,16 @@
</div>
</td>
</tr>
<tr>
<td class="bbg-transparent">安全措施确认人</td>
<td colspan="3">
<div v-if="pd.SAFETY_SIGNATURE" style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.SAFETY_SIGNATURE" alt="" width="100" height="100">
<span>{{ pd.SAFETY_SIGNATURE_TIME }}</span>
</div>
</td>
</tr>
<tr v-if="pd.CONFIRM_USER_SIGNER_PATH">
<td colspan="6">
<div>作业负责人意见{{ pd.CONFIRM_CONTENT }}</div>
@ -157,9 +178,19 @@
</div>
</td>
</tr>
<tr v-if="pd.BELONGING_SIGNATURE">
<td colspan="6">
<div>项目主管部门负责人意见{{ pd.BELONGING_OPINIONS }}</div>
<div style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.BELONGING_SIGNATURE" alt="" width="100" height="100">
<span>{{ pd.BELONGING_SIGNATURE_TIME }}</span>
</div>
</td>
</tr>
<tr v-if="pd.LEADER_USER_SIGNER_PATH">
<td colspan="6">
<div>所在单位意见{{ pd.LEADER_CONTENT }}</div>
<div>属地监管单位意见{{ pd.LEADER_CONTENT }}</div>
<div style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.LEADER_USER_SIGNER_PATH" alt="" width="100" height="100">
@ -189,7 +220,7 @@
</tr>
<tr v-if="pd.MONITOR_USER_SIGNER_PATH">
<td colspan="6">
<div>动火前岗位当班班长验票情况{{ pd.MONITOR_CONTENT }}</div>
<div>动火前验票负责人{{ pd.MONITOR_CONTENT }}</div>
<div style="text-align: right">
<span>签字</span>
<img v-viewer :src="config.fileUrl + pd.MONITOR_USER_SIGNER_PATH" alt="" width="100" height="100">
@ -241,7 +272,8 @@ export default {
gasList: [],
imgList: [],
imgList1: [],
otherProtectiveMeasures: []
otherProtectiveMeasures: [],
confessList: []
}
},
created() {
@ -283,6 +315,11 @@ export default {
this.pd = data.pd // map
this.imgList = data.imgList
this.imgList1 = data.imgList1
data.pd.confessList.forEach(item => {
if (item.APPROVAL_SIGNATURE_TIME !== undefined && item.APPROVAL_SIGNATURE_TIME.trim() !== '') {
this.confessList.push(item)
}
})
for (let i = 0; i < data.measuresList.length; i++) {
//
const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('')
@ -318,6 +355,13 @@ export default {
this.pd.APPROVE_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[3]
this.pd.MONITOR_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[4]
}
let dongHuoCaoZuoRenPic = data.imgList2
if (dongHuoCaoZuoRenPic && dongHuoCaoZuoRenPic.length > 0) {
this.pd.dongHuoCaoZuoRenPic = []
for (let i = 0; i < dongHuoCaoZuoRenPic.length; i++) {
this.pd.dongHuoCaoZuoRenPic.push(this.config.fileUrl + dongHuoCaoZuoRenPic[i].FILEPATH)
}
}
}).catch((e) => {
this.listLoading = false
})

View File

@ -1,6 +1,6 @@
<template>
<div class="bi-different-dialog">
<el-dialog id="eldig" :visible="visible" :before-close="closeDialog" :title="title" :close-on-click-modal="false" :width="width">
<el-dialog id="eldig" :visible="visible" :before-close="closeDialog" :title="title" :close-on-click-modal="false" :width="width" top="50px">
<!-- 动火 -->
<!--消防模块对接-->
<weatherstation v-if="type === '293187ddfd984c9ab3fd716aef58da0e'" :id="id" :type="type" :gangkou="gangkou"/>
@ -27,7 +27,7 @@
<hotworkFirst v-if="type === 'HOTWORK' && corpInfoId === '035958e685cf4850bc40151c5e0617a6' " :id="id" :type="type" :gangkou="gangkou"/>
<!--秦港一公司 动火作业 详细页面 end-->
<!--其他公司 动火作业 详细页面 start-->
<hotwork v-if="type === 'HOTWORK' || type === 'HOTWORK00005' && corpInfoId !== '635917e77af8461691d5da5507b56347' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" :gangkou="gangkou"/>
<hotwork v-if="(type === 'HOTWORK' || type === 'HOTWORK00005') && corpInfoId !== '635917e77af8461691d5da5507b56347' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" :gangkou="gangkou"/>
<!--其他公司 动火作业 详细页面 end-->
<!--其他七项作业共用一个详细页面 start-->
<confinedspace v-if="type === 'CONFINEDSPACE' || type === 'CONFINEDSPACE00005' && corpInfoId !== '635917e77af8461691d5da5507b56347'" :id="id" :type="type" :gangkou="gangkou"/>
@ -59,6 +59,9 @@
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />
<!-- 重点工程 end -->
<!-- 气象监测-右边栏 start-->
<meteorological-monitoring v-if="type === 'METEOROLOGICAL'" :id="id" :type="type" :gangkou="gangkou"/>
<!-- 气象监测-右边栏 end-->
</el-dialog>
</div>
</template>
@ -106,6 +109,8 @@ import peoplePositionYGS from './peoplePositionYGS.vue'
import outSourceInfo from './outSourceInfo.vue'
import outSourceVideoInfo from './outSourceVideoInfo.vue'
import AlarmDevice from './alarmDevice'
import meteorologicalMonitoring from './meteorologicalMonitoring.vue'
export default {
components: {
@ -150,7 +155,8 @@ export default {
peoplePositionYGS,
outSourceInfo,
outSourceVideoInfo,
MkGateMachineCmt
MkGateMachineCmt,
meteorologicalMonitoring
},
props: {
title: {
@ -230,7 +236,7 @@ export default {
font-size: 14px;
color: #fff;
overflow-y: auto;
max-height: 60vh;
max-height: 85vh;
//
&::-webkit-scrollbar {

View File

@ -0,0 +1,46 @@
<template>
<div class="app-container print-work">
<iframe
:src="'http://192.168.42.57:8080/QinHuangDao'"
style="width: 100%;height: 80vh;"/>
</div>
</template>
<script>
export default {
props: {
id: {
type: String,
default() {
return ''
}
},
type: {
type: String,
default() {
return ''
}
}
},
data() {
return {}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
#main4{
width: 340px;
height: 380px;
}
#main5{
width: 340px;
height: 380px;
}
#main6{
width: 340px;
height: 380px;
}
</style>

View File

@ -16,7 +16,7 @@
<script>
import { requestFN } from '@/utils/request'
const imosPlayer = window.imosPlayer
// const imosPlayer = window.imosPlayer
let iframeObj = null
export default {
@ -65,19 +65,19 @@ export default {
},
methods: {
showYsVideo() {
iframeObj = imosPlayer.createPanelWindow()
var dom = document.getElementById('aLiVideoPlayer')
iframeObj.style.margin = 'auto'
dom.appendChild(iframeObj)
imosPlayer
.playLive(iframeObj.id, {
camera: this.id,
title: this.id,
stream: 1
})
.then((e) => {
console.log(e)
})
// iframeObj = imosPlayer.createPanelWindow()
// var dom = document.getElementById('aLiVideoPlayer')
// iframeObj.style.margin = 'auto'
// dom.appendChild(iframeObj)
// imosPlayer
// .playLive(iframeObj.id, {
// camera: this.id,
// title: this.id,
// stream: 1
// })
// .then((e) => {
// console.log(e)
// })
},
showVideo() {
let url = this.requestUrl

View File

@ -277,6 +277,7 @@ import cloneDeep from 'lodash/cloneDeep'
import fullScreenMixins from '@/assets/mixins/fullScreen'
import { animate } from 'motion'
import loadMapBoxCfd from './js/mapboxCfd'
import loadCmtMapBox from './js/mapboxCmt'
import loadMapBoxCzks from './js/mapboxCzks'
import loadMapBox from './js/mapbox'
import AnquanCfd from './components/anquanCfd'
@ -295,7 +296,7 @@ import axios from 'axios'
// md5
import md5 from 'md5'
const imosPlayer = window.imosPlayer
// const imosPlayer = window.imosPlayer
var PI = 3.1415926535897932384626
var a = 6378245.0 //
var ee = 0.00669342162296594323 // 椭球的偏心率。//判断是否在国内在中国国内的经纬度才需要做偏移
@ -429,6 +430,12 @@ export default {
checkImg: require('../../assets/map/index/map_on.png'),
check: false,
label: '纯净地图'
},
{
img: require('../../assets/map/index/map.png'),
checkImg: require('../../assets/map/index/map_on.png'),
check: '',
label: '气象监测'
}
],
myEntityCollection: {},
@ -870,6 +877,7 @@ export default {
pointBoxCfd: [],
pointBox: [],
pointBoxCzks: [],
pointBoxCmt: [],
fwebsocket: {},
redList: [],
orangeList: [],
@ -1151,6 +1159,7 @@ export default {
mounted() {
this.initMap()
this.pointBoxCfd = loadMapBoxCfd()
this.pointBoxCmt = loadCmtMapBox()
this.pointBox = loadMapBox()
this.pointBoxCzks = loadMapBoxCzks()
// this.ysVideoInit()
@ -1173,49 +1182,6 @@ export default {
})
},
ysVideoInit() {
//
var _this = this
requestFN(
'/map/loginOrKeepAlive',
{
}
).then((data) => {
const token = data.token
var nbsp = String.fromCharCode(160)
var arr = []
arr.length = 40
const str = arr.fill(nbsp).join('')
const voidPath = imosPlayer.getUniqueID()
window.voidPath = voidPath
document.title = document.title + str + new Date().getTime()
_this.keepalive(token)
setInterval(_this.keepalive, 30000, token)
window.videoWindow = 0
imosPlayer.setLinkPort('8093')
imosPlayer
.init({
ip: '172.14.0.54',
token: token,
title: document.title,
voidListenerPath: '\\' + voidPath
})
.then(async(resr) => {
if (resr.ErrCode === 0) {
// imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS)
// imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS)
// eslint-disable-next-line no-alert
console.info('登录成功')
} else {
// eslint-disable-next-line no-alert
console.info(resr.ErrMsg)
}
})
.catch((err) => {
console.error(err)
})
})
},
// keepalive(token) {
// axios({
@ -1380,6 +1346,15 @@ export default {
url: '/mapapi/ware/upload/qhdgysh/merge_tile.json'
})
viewer.scene.primitives.add(qhdgysh)
var czkszhmt = new Cesium.Cesium3DTileset({ //
url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/merge_tile.json'
})
viewer.scene.primitives.add(czkszhmt)
var czksksmt = new Cesium.Cesium3DTileset({//
url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/merge_tile.json'
})
viewer.scene.primitives.add(czksksmt)
},
leftDownAction() {
@ -1894,6 +1869,14 @@ export default {
this.componentKey = Math.random()
this.bottomOptionsKey = Math.random()
this.bottomOptionsAnimationComplex = false
} else if (index === 6) {
this.dialog.visible = true
this.dialog.title = '气象监测'
this.dialog.type = 'METEOROLOGICAL'
this.dialog.id = 'METEOROLOGICAL'
this.dialog.corpInfoId = ''
this.dialog.infoname = ''
this.dialog.width = '96%'
}
},
changeSceneMode(check) {

View File

@ -70,10 +70,12 @@ import './PolylineTrailLinkMaterialProperty'
import loadMapBox from './mapbox'
import loadMapBoxCfd from './mapboxCfd'
import loadMapBoxCzks from './mapboxCzks'
import loadCmtMapBox from './mapboxCmt'
const polygonMap = {
'00003': loadMapBox,
'00002': loadMapBoxCzks,
'00005': loadCmtMapBox,
'00004': loadMapBoxCfd
}

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ import { requestFN } from '@/utils/request'
import editLabel from '../../../Label/components/editLabel.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {

View File

@ -15,7 +15,7 @@
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },

View File

@ -79,7 +79,7 @@ import editLabel from '../../../Label/components/editLabel.vue'
import selectLabel from '../../../Label/components/selectLable.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {

View File

@ -306,7 +306,8 @@ export default {
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '0',
CORPINFO_ID: '0'
CORPINFO_ID: '0',
MIGRATION_FLAG: '1'
}
).then((data) => {
this.listLoading = false

View File

@ -15,7 +15,7 @@
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },

View File

@ -59,7 +59,7 @@ import editLabel from '../../../Label/components/editLabel.vue'
import selectLabel from '../../../Label/components/selectLable.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {

View File

@ -242,7 +242,8 @@ export default {
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '1',
CORPINFO_ID: '0'
CORPINFO_ID: '0',
MIGRATION_FLAG: '1'
}
).then((data) => {
this.listLoading = false

View File

@ -15,7 +15,7 @@
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },

View File

@ -59,7 +59,7 @@ import editLabel from '../../../Label/components/editLabel.vue'
import selectLabel from '../../../Label/components/selectLable.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {

View File

@ -280,7 +280,8 @@ export default {
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '2',
CORPINFO_ID: '0'
CORPINFO_ID: '0',
MIGRATION_FLAG: '1'
}
).then((data) => {
this.listLoading = false

View File

@ -15,7 +15,7 @@
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/uploadFile/index.vue'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },

View File

@ -0,0 +1,188 @@
<template>
<el-drawer
v-if="visible"
ref="drawer"
:visible.sync="visible"
:before-close="close"
title="搜索条件"
size="50%">
<div style="margin-left: 30px">
<el-form ref="form" label-width="200px">
<el-form-item label="规程属性:" prop="CATEGORY_LIST">
<multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" title="选择"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName" title="选择"/>
</el-form-item>
<el-form-item label="国民经济行业类型:" prop="SPECIFICATION_TYPES">
<multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy title="选择"/>
</el-form-item>
<el-form-item label="标签:" prop="LABELS">
<multiple-choice :dynamic-tags.sync="form.LABELS" :row-key="key.labelsKey" :row-name="key.labelsName" title="选择"/>
</el-form-item>
<el-form-item v-if="false" label="企业:">
<el-select
v-model="form.CORPINFO_ID"
:remote-method="searchCorp"
:loading="selectLoading"
filterable
remote
reserve-keyword
placeholder="请输入关键词">
<el-option
v-for="item in corp_list"
:key="item.CORPINFO_ID"
:label="item.CORP_NAME"
:value="item.CORPINFO_ID"/>
</el-select>
</el-form-item>
</el-form>
<div>
<el-button @click="closePanel"> </el-button>
<el-button :loading="loading" type="primary" @click="submit">{{ loading ? ' ...' : ' ' }}</el-button>
</div>
</div>
</el-drawer>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves' // waves directive
import { videoPlayer } from 'vue-video-player'
import 'video.js/dist/video-js.css'
import multipleChoice from '../../../util/multipleChoice.vue'
import { requestFN } from '@/utils/request'
export default {
components: { multipleChoice, Pagination, videoPlayer },
directives: { waves },
props: {
haveCorpFlag: {
type: Boolean,
default: false
}
},
data() {
return {
visible: false,
loading: false,
key: {
typeKey: 'DICTIONARIES_ID',
typeName: 'NAME',
specificationTypeKey: 'DICTIONARIES_ID',
specificationTypeName: 'NAME',
categoryKey: 'DICTIONARIES_ID',
categoryName: 'NAME',
labelsKey: 'BUS_LABEL_FACTORY_ID',
labelsName: 'NAME'
},
typeList: [],
industryTypeList: [],
categoryList: [],
form: {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: [''],
CORPINFO_ID: ''
},
corp_list: [],
selectLoading: false
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
created() {
this.getDic()
},
methods: {
init(tags) {
this.visible = true
},
close(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: ['']
}
done()
})
.catch(e => {})
},
closePanel() {
this.visible = false
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: ['']
}
},
submit() {
this.$emit('getResult', this.form)
this.visible = false
},
getDic() {
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'ca4e4a7597f8485d8be323bd6876c40b' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' }
).then((data) => {
this.industryTypeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '99543742b79b473480617191f7ac256e' }
).then((data) => {
this.categoryList = data.list
}).catch((e) => {
this.loading = false
})
},
clear() {
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: [''],
TTRIBUTE_LIST: [''],
CORPINFO_ID: ''
}
},
searchCorp(query) {
if (query !== '') {
this.selectLoading = true
requestFN(
'corpinfo/list', { KEYWORDS: query }
).then((data) => {
this.corp_list = data.varList
this.selectLoading = false
}).catch((e) => {
console.log(e)
this.selectLoading = false
})
}
}
}
}
</script>
<style scoped>
.information >>> .el-scrollbar__wrap {
overflow-x: hidden;
}
</style>

View File

@ -0,0 +1,38 @@
<template>
<div class="app-container">
<el-tabs type="border-card" @tab-click="changTab">
<el-tab-pane label="安全操作规程平台资源库">
<list/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves'
import List from './list.vue'
import ListEm from './listEm.vue'
export default {
components: { List, Pagination, ListEm },
directives: { waves },
data() {
return {
vectory: 'listEm'
}
},
created() {
},
methods: {
changTab(title) {
console.log(title.label)
if (title.label === '安全操作规程平台资源库') { this.vectory = 'list' }
if (title.label === '安全操作规程') { this.vectory = 'listEm' }
}
}
}
</script>

View File

@ -0,0 +1,392 @@
<template>
<el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" :title="title" destroy-on-close @close="clear" >
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-form-item v-if="false" label="规程属性:" prop="CATEGORY_LIST">
<multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" :limit="1" @getChooseOne="getChooseOne"/>
</el-form-item>
<el-form-item label="安全操作规程名称:" prop="REMARKS">
<el-input v-model="form.REMARKS" style="width: 100%"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName"/>
</el-form-item>
<el-form-item v-if="false" label="国民经济行业类型:" prop="SPECIFICATION_TYPES">
<multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy/>
</el-form-item>
<el-form-item v-if="false" label="状态:" prop="STATUS">
<el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;">
<el-option label="停用" value="0"/>
<el-option label="启用" value="1"/>
</el-select>
</el-form-item>
<el-form-item v-if="!isEdit" label="文件:" prop="FILE">
<upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/>
</el-form-item>
<el-form-item v-if="!isEdit" label="添加文件内容:">
<el-button size="small" type="primary" @click="openTextEdit()"></el-button>
</el-form-item>
<el-form-item v-if="isEdit" label="添加文件内容:">
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},true)"></el-button>
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},false)"></el-button>
<el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">word</el-button>
</el-form-item>
<el-form-item label="标签:" prop="labels">
<multiple-choice :dynamic-tags.sync="form.labels" :row-key="key.labelsKey" :row-name="key.labelsName" can-add/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</div>
<edit-label ref="editLabel" append-to-body/>
<select-label ref="selectLabel" append-to-body @getResult="getChooseTage"/>
<select-type ref="selectType" :limit="1" append-to-body @getResult="getType"/>
<text-editing ref="textEditing" :disabled="textDisabled" append-to-body title="文本编辑器" @getResult="getText"/>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import { requestFN } from '@/utils/request'
import editLabel from '../../../Label/components/editLabel.vue'
import selectLabel from '../../../Label/components/selectLable.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import UploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice, UploadFile },
directives: { waves },
props: {
title: {
type: String,
default: ''
}
},
data() {
return {
dialogVisible: false,
form: {
REMARKS: '',
FILE: [],
labels: [''],
TYPE: '',
TYPES: [''],
SPECIFICATION_TYPES: [''],
CATEGORY_LIST: [''],
STATUS: '',
ASSOCIATION: '0',
types: [],
specification_types: [],
category_list: [],
TEXT_INFO: ''
},
key: {
typeKey: 'DICTIONARIES_ID',
typeName: 'NAME',
specificationTypeKey: 'DICTIONARIES_ID',
specificationTypeName: 'NAME',
categoryKey: 'DICTIONARIES_ID',
categoryName: 'NAME',
labelsKey: 'BUS_LABEL_FACTORY_ID',
labelsName: 'NAME'
},
rules: {
REMARKS: [{ required: true, message: '请输安全操作规程', trigger: 'change' }],
STATUS: [{ required: true, message: '请选择状态', trigger: 'change' }],
FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }],
TYPES: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('类型必选'))
}
return callback()
},
trigger: 'blur'
}],
SPECIFICATION_TYPES: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('操作规程行业类型必选'))
}
return callback()
},
trigger: 'blur'
}],
CATEGORY_LIST: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('规程属性必选'))
}
return callback()
},
trigger: 'blur'
}]
},
loading: false,
e: {},
isEdit: false,
typeList: [],
industryTypeList: [],
categoryList: [],
remoteControl: {
keyOne: true
},
textDisabled: false
}
},
methods: {
init(e) {
this.dialogVisible = true
this.e = e ? e.e : {}
this.isEdit = e ? e.isEdit : false
this.getDic()
if (e) {
this.loading = true
requestFN(
'/textLibrary/goEdit',
{ BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID }
).then((data) => {
this.loading = false
this.form = data.data
this.form.FILE = []
this.form.types = []
this.form.specification_types = []
this.form.category_list = []
if (!this.form.TYPES || this.form.TYPES.length === 0) this.form.TYPES = ['']
if (!this.form.SPECIFICATION_TYPES || this.form.SPECIFICATION_TYPES.length === 0) this.form.SPECIFICATION_TYPES = ['']
if (!this.form.CATEGORY_LIST || this.form.CATEGORY_LIST.length === 0) this.form.CATEGORY_LIST = ['']
if (!this.form.labels || this.form.labels.length === 0) this.form.labels = ['']
this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '8051d985a2bc406a83ea9360b64182b2')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
} else {
this.isEdit = false
}
},
save() {
if (this.checkForm()) {
return
}
this.$refs.form.validate((valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '上传中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
if (this.form.TEXT_INFO) this.form.TEXT_INFO = this.form.TEXT_INFO.replaceAll('<img', '<img style="max-width:100%"')
Object.keys(this.form).map(key => {
formData.append(key, this.form[key])
})
if (!this.isEdit) {
if (!this.form.FILE || this.form.FILE.length <= 0) {
this.$message.error('请上传文件')
loading.close()
return
}
}
for (let i = 0; i < this.form.FILE.length; i++) {
if (this.form.FILE[i].raw) {
formData.append('FILE', this.form.FILE[i].raw)
}
}
formData.append('labels', JSON.stringify(this.form.labels))
for (let i = 0; i < this.form.TYPES.length; i++) {
if (this.form.TYPES[i]) {
this.form.types.push({
CATEGORY: 'TYPES',
CATEGORY_ID: this.form.TYPES[i].DICTIONARIES_ID,
CATEGORY_NAME: this.form.TYPES[i].NAME
})
}
}
formData.append('TYPES', JSON.stringify(this.form.types))
for (let i = 0; i < this.form.SPECIFICATION_TYPES.length; i++) {
if (this.form.SPECIFICATION_TYPES[i]) {
this.form.specification_types.push({
CATEGORY: 'SPECIFICATION_TYPES',
CATEGORY_ID: this.form.SPECIFICATION_TYPES[i].DICTIONARIES_ID,
CATEGORY_NAME: this.form.SPECIFICATION_TYPES[i].NAME
})
}
}
formData.append('SPECIFICATION_TYPES', JSON.stringify(this.form.specification_types))
if (!this.form.category_list) this.form.category_list = []
this.form.category_list.push({
CATEGORY: 'CATEGORY_LIST',
CATEGORY_ID: '31c2e389f2284ac48d54e85d56528092',
CATEGORY_NAME: '行业专属类'
})
formData.append('CATEGORY_LIST', JSON.stringify(this.form.category_list))
upload(
'/textLibrary/init',
formData
).then((data) => {
loading.close()
this.dialogVisible = false
this.$emit('logical-end', { result: 'OK' })
this.$message.success('保存成功')
}).catch((e) => {
loading.close()
console.log(e)
})
this.clear()
} else {
return false
}
})
},
checkForm() {
if (this.form.labels.length > 15) {
this.$message.error('关联标签数不能超过15个')
return true
}
},
goBack() {
this.dialogVisible = false
this.clear()
this.$emit('goBack', this.e)
},
getChooseTage(e) {
if (e.TYPE === '0') {
const list = e.e
for (const listKey in list) {
const index = this.form.labels.findIndex(item => {
item.BUS_LABEL_FACTORY_ID === list[listKey].BUS_LABEL_FACTORY_ID
})
if (index < 0) {
const label = JSON.parse(JSON.stringify(list[listKey]))
label.label = label.NAME
label.value = JSON.stringify(list[listKey])
const index = this.form.labels.findIndex(item => item.value === label.value)
if (index < 0) {
this.form.labels.push(label)
}
}
}
} else {
if (e.e.length > 1) {
this.$message.error('只能选择一个类型')
return
}
this.form.TYPE_NAME = e.e[0].NAME
this.form.TYPE = e.e[0].BUS_LABEL_FACTORY_ID
this.$forceUpdate()
}
},
getType(e) {
this.form.TYPE = e.info[0].DICTIONARIES_ID
this.form.TYPE_NAME = e.info[0].NAME
},
clear() {
this.dialogVisible = false
console.log('clear')
this.isEdit = false
this.form = {
REMARKS: '',
FILE: [],
labels: [''],
TYPE: '',
TYPES: [''],
SPECIFICATION_TYPES: [''],
STATUS: '',
ASSOCIATION: '0',
types: [],
specification_types: []
}
},
getDic() {
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'ca4e4a7597f8485d8be323bd6876c40b' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' }
).then((data) => {
this.industryTypeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '99543742b79b473480617191f7ac256e' }
).then((data) => {
this.categoryList = data.list
}).catch((e) => {
this.loading = false
})
},
getChooseOne(e) {
this.remoteControl.keyOne = !(e && e.info && e.info.DICTIONARIES_ID && e.info.DICTIONARIES_ID === '8051d985a2bc406a83ea9360b64182b2')
},
openTextEdit(id, textDisabled) {
if (!id) {
this.textDisabled = false
this.$refs.textEditing.init({ text: this.form.TEXT_INFO })
} else {
this.textDisabled = textDisabled
this.loading = true
requestFN('textLibrary/getTextInfo', id)
.then((data) => {
if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') {
this.$refs.textEditing.init({ text: data.info.TEXT_INFO })
} else {
if (((!this.form.TEXT_INFO) || this.form.TEXT_INFO === '') && this.textDisabled) {
this.$message.error('此数据未维护文件内容')
} else {
this.$refs.textEditing.init({ text: this.form.TEXT_INFO })
}
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
},
getText(e) {
this.form.TEXT_INFO = e.text
},
exportWord(info) {
this.loading = true
requestFN('textLibrary/getTextInfo', info)
.then((data) => {
if (data.info) {
if ((!data.info) || data.info.TEXT_INFO === '') {
this.$message.error('没有文件导出')
} else {
this.$message.success('导出成功')
window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID)
}
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,561 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="安全操作规程名称:" label-width="150px">
<el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition">
添加其他搜索条件
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:row-key="getRowKey"
:data="varList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
:row-class-name="tableRowClassName"
tooltip-effect="dark"
border
fit
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<el-table-column type="expand">
<template slot-scope="props">
<div style="text-align: left;padding: 10px;">
<el-form label-position="left" inline>
<el-form-item label="标签">
<el-tag
v-for="tag in props.row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</el-form-item>
<el-form-item label="国民经济行业类型">
<div v-if="(props.row.SPECIFICATION_TYPES && props.row.SPECIFICATION_TYPES.length > 0) && ((!props.row.CATEGORY_LIST) || (!props.row.CATEGORY_LIST[0]) || (props.row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) ">
<el-tag
v-for="tag in props.row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</el-form-item>
</el-form>
</div>
</template>
</el-table-column>
<el-table-column
v-if="false"
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column align="center" prop="REMARKS" label="安全操作规程名称" />
<el-table-column align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<template slot-scope="{row}">
<div v-if="(row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0) && ((!row.CATEGORY_LIST) || (!row.CATEGORY_LIST[0]) || (row.CATEGORY_LIST[0].CATEGORY_ID !== '8051d985a2bc406a83ea9360b64182b2')) ">
<el-tag
v-for="tag in row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="200px"/>
<el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" >
<template slot-scope="{row}">
{{ '资源库数据' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="14">
<el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="10">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)"></el-button>
</el-col>
</el-row>
</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>
<edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/>
<text-library-info ref="textLibraryInfo"/>
<update-spe-file ref="updateFile"/>
<update-log ref="updateLog"/>
<condition ref="condition" @getResult="getCondition"/>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import editTextLibrary from './editTextLibrary.vue'
import textLibraryInfo from './textLibraryInfo.vue'
import updateLog from './updateLog.vue'
import condition from './condition.vue'
import UpdateSpeFile from './updateSpeFile.vue'
export default {
components: { UpdateSpeFile, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
form: {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: ''
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.BUS_TEXT_LIBRARY_ID
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
addCondition() {
this.$refs.condition.init()
},
getCondition(info) {
this.form.CATEGORY_LIST = info.CATEGORY_LIST
this.form.TYPES = info.TYPES
this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES
this.form.labels = info.LABELS
},
clearMessage() {
this.label_name = ''
this.form = {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.form.KEYWORDS,
CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST),
TYPES: JSON.stringify(this.form.TYPES),
SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES),
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '0',
CORPINFO_ID: '0',
LIBRARY_FLAG: '1'
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
handleAdd() {
this.title = '新增'
this.$refs.editTextLibrary.init()
},
handleEdit(e) {
this.title = '编辑'
this.$refs.editTextLibrary.init({ e: e, isEdit: true })
},
getInformation(e) {
this.$refs.textLibraryInfo.init({ e: e })
},
handleDelete(e) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/delete',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
if (data.code === '0') {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
} else {
this.listLoading = false
this.$message.error(data.errorMessage)
}
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleLock(e, flag) {
this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/lock',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isLock: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleTop(e, flag) {
this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/top',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isTop: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleExport(e) {
this.$confirm('确定要导出文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (e.MIGRATION_FLAG === '1') {
window.open(config.fileUrl + e.PATH)
} else {
window.open(e.PATH)
}
}).catch((e) => {
console.log(e)
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const _ids = _selectData.filter((item, index) => {
return item.LOCKTOOL
})
if (_ids.length > 0) {
this.$message.error('选中的数据有锁定数据,请重新选择')
return
}
const ids = _selectData.map((item, index) => {
return item.BUS_TEXT_LIBRARY_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'textlibraryOne:add,textlibraryOne:del,textlibraryOne:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.textlibraryOnefhadminadd //
this.del = data.textlibraryOnefhadmindel //
this.edit = data.textlibraryOnefhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (row.ISTOPTIME) {
return 'warning-row'
}
},
saveClose(e) {
this.getList()
},
openUpdateFile(row) {
this.$refs.updateFile.init(row)
},
openUpdateLog(row) {
this.$refs.updateLog.init(row)
},
setStatus(row, status) {
this.listLoading = true
this.$confirm('是否更改状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/textLibrary/setStatus',
{
BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID,
STATUS: status
}
).then((data) => {
this.listLoading = false
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
this.listLoading = false
})
},
handleCopy(row) {
this.$confirm('确定要将此条数据添加到本地', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.copyInfo(row)
}).catch((e) => {
console.log(e)
this.$message({
type: 'info',
message: '已取消添加'
})
})
},
copyInfo(row) {
requestFN(
'/textLibrary/copyToOperate?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{ BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID }
).then((data) => {
if (data.code === '0') {
this.$message.success('添加成功')
} else {
this.$message.success('添加失败')
}
}).catch((e) => {
this.$message.success('添加失败')
})
},
enterSelectionRows(row, column, cell, event) {
console.log(row, 'row')
if (row.ISTOPTIME) {
this.createTips(event, row, '数据已置顶')
}
},
leaveSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.removeTips(row)
}
},
createTips(el, row, value) {
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDom = document.createElement('div')
tooltipDom.style.cssText = `
display: inline-block;
max-width: 400px;
max-height: 400px;
position: absolute;
top: ${el.clientY + 5}px;
left: ${el.clientX}px;
padding:5px 10px;
overflow: auto;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #595959;
background: #fff;
border-radius: 5px;
z-index: 19999;
box-shadow: 0 4px 12px 1px #ccc;
`
tooltipDom.innerHTML = value
tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`)
// body
document.body.appendChild(tooltipDom)
},
removeTips(row) {
console.log(row, 'row')
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`)
if (tooltipDomLeave.length) {
tooltipDomLeave.forEach(dom => {
document.body.removeChild(dom)
})
}
}
}
}
</script>

View File

@ -0,0 +1,504 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="安全操作规程名称:" label-width="150px">
<el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition">
添加其他搜索条件
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:row-key="getRowKey"
:data="varList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
:row-class-name="tableRowClassName"
tooltip-effect="dark"
border
fit
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<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 align="center" prop="REMARKS" label="安全操作规程名称" />
<el-table-column align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<template slot-scope="{row}">
<div v-if="row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0">
<el-tag
v-for="tag in row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" >
<template slot-scope="{row}">
{{ !row.CORP_NAME === '' ? '资源库数据' : row.CORP_NAME }}
</template>
</el-table-column> <el-table-column label="" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="24" style="padding-bottom: 10px">
<el-button type="info" icon="el-icon-view" size="mini" @click="getInformation(row)"></el-button>
<el-button type="warning" icon="el-icon-printer" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="24">
<el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-if="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)"></el-button>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-if="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/>
<text-library-info ref="textLibraryInfo"/>
<update-spe-file ref="updateFile"/>
<update-log ref="updateLog"/>
<condition ref="condition" have-corp-flag @getResult="getCondition"/>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import editTextLibrary from './editTextLibrary.vue'
import textLibraryInfo from './textLibraryInfo.vue'
import updateLog from './updateLog.vue'
import UpdateLog from './updateLog.vue'
import condition from './condition.vue'
import UpdateSpeFile from './updateSpeFile.vue'
export default {
components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
form: {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: ''
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.BLACKSPOT_ID
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
addCondition() {
this.$refs.condition.init()
},
getCondition(info) {
this.form.CATEGORY_LIST = info.CATEGORY_LIST
this.form.TYPES = info.TYPES
this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES
this.form.labels = info.LABELS
this.form.CORPINFO_ID = info.CORPINFO_ID
},
clearMessage() {
this.label_name = ''
this.form = {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.form.KEYWORDS,
CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST),
TYPES: JSON.stringify(this.form.TYPES),
SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES),
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '0',
ENTERPRISE_SIDE: '0',
CORPINFO_ID: this.form.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
handleAdd() {
this.title = '新增'
this.$refs.editTextLibrary.init()
},
handleEdit(e) {
this.title = '编辑'
this.$refs.editTextLibrary.init({ e: e, isEdit: true })
},
getInformation(e) {
this.$refs.textLibraryInfo.init({ e: e })
},
handleDelete(e) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/delete',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
if (data.code === '0') {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
} else {
this.listLoading = false
this.$message.error(data.errorMessage)
}
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleLock(e, flag) {
this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/lock',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isLock: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleTop(e, flag) {
this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/top',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isTop: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleExport(e) {
this.$confirm('确定要导出文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (e.MIGRATION_FLAG === '1') {
window.open(config.fileUrl + e.PATH)
} else {
window.open(e.PATH)
}
}).catch((e) => {
console.log(e)
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const _ids = _selectData.filter((item, index) => {
return item.LOCKTOOL
})
if (_ids.length > 0) {
this.$message.error('选中的数据有锁定数据,请重新选择')
return
}
const ids = _selectData.map((item, index) => {
return item.BUS_TEXT_LIBRARY_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'textlibraryOne:add,textlibraryOne:del,textlibraryOne:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.textlibraryOnefhadminadd //
this.del = data.textlibraryOnefhadmindel //
this.edit = data.textlibraryOnefhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (row.ISTOPTIME) {
return 'warning-row'
}
},
saveClose(e) {
this.getList()
},
openUpdateFile(row) {
this.$refs.updateFile.init(row)
},
openUpdateLog(row) {
this.$refs.updateLog.init(row)
},
setStatus(row, status) {
this.listLoading = true
this.$confirm('是否更改状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/textLibrary/setStatus',
{
BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID,
STATUS: status
}
).then((data) => {
this.listLoading = false
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
this.listLoading = false
})
},
enterSelectionRows(row, column, cell, event) {
console.log('row', row)
if (row.ISTOPTIME) {
this.createTips(event, row, '数据已置顶')
}
},
leaveSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.removeTips(row)
}
},
createTips(el, row, value) {
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDom = document.createElement('div')
tooltipDom.style.cssText = `
display: inline-block;
max-width: 400px;
max-height: 400px;
position: absolute;
top: ${el.clientY + 5}px;
left: ${el.clientX}px;
padding:5px 10px;
overflow: auto;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #595959;
background: #fff;
border-radius: 5px;
z-index: 19999;
box-shadow: 0 4px 12px 1px #ccc;
`
tooltipDom.innerHTML = value
tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`)
// body
document.body.appendChild(tooltipDom)
},
removeTips(row) {
console.log(row, 'row')
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`)
if (tooltipDomLeave.length) {
tooltipDomLeave.forEach(dom => {
document.body.removeChild(dom)
})
}
}
}
}
</script>

View File

@ -0,0 +1,146 @@
<template>
<el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" title="详情">
<el-form ref="form" :model="form" label-width="180px">
<el-form-item label="安全操作规程名称:" prop="FILE_NAME">
<el-input v-model="form.REMARKS" disabled style="width: 70%"/>
</el-form-item>
<el-form-item label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-tag v-for="tag in form.SPECIFICATION_TYPES" :key="tag.value" :disable-transitions="false" style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="上传时间:" prop="FILE_NAME">
<el-input v-model="form.UPLOAD_TIME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item label="上传人:" prop="FILE_NAME">
<el-input v-model="form.UPLOAD_USER_NAME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item prop="tags" label="标签:">
<el-tag
v-for="tag in form.labels"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.NAME }}
</el-tag>
</el-form-item>
<el-form-item label="文件详情:">
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})"></el-button>
<el-button size="small" type="primary" @click="exportWord(form)">word</el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
</div>
<text-editing ref="textEditing" :disabled="true" append-to-body title="文本编辑器"/>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'
import TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination },
directives: { waves },
data() {
return {
config: config,
dialogVisible: false,
form: {
BUS_TEXT_LIBRARY_ID: '',
FILE_NAME: '',
FILE: [],
TYPE: '',
labels: [],
UPLOAD_TIME: '',
UPLOAD_USER_NAME: ''
},
loading: false,
remoteControl: {
keyOne: true
}
}
},
methods: {
init(e) {
this.dialogVisible = true
this.loading = true
this.e = e.e
requestFN(
'/textLibrary/goEdit',
{
BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
this.loading = false
this.form = data.data
this.form.FILE = []
this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '8051d985a2bc406a83ea9360b64182b2')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
},
goBack() {
this.dialogVisible = false
this.$emit('goBack', this.e)
},
openTextEdit(id) {
this.loading = true
requestFN('textLibrary/getTextInfo', id)
.then((data) => {
if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') {
this.$refs.textEditing.init({ text: data.info.TEXT_INFO })
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
},
exportWord(info) {
this.loading = true
requestFN('textLibrary/getTextInfo', info)
.then((data) => {
if (data.info) {
if ((!data.info) || data.info.TEXT_INFO === '') {
this.$message.error('没有文件导出')
} else {
this.$message.success('导出成功')
window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID)
}
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,55 @@
<template>
<el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
<el-table :data="list">
<el-table-column prop="CREATE_TIME" label="日期"/>
<el-table-column prop="CREATOR_NAME" label="姓名"/>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
visible: false,
list: [],
loading: false,
id: ''
}
},
methods: {
init(e) {
this.visible = true
this.id = e.BUS_TEXT_LIBRARY_ID
this.getList()
},
goBack() {
this.list = []
this.visible = false
},
getList() {
this.loading = true
requestFN(
'/textLibrary/getUpdateLog',
{
BUS_TEXT_LIBRARY_ID: this.id
}
).then((data) => {
this.loading = false
this.list = data.list
}).catch((e) => {
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,77 @@
<template>
<el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-form-item label="文件:" prop="FILE">
<upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },
directives: { waves },
data() {
return {
visible: false,
form: {
FILE: [],
BUS_TEXT_LIBRARY_ID: ''
},
rules: {
FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }]
},
loading: false
}
},
methods: {
init(e) {
this.visible = true
this.form.BUS_TEXT_LIBRARY_ID = e.BUS_TEXT_LIBRARY_ID
},
goBack() {
this.form = {
FILE: [],
BUS_TEXT_LIBRARY_ID: ''
}
this.visible = false
},
save() {
const loading = this.$loading({
lock: true,
text: '上传中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
for (let i = 0; i < this.form.FILE.length; i++) {
if (this.form.FILE[i].raw) {
formData.append('FILE', this.form.FILE[i].raw)
}
}
formData.append('BUS_TEXT_LIBRARY_ID', this.form.BUS_TEXT_LIBRARY_ID)
upload(
'/textLibrary/updateFile',
formData
).then((data) => {
loading.close()
this.visible = false
this.$emit('logical-end', { result: 'OK' })
}).catch((e) => {
loading.close()
console.log(e)
})
}
}
}
</script>

View File

@ -0,0 +1,19 @@
<template>
<div>
<List v-if="activeName==='List'" ref="list" />
<Dashboard v-if="activeName==='Dashboard'" ref="Dashboard"/>
</div>
</template>
<script>
import List from './components/list.vue'
import Dashboard from './components/dashboard.vue'
export default {
components: { List, Dashboard },
data() {
return {
activeName: 'Dashboard'
}
}
}
</script>

View File

@ -0,0 +1,188 @@
<template>
<el-drawer
v-if="visible"
ref="drawer"
:visible.sync="visible"
:before-close="close"
title="搜索条件"
size="50%">
<div style="margin-left: 30px">
<el-form ref="form" label-width="200px">
<el-form-item label="规程属性:" prop="CATEGORY_LIST">
<multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" title="选择"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName" title="选择"/>
</el-form-item>
<el-form-item label="国民经济行业类型:" prop="SPECIFICATION_TYPES">
<multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy title="选择"/>
</el-form-item>
<el-form-item label="标签:" prop="LABELS">
<multiple-choice :dynamic-tags.sync="form.LABELS" :row-key="key.labelsKey" :row-name="key.labelsName" title="选择"/>
</el-form-item>
<el-form-item v-if="false" label="企业:">
<el-select
v-model="form.CORPINFO_ID"
:remote-method="searchCorp"
:loading="selectLoading"
filterable
remote
reserve-keyword
placeholder="请输入关键词">
<el-option
v-for="item in corp_list"
:key="item.CORPINFO_ID"
:label="item.CORP_NAME"
:value="item.CORPINFO_ID"/>
</el-select>
</el-form-item>
</el-form>
<div>
<el-button @click="closePanel"> </el-button>
<el-button :loading="loading" type="primary" @click="submit">{{ loading ? ' ...' : ' ' }}</el-button>
</div>
</div>
</el-drawer>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves' // waves directive
import { videoPlayer } from 'vue-video-player'
import 'video.js/dist/video-js.css'
import multipleChoice from '../../../util/multipleChoice.vue'
import { requestFN } from '@/utils/request'
export default {
components: { multipleChoice, Pagination, videoPlayer },
directives: { waves },
props: {
haveCorpFlag: {
type: Boolean,
default: false
}
},
data() {
return {
visible: false,
loading: false,
key: {
typeKey: 'DICTIONARIES_ID',
typeName: 'NAME',
specificationTypeKey: 'DICTIONARIES_ID',
specificationTypeName: 'NAME',
categoryKey: 'DICTIONARIES_ID',
categoryName: 'NAME',
labelsKey: 'BUS_LABEL_FACTORY_ID',
labelsName: 'NAME'
},
typeList: [],
industryTypeList: [],
categoryList: [],
form: {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: [''],
CORPINFO_ID: ''
},
corp_list: [],
selectLoading: false
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
created() {
this.getDic()
},
methods: {
init(tags) {
this.visible = true
},
close(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: ['']
}
done()
})
.catch(e => {})
},
closePanel() {
this.visible = false
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: ['']
}
},
submit() {
this.$emit('getResult', this.form)
this.visible = false
},
getDic() {
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '675ed73a7d7d42a488491f6e0e9c8fd5' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' }
).then((data) => {
this.industryTypeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'c35e6f7ea1b844e7946b2f78e1cc3907' }
).then((data) => {
this.categoryList = data.list
}).catch((e) => {
this.loading = false
})
},
clear() {
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: [''],
TTRIBUTE_LIST: [''],
CORPINFO_ID: ''
}
},
searchCorp(query) {
if (query !== '') {
this.selectLoading = true
requestFN(
'corpinfo/list', { KEYWORDS: query }
).then((data) => {
this.corp_list = data.varList
this.selectLoading = false
}).catch((e) => {
console.log(e)
this.selectLoading = false
})
}
}
}
}
</script>
<style scoped>
.information >>> .el-scrollbar__wrap {
overflow-x: hidden;
}
</style>

View File

@ -0,0 +1,38 @@
<template>
<div class="app-container">
<el-tabs type="border-card" @tab-click="changTab">
<el-tab-pane label="安全生产管理制度平台资源库">
<list/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves'
import List from './list.vue'
import ListEm from './listEm.vue'
export default {
components: { List, Pagination, ListEm },
directives: { waves },
data() {
return {
vectory: 'listEm'
}
},
created() {
},
methods: {
changTab(title) {
console.log(title.label)
if (title.label === '安全生产管理制度平台资源库') { this.vectory = 'list' }
if (title.label === '安全生产管理制度') { this.vectory = 'listEm' }
}
}
}
</script>

View File

@ -0,0 +1,390 @@
<template>
<el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" :title="title" destroy-on-close @close="clear">
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-form-item v-if="false" label="规程属性:" prop="CATEGORY_LIST">
<multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" :limit="1" @getChooseOne="getChooseOne"/>
</el-form-item>
<el-form-item label="安全管理制度名称:" prop="REMARKS">
<el-input v-model="form.REMARKS" style="width: 100%"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName"/>
</el-form-item>
<el-form-item v-if="false" label="国民经济行业类型:" prop="SPECIFICATION_TYPES">
<multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy/>
</el-form-item>
<el-form-item v-if="false" label="状态:" prop="STATUS">
<el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;">
<el-option label="停用" value="0"/>
<el-option label="启用" value="1"/>
</el-select>
</el-form-item>
<el-form-item v-if="!isEdit" label="文件:" prop="FILE">
<upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/>
</el-form-item>
<el-form-item v-if="!isEdit" label="添加文件内容:">
<el-button size="small" type="primary" @click="openTextEdit()"></el-button>
</el-form-item>
<el-form-item v-if="isEdit" label="添加文件内容:">
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},true)"></el-button>
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},false)"></el-button>
<el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">word</el-button>
</el-form-item>
<el-form-item label="标签:" prop="labels">
<multiple-choice :dynamic-tags.sync="form.labels" :row-key="key.labelsKey" :row-name="key.labelsName" can-add/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</div>
<edit-label ref="editLabel" append-to-body/>
<select-label ref="selectLabel" append-to-body @getResult="getChooseTage"/>
<select-type ref="selectType" :limit="1" append-to-body @getResult="getType"/>
<text-editing ref="textEditing" :disabled="textDisabled" append-to-body title="文本编辑器" @getResult="getText"/>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import { requestFN } from '@/utils/request'
import editLabel from '../../../Label/components/editLabel.vue'
import selectLabel from '../../../Label/components/selectLable.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import UploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice, UploadFile },
directives: { waves },
props: {
title: {
type: String,
default: ''
}
},
data() {
return {
dialogVisible: false,
form: {
REMARKS: '',
FILE: [],
labels: [''],
TYPE: '',
TYPES: [''],
SPECIFICATION_TYPES: [''],
CATEGORY_LIST: [''],
STATUS: '',
ASSOCIATION: '1',
types: [],
specification_types: [],
category_list: [],
TEXT_INFO: ''
},
key: {
typeKey: 'DICTIONARIES_ID',
typeName: 'NAME',
specificationTypeKey: 'DICTIONARIES_ID',
specificationTypeName: 'NAME',
categoryKey: 'DICTIONARIES_ID',
categoryName: 'NAME',
labelsKey: 'BUS_LABEL_FACTORY_ID',
labelsName: 'NAME'
},
rules: {
REMARKS: [{ required: true, message: '请输安全操作规程', trigger: 'change' }],
STATUS: [{ required: true, message: '请选择状态', trigger: 'change' }],
FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }],
TYPES: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('类型必选'))
}
return callback()
},
trigger: 'blur'
}],
SPECIFICATION_TYPES: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('操作规程行业类型必选'))
}
return callback()
},
trigger: 'blur'
}],
CATEGORY_LIST: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('规程属性必选'))
}
return callback()
},
trigger: 'blur'
}]
},
loading: false,
e: {},
isEdit: false,
typeList: [],
industryTypeList: [],
categoryList: [],
remoteControl: {
keyOne: true
},
textDisabled: false
}
},
methods: {
init(e) {
this.dialogVisible = true
this.e = e ? e.e : {}
this.isEdit = e ? e.isEdit : false
this.getDic()
if (e) {
this.loading = true
requestFN(
'/textLibrary/goEdit',
{ BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID }
).then((data) => {
this.loading = false
this.form = data.data
this.form.FILE = []
this.form.types = []
this.form.specification_types = []
this.form.category_list = []
if (!this.form.TYPES || this.form.TYPES.length === 0) this.form.TYPES = ['']
if (!this.form.SPECIFICATION_TYPES || this.form.SPECIFICATION_TYPES.length === 0) this.form.SPECIFICATION_TYPES = ['']
if (!this.form.CATEGORY_LIST || this.form.CATEGORY_LIST.length === 0) this.form.CATEGORY_LIST = ['']
if (!this.form.labels || this.form.labels.length === 0) this.form.labels = ['']
this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '691346658ed744a1bda2ed3a755f606c')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
} else {
this.isEdit = false
}
},
save() {
if (this.checkForm()) {
return
}
this.$refs.form.validate((valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '上传中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
if (this.form.TEXT_INFO) this.form.TEXT_INFO = this.form.TEXT_INFO.replaceAll('<img', '<img style="max-width:100%"')
Object.keys(this.form).map(key => {
formData.append(key, this.form[key])
})
if (!this.isEdit) {
if (!this.form.FILE || this.form.FILE.length <= 0) {
this.$message.error('请上传文件')
loading.close()
return
}
}
for (let i = 0; i < this.form.FILE.length; i++) {
if (this.form.FILE[i].raw) {
formData.append('FILE', this.form.FILE[i].raw)
}
}
formData.append('labels', JSON.stringify(this.form.labels))
for (let i = 0; i < this.form.TYPES.length; i++) {
if (this.form.TYPES[i]) {
this.form.types.push({
CATEGORY: 'TYPES',
CATEGORY_ID: this.form.TYPES[i].DICTIONARIES_ID,
CATEGORY_NAME: this.form.TYPES[i].NAME
})
}
}
formData.append('TYPES', JSON.stringify(this.form.types))
for (let i = 0; i < this.form.SPECIFICATION_TYPES.length; i++) {
if (this.form.SPECIFICATION_TYPES[i]) {
this.form.specification_types.push({
CATEGORY: 'SPECIFICATION_TYPES',
CATEGORY_ID: this.form.SPECIFICATION_TYPES[i].DICTIONARIES_ID,
CATEGORY_NAME: this.form.SPECIFICATION_TYPES[i].NAME
})
}
}
formData.append('SPECIFICATION_TYPES', JSON.stringify(this.form.specification_types))
if (!this.form.category_list) this.form.category_list = []
this.form.category_list.push({
CATEGORY: 'CATEGORY_LIST',
CATEGORY_ID: '0ac08f29beec46bd93956afec058e189',
CATEGORY_NAME: '行业专属类'
})
formData.append('CATEGORY_LIST', JSON.stringify(this.form.category_list))
upload(
'/textLibrary/init',
formData
).then((data) => {
loading.close()
this.dialogVisible = false
this.$emit('logical-end', { result: 'OK' })
this.$message.success('保存成功')
}).catch((e) => {
loading.close()
console.log(e)
})
this.clear()
} else {
return false
}
})
},
checkForm() {
if (this.form.labels.length > 15) {
this.$message.error('关联标签数不能超过15个')
return true
}
},
goBack() {
this.dialogVisible = false
this.clear()
this.$emit('goBack', this.e)
},
getChooseTage(e) {
if (e.TYPE === '0') {
const list = e.e
for (const listKey in list) {
const index = this.form.labels.findIndex(item => {
item.BUS_LABEL_FACTORY_ID === list[listKey].BUS_LABEL_FACTORY_ID
})
if (index < 0) {
const label = JSON.parse(JSON.stringify(list[listKey]))
label.label = label.NAME
label.value = JSON.stringify(list[listKey])
const index = this.form.labels.findIndex(item => item.value === label.value)
if (index < 0) {
this.form.labels.push(label)
}
}
}
} else {
if (e.e.length > 1) {
this.$message.error('只能选择一个类型')
return
}
this.form.TYPE_NAME = e.e[0].NAME
this.form.TYPE = e.e[0].BUS_LABEL_FACTORY_ID
this.$forceUpdate()
}
},
getType(e) {
this.form.TYPE = e.info[0].DICTIONARIES_ID
this.form.TYPE_NAME = e.info[0].NAME
},
clear() {
this.isEdit = false
this.form = {
REMARKS: '',
FILE: [],
labels: [''],
TYPE: '',
TYPES: [''],
SPECIFICATION_TYPES: [''],
STATUS: '',
ASSOCIATION: '1',
types: [],
specification_types: []
}
},
getDic() {
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '675ed73a7d7d42a488491f6e0e9c8fd5' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' }
).then((data) => {
this.industryTypeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'c35e6f7ea1b844e7946b2f78e1cc3907' }
).then((data) => {
this.categoryList = data.list
}).catch((e) => {
this.loading = false
})
},
getChooseOne(e) {
this.remoteControl.keyOne = !(e && e.info && e.info.DICTIONARIES_ID && e.info.DICTIONARIES_ID === '691346658ed744a1bda2ed3a755f606c')
},
openTextEdit(id, textDisabled) {
if (!id) {
this.textDisabled = false
this.$refs.textEditing.init({ text: this.form.TEXT_INFO })
} else {
this.textDisabled = textDisabled
this.loading = true
requestFN('textLibrary/getTextInfo', id)
.then((data) => {
if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') {
this.$refs.textEditing.init({ text: data.info.TEXT_INFO })
} else {
if (((!this.form.TEXT_INFO) || this.form.TEXT_INFO === '') && this.textDisabled) {
this.$message.error('此数据未维护文件内容')
} else {
this.$refs.textEditing.init({ text: this.form.TEXT_INFO })
}
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
},
getText(e) {
this.form.TEXT_INFO = e.text
},
exportWord(info) {
this.loading = true
requestFN('textLibrary/getTextInfo', info)
.then((data) => {
if (data.info) {
if ((!data.info) || data.info.TEXT_INFO === '') {
this.$message.error('没有文件导出')
} else {
this.$message.success('导出成功')
window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID)
}
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,562 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="安全生产管理制度名称:" label-width="200px">
<el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition">
添加其他搜索条件
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:row-key="getRowKey"
:data="varList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
:row-class-name="tableRowClassName"
tooltip-effect="dark"
border
fit
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<el-table-column
v-if="false"
:reserve-selection="true"
type="selection"
width="55"
align="center"
/>
<el-table-column type="expand">
<template slot-scope="props">
<div style="text-align: left;padding: 10px;">
<el-form label-position="left" inline>
<el-form-item label="标签">
<el-tag
v-for="tag in props.row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</el-form-item>
<el-form-item label="国民经济行业类型">
<div v-if="(props.row.SPECIFICATION_TYPES && props.row.SPECIFICATION_TYPES.length > 0) && ((!props.row.CATEGORY_LIST) || (!props.row.CATEGORY_LIST[0]) || (props.row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) ">
<el-tag
v-for="tag in props.row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</el-form-item>
</el-form>
</div>
</template>
</el-table-column>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column align="center" prop="REMARKS" label="安全生产管理制度名称" />
<el-table-column align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<template slot-scope="{row}">
<div v-if="(row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0) && ((!row.CATEGORY_LIST) || (!row.CATEGORY_LIST[0]) || (row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) ">
<el-tag
v-for="tag in row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="200px"/>
<el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" >
<template slot-scope="{row}">
{{ '资源库数据' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="14">
<el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="10">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)"></el-button>
</el-col>
</el-row>
</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>
<edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/>
<text-library-info ref="textLibraryInfo"/>
<update-spe-file ref="updateFile"/>
<update-log ref="updateLog"/>
<condition ref="condition" @getResult="getCondition"/>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import editTextLibrary from './editTextLibrary.vue'
import textLibraryInfo from './textLibraryInfo.vue'
import updateFile from './updateSpeFile.vue'
import updateLog from './updateLog.vue'
import condition from './condition.vue'
import UpdateSpeFile from './updateSpeFile.vue'
export default {
components: { UpdateSpeFile, Pagination, editTextLibrary, textLibraryInfo, updateFile, updateLog, condition },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
form: {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: ''
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.BUS_TEXT_LIBRARY_ID
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
addCondition() {
this.$refs.condition.init()
},
getCondition(info) {
this.form.CATEGORY_LIST = info.CATEGORY_LIST
this.form.TYPES = info.TYPES
this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES
this.form.labels = info.LABELS
},
clearMessage() {
this.label_name = ''
this.form = {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.form.KEYWORDS,
CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST),
TYPES: JSON.stringify(this.form.TYPES),
SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES),
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '1',
CORPINFO_ID: '0',
LIBRARY_FLAG: '1'
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
handleAdd() {
this.title = '新增'
this.$refs.editTextLibrary.init()
},
handleEdit(e) {
this.title = '编辑'
this.$refs.editTextLibrary.init({ e: e, isEdit: true })
},
getInformation(e) {
this.$refs.textLibraryInfo.init({ e: e })
},
handleDelete(e) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/delete',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
if (data.code === '0') {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
} else {
this.listLoading = false
this.$message.error(data.errorMessage)
}
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleLock(e, flag) {
this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/lock',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isLock: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleTop(e, flag) {
this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/top',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isTop: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleExport(e) {
this.$confirm('确定要导出文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (e.MIGRATION_FLAG === '1') {
window.open(config.fileUrl + e.PATH)
} else {
window.open(e.PATH)
}
}).catch((e) => {
console.log(e)
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const _ids = _selectData.filter((item, index) => {
return item.LOCKTOOL
})
if (_ids.length > 0) {
this.$message.error('选中的数据有锁定数据,请重新选择')
return
}
const ids = _selectData.map((item, index) => {
return item.BUS_TEXT_LIBRARY_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'textlibraryTwo:add,textlibraryTwo:del,textlibraryTwo:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.textlibraryTwofhadminadd //
this.del = data.textlibraryTwofhadmindel //
this.edit = data.textlibraryTwofhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (row.ISTOPTIME) {
return 'warning-row'
}
},
saveClose(e) {
this.getList()
},
openUpdateFile(row) {
this.$refs.updateFile.init(row)
},
openUpdateLog(row) {
this.$refs.updateLog.init(row)
},
setStatus(row, status) {
this.listLoading = true
this.$confirm('是否更改状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/textLibrary/setStatus',
{
BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID,
STATUS: status
}
).then((data) => {
this.listLoading = false
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
this.listLoading = false
})
},
handleCopy(row) {
this.$confirm('确定要将此条数据添加到本地', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.copyInfo(row)
}).catch((e) => {
console.log(e)
this.$message({
type: 'info',
message: '已取消添加'
})
})
},
copyInfo(row) {
requestFN(
'/textLibrary/copyToOperate?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{ BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID }
).then((data) => {
if (data.code === '0') {
this.$message.success('添加成功')
} else {
this.$message.success('添加失败')
}
}).catch((e) => {
this.$message.success('添加失败')
})
},
enterSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.createTips(event, row, '数据已置顶')
}
},
leaveSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.removeTips(row)
}
},
createTips(el, row, value) {
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDom = document.createElement('div')
tooltipDom.style.cssText = `
display: inline-block;
max-width: 400px;
max-height: 400px;
position: absolute;
top: ${el.clientY + 5}px;
left: ${el.clientX}px;
padding:5px 10px;
overflow: auto;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #595959;
background: #fff;
border-radius: 5px;
z-index: 19999;
box-shadow: 0 4px 12px 1px #ccc;
`
tooltipDom.innerHTML = value
tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`)
// body
document.body.appendChild(tooltipDom)
},
removeTips(row) {
console.log(row, 'row')
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`)
if (tooltipDomLeave.length) {
tooltipDomLeave.forEach(dom => {
document.body.removeChild(dom)
})
}
}
}
}
</script>

View File

@ -0,0 +1,503 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="安全生产管理制度名称:" label-width="200px">
<el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition">
添加其他搜索条件
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:row-key="getRowKey"
:data="varList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
:row-class-name="tableRowClassName"
tooltip-effect="dark"
border
fit
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<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 align="center" prop="REMARKS" label="安全生产管理制度名称" />
<el-table-column align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<template slot-scope="{row}">
<div v-if="row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0">
<el-tag
v-for="tag in row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" >
<template slot-scope="{row}">
{{ !row.CORP_NAME ? '资源库数据' : row.CORP_NAME }}
</template>
</el-table-column> <el-table-column label="" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="24" style="padding-bottom: 10px">
<el-button type="info" icon="el-icon-view" size="mini" @click="getInformation(row)"></el-button>
<el-button type="warning" icon="el-icon-printer" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="24">
<el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-if="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)"></el-button>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-if="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/>
<text-library-info ref="textLibraryInfo"/>
<update-spe-file ref="updateFile"/>
<update-log ref="updateLog"/>
<condition ref="condition" have-corp-flag @getResult="getCondition"/>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import editTextLibrary from './editTextLibrary.vue'
import textLibraryInfo from './textLibraryInfo.vue'
import updateLog from './updateLog.vue'
import UpdateLog from './updateLog.vue'
import condition from './condition.vue'
import UpdateSpeFile from './updateSpeFile.vue'
export default {
components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
form: {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: ''
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.BLACKSPOT_ID
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
addCondition() {
this.$refs.condition.init()
},
getCondition(info) {
this.form.CATEGORY_LIST = info.CATEGORY_LIST
this.form.TYPES = info.TYPES
this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES
this.form.labels = info.LABELS
this.form.CORPINFO_ID = info.CORPINFO_ID
},
clearMessage() {
this.label_name = ''
this.form = {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.form.KEYWORDS,
CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST),
TYPES: JSON.stringify(this.form.TYPES),
SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES),
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '1',
ENTERPRISE_SIDE: '0',
CORPINFO_ID: this.form.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
handleAdd() {
this.title = '新增'
this.$refs.editTextLibrary.init()
},
handleEdit(e) {
this.title = '编辑'
this.$refs.editTextLibrary.init({ e: e, isEdit: true })
},
getInformation(e) {
this.$refs.textLibraryInfo.init({ e: e })
},
handleDelete(e) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/delete',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
if (data.code === '0') {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
} else {
this.listLoading = false
this.$message.error(data.errorMessage)
}
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleLock(e, flag) {
this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/lock',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isLock: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleTop(e, flag) {
this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/top',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isTop: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleExport(e) {
this.$confirm('确定要导出文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (e.MIGRATION_FLAG === '1') {
window.open(config.fileUrl + e.PATH)
} else {
window.open(e.PATH)
}
}).catch((e) => {
console.log(e)
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const _ids = _selectData.filter((item, index) => {
return item.LOCKTOOL
})
if (_ids.length > 0) {
this.$message.error('选中的数据有锁定数据,请重新选择')
return
}
const ids = _selectData.map((item, index) => {
return item.BUS_TEXT_LIBRARY_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'textlibraryTwo:add,textlibraryTwo:del,textlibraryTwo:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.textlibraryTwofhadminadd //
this.del = data.textlibraryTwofhadmindel //
this.edit = data.textlibraryTwofhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (row.ISTOPTIME) {
return 'warning-row'
}
},
saveClose(e) {
this.getList()
},
openUpdateFile(row) {
this.$refs.updateFile.init(row)
},
openUpdateLog(row) {
this.$refs.updateLog.init(row)
},
setStatus(row, status) {
this.listLoading = true
this.$confirm('是否更改状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/textLibrary/setStatus',
{
BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID,
STATUS: status
}
).then((data) => {
this.listLoading = false
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
this.listLoading = false
})
},
enterSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.createTips(event, row, '数据已置顶')
}
},
leaveSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.removeTips(row)
}
},
createTips(el, row, value) {
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDom = document.createElement('div')
tooltipDom.style.cssText = `
display: inline-block;
max-width: 400px;
max-height: 400px;
position: absolute;
top: ${el.clientY + 5}px;
left: ${el.clientX}px;
padding:5px 10px;
overflow: auto;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #595959;
background: #fff;
border-radius: 5px;
z-index: 19999;
box-shadow: 0 4px 12px 1px #ccc;
`
tooltipDom.innerHTML = value
tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`)
// body
document.body.appendChild(tooltipDom)
},
removeTips(row) {
console.log(row, 'row')
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`)
if (tooltipDomLeave.length) {
tooltipDomLeave.forEach(dom => {
document.body.removeChild(dom)
})
}
}
}
}
</script>

View File

@ -0,0 +1,146 @@
<template>
<el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" title="详情">
<el-form ref="form" :model="form" label-width="180px">
<el-form-item label="安全管理制度名称:" prop="FILE_NAME">
<el-input v-model="form.REMARKS" disabled style="width: 70%"/>
</el-form-item>
<el-form-item label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-tag v-for="tag in form.SPECIFICATION_TYPES" :key="tag.value" :disable-transitions="false" style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="上传时间:" prop="FILE_NAME">
<el-input v-model="form.UPLOAD_TIME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item label="上传人:" prop="FILE_NAME">
<el-input v-model="form.UPLOAD_USER_NAME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item prop="tags" label="标签:">
<el-tag
v-for="tag in form.labels"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.NAME }}
</el-tag>
</el-form-item>
<el-form-item label="文件详情:">
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})"></el-button>
<el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">word</el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
</div>
<text-editing ref="textEditing" :disabled="true" append-to-body title="文本编辑器"/>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'
import TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination },
directives: { waves },
data() {
return {
config: config,
dialogVisible: false,
form: {
BUS_TEXT_LIBRARY_ID: '',
FILE_NAME: '',
FILE: [],
TYPE: '',
labels: [],
UPLOAD_TIME: '',
UPLOAD_USER_NAME: ''
},
loading: false,
remoteControl: {
keyOne: true
}
}
},
methods: {
init(e) {
this.dialogVisible = true
this.loading = true
this.e = e.e
requestFN(
'/textLibrary/goEdit',
{
BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
this.loading = false
this.form = data.data
this.form.FILE = []
this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '691346658ed744a1bda2ed3a755f606c')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
},
goBack() {
this.dialogVisible = false
this.$emit('goBack', this.e)
},
openTextEdit(id) {
this.loading = true
requestFN('textLibrary/getTextInfo', id)
.then((data) => {
if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') {
this.$refs.textEditing.init({ text: data.info.TEXT_INFO })
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
},
exportWord(info) {
this.loading = true
requestFN('textLibrary/getTextInfo', info)
.then((data) => {
if (data.info) {
if ((!data.info) || data.info.TEXT_INFO === '') {
this.$message.error('没有文件导出')
} else {
this.$message.success('导出成功')
window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID)
}
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,55 @@
<template>
<el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
<el-table :data="list">
<el-table-column prop="CREATE_TIME" label="日期"/>
<el-table-column prop="CREATOR_NAME" label="姓名"/>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
visible: false,
list: [],
loading: false,
id: ''
}
},
methods: {
init(e) {
this.visible = true
this.id = e.BUS_TEXT_LIBRARY_ID
this.getList()
},
goBack() {
this.list = []
this.visible = false
},
getList() {
this.loading = true
requestFN(
'/textLibrary/getUpdateLog',
{
BUS_TEXT_LIBRARY_ID: this.id
}
).then((data) => {
this.loading = false
this.list = data.list
}).catch((e) => {
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,77 @@
<template>
<el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-form-item label="文件:" prop="FILE">
<upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },
directives: { waves },
data() {
return {
visible: false,
form: {
FILE: [],
BUS_TEXT_LIBRARY_ID: ''
},
rules: {
FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }]
},
loading: false
}
},
methods: {
init(e) {
this.visible = true
this.form.BUS_TEXT_LIBRARY_ID = e.BUS_TEXT_LIBRARY_ID
},
goBack() {
this.form = {
FILE: [],
BUS_TEXT_LIBRARY_ID: ''
}
this.visible = false
},
save() {
const loading = this.$loading({
lock: true,
text: '上传中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
for (let i = 0; i < this.form.FILE.length; i++) {
if (this.form.FILE[i].raw) {
formData.append('FILE', this.form.FILE[i].raw)
}
}
formData.append('BUS_TEXT_LIBRARY_ID', this.form.BUS_TEXT_LIBRARY_ID)
upload(
'/textLibrary/updateFile',
formData
).then((data) => {
loading.close()
this.visible = false
this.$emit('logical-end', { result: 'OK' })
}).catch((e) => {
loading.close()
console.log(e)
})
}
}
}
</script>

View File

@ -0,0 +1,19 @@
<template>
<div>
<List v-if="activeName==='List'" ref="list" />
<Dashboard v-if="activeName==='Dashboard'" ref="Dashboard"/>
</div>
</template>
<script>
import List from './components/list.vue'
import Dashboard from './components/dashboard.vue'
export default {
components: { List, Dashboard },
data() {
return {
activeName: 'Dashboard'
}
}
}
</script>

View File

@ -0,0 +1,188 @@
<template>
<el-drawer
v-if="visible"
ref="drawer"
:visible.sync="visible"
:before-close="close"
title="搜索条件"
size="50%">
<div style="margin-left: 30px">
<el-form ref="form" label-width="200px">
<el-form-item label="规程属性:" prop="CATEGORY_LIST">
<multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" title="选择"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName" title="选择"/>
</el-form-item>
<el-form-item label="国民经济行业类型:" prop="SPECIFICATION_TYPES">
<multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy title="选择"/>
</el-form-item>
<el-form-item label="标签:" prop="LABELS">
<multiple-choice :dynamic-tags.sync="form.LABELS" :row-key="key.labelsKey" :row-name="key.labelsName" title="选择"/>
</el-form-item>
<el-form-item v-if="false" label="企业:">
<el-select
v-model="form.CORPINFO_ID"
:remote-method="searchCorp"
:loading="selectLoading"
filterable
remote
reserve-keyword
placeholder="请输入关键词">
<el-option
v-for="item in corp_list"
:key="item.CORPINFO_ID"
:label="item.CORP_NAME"
:value="item.CORPINFO_ID"/>
</el-select>
</el-form-item>
</el-form>
<div>
<el-button @click="closePanel"> </el-button>
<el-button :loading="loading" type="primary" @click="submit">{{ loading ? ' ...' : ' ' }}</el-button>
</div>
</div>
</el-drawer>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves' // waves directive
import { videoPlayer } from 'vue-video-player'
import 'video.js/dist/video-js.css'
import multipleChoice from '../../../util/multipleChoice.vue'
import { requestFN } from '@/utils/request'
export default {
components: { multipleChoice, Pagination, videoPlayer },
directives: { waves },
props: {
haveCorpFlag: {
type: Boolean,
default: false
}
},
data() {
return {
visible: false,
loading: false,
key: {
typeKey: 'DICTIONARIES_ID',
typeName: 'NAME',
specificationTypeKey: 'DICTIONARIES_ID',
specificationTypeName: 'NAME',
categoryKey: 'DICTIONARIES_ID',
categoryName: 'NAME',
labelsKey: 'BUS_LABEL_FACTORY_ID',
labelsName: 'NAME'
},
typeList: [],
industryTypeList: [],
categoryList: [],
form: {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: [''],
CORPINFO_ID: ''
},
corp_list: [],
selectLoading: false
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
created() {
this.getDic()
},
methods: {
init(tags) {
this.visible = true
},
close(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: ['']
}
done()
})
.catch(e => {})
},
closePanel() {
this.visible = false
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: ['']
}
},
submit() {
this.$emit('getResult', this.form)
this.visible = false
},
getDic() {
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '5a7c94b2b9514285b433759edd848b4a' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' }
).then((data) => {
this.industryTypeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '84254cb5b2ae40eb9f451509b2d370ae' }
).then((data) => {
this.categoryList = data.list
}).catch((e) => {
this.loading = false
})
},
clear() {
this.form = {
CATEGORY_LIST: [''],
TYPES: [''],
SPECIFICATION_TYPES: [''],
LABELS: [''],
TTRIBUTE_LIST: [''],
CORPINFO_ID: ''
}
},
searchCorp(query) {
if (query !== '') {
this.selectLoading = true
requestFN(
'corpinfo/list', { KEYWORDS: query }
).then((data) => {
this.corp_list = data.varList
this.selectLoading = false
}).catch((e) => {
console.log(e)
this.selectLoading = false
})
}
}
}
}
</script>
<style scoped>
.information >>> .el-scrollbar__wrap {
overflow-x: hidden;
}
</style>

View File

@ -0,0 +1,38 @@
<template>
<div class="app-container">
<el-tabs type="border-card" @tab-click="changTab">
<el-tab-pane label="安全生产责任制平台资源库">
<list/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import waves from '@/directive/waves'
import List from './list.vue'
import ListEm from './listEm.vue'
export default {
components: { List, Pagination, ListEm },
directives: { waves },
data() {
return {
vectory: 'listEm'
}
},
created() {
},
methods: {
changTab(title) {
console.log(title.label)
if (title.label === '安全生产责任制平台资源库') { this.vectory = 'list' }
if (title.label === '安全生产责任制') { this.vectory = 'listEm' }
}
}
}
</script>

View File

@ -0,0 +1,390 @@
<template>
<el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" :title="title" destroy-on-close @close="clear">
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-form-item v-if="false" label="规程属性:" prop="CATEGORY_LIST">
<multiple-choice :dynamic-tags.sync="form.CATEGORY_LIST" :labels="categoryList" :row-key="key.categoryKey" :row-name="key.categoryName" :limit="1" @getChooseOne="getChooseOne"/>
</el-form-item>
<el-form-item label="安全生产责任制名称:" prop="REMARKS">
<el-input v-model="form.REMARKS" style="width: 100%"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<multiple-choice :dynamic-tags.sync="form.TYPES" :labels="typeList" :row-key="key.typeKey" :row-name="key.typeName"/>
</el-form-item>
<el-form-item v-if="false" label="国民经济行业类型:" prop="SPECIFICATION_TYPES">
<multiple-choice :dynamic-tags.sync="form.SPECIFICATION_TYPES" :labels="industryTypeList" :row-key="key.specificationTypeKey" :row-name="key.specificationTypeName" lazy/>
</el-form-item>
<el-form-item v-if="false" label="状态:" prop="STATUS">
<el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;">
<el-option label="停用" value="0"/>
<el-option label="启用" value="1"/>
</el-select>
</el-form-item>
<el-form-item v-if="!isEdit" label="文件:" prop="FILE">
<upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/>
</el-form-item>
<el-form-item v-if="!isEdit" label="添加文件内容:">
<el-button size="small" type="primary" @click="openTextEdit()"></el-button>
</el-form-item>
<el-form-item v-if="isEdit" label="添加文件内容:">
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},true)"></el-button>
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID},false)"></el-button>
<el-button size="small" type="primary" @click="exportWord(form)">word</el-button>
</el-form-item>
<el-form-item label="标签:" prop="labels">
<multiple-choice :dynamic-tags.sync="form.labels" :row-key="key.labelsKey" :row-name="key.labelsName" can-add/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</div>
<edit-label ref="editLabel" append-to-body/>
<select-label ref="selectLabel" append-to-body @getResult="getChooseTage"/>
<select-type ref="selectType" :limit="1" append-to-body @getResult="getType"/>
<text-editing ref="textEditing" :disabled="textDisabled" append-to-body title="文本编辑器" @getResult="getText"/>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import { requestFN } from '@/utils/request'
import editLabel from '../../../Label/components/editLabel.vue'
import selectLabel from '../../../Label/components/selectLable.vue'
import selectType from '../../../util/selectType.vue'
import multipleChoice from '../../../util/multipleChoice.vue'
import UploadFile from '../../../../components/upload-file/index.vue'
import TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice, UploadFile },
directives: { waves },
props: {
title: {
type: String,
default: ''
}
},
data() {
return {
dialogVisible: false,
form: {
REMARKS: '',
FILE: [],
labels: [''],
TYPE: '',
TYPES: [''],
SPECIFICATION_TYPES: [''],
CATEGORY_LIST: [''],
STATUS: '',
ASSOCIATION: '2',
types: [],
specification_types: [],
category_list: [],
TEXT_INFO: ''
},
key: {
typeKey: 'DICTIONARIES_ID',
typeName: 'NAME',
specificationTypeKey: 'DICTIONARIES_ID',
specificationTypeName: 'NAME',
categoryKey: 'DICTIONARIES_ID',
categoryName: 'NAME',
labelsKey: 'BUS_LABEL_FACTORY_ID',
labelsName: 'NAME'
},
rules: {
REMARKS: [{ required: true, message: '请输安全操作规程', trigger: 'change' }],
STATUS: [{ required: true, message: '请选择状态', trigger: 'change' }],
FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }],
TYPES: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('类型必选'))
}
return callback()
},
trigger: 'blur'
}],
SPECIFICATION_TYPES: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('操作规程行业类型必选'))
}
return callback()
},
trigger: 'blur'
}],
CATEGORY_LIST: [{
required: true,
validator: (rules, value, callback) => {
if (!value || value.length === 0 || value[0] === '') {
return callback(new Error('规程属性必选'))
}
return callback()
},
trigger: 'blur'
}]
},
loading: false,
e: {},
isEdit: false,
typeList: [],
industryTypeList: [],
categoryList: [],
remoteControl: {
keyOne: true
},
textDisabled: false
}
},
methods: {
init(e) {
this.dialogVisible = true
this.e = e ? e.e : {}
this.isEdit = e ? e.isEdit : false
this.getDic()
if (e) {
this.loading = true
requestFN(
'/textLibrary/goEdit',
{ BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID }
).then((data) => {
this.loading = false
this.form = data.data
this.form.FILE = []
this.form.types = []
this.form.specification_types = []
this.form.category_list = []
if (!this.form.TYPES || this.form.TYPES.length === 0) this.form.TYPES = ['']
if (!this.form.SPECIFICATION_TYPES || this.form.SPECIFICATION_TYPES.length === 0) this.form.SPECIFICATION_TYPES = ['']
if (!this.form.CATEGORY_LIST || this.form.CATEGORY_LIST.length === 0) this.form.CATEGORY_LIST = ['']
if (!this.form.labels || this.form.labels.length === 0) this.form.labels = ['']
this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '7158f688d0f34054a28a9275139298df')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
} else {
this.isEdit = false
}
},
save() {
if (this.checkForm()) {
return
}
this.$refs.form.validate((valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '上传中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
if (this.form.TEXT_INFO) this.form.TEXT_INFO = this.form.TEXT_INFO.replaceAll('<img', '<img style="max-width:100%"')
Object.keys(this.form).map(key => {
formData.append(key, this.form[key])
})
if (!this.isEdit) {
if (!this.form.FILE || this.form.FILE.length <= 0) {
this.$message.error('请上传文件')
loading.close()
return
}
}
for (let i = 0; i < this.form.FILE.length; i++) {
if (this.form.FILE[i].raw) {
formData.append('FILE', this.form.FILE[i].raw)
}
}
formData.append('labels', JSON.stringify(this.form.labels))
for (let i = 0; i < this.form.TYPES.length; i++) {
if (this.form.TYPES[i]) {
this.form.types.push({
CATEGORY: 'TYPES',
CATEGORY_ID: this.form.TYPES[i].DICTIONARIES_ID,
CATEGORY_NAME: this.form.TYPES[i].NAME
})
}
}
formData.append('TYPES', JSON.stringify(this.form.types))
for (let i = 0; i < this.form.SPECIFICATION_TYPES.length; i++) {
if (this.form.SPECIFICATION_TYPES[i]) {
this.form.specification_types.push({
CATEGORY: 'SPECIFICATION_TYPES',
CATEGORY_ID: this.form.SPECIFICATION_TYPES[i].DICTIONARIES_ID,
CATEGORY_NAME: this.form.SPECIFICATION_TYPES[i].NAME
})
}
}
formData.append('SPECIFICATION_TYPES', JSON.stringify(this.form.specification_types))
if (!this.form.category_list) this.form.category_list = []
this.form.category_list.push({
CATEGORY: 'CATEGORY_LIST',
CATEGORY_ID: '7158f688d0f34054a28a9275139298df',
CATEGORY_NAME: '行业专属类'
})
formData.append('CATEGORY_LIST', JSON.stringify(this.form.category_list))
upload(
'/textLibrary/init',
formData
).then((data) => {
loading.close()
this.dialogVisible = false
this.$emit('logical-end', { result: 'OK' })
this.$message.success('保存成功')
}).catch((e) => {
loading.close()
console.log(e)
})
this.clear()
} else {
return false
}
})
},
checkForm() {
if (this.form.labels.length > 15) {
this.$message.error('关联标签数不能超过15个')
return true
}
},
goBack() {
this.dialogVisible = false
this.clear()
this.$emit('goBack', this.e)
},
getChooseTage(e) {
if (e.TYPE === '0') {
const list = e.e
for (const listKey in list) {
const index = this.form.labels.findIndex(item => {
item.BUS_LABEL_FACTORY_ID === list[listKey].BUS_LABEL_FACTORY_ID
})
if (index < 0) {
const label = JSON.parse(JSON.stringify(list[listKey]))
label.label = label.NAME
label.value = JSON.stringify(list[listKey])
const index = this.form.labels.findIndex(item => item.value === label.value)
if (index < 0) {
this.form.labels.push(label)
}
}
}
} else {
if (e.e.length > 1) {
this.$message.error('只能选择一个类型')
return
}
this.form.TYPE_NAME = e.e[0].NAME
this.form.TYPE = e.e[0].BUS_LABEL_FACTORY_ID
this.$forceUpdate()
}
},
getType(e) {
this.form.TYPE = e.info[0].DICTIONARIES_ID
this.form.TYPE_NAME = e.info[0].NAME
},
clear() {
this.isEdit = false
this.form = {
REMARKS: '',
FILE: [],
labels: [''],
TYPE: '',
TYPES: [''],
SPECIFICATION_TYPES: [''],
STATUS: '',
ASSOCIATION: '2',
types: [],
specification_types: []
}
},
getDic() {
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '5a7c94b2b9514285b433759edd848b4a' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' }
).then((data) => {
this.industryTypeList = data.list
}).catch((e) => {
this.loading = false
})
//
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '84254cb5b2ae40eb9f451509b2d370ae' }
).then((data) => {
this.categoryList = data.list
}).catch((e) => {
this.loading = false
})
},
getChooseOne(e) {
this.remoteControl.keyOne = !(e && e.info && e.info.DICTIONARIES_ID && e.info.DICTIONARIES_ID === '7158f688d0f34054a28a9275139298df')
},
openTextEdit(id, textDisabled) {
if (!id) {
this.textDisabled = false
this.$refs.textEditing.init({ text: this.form.TEXT_INFO })
} else {
this.textDisabled = textDisabled
this.loading = true
requestFN('textLibrary/getTextInfo', id)
.then((data) => {
if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') {
this.$refs.textEditing.init({ text: data.info.TEXT_INFO })
} else {
if (((!this.form.TEXT_INFO) || this.form.TEXT_INFO === '') && this.textDisabled) {
this.$message.error('此数据未维护文件内容')
} else {
this.$refs.textEditing.init({ text: this.form.TEXT_INFO })
}
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
},
getText(e) {
this.form.TEXT_INFO = e.text
},
exportWord(info) {
this.loading = true
requestFN('textLibrary/getTextInfo', info)
.then((data) => {
if (data.info) {
if ((!data.info) || data.info.TEXT_INFO === '') {
this.$message.error('没有文件导出')
} else {
this.$message.success('导出成功')
window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID)
}
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,562 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="安全生产责任制名称:" label-width="150px">
<el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition">
添加其他搜索条件
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:row-key="getRowKey"
:data="varList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
:row-class-name="tableRowClassName"
tooltip-effect="dark"
border
fit
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<el-table-column
v-if="false"
:reserve-selection="true"
type="selection"
width="55"
align="center"
/>
<el-table-column type="expand">
<template slot-scope="props">
<div style="text-align: left;padding: 10px;">
<el-form label-position="left" inline>
<el-form-item label="标签">
<el-tag
v-for="tag in props.row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</el-form-item>
<el-form-item label="国民经济行业类型">
<div v-if="(props.row.SPECIFICATION_TYPES && props.row.SPECIFICATION_TYPES.length > 0) && ((!props.row.CATEGORY_LIST) || (!props.row.CATEGORY_LIST[0]) || (props.row.CATEGORY_LIST[0].CATEGORY_ID !== '691346658ed744a1bda2ed3a755f606c')) ">
<el-tag
v-for="tag in props.row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</el-form-item>
</el-form>
</div>
</template>
</el-table-column>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column align="center" prop="REMARKS" label="安全生产责任制名称" />
<el-table-column align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" align="center" prop="LABEL" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<template slot-scope="{row}">
<div v-if="(row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0) && ((!row.CATEGORY_LIST) || (!row.CATEGORY_LIST[0]) || (row.CATEGORY_LIST[0].CATEGORY_ID !== '7158f688d0f34054a28a9275139298df'))">
<el-tag
v-for="tag in row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="200px"/>
<el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" >
<template slot-scope="{row}">
{{ !row.CORP_NAME ? '资源库数据' : row.CORP_NAME }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="14">
<el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="10">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)"></el-button>
</el-col>
</el-row>
</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>
<edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/>
<text-library-info ref="textLibraryInfo"/>
<update-spe-file ref="updateFile"/>
<update-log ref="updateLog"/>
<condition ref="condition" @getResult="getCondition"/>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import editTextLibrary from './editTextLibrary.vue'
import textLibraryInfo from './textLibraryInfo.vue'
import updateLog from './updateLog.vue'
import UpdateLog from './updateLog.vue'
import condition from './condition.vue'
import UpdateSpeFile from './updateSpeFile.vue'
export default {
components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
form: {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: ''
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.BUS_TEXT_LIBRARY_ID
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
addCondition() {
this.$refs.condition.init()
},
getCondition(info) {
this.form.CATEGORY_LIST = info.CATEGORY_LIST
this.form.TYPES = info.TYPES
this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES
this.form.labels = info.LABELS
},
clearMessage() {
this.label_name = ''
this.form = {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.form.KEYWORDS,
CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST),
TYPES: JSON.stringify(this.form.TYPES),
SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES),
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '2',
CORPINFO_ID: '0',
LIBRARY_FLAG: '1'
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
handleAdd() {
this.title = '新增'
this.$refs.editTextLibrary.init()
},
handleEdit(e) {
this.title = '编辑'
this.$refs.editTextLibrary.init({ e: e, isEdit: true })
},
getInformation(e) {
this.$refs.textLibraryInfo.init({ e: e })
},
handleDelete(e) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/delete',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
if (data.code === '0') {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
} else {
this.listLoading = false
this.$message.error(data.errorMessage)
}
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleLock(e, flag) {
this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/lock',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isLock: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleTop(e, flag) {
this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/top',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isTop: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleExport(e) {
this.$confirm('确定要导出文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (e.MIGRATION_FLAG === '1') {
window.open(config.fileUrl + e.PATH)
} else {
window.open(e.PATH)
}
}).catch((e) => {
console.log(e)
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const _ids = _selectData.filter((item, index) => {
return item.LOCKTOOL
})
if (_ids.length > 0) {
this.$message.error('选中的数据有锁定数据,请重新选择')
return
}
const ids = _selectData.map((item, index) => {
return item.BUS_TEXT_LIBRARY_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'textlibraryThree:add,textlibraryThree:del,textlibraryThree:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.textlibraryThreefhadminadd //
this.del = data.textlibraryThreefhadmindel //
this.edit = data.textlibraryThreefhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (row.ISTOPTIME) {
return 'warning-row'
}
},
saveClose(e) {
this.getList()
},
openUpdateFile(row) {
this.$refs.updateFile.init(row)
},
openUpdateLog(row) {
this.$refs.updateLog.init(row)
},
setStatus(row, status) {
this.listLoading = true
this.$confirm('是否更改状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/textLibrary/setStatus',
{
BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID,
STATUS: status
}
).then((data) => {
this.listLoading = false
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
this.listLoading = false
})
},
handleCopy(row) {
this.$confirm('确定要将此条数据添加到本地', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.copyInfo(row)
}).catch((e) => {
console.log(e)
this.$message({
type: 'info',
message: '已取消添加'
})
})
},
copyInfo(row) {
requestFN(
'/textLibrary/copyToOperate?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{ BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID }
).then((data) => {
if (data.code === '0') {
this.$message.success('添加成功')
} else {
this.$message.success('添加失败')
}
}).catch((e) => {
this.$message.success('添加失败')
})
},
enterSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.createTips(event, row, '数据已置顶')
}
},
leaveSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.removeTips(row)
}
},
createTips(el, row, value) {
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDom = document.createElement('div')
tooltipDom.style.cssText = `
display: inline-block;
max-width: 400px;
max-height: 400px;
position: absolute;
top: ${el.clientY + 5}px;
left: ${el.clientX}px;
padding:5px 10px;
overflow: auto;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #595959;
background: #fff;
border-radius: 5px;
z-index: 19999;
box-shadow: 0 4px 12px 1px #ccc;
`
tooltipDom.innerHTML = value
tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`)
// body
document.body.appendChild(tooltipDom)
},
removeTips(row) {
console.log(row, 'row')
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`)
if (tooltipDomLeave.length) {
tooltipDomLeave.forEach(dom => {
document.body.removeChild(dom)
})
}
}
}
}
</script>

View File

@ -0,0 +1,503 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="安全生产责任制名称:" label-width="150px">
<el-input v-model="form.KEYWORDS" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="addCondition">
添加其他搜索条件
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-magic-stick" @click="clearMessage">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:row-key="getRowKey"
:data="varList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
:row-class-name="tableRowClassName"
tooltip-effect="dark"
border
fit
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<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 align="center" prop="REMARKS" label="安全生产管理制度名称" />
<el-table-column align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.NAME }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<template slot-scope="{row}">
<div v-if="row.SPECIFICATION_TYPES && row.SPECIFICATION_TYPES.length > 0">
<el-tag
v-for="tag in row.SPECIFICATION_TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</div>
<div v-else>
<el-tag type="warning">通用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<el-table-column v-if="false" :show-overflow-tooltip="true" align="center" prop="UPLOAD_USER_NAME" width="100px" label="数据来源" >
<template slot-scope="{row}">
{{ !row.CORP_NAME ? '资源库数据' : row.CORP_NAME }}
</template>
</el-table-column> <el-table-column label="" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="24" style="padding-bottom: 10px">
<el-button type="info" icon="el-icon-view" size="mini" @click="getInformation(row)"></el-button>
<el-button type="warning" icon="el-icon-printer" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="24">
<el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-if="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)"></el-button>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-if="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<edit-text-library ref="editTextLibrary" :title="title" @logical-end="saveClose"/>
<text-library-info ref="textLibraryInfo"/>
<update-spe-file ref="updateFile"/>
<update-log ref="updateLog"/>
<condition ref="condition" have-corp-flag @getResult="getCondition"/>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
</style>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import editTextLibrary from './editTextLibrary.vue'
import textLibraryInfo from './textLibraryInfo.vue'
import updateLog from './updateLog.vue'
import UpdateLog from './updateLog.vue'
import condition from './condition.vue'
import UpdateSpeFile from './updateSpeFile.vue'
export default {
components: { UpdateSpeFile, UpdateLog, Pagination, editTextLibrary, textLibraryInfo, updateLog, condition },
directives: { waves },
data() {
return {
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
form: {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: ''
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.BLACKSPOT_ID
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
addCondition() {
this.$refs.condition.init()
},
getCondition(info) {
this.form.CATEGORY_LIST = info.CATEGORY_LIST
this.form.TYPES = info.TYPES
this.form.SPECIFICATION_TYPES = info.SPECIFICATION_TYPES
this.form.labels = info.LABELS
this.form.CORPINFO_ID = info.CORPINFO_ID
},
clearMessage() {
this.label_name = ''
this.form = {
KEYWORDS: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.form.KEYWORDS,
CATEGORY_LIST: JSON.stringify(this.form.CATEGORY_LIST),
TYPES: JSON.stringify(this.form.TYPES),
SPECIFICATION_TYPES: JSON.stringify(this.form.SPECIFICATION_TYPES),
labels: JSON.stringify(this.form.labels),
STATUS: this.form.STATUS,
ASSOCIATION: '2',
ENTERPRISE_SIDE: '0',
CORPINFO_ID: this.form.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
handleAdd() {
this.title = '新增'
this.$refs.editTextLibrary.init()
},
handleEdit(e) {
this.title = '编辑'
this.$refs.editTextLibrary.init({ e: e, isEdit: true })
},
getInformation(e) {
this.$refs.textLibraryInfo.init({ e: e })
},
handleDelete(e) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/delete',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
if (data.code === '0') {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
} else {
this.listLoading = false
this.$message.error(data.errorMessage)
}
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleLock(e, flag) {
this.$confirm(flag === '1' ? '确定要锁定吗?' : '确定要解锁吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/lock',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isLock: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleTop(e, flag) {
this.$confirm(flag === '1' ? '确定要置顶吗?' : '确定要取消置顶吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/top',
{
BUS_TEXT_LIBRARY_ID: e.BUS_TEXT_LIBRARY_ID,
isTop: flag
}
).then(() => {
this.$message({
message: '操作成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch((e) => {
console.log(e)
})
},
handleExport(e) {
this.$confirm('确定要导出文件吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (e.MIGRATION_FLAG === '1') {
window.open(config.fileUrl + e.PATH)
} else {
window.open(e.PATH)
}
}).catch((e) => {
console.log(e)
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const _ids = _selectData.filter((item, index) => {
return item.LOCKTOOL
})
if (_ids.length > 0) {
this.$message.error('选中的数据有锁定数据,请重新选择')
return
}
const ids = _selectData.map((item, index) => {
return item.BUS_TEXT_LIBRARY_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/textLibrary/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'textlibraryThree:add,textlibraryThree:del,textlibraryThree:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.textlibraryThreefhadminadd //
this.del = data.textlibraryThreefhadmindel //
this.edit = data.textlibraryThreefhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
tableRowClassName({ row, rowIndex }) {
if (row.ISTOPTIME) {
return 'warning-row'
}
},
saveClose(e) {
this.getList()
},
openUpdateFile(row) {
this.$refs.updateFile.init(row)
},
openUpdateLog(row) {
this.$refs.updateLog.init(row)
},
setStatus(row, status) {
this.listLoading = true
this.$confirm('是否更改状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/textLibrary/setStatus',
{
BUS_TEXT_LIBRARY_ID: row.BUS_TEXT_LIBRARY_ID,
STATUS: status
}
).then((data) => {
this.listLoading = false
this.$message({
type: 'success',
message: '修改成功!'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
this.listLoading = false
})
},
enterSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.createTips(event, row, '数据已置顶')
}
},
leaveSelectionRows(row, column, cell, event) {
if (row.ISTOPTIME) {
this.removeTips(row)
}
},
createTips(el, row, value) {
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDom = document.createElement('div')
tooltipDom.style.cssText = `
display: inline-block;
max-width: 400px;
max-height: 400px;
position: absolute;
top: ${el.clientY + 5}px;
left: ${el.clientX}px;
padding:5px 10px;
overflow: auto;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #595959;
background: #fff;
border-radius: 5px;
z-index: 19999;
box-shadow: 0 4px 12px 1px #ccc;
`
tooltipDom.innerHTML = value
tooltipDom.setAttribute('id', `tooltip-${BUS_TEXT_LIBRARY_ID}`)
// body
document.body.appendChild(tooltipDom)
},
removeTips(row) {
console.log(row, 'row')
const { BUS_TEXT_LIBRARY_ID } = row
const tooltipDomLeave = document.querySelectorAll(`#tooltip-${BUS_TEXT_LIBRARY_ID}`)
if (tooltipDomLeave.length) {
tooltipDomLeave.forEach(dom => {
document.body.removeChild(dom)
})
}
}
}
}
</script>

View File

@ -0,0 +1,146 @@
<template>
<el-dialog v-loading="loading" v-if="dialogVisible" :visible.sync="dialogVisible" title="详情">
<el-form ref="form" :model="form" label-width="180px">
<el-form-item label="安全生产责任制名称:" prop="FILE_NAME">
<el-input v-model="form.REMARKS" disabled style="width: 70%"/>
</el-form-item>
<el-form-item label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-tag v-for="tag in form.SPECIFICATION_TYPES" :key="tag.value" :disable-transitions="false" style="margin-right: 10px">
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="上传时间:" prop="FILE_NAME">
<el-input v-model="form.UPLOAD_TIME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item label="上传人:" prop="FILE_NAME">
<el-input v-model="form.UPLOAD_USER_NAME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item prop="tags" label="标签:">
<el-tag
v-for="tag in form.labels"
:key="tag.value"
:disable-transitions="false"
style="margin-right: 10px">
{{ tag.NAME }}
</el-tag>
</el-form-item>
<el-form-item label="文件详情:">
<el-button size="small" type="primary" @click="openTextEdit({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})"></el-button>
<el-button size="small" type="primary" @click="exportWord({BUS_TEXT_LIBRARY_ID:form.BUS_TEXT_LIBRARY_ID})">word</el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
</div>
<text-editing ref="textEditing" :disabled="true" append-to-body title="文本编辑器"/>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'
import TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination },
directives: { waves },
data() {
return {
config: config,
dialogVisible: false,
form: {
BUS_TEXT_LIBRARY_ID: '',
FILE_NAME: '',
FILE: [],
TYPE: '',
labels: [],
UPLOAD_TIME: '',
UPLOAD_USER_NAME: ''
},
loading: false,
remoteControl: {
keyOne: true
}
}
},
methods: {
init(e) {
this.dialogVisible = true
this.loading = true
this.e = e.e
requestFN(
'/textLibrary/goEdit',
{
BUS_TEXT_LIBRARY_ID: this.e.BUS_TEXT_LIBRARY_ID
}
).then((data) => {
this.loading = false
this.form = data.data
this.form.FILE = []
this.remoteControl.keyOne = !(this.form.CATEGORY_LIST[0].CATEGORY_ID === '7158f688d0f34054a28a9275139298df')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
},
goBack() {
this.dialogVisible = false
this.$emit('goBack', this.e)
},
openTextEdit(id) {
this.loading = true
requestFN('textLibrary/getTextInfo', id)
.then((data) => {
if (data.info && data.info.TEXT_INFO && data.info.TEXT_INFO !== '') {
this.$refs.textEditing.init({ text: data.info.TEXT_INFO })
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
},
exportWord(info) {
this.loading = true
requestFN('textLibrary/getTextInfo', info)
.then((data) => {
if (data.info) {
if ((!data.info) || data.info.TEXT_INFO === '') {
this.$message.error('没有文件导出')
} else {
this.$message.success('导出成功')
window.open(config.httpurl + '/textLibrary/exportWord?BUS_TEXT_LIBRARY_ID=' + info.BUS_TEXT_LIBRARY_ID)
}
} else {
this.$message.error('此数据未维护文件内容')
}
this.loading = false
}).catch((e) => {
console.log(e)
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,55 @@
<template>
<el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
<el-table :data="list">
<el-table-column prop="CREATE_TIME" label="日期"/>
<el-table-column prop="CREATOR_NAME" label="姓名"/>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { requestFN } from '@/utils/request'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
visible: false,
list: [],
loading: false,
id: ''
}
},
methods: {
init(e) {
this.visible = true
this.id = e.BUS_TEXT_LIBRARY_ID
this.getList()
},
goBack() {
this.list = []
this.visible = false
},
getList() {
this.loading = true
requestFN(
'/textLibrary/getUpdateLog',
{
BUS_TEXT_LIBRARY_ID: this.id
}
).then((data) => {
this.loading = false
this.list = data.list
}).catch((e) => {
this.loading = false
})
}
}
}
</script>

View File

@ -0,0 +1,77 @@
<template>
<el-dialog v-loading="loading" v-if="visible" :visible.sync="visible" title="替换">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-form-item label="文件:" prop="FILE">
<upload-file :file-list.sync="form.FILE" :limit="1" :file-size="200" append-to-body accept=".pdf"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="goBack"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves'
import { upload } from '@/utils/upload'
import uploadFile from '../../../../components/upload-file/index.vue'
export default {
components: { Pagination, uploadFile },
directives: { waves },
data() {
return {
visible: false,
form: {
FILE: [],
BUS_TEXT_LIBRARY_ID: ''
},
rules: {
FILE: [{ required: true, message: '请选择文件', trigger: 'blur' }]
},
loading: false
}
},
methods: {
init(e) {
this.visible = true
this.form.BUS_TEXT_LIBRARY_ID = e.BUS_TEXT_LIBRARY_ID
},
goBack() {
this.form = {
FILE: [],
BUS_TEXT_LIBRARY_ID: ''
}
this.visible = false
},
save() {
const loading = this.$loading({
lock: true,
text: '上传中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
for (let i = 0; i < this.form.FILE.length; i++) {
if (this.form.FILE[i].raw) {
formData.append('FILE', this.form.FILE[i].raw)
}
}
formData.append('BUS_TEXT_LIBRARY_ID', this.form.BUS_TEXT_LIBRARY_ID)
upload(
'/textLibrary/updateFile',
formData
).then((data) => {
loading.close()
this.visible = false
this.$emit('logical-end', { result: 'OK' })
}).catch((e) => {
loading.close()
console.log(e)
})
}
}
}
</script>

View File

@ -0,0 +1,19 @@
<template>
<div>
<List v-if="activeName==='List'" ref="list" />
<Dashboard v-if="activeName==='Dashboard'" ref="Dashboard"/>
</div>
</template>
<script>
import List from './components/list.vue'
import Dashboard from './components/dashboard.vue'
export default {
components: { List, Dashboard },
data() {
return {
activeName: 'Dashboard'
}
}
}
</script>

View File

@ -31,6 +31,18 @@
</el-button>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="归属企业">
<el-select v-model="BELONG_TO_CORP" filterable placeholder="请选择" style="width: 100%" >
<el-option
v-for="item in companyList"
:key="item.BELONG_TO_CORP"
:label="item.BELONG_TO_CORP_NAME"
:value="item.BELONG_TO_CORP"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
@ -126,7 +138,9 @@ export default {
studyStatusList: [],
checkStatusList: [],
STUDY_STATUS: '',
CHECK_STATUS: ''
CHECK_STATUS: '',
BELONG_TO_CORP: '',
companyList: []
}
},
created() {
@ -159,6 +173,7 @@ export default {
this.STATUS = ''
this.CHECK_STATUS = ''
this.STUDY_STATUS = ''
this.BELONG_TO_CORP = ''
this.getQuery()
},
getList() {
@ -168,7 +183,8 @@ export default {
{
KEYWORDS: this.KEYWORDS,
CHECK_STATUS: this.CHECK_STATUS,
STUDY_STATUS: this.STUDY_STATUS
STUDY_STATUS: this.STUDY_STATUS,
BELONG_TO_CORP: this.BELONG_TO_CORP
}
).then((data) => {
this.listLoading = false
@ -270,6 +286,13 @@ export default {
}).catch((e) => {
this.listLoading = false
})
requestFN(
'/xgf/user/getAllCorpInfo', {}
).then((data) => {
this.companyList = data.list
}).catch((e) => {
this.loading = false
})
}
}
}

View File

@ -19,7 +19,7 @@
<span v-if="imgUrl != ''">
<div class="img-flex">
<viewer>
<img :src="imgUrl" width="40" height="40" style="object-fit: cover;">
<el-image :src="imgUrl" :preview-src-list="[imgUrl]" style="object-fit: cover; width: 40px; height: 40px" z-index="8000" />
</viewer>
</div>
</span>
@ -47,13 +47,13 @@
<span>
<div class="img-flex">
<viewer>
<img
<el-image
v-for="item in userCardIDPhotoFile"
:src="config.fileUrl + item.FILEPATH"
:key="item.IMGFILES_ID"
width="40"
height="40"
style="object-fit: cover;">
:preview-src-list="[config.fileUrl + item.FILEPATH]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>
</viewer>
</div>
</span>
@ -137,13 +137,13 @@
<td v-if="userDetailForm.ISPAY === '1'">
<span>
<viewer>
<img
<el-image
v-for="item in insuranceFileList"
:src="config.fileUrl + item.FILEPATH"
:key="item.IMGFILES_ID"
width="40"
height="40"
style="object-fit: cover;">
:preview-src-list="[config.fileUrl + item.FILEPATH]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>
</viewer>
</span>
</td>
@ -159,13 +159,13 @@
<td v-if="userDetailForm.IS_SIGN_LABOR === '1'" colspan="3">
<span>
<viewer>
<img
<el-image
v-for="item in contractFileList"
:src="config.fileUrl + item.FILEPATH"
:key="item.IMGFILES_ID"
width="40"
height="40"
style="object-fit: cover;">
:preview-src-list="[config.fileUrl + item.FILEPATH]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>
</viewer>
</span>
</td>
@ -178,13 +178,13 @@
<span>
<div class="img-flex">
<viewer>
<img
<el-image
v-for="item in photosOfLevel"
:src="config.fileUrl + item.FILEPATH"
:key="item.IMGFILES_ID"
width="40"
height="40"
style="object-fit: cover;">
:preview-src-list="[config.fileUrl + item.FILEPATH]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>
</viewer>
</div>
</span>
@ -258,9 +258,9 @@
<table v-for="(item,index) in specialUsersList" :key="index" class="table-ui" style="margin-bottom: 20px;">
<tr>
<th style="width: 150px">证书名称</th>
<td style="width: 200px">{{ item.CERTIFICATE }}</td>
<td style="width: 150px">{{ item.CERTIFICATE }}</td>
<th style="width: 150px">作业类别</th>
<td style="width: 200px">{{ item.SPECIAL_TYPE_NAME }}</td>
<td style="width: 180px">{{ item.SPECIAL_TYPE_NAME }}</td>
<th style="width: 150px">操作项目</th>
<td>{{ item.OPERATION_TYPE_NAME }}</td>
<th style="width: 100px">证书照片</th>
@ -268,17 +268,16 @@
<span>
<div class="img-flex">
<viewer>
<img
<el-image
:src="config.fileUrl + item.FILEPATH"
width="40"
height="40"
style="object-fit: cover;">
<img
:preview-src-list="[config.fileUrl + item.FILEPATH]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>
<el-image
v-if="item.FILEPATH_BACK"
:src="config.fileUrl + item.FILEPATH_BACK"
width="40"
height="40"
style="object-fit: cover;">
:preview-src-list="[config.fileUrl + item.FILEPATH_BACK]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>
</viewer>
</div>
</span>
@ -413,7 +412,7 @@
</el-scrollbar>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button @click="close"> </el-button>
</span>
</el-dialog>
</div>
@ -511,6 +510,19 @@ export default {
},
download(item) {
useDownloadFile(item)
},
close() {
this.visible = false
this.userDetailForm = {}
this.userCardIDPhotoFile = [] //
this.trainRecordList = []
this.photosOfLevel = [] //
this.specialUsersList = {}
this.insuranceFileList = [] //
this.contractFileList = []
this.socialPhotoFile = []
this.gongshangbaoxianFile = []
this.applyList = []
}
}
}

View File

@ -31,6 +31,17 @@
</el-button>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="归属企业">
<el-select v-model="BELONG_TO_CORP" filterable placeholder="请选择" style="width: 100%" >
<el-option
v-for="item in companyList"
:key="item.BELONG_TO_CORP"
:label="item.BELONG_TO_CORP_NAME"
:value="item.BELONG_TO_CORP"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
@ -126,7 +137,9 @@ export default {
studyStatusList: [],
checkStatusList: [],
STUDY_STATUS: '',
CHECK_STATUS: ''
CHECK_STATUS: '',
BELONG_TO_CORP: '',
companyList: []
}
},
created() {
@ -157,6 +170,9 @@ export default {
goKeyReset() {
this.KEYWORDS = ''
this.STATUS = ''
this.CHECK_STATUS = ''
this.BELONG_TO_CORP = ''
this.STUDY_STATUS = ''
this.getQuery()
},
getList() {
@ -167,7 +183,8 @@ export default {
KEYWORDS: this.KEYWORDS,
Step: '1',
CHECK_STATUS: this.CHECK_STATUS,
STUDY_STATUS: this.STUDY_STATUS
STUDY_STATUS: this.STUDY_STATUS,
BELONG_TO_CORP: this.BELONG_TO_CORP
}
).then((data) => {
this.listLoading = false
@ -269,6 +286,14 @@ export default {
}).catch((e) => {
this.listLoading = false
})
requestFN(
'/xgf/user/getAllCorpInfo', {}
).then((data) => {
this.companyList = data.list
}).catch((e) => {
this.loading = false
})
}
}
}