Merge remote-tracking branch 'origin/pet' into pet

liujun0708-动火作业流程图逻辑修改
guoyuepeng 2024-06-27 13:59:19 +08:00
commit 38657469ae
53 changed files with 4338 additions and 122 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -235,6 +235,19 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="负责部门" label-width="80px">
<SelectTree
ref="deptTree_Select"
:clearable="false"
:key="waitFor.DEPARTMENT_ID"
:options="treeDataDepart"
:props="defaultProps"
v-model="waitFor.DEPARTMENT_ID"
placeholder="请选择部门"
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="4" label-width="80px">
<el-form-item>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="getDevice">
@ -404,8 +417,10 @@ export default {
POSTNAME: '',
USERNAME: '',
varList: [],
idListFcS: []
idListFcS: [],
DEPARTMENT_ID: ''
},
treeDataDepart: [],
pointList: [],
pointCode: '',
// ------------end
@ -531,7 +546,8 @@ export default {
FIRE_DEVICE_TYPE_ID: this.waitFor.FIRE_DEVICE_TYPE_ID,
FIRE_POINT_ID: this.waitFor.FIRE_POINT_ID,
FIRE_DEVICE_CODE: this.waitFor.FIRE_DEVICE_CODE,
FIRE_REGION_ID: this.waitFor.FIRE_REGION_ID
FIRE_REGION_ID: this.waitFor.FIRE_REGION_ID,
DEPARTMENT_ID: this.waitFor.DEPARTMENT_ID
}
).then((data) => {
this.listLoading = false
@ -587,6 +603,7 @@ export default {
this.treeData.forEach((item) => {
item.isDisabled = true
})
this.treeDataDepart = JSON.parse(data.zTreeNodes)
resolve()
}).catch((e) => {
})
@ -828,6 +845,7 @@ export default {
this.waitFor.FIRE_DEVICE_ID = ''
this.waitFor.FIRE_DEVICE_CODE = ''
this.waitFor.FIRE_POINT_NAME = ''
this.waitFor.DEPARTMENT_ID = ''
this.pointList = []
this.getList()
this.getDevice()

View File

@ -489,7 +489,7 @@ export default {
'data_id': '00002',
'MAP_POINT_NAME': dianweiName,
'name': '',
'point_type': '',
'point_type': '港口',
'type': '',
'descr': '',
'position': {
@ -544,8 +544,13 @@ export default {
},
toCenter(center = this.center) {
console.log('toCenter', center)
this.center.longitude = center.longitude
this.center.latitude = center.latitude
if (this.FIRE_POINT_ID && this.LONGTITUDE && this.LATITUDE && this.LONGTITUDE.trim() != '' && this.LATITUDE.trim() != '') {
this.center.longitude = this.LONGTITUDE
this.center.latitude = this.LATITUDE
} else {
this.center.longitude = center.longitude
this.center.latitude = center.latitude
}
this.center.height = center.height
viewer.camera.flyTo({
// ,x,y,

View File

@ -26,6 +26,13 @@
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="是否标点" label-width="110px">
<el-select v-model="IS_PUNCTUATION" clearable placeholder="请选择" style="width: 100%;">
<el-option v-for="item in punctuationStatusList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
@ -60,6 +67,12 @@
<el-table-column prop="DEVICE_COUNT" label="点位下消防器材数"/>
<el-table-column prop="DEPARTMENT_NAME" label="负责部门"/>
<el-table-column prop="USERNAME" label="负责人"/>
<el-table-column prop="ISPUNCTUATION" label="是否标点">
<template slot-scope="{row}">
<el-tag v-if="row.ISPUNCTUATION == 0" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="380">
<template slot-scope="{row}">
<el-button
@ -204,7 +217,18 @@ export default {
USER_ID: [{ required: true, message: '请选择负责人', trigger: 'change' }]
},
deptTreeData: [],
userList: []
userList: [],
punctuationStatusList: [
{
value: 0,
label: '是'
},
{
value: 1,
label: '否'
}
],
IS_PUNCTUATION: ''
}
},
watch: {
@ -263,7 +287,8 @@ export default {
{
FIRE_POINT_NAME: this.FIRE_POINT_NAME,
FIRE_POINT_CODE: this.FIRE_POINT_CODE,
DEPARTMENT_ID: this.selectForm.DEPARTMENT_ID
DEPARTMENT_ID: this.selectForm.DEPARTMENT_ID,
IS_PUNCTUATION: this.IS_PUNCTUATION
}
).then((data) => {
this.listLoading = false
@ -276,6 +301,7 @@ export default {
}, goKeyReset() {
this.FIRE_POINT_NAME = ''
this.FIRE_POINT_CODE = ''
this.IS_PUNCTUATION = ''
this.selectForm = {
DEPARTMENT_ID: ''
}

View File

@ -114,8 +114,8 @@
</td>
</tr>
<tr>
<td colspan="2">时间{{ pd.HOT_WORK_PERSON_PRINCIPAL_TIME }}</td>
<td colspan="2">时间{{ pd.HOT_WORK_AFTER_PRINCIPAL_TIME }}</td>
<td v-if="pd.HOT_WORK_PERSON_PRINCIPAL" colspan="2">{{ pd.HOT_WORK_PERSON_PRINCIPAL_TIME }}</td>
<td v-if="pd.HOT_WORK_AFTER_PRINCIPAL" colspan="2">{{ pd.HOT_WORK_AFTER_PRINCIPAL_TIME }}</td>
</tr>
<tr>
<td class="tbg">延时监火记录</td>

View File

@ -193,7 +193,7 @@
</div>
<div class="level-line" />
<div class="level-title">
<h1>处罚相关</h1>
<h1>处罚相关</h1><span style="color: gray; font-size: 12px;">(AI报警的处罚人员为AI报警的处置人)</span>
</div>
<el-divider content-position="left">处罚人员 <el-button type="primary" size="mini" @click="addInspector"></el-button></el-divider>
<el-form-item v-for="(item,index) in inspectorList" :key="index + (Math.random() + '').replace('.', '')" :label="(index+1)+'.'">
@ -1087,6 +1087,7 @@ export default {
const corpId = data.varList[i].CORPINFO_ID
if (corpId === '1e6dbbe16004402f8d2c0e52afd9a676' ||
corpId === '3a854eefa7894e06aaa1a2611bca80f6' ||
corpId === '5cee11f6152d42e0a08ae38dc6abcfdf' ||
corpId === '020578a4c1f04bc692ee25145c2efbe5' || corpId === '90966974de3c4b83aca6f8fd6432d5c2') {
this.groupCorpList.push(data.varList[i])
}

View File

@ -150,7 +150,7 @@
<div class="level-line" />
<div class="level-title">
<h1>处罚相关</h1>
<h1>处罚相关</h1><span style="color: gray; font-size: 12px;">(AI报警的处罚人员为AI报警的处置人)</span>
</div>
<tr v-for="(item,index) in punishThePerson" :key="index">
<td class="tbg">处罚人员部门</td>

View File

@ -45,6 +45,7 @@
<el-table-column prop="UNITS_PIC_NAME" label="相关方单位负责人" show-overflow-tooltip />
<el-table-column prop="UNITS_PHONE" label="电话" show-overflow-tooltip />
<el-table-column prop="CHECK_COUNT" label="安全环保检查次数" />
<el-table-column prop="AI_COUNT" label="AI报警隐患数" />
<el-table-column label="操作" align="center" width="100">
<template slot-scope="{row}">
<el-button icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)"></el-button>

View File

@ -50,9 +50,10 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="500">
<el-table-column label="操作" align="left" width="600px">
<template slot-scope="{row}">
<el-button :disabled="STATE == 2" type="success" icon="el-icon-caret-right" size="mini" @click="showVideo(row)"></el-button>
<el-button type="success" size="mini" @click="getOutsourced(row)"></el-button>
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(row)"></el-button>
<el-button v-show="!row.PLATFORMVIDEOMANAGEMENT_ID" :disabled="STATE == 2" type="warning" icon="el-icon-caret-right" size="mini" @click="showVideoBack(row.VIDEOURL)"></el-button>
<el-button v-show="row.PLATFORMVIDEOMANAGEMENT_ID" :disabled="STATE == 2" type="warning" size="mini" @click="getRTSP(row)">rtsp</el-button>
@ -152,7 +153,49 @@
<el-button @click="back"> </el-button>
</div>
</el-dialog>
<!-- 反查重点工程 -->
<el-dialog
:visible.sync="outsourcedListVisible"
:title="'绑定列表'"
width="80%">
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="outsourcedList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" show-overflow-tooltip />
<el-table-column prop="STATE" label="状态" width="100" >
<template slot-scope="{row}">
<span v-if="row.STATE == 0"></span>
<span v-if="row.STATE == 1"></span>
<span v-if="row.STATE == 2"></span>
<span v-if="row.STATE == -1"></span>
<span v-if="row.STATE == -2"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="400">
<template slot-scope="{row}">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="untie(row.VIDEOMANAGER_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="outsourcedListVisible = false"> </el-button>
</div>
</el-dialog>
<!-- 反查重点工程END -->
<platformvideo ref="platformvideo" @handleSelected="handleSelected"/>
<BobileCamer ref="bobileCamer" @bobilehandleSelected="bobilehandleSelected"/>
</div>
@ -182,6 +225,9 @@ export default {
dialogImageUrl: '',
dialogVisible: false,
dialogSelect: false,
outsourcedListVisible: false, //
controlRowTemp: null, // row
outsourcedList: [], //
add: true,
del: true,
edit: true,
@ -737,6 +783,50 @@ export default {
goBack() {
this.$parent.activeName = 'List'
this.$parent.OUTSOURCED_ID = ''
},
//
async getOutsourced(row) {
this.listLoading = true
this.outsourcedListVisible = true
this.controlRowTemp = row
this.outsourcedList = []
requestFN(
`/videoResources/getRelevanceOutsourced?VIDEO_ID=${row.VIDEO_RESOURCES_ID ? row.VIDEO_RESOURCES_ID : row.PLATFORMVIDEOMANAGEMENT_ID}`,
{
}
).then((data) => {
this.listLoading = false
this.outsourcedList = data.varList
}).catch((e) => {
this.listLoading = false
})
},
async untie(id) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
console.log(this.VIDEOMANAGER_ID)
requestFN(
'/videomanager/delete',
{
VIDEOMANAGER_ID: id
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.getOutsourced(this.controlRowTemp)
this.listLoading = false
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
}
}

View File

@ -1,7 +1,7 @@
<template>
<div class="shipin">
<div class="block1">
<layout-title title="视频状态"/>
<layout-title title="视频定位"/>
<div class="options">
<div class="option">
<div class="leftimg"/>
@ -15,7 +15,7 @@
</div>
</div>
<div class="block2">
<layout-title title="区域报警数"/>
<layout-title title="重点工程"/>
<div class="options">
<div v-for="(item,index) in block2OptionsList" :key="index" class="option">
<div class="circular"><img :src="item.img" alt=""></div>
@ -26,26 +26,25 @@
</div>
</div>
</div>
<div class="block3">
<layout-title title="报警记录"/>
<div class="content">
<div class="table">
<div class="tr">
<div class="td">防区</div>
<div class="td">摄像头名称</div>
<div class="td">时间</div>
</div>
<div class="scroll">
<div v-for="(item,index) in block3List" :key="index" class="tr">
<div class="td line1">{{ item.region }}</div>
<div class="td">{{ item.name }}</div>
<div class="td">{{ item.time }}</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="block3">-->
<!-- <layout-title title="报警记录"/>-->
<!-- <div class="content">-->
<!-- <div class="table">-->
<!-- <div class="tr">-->
<!-- <div class="td">防区</div>-->
<!-- <div class="td">摄像头名称</div>-->
<!-- <div class="td">时间</div>-->
<!-- </div>-->
<!-- <div class="scroll">-->
<!-- <div v-for="(item,index) in block3List" :key="index" class="tr">-->
<!-- <div class="td line1">{{ item.region }}</div>-->
<!-- <div class="td">{{ item.name }}</div>-->
<!-- <div class="td">{{ item.time }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</template>
@ -79,17 +78,25 @@ export default {
{
lable: '视频总数',
count: 0
},
{
lable: '在线数量',
count: 0
},
{
lable: '离线数量',
count: 0
}
],
block2OptionsList: [
{
img: require('../../../assets/map/bianjie/img1.png'),
label: '码头',
img: require('../../../assets/map/gangkou_index/point/ico15.png'),
label: '重点工程总数',
count: 0
},
{
img: require('../../../assets/map/bianjie/img2.png'),
label: '油罐区域',
img: require('../../../assets/map/gangkou_index/point/ico30.png'),
label: '重点工程开工数量',
count: 0
}
],
@ -163,33 +170,70 @@ export default {
this.initgetTable()
},
methods: {
//
// initCount() {
// requestFN(
// '/map/mapPlatformelectronic/listAll',
// {
// CORPINFO_ID: this.corpInfoId,
// AREA: this.area
// }
// ).then((data) => {
// this.block1OptionsList[0].count = data.allForMap
// })
// },
//
initCount() {
requestFN(
'/map/mapPlatformelectronic/listAll',
'/map/keyProject/listAllLocation',
{
CORPINFO_ID: this.corpInfoId,
AREA: this.area
AREA: this.area,
TYPE: 'VIDEO',
GANGKOU: this.gangkou
}
).then((data) => {
this.block1OptionsList[0].count = data.allForMap
this.block1OptionsList[0].count = data.varList.length
data.varList.forEach((item) => {
if (item.ONLINE_STATUS === '0') {
this.block1OptionsList[1].count++
} else {
this.block1OptionsList[2].count++
}
})
})
},
//
// initgetTable() {
// requestFN(
// '/map/mapPlatformelectronic/listAllByArea',
// {
// CORPINFO_ID: this.corpInfoId,
// AREA: this.area
// }
// ).then((data) => {
// data.varList.forEach(item => {
// if (item.SUOSHUQUYU === '2') {
// this.block2OptionsList[0].count = item.co
// } else if (item.SUOSHUQUYU === '1') {
// this.block2OptionsList[1].count = item.co
// }
// })
// })
// },
//
initgetTable() {
requestFN(
'/map/mapPlatformelectronic/listAllByArea',
'/outsourced/listForCount',
{
CORPINFO_ID: this.corpInfoId,
AREA: this.area
CORPINFO_ID: this.corpInfoId
}
).then((data) => {
this.block2OptionsList[0].count = data.varList.length
data.varList.forEach(item => {
if (item.SUOSHUQUYU === '2') {
this.block2OptionsList[0].count = item.co
} else if (item.SUOSHUQUYU === '1') {
this.block2OptionsList[1].count = item.co
if (item.STATE == 1) {
this.block2OptionsList[1].count++
}
})
})

View File

@ -48,8 +48,8 @@
<carPositionCfdD v-if="type === 'carPosition'" :id="id" :type="type" :infoname="infoname"/>
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
<peoplePositionOne v-if="type === 'peoplePositionOne' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" corp-id="035958e685cf4850bc40151c5e0617a6" />
<peoplePositionOne v-if="type === 'peoplePositionOne' && !(corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26')" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && (corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26')" :id="id" :type="type" :corp-id="corpInfoId" />
<!-- 重点工程 start -->
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />

View File

@ -7,7 +7,9 @@
<table class="table-ui">
<tr>
<td class="bbg-transparent">视频名称</td>
<td colspan="3">{{ pd.VIDEONAME }}</td>
<td>{{ pd.VIDEONAME }}</td>
<td class="bbg-transparent">在线状态</td>
<td>{{ pd.ONLINE_STATUS }}</td>
</tr>
<tr>
<td class="bbg-transparent">所属重点工程</td>

View File

@ -41,7 +41,7 @@
</tr>
<tr>
<td class="bbg-transparent">定位卡电量</td>
<td >{{ info?otherInfo.data[3].currentValBody.val:'' }}</td>
<td >{{ info?(otherInfo?otherInfo.data[3].currentValBody.val:'*'):'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">部门</td>

View File

@ -1762,6 +1762,10 @@ export default {
this.clearMqttPoint('+/UwbBQ/')
this.removeTrajectory()
}
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') {
this.clearRYDWPoint('+/UwbBQ/')
this.removeTrajectory()
}
this.bottomOptionsList[pindex].list[index].check = false
if (this.gangkouActive === '00004') {
this.cfdBottomOptionsList[pindex].list[index].check = false
@ -1782,6 +1786,9 @@ export default {
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
!this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe()
} else if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') {
// websocket
this.initRYDWWebsocket('21590a00ea5e462e9ee44dd332dddc26')
} else {
requestFN(
pointUrl,
@ -1826,6 +1833,14 @@ export default {
} else {
point.infoname = varList[i].NAME
}
// 线
if (point.icon_type.indexOf('6_1') > -1) {
if (varList[i].ONLINE_STATUS === '0') {
point.icon_type = point.icon_type + '_online'
} else {
point.icon_type = point.icon_type + '_offline'
}
}
points.push(point)
}
if (this.gangkouActive === '00004' && urlType === 'carPosition') {
@ -2034,7 +2049,7 @@ export default {
},
//
isPointxyWithinTheArea(pointBox, x, y) {
isPointxyWithinTheArea(pointBox = {}, x, y) {
if (this.forEachIsPointInPolygon(pointBox.redList, x, y)) {
return '_1'
} else if (this.forEachIsPointInPolygon(pointBox.orangeList, x, y)) {
@ -2145,6 +2160,15 @@ export default {
delete this.mqttPoint[key]
}
},
clearRYDWPoint(prefix) {
this.fwebsocket.close()
for (const mqttPointKey in this.mqttPoint) {
const key = prefix ? prefix + this.mqttPoint[mqttPointKey] : mqttPointKey
viewer.entities.removeById(this.mqttPoint[key])
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== this.mqttPoint[key])
delete this.mqttPoint[key]
}
},
//
doSubscribe() {
const { topic, topic1, qos } = this.subscription
@ -2308,6 +2332,50 @@ export default {
}
}
},
// websocket
initRYDWWebsocket(CORP_INFO_ID) {
// eslint-disable-next-line no-unused-vars
const _this = this
if (window.WebSocket) {
const wsUrl = config.NoDwSysUrl + '/ltLocation/DW_' + new Date().getTime() + '_98'
_this.fwebsocket = new WebSocket(encodeURI(wsUrl))
_this.fwebsocket.onmessage = function(message) {
console.info('接收消息')
const peopleList = JSON.parse(message.data).data.data
for (let i = 0; i < peopleList.length; i++) {
const item = peopleList[i]
if ((!item) || (item.ts === 1)) continue
//
const index = _this.onePerLocArr.findIndex(item1 => {
return item1.id.toString() === item.id.toString()
})
const x = item.lon
const y = item.lat
const pointColor = _this.isPointxyWithinTheArea(this.pointBox, x, y)
if (index !== -1) {
_this.onePerLocArr[index].x = x
_this.onePerLocArr[index].y = y
_this.onePerLocArr[index].icon_type = 'img4_0' + pointColor
ry_drag.getPosition(_this.onePerLocArr[index])
} else {
const perLoc = {
id: item.id,
x: x,
y: y,
icon_type: 'img4_0' + pointColor,
data_id: item.id,
point_type: '标记点peoplePositionOne',
label: '人员定位',
corpInfoId: CORP_INFO_ID
}
_this.onePerLocArr.push(perLoc)
ry_drag.addEntity(perLoc)
_this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id
}
}
}
}
},
radomPer(mockData) {
for (const item of mockData.data) {
item.longitude += 0.0003 * Math.random()
@ -2543,7 +2611,7 @@ export default {
})
},
//
isPointWithinTheArea(pointBox, point) {
isPointWithinTheArea(pointBox = {}, point) {
if (this.forEachIsPointInPolygon(pointBox.redList, point.x, point.y)) {
point.color = 'red'
} else if (this.forEachIsPointInPolygon(pointBox.orangeList, point.x, point.y)) {
@ -2556,7 +2624,7 @@ export default {
},
// true
forEachIsPointInPolygon(polygonList, lng, lat) {
forEachIsPointInPolygon(polygonList = [], lng, lat) {
return polygonList.some(item => {
return this.isPointInPolygon(item.position, lng, lat)
})

View File

@ -43,6 +43,8 @@ const img5_0 = require('../../../assets/map/gangkou_index/point/ico26.png')
const img6_0 = require('../../../assets/map/gangkou_index/point/ico30.png')
const img6_1 = require('../../../assets/map/gangkou_index/point/ico31.png')
const img6_1_online = require('../../../assets/map/gangkou_index/point/ico31_online.png')
const img6_1_offline = require('../../../assets/map/gangkou_index/point/ico31_offline.png')
const img7_0 = require('../../../assets/map/gangkou_index/point/ico26.png')
@ -61,7 +63,8 @@ const imgMap = {
img6_0, img6_1,
img7_0,
img8_0, img8_1, img8_2, img8_3,
cfd_img1_0, cfd_img1_0_1, cfd_img1_0_2, cfd_img1_0_3
cfd_img1_0, cfd_img1_0_1, cfd_img1_0_2, cfd_img1_0_3,
img6_1_online, img6_1_offline
}
export { imgMap }

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/UploadFile/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,512 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form label-width="50px">
<el-row>
<el-col :span="6">
<el-form-item label="名称:" >
<el-input v-model="form.TEXT_NAME" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col v-if="false" :span="6">
<el-form-item label="状态:">
<el-select v-model="form.STATUS" placeholder="请选择" style="width: 100%;">
<el-option label="正常" value="1"/>
<el-option label="停用" value="0"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="分类:">
<el-select v-model="form.TYPE" placeholder="请选择" style="width: 100%;">
<el-option v-for="(item, index) in typeList" :key="index" :label="item.NAME" :value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
<el-col v-if="false" :span="6">
<el-form-item label="日期:">
<el-date-picker v-model="form.DATE" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%"/>
</el-form-item>
</el-col>
<el-col :span="6">
<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 v-if="false" 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="TYPE_NAME" label="分类"/>
<el-table-column align="center" prop="TEXT_NAME" label="名称"/>
<el-table-column align="center" prop="CODE_NAME" label="文号"/>
<el-table-column align="center" prop="PUBLISHES" label="制定机关"/>
<el-table-column align="center" prop="PUBLICATION_DATE" label="公布日期"/>
<el-table-column align="center" prop="IMPLEMENTATION_DATE" label="施行日期"/>
<el-table-column align="center" prop="REMARKS" label="备注"/>
<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 align="center" prop="STATUS" label="状态" width="80px">
<template slot-scope="{row}">
{{ row.STATUS === '0' ? '停用' : '正常' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="390px">
<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-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 './updateFile.vue'
import updateLog from './updateLog.vue'
import UpdateLog from './updateLog.vue'
import condition from './condition.vue'
export default {
components: { UpdateLog, 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: '',
DATE: '',
TYPE: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: '',
typeList: []
}
},
created() {
this.getList()
this.getDic()
},
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
},
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,
TYPE: this.form.TYPE,
DATE: this.form.DATE,
TEXT_NAME: this.form.TEXT_NAME,
ASSOCIATION: '4',
CORPINFO_ID: '0',
MIGRATION_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
})
},
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)
})
}
},
getDic() {
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '86ad14e9999b418aac2309744364e714' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
}
}
}
</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-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 updateFile from './updateFile.vue'
import updateLog from './updateLog.vue'
import UpdateLog from './updateLog.vue'
import condition from './condition.vue'
export default {
components: { UpdateLog, 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.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: '4',
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,148 @@
<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="TEXT_NAME">
<el-input v-model="form.TEXT_NAME" disabled style="width: 70%"/>
</el-form-item>
<el-form-item v-if="false" 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 v-if="false" 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="false" 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 v-if="false" 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 = []
if (this.form.CATEGORY_LIST) {
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,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/UploadFile/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,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,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

@ -7,7 +7,7 @@
<el-form-item label="安全操作规程名称:" prop="REMARKS">
<el-input v-model="form.REMARKS" style="width: 100%"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<el-form-item v-if="false" 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">

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -47,7 +47,7 @@
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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -71,7 +71,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<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
@ -88,7 +88,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<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}">
{{ '资源库数据' }}

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -48,7 +48,7 @@
/>
<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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -72,7 +72,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<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">
<el-tag
@ -89,7 +89,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<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 }}

View File

@ -4,7 +4,7 @@
<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-form-item v-if="false" label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
@ -13,7 +13,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-form-item v-if="false" label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
@ -22,7 +22,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-form-item v-if="false" 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>
@ -95,7 +95,6 @@ export default {
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

View File

@ -7,7 +7,7 @@
<el-form-item label="安全管理制度名称:" prop="REMARKS">
<el-input v-model="form.REMARKS" style="width: 100%"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<el-form-item v-if="false" 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">

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -48,7 +48,7 @@
/>
<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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -72,7 +72,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<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
@ -89,7 +89,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<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}">
{{ '资源库数据' }}

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -48,7 +48,7 @@
/>
<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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -72,7 +72,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<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">
<el-tag
@ -89,7 +89,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<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 }}

View File

@ -4,7 +4,7 @@
<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-form-item v-if="false" label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
@ -13,7 +13,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-form-item v-if="false" label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
@ -22,7 +22,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-form-item v-if="false" 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>
@ -95,7 +95,6 @@ export default {
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

View File

@ -7,7 +7,7 @@
<el-form-item label="安全生产责任制名称:" prop="REMARKS">
<el-input v-model="form.REMARKS" style="width: 100%"/>
</el-form-item>
<el-form-item label="类型:" prop="TYPES">
<el-form-item v-if="false" 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">

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -48,7 +48,7 @@
/>
<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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -72,7 +72,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<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
@ -89,7 +89,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<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 }}

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -48,7 +48,7 @@
/>
<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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -72,7 +72,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="SPECIFICATION_TYPES" label="国民经济行业类型" width="300px">
<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">
<el-tag
@ -89,7 +89,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" width="90px"/>
<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 }}

View File

@ -4,7 +4,7 @@
<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-form-item v-if="false" label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
@ -13,7 +13,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-form-item v-if="false" label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
@ -22,7 +22,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-form-item v-if="false" 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>
@ -95,7 +95,6 @@ export default {
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

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -40,7 +40,7 @@
highlight-current-row
@cell-mouse-enter="enterSelectionRows"
@cell-mouse-leave="leaveSelectionRows">
<el-table-column type="expand">
<el-table-column v-if="false" type="expand">
<template slot-scope="props">
<div style="text-align: left;padding: 10px;">
<el-form label-position="left" inline>
@ -81,7 +81,7 @@
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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -93,7 +93,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" prop="LABEL" align="center" label="标签" >
<el-table-column prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"

View File

@ -4,7 +4,7 @@
<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-form-item v-if="false" label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
@ -13,7 +13,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-form-item v-if="false" label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
@ -22,7 +22,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-form-item v-if="false" 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>

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -47,7 +47,7 @@
width="55"
align="center"
/>
<el-table-column type="expand">
<el-table-column v-if="false" type="expand">
<template slot-scope="props">
<div style="text-align: left;padding: 10px;">
<el-form label-position="left" inline>
@ -82,7 +82,7 @@
</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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -94,7 +94,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" prop="LABEL" align="center" label="标签" >
<el-table-column prop="LABEL" align="center" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"

View File

@ -4,7 +4,7 @@
<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-form-item v-if="false" label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
@ -13,7 +13,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-form-item v-if="false" label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
@ -22,7 +22,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-form-item v-if="false" 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>

View File

@ -13,7 +13,7 @@
<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 v-waves v-if="false" 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">
@ -47,7 +47,7 @@
width="55"
align="center"
/>
<el-table-column type="expand">
<el-table-column v-if="false" type="expand">
<template slot-scope="props">
<div style="text-align: left;padding: 10px;">
<el-form label-position="left" inline>
@ -82,7 +82,7 @@
</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="类型" >
<el-table-column v-if="false" align="center" prop="TYPES" label="类型" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.TYPES"
@ -94,7 +94,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column v-if="false" align="center" prop="LABEL" label="标签" >
<el-table-column align="center" prop="LABEL" label="标签" >
<template slot-scope="{row}">
<el-tag
v-for="tag in row.labels"
@ -132,10 +132,10 @@
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="{row}">
<el-row>
<el-col :span="14">
<el-col :span="12">
<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-col :span="12">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="getInformation(row)"></el-button>
</el-col>
</el-row>

View File

@ -4,7 +4,7 @@
<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-form-item v-if="false" label="规程属性:" prop="FILE_NAME">
<el-tag
v-for="tag in form.CATEGORY_LIST"
:key="tag.value"
@ -13,7 +13,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item label="类型:" prop="FILE_NAME">
<el-form-item v-if="false" label="类型:" prop="FILE_NAME">
<el-tag
v-for="tag in form.TYPES"
:key="tag.value"
@ -22,7 +22,7 @@
{{ tag.CATEGORY_NAME }}
</el-tag>
</el-form-item>
<el-form-item v-if="remoteControl.keyOne" label="国民经济行业类型:" prop="FILE_NAME">
<el-form-item v-if="false" 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>

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,391 @@
<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 TextEditing from '../../../util/textEditing.vue'
export default {
components: { TextEditing, Pagination, editLabel, selectLabel, selectType, multipleChoice },
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,590 @@
<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.KEYWORD" placeholder="请输入" class="filter-item"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="文件类型" label-width="200px">
<el-select v-model="form.TYPE" placeholder="请选择" style="width: 100%;">
<el-option v-for="(item, index) in typeList" :key="index" :label="item.NAME" :value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="部门类型" label-width="200px">
<el-select v-model="form.TYPE_TWO" placeholder="请选择" style="width: 100%;">
<el-option v-for="(item, index) in typeTwoList" :key="index" :label="item.NAME" :value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<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 v-if="false" 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" 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.TYPES"
:key="tag.BUS_LIBRARY_LABELS_ID"
:disable-transitions="false"
type="warning"
style="margin-right: 10px;margin-bottom: 10px">
{{ tag.CATEGORY_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="TYPE_NAME" label="文件类型" />
<el-table-column align="center" prop="TYPE_TWO_NAME" label="部门分类" />
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" />
<el-table-column align="center" prop="UPLOAD_USER_NAME" label="上传人" />
<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 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="12">
<el-button v-show="!row.LOCKTOOL" type="primary" icon="el-icon-edit" size="mini" @click="handleExport(row)"></el-button>
</el-col>
<el-col :span="12">
<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'
export default {
components: { 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: {
KEYWORD: '',
TYPE: '',
TYPE_TWO: '',
labels: [],
CATEGORY_LIST: [],
TYPES: [],
SPECIFICATION_TYPES: [],
STATUS: ''
},
label_name: '',
varList: [],
pd: [],
isEdit: false,
isLook: false,
title: '',
typeList: [],
typeTwoList: []
}
},
created() {
this.getList()
this.getDic()
},
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: [],
TYPE: '',
TYPE_TWO: '',
SPECIFICATION_TYPES: [],
STATUS: ''
}
this.$refs.condition.clear()
this.getList()
},
getList() {
this.listLoading = true
requestFN(
'/textLibrary/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORD: this.form.KEYWORD,
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,
TYPE: this.form.TYPE,
TYPE_TWO: this.form.TYPE_TWO,
ASSOCIATION: '0',
MIGRATION_FLAG: '2',
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
})
},
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)
})
}
},
getDic() {
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: 'c1787df61ed24a3787897ae48bfd720a' }
).then((data) => {
this.typeList = data.list
}).catch((e) => {
this.loading = false
})
requestFN(
'dictionaries/getLevels', { DICTIONARIES_ID: '72227a1259874470bb55760758b87c4d' }
).then((data) => {
this.typeTwoList = data.list
}).catch((e) => {
this.loading = false
})
}
}
}
</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'
export default {
components: { 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 === '2') {
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,145 @@
<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 v-if="false" label="标准规范名称:" prop="FILE_NAME">
<el-input v-model="form.REMARKS" disabled style="width: 70%"/>
</el-form-item>
<el-form-item v-if="false" 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 v-if="false" 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="false" 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 v-if="false" 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 = []
}).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,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

@ -26,6 +26,7 @@
<Treeselect
:options="departmentTree"
:normalizer="normalizer"
:default-expand-level="3"
v-model="form.APPOINT_DEPARTMENT_ID"
placeholder="请选择部门"
no-options-text="暂无数据"
@ -37,11 +38,64 @@
</el-col>
</el-row>
<el-row>
<el-col v-if="form.STATUS === '0'" :span="12">
<el-col v-if="form.STATUS === '0'" :span="24">
<el-form-item v-if="form.STATUS === '0'" prop="OPINION" label="打回原因:">
<el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/>
</el-form-item>
</el-col>
<el-col v-if="form.STATUS === '0'" :span="24">
<el-form-item v-if="form.STATUS === '0'" prop="BACK_NAME" label="打回至:">
<div>{{ form.BACK_NAME }}</div>
</el-form-item>
</el-col>
<el-col v-if="form.STATUS === '0'" :span="24">
<el-steps :space="200" :active="+step" finish-status="success">
<el-step>
<template slot="description">
<el-card class="box-card" style="margin-top: 10px" @click.native="backPoint('-1',info.BELONG_TO_CORP_NAME)">
<div icon="el-icon-aim"/>
<div slot="header" class="clearfix">
<span>相关方端</span>
</div>
<div>
企业名称{{ info.BELONG_TO_CORP_NAME }}
</div>
</el-card>
</template>
</el-step>
<el-step v-for="item in list" :key="item.INDEX" :value="item.INDEX">
<template slot="description">
<el-card class="box-card" style="margin-top: 10px" @click.native="backPoint(item.INDEX, item.APPOINT_USER_NAME)">
<div slot="header" class="clearfix">
<span>审批节点</span>
</div>
<div>
<el-row>
<el-col>
审批人{{ item.APPOINT_USER_NAME }}
</el-col>
<el-col v-if="item.INDEX !== step">
审批人公司{{ item.APPOINT_CORP_NAME }}
</el-col>
<el-col>
审批人部门{{ item.APPOINT_DEPARTMENT_NAME }}
</el-col>
<el-col v-if="item.INDEX !== step">
审批状态{{ item.APPOINT_STATUS === '1' ? '同意' : item.APPOINT_STATUS === '0' ? '不同意' : '' }}
</el-col>
<el-col v-if="item.INDEX !== step">
审批时间{{ item.APPOINT_TIME }}
</el-col>
<el-col v-if="item.APPOINT_OPINION && item.INDEX !== step">
审批意见{{ item.APPOINT_OPINION }}
</el-col>
</el-row>
</div>
</el-card>
</template>
</el-step>
</el-steps>
</el-col>
<el-col v-if="form.STATUS === '1' && isShow" :span="12">
<el-form-item v-if="form.STATUS === '1'" :label="menu.user +':'" prop="APPOINT_USER_ID">
<el-select v-model="form.user" style="width: 300px" placeholder="请选择" @change="chooseUser">
@ -113,7 +167,9 @@ export default {
tm: new Date().getTime(),
list: [],
isShow: true,
info: {}
info: {},
BACK_NAME: '',
BACK_STEP: ''
},
rules: {
STATUS: [
@ -133,6 +189,9 @@ export default {
],
LIMIT_END_TIME: [
{ required: true, message: '请选择指定培训有效截至时间', trigger: 'change' }
],
BACK_NAME: [
{ required: true, message: '请填选择回节点', trigger: 'change' }
]
},
heirloom: {},
@ -153,7 +212,9 @@ export default {
user: '',
uploadFile: '',
limitFlag: ''
}
},
step: 0,
list: []
}
},
methods: {
@ -164,6 +225,8 @@ export default {
this.form.list = JSON.stringify(e)
this.info = e[0]
await this.getMenu()
this.form.BACK_NAME = this.info.BELONG_TO_CORP_NAME
this.form.BACK_STEP = '-1'
if (this.info.FLOWS_TYPE === '0') {
if (this.info.FLOWS_STEP === 0) {
@ -327,6 +390,11 @@ export default {
list: [],
tm: new Date().getTime()
}
this.list = [
{
INDEX: '-1'
}
]
},
clearInfo() {
this.form.APPOINT_DEPARTMENT_ID = null
@ -335,6 +403,36 @@ export default {
this.form.APPOINT_USER_NAME = ''
this.form.OPINION = ''
this.form.user = ''
if (this.form.STATUS === '0') {
this.getInfo()
}
},
getInfo() {
const info = JSON.parse(this.heirloom)[0]
requestFN(
'/xgf/user/getApproveInfo', { XGF_USER_ID: info.XGF_USER_ID }
).then((data) => {
this.list = data.flow.info
this.step = data.flow.STEP
if (data.flow.endFlag === '1') {
this.title = '审批中'
}
if (data.flow.endFlag === '2') {
this.title = '审批结束'
}
if (data.flow.endFlag === '-2') {
this.title = '审批驳回'
}
this.visible = true
this.loading = false
}).catch((e) => {
console.log(e)
})
},
backPoint(num, name) {
this.form.BACK_STEP = num
this.form.BACK_NAME = name
this.$forceUpdate()
}
}
}

View File

@ -9,5 +9,6 @@ const config = {
weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址
httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // ,
fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址,
publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2zCyUYSD0pNrbtaYdvGfHfWoRV+fo/2N9O2PLLz/jZvMkigkq4eAq4JO+Ek0wDHI9WxP6iTSLYCHhIOs9CQTPvyldJFm8riZtQZlBTD8Plkb3rjrgwTqbBi3w3+HKYdkSvGFXJIdSOPbpXnj5BzN8vlVaybs24R/vpUzG9178lwIDAQAB'
publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2zCyUYSD0pNrbtaYdvGfHfWoRV+fo/2N9O2PLLz/jZvMkigkq4eAq4JO+Ek0wDHI9WxP6iTSLYCHhIOs9CQTPvyldJFm8riZtQZlBTD8Plkb3rjrgwTqbBi3w3+HKYdkSvGFXJIdSOPbpXnj5BzN8vlVaybs24R/vpUzG9178lwIDAQAB',
NoDwSysUrl: 'ws://192.168.151.27:9002' // 人员定位系统websocket地址
}