Compare commits
No commits in common. "397f5e0e4990833a38e0db22beaa67798748f860" and "4a2a2969a04e45cb59297baf7e3931bd40ed294b" have entirely different histories.
397f5e0e49
...
4a2a2969a0
|
@ -25,7 +25,4 @@ export default {
|
|||
font-size: 14px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-loading-mask{
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="renyuan">
|
||||
<div v-if="false" class="block1">
|
||||
<div class="block1">
|
||||
<layout-title title="定位基础信息"/>
|
||||
<div class="options">
|
||||
<div v-for="(item,index) in block1OptionsList" :key="index" class="option">
|
||||
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="false" class="block2">
|
||||
<div class="block2">
|
||||
<layout-title title="定位状态数据"/>
|
||||
<div class="options">
|
||||
<div class="bg"/>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="false" class="block3">
|
||||
<div class="block3">
|
||||
<layout-title title="定位标签状态"/>
|
||||
<div class="content">
|
||||
<div class="options">
|
||||
|
@ -56,42 +56,18 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block4">
|
||||
<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 v-for="(item,index) in block4List" :key="index" class="tr">
|
||||
<div class="td">{{ item.alarmName }}</div>
|
||||
<div class="td">{{ item.equipmentName }}</div>
|
||||
<div class="td">{{ item.statusName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import layoutTitle from './title.vue'
|
||||
import CountTo from 'vue-count-to'
|
||||
import { requestFN } from '../../../utils/request'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CountTo,
|
||||
layoutTitle
|
||||
},
|
||||
props: {
|
||||
corpInfoId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
block1OptionsList: [
|
||||
|
@ -155,26 +131,12 @@ export default {
|
|||
count: '-',
|
||||
facount: '-'
|
||||
}
|
||||
],
|
||||
block4List: []
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
block3OptionsClick(index) {
|
||||
this.block3OptionsIndex = index
|
||||
},
|
||||
getData() {
|
||||
requestFN(
|
||||
'/map/getAlarmList',
|
||||
{ corpId: this.corpInfoId }
|
||||
).then((data) => {
|
||||
this.block4List = data.list
|
||||
}).catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -359,48 +321,6 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.block4 {
|
||||
margin-top: 10px;
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
|
||||
.content {
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
padding: 10px;
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 5px;
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: rgba(42, 86, 158, 0.53);
|
||||
}
|
||||
|
||||
.td {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes scale {
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<!--曹妃甸东 八项作业 曹实业详细页面 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" />
|
||||
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
|
||||
<!-- 重点工程 start -->
|
||||
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
|
||||
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />
|
||||
|
|
|
@ -8,25 +8,19 @@
|
|||
<td class="bbg-transparent">照片</td>
|
||||
<td ><img src="../../../assets/map/index/touxiang.png" alt="" width="50" height="50"></td>
|
||||
<td class="bbg-transparent">姓名</td>
|
||||
<td >{{ info?info.userName:'' }}</td>
|
||||
<td >{{ info?info.NAME:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">公司</td>
|
||||
<td >{{ info?info.corpName:'' }}</td>
|
||||
<td class="bbg-transparent">部门</td>
|
||||
<td >{{ info?info.departmentName:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">设备id</td>
|
||||
<td >{{ info?info.deviceId:'' }}</td>
|
||||
<td class="bbg-transparent">设备名称</td>
|
||||
<td >{{ info?info.deviceName:'' }}</td>
|
||||
<td >{{ info?info.DEPARTMENT_NAME:'' }}</td>
|
||||
<td class="bbg-transparent">岗位</td>
|
||||
<td >{{ info?info.POST_NAME:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">人员类型</td>
|
||||
<td>{{ otherInfo?otherInfo.personType:'' }}</td>
|
||||
<td class="bbg-transparent">岗位</td>
|
||||
<td>{{ otherInfo?otherInfo.postName:'' }}</td>
|
||||
<td >{{ info?info.PERSON_TYPE:'' }}</td>
|
||||
<td class="bbg-transparent">是否为隐患确认人</td>
|
||||
<td >{{ info.IS_HAZARDCONFIRMER == 0 ?'否':'是' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -48,19 +42,12 @@ export default {
|
|||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
corpId: {
|
||||
type: String,
|
||||
default() {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
info: {},
|
||||
otherInfo: {}
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -71,12 +58,10 @@ export default {
|
|||
requestFN(
|
||||
'/map/getPersonByCardNo',
|
||||
{
|
||||
CARDNO: this.id,
|
||||
corpId: this.corpId
|
||||
CARDNO: this.id
|
||||
}
|
||||
).then((data) => {
|
||||
this.info = data.info.required
|
||||
this.otherInfo = data.otherInfo
|
||||
this.info = data.pd
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1053,7 +1053,6 @@ export default {
|
|||
},
|
||||
subscription: {
|
||||
topic: '+/UwbBQ/+/prop',
|
||||
topic1: '+/+/+/alarm',
|
||||
qos: 0
|
||||
},
|
||||
|
||||
|
@ -1074,8 +1073,7 @@ export default {
|
|||
CORP_INFO_ID: '',
|
||||
longitude: '',
|
||||
latitude: ''
|
||||
},
|
||||
trajectoryEntityCollection: {}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -1186,58 +1184,6 @@ export default {
|
|||
this.closeBubbles()
|
||||
}
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
|
||||
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_DOUBLE_CLICK)
|
||||
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK)
|
||||
document.addEventListener('contextmenu', function(event) {
|
||||
event.preventDefault()
|
||||
})
|
||||
this.handler.setInputAction(movement => {
|
||||
const pick = viewer.scene.pick(movement.position)
|
||||
if (Cesium.defined(pick) && (pick.id.id)) {
|
||||
if (!pick.id._monitoItems) {
|
||||
this.removeTrajectory()
|
||||
return
|
||||
}
|
||||
const point_type = pick.id._monitoItems.data.point_type
|
||||
const point_id = pick.id._monitoItems.data.id
|
||||
const corpInfoId = pick.id._monitoItems.data.corpInfoId
|
||||
if (point_type === '标记点peoplePositionOne') {
|
||||
this.removeTrajectory()
|
||||
this.addTrajectory(point_id, corpInfoId)
|
||||
}
|
||||
} else {
|
||||
this.removeTrajectory()
|
||||
}
|
||||
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK)
|
||||
},
|
||||
addTrajectory(point_id, corpInfoId) {
|
||||
requestFN(
|
||||
'/map/getPersonTrace',
|
||||
{
|
||||
id: point_id,
|
||||
corpId: corpInfoId
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.list) {
|
||||
const positions = []
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
positions.push(Cesium.Cartesian3.fromDegrees(data.list[i].XAxis, data.list[i].YAxis))
|
||||
}
|
||||
const entity = new Cesium.Entity({
|
||||
id: 'trajectory',
|
||||
polyline: { positions, width: 5.0, material: Cesium.Color.RED }
|
||||
})
|
||||
const collection = new Cesium.CustomDataSource('trajectoryEntityCollection')
|
||||
collection.entities.add(entity)
|
||||
viewer.dataSources.add(collection)
|
||||
this.trajectoryEntityCollection = collection
|
||||
}
|
||||
})
|
||||
},
|
||||
removeTrajectory() {
|
||||
if (Object.keys(this.trajectoryEntityCollection).length === 0) return
|
||||
viewer.dataSources.remove(this.trajectoryEntityCollection)
|
||||
this.trajectoryEntityCollection = {}
|
||||
},
|
||||
|
||||
getCatesian3FromPX: function(px) {
|
||||
|
@ -1575,7 +1521,6 @@ export default {
|
|||
this.destroyConnection()
|
||||
this.clearAllBottomOptionsItemsCheck()
|
||||
this.clearAllBottomOptionsItemsEntityCollection()
|
||||
this.removeTrajectory()
|
||||
this.onePerLocArr = []
|
||||
this.perLocArr = []
|
||||
this.clearMqttPoint()
|
||||
|
@ -1618,7 +1563,6 @@ export default {
|
|||
this.addBranchPoint()
|
||||
this.clearAllBottomOptionsItemsCheck()
|
||||
this.clearAllBottomOptionsItemsEntityCollection()
|
||||
this.removeTrajectory()
|
||||
},
|
||||
bottomOptionsClick(index) {
|
||||
if (this.bottomClickDisable) return
|
||||
|
@ -1688,7 +1632,6 @@ export default {
|
|||
} else if (this.CORP_INFO_ID) {
|
||||
this.CORP_INFO_ID = ''
|
||||
this.clearAllBottomOptionsItemsEntityCollection()
|
||||
this.removeTrajectory()
|
||||
this.dragAreaEntity(this.branchPoint)
|
||||
this.toCenter(this.parentCenter)
|
||||
this.destroyConnection()
|
||||
|
@ -1733,8 +1676,7 @@ export default {
|
|||
}
|
||||
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
|
||||
this.doUnSubscribe()
|
||||
this.clearMqttPoint('+/UwbBQ/')
|
||||
this.removeTrajectory()
|
||||
this.clearMqttPoint('1698584148364034050/UwbBQ/')
|
||||
}
|
||||
this.bottomOptionsList[pindex].list[index].check = false
|
||||
if (this.gangkouActive === '00004') {
|
||||
|
@ -2056,58 +1998,48 @@ export default {
|
|||
},
|
||||
mqttMessage(CORP_INFO_ID) {
|
||||
this.client.on('message', (topic, message) => {
|
||||
if (topic.indexOf('UwbBQ') !== -1 && topic.indexOf('prop') !== -1) {
|
||||
// created by liu jun mqtt返回的参数可能是一个数组
|
||||
let peopleList = JSON.parse(message)
|
||||
if (!Array.isArray(peopleList)) {
|
||||
peopleList = [peopleList]
|
||||
let peopleList = JSON.parse(message)
|
||||
if (!Array.isArray(peopleList)) {
|
||||
peopleList = [peopleList]
|
||||
}
|
||||
for (let i = 0; i < peopleList.length; i++) {
|
||||
const item = peopleList[i]
|
||||
// 如果不是人员信息则跳过
|
||||
// UwbBQ是人员定位卡的id(UwbJiZhan这是基站的id)
|
||||
if (item.productKey !== 'UwbBQ') {
|
||||
continue
|
||||
}
|
||||
for (let i = 0; i < peopleList.length; i++) {
|
||||
const item = peopleList[i]
|
||||
// 如果不是人员信息则跳过
|
||||
// UwbBQ是人员定位卡的id(UwbJiZhan这是基站的id)
|
||||
if (item.productKey !== 'UwbBQ') {
|
||||
continue
|
||||
}
|
||||
// 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点
|
||||
const index = this.onePerLocArr.findIndex(item1 => {
|
||||
return item1.id.toString() === item.deviceCode.toString()
|
||||
})
|
||||
const x = item.properties[2].value
|
||||
const y = item.properties[3].value
|
||||
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 id = '4_0_' +item.deviceCode
|
||||
const perLoc = {
|
||||
id: item.deviceCode,
|
||||
// name: item.realName,
|
||||
x: x,
|
||||
y: y,
|
||||
icon_type: 'img4_0' + pointColor,
|
||||
// infoname: item.realName,
|
||||
data_id: item.deviceCode,
|
||||
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.deviceCode] = item.deviceCode
|
||||
}
|
||||
}
|
||||
} else if (topic.indexOf('alarm') !== -1) {
|
||||
const formatMessage = JSON.parse(message)
|
||||
this.$notify({
|
||||
title: '报警信息',
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `部门:${formatMessage.deptName}<br/>类型:${formatMessage.identifierName}`,
|
||||
type: 'error'
|
||||
// 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点
|
||||
const index = this.onePerLocArr.findIndex(item1 => {
|
||||
return item1.id.toString() === item.deviceCode.toString()
|
||||
})
|
||||
const x = item.properties[2].value
|
||||
const y = item.properties[3].value
|
||||
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 id = '4_0_' +item.deviceCode
|
||||
const perLoc = {
|
||||
id: item.deviceCode,
|
||||
// name: item.realName,
|
||||
x: x,
|
||||
y: y,
|
||||
icon_type: 'img4_0' + pointColor,
|
||||
// infoname: item.realName,
|
||||
data_id: item.deviceCode,
|
||||
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.deviceCode] = item.deviceCode
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -2121,8 +2053,8 @@ export default {
|
|||
},
|
||||
// 订阅
|
||||
doSubscribe() {
|
||||
const { topic, topic1, qos } = this.subscription
|
||||
this.client.subscribe([topic, topic1], { qos }, (error, res) => {
|
||||
const { topic, qos } = this.subscription
|
||||
this.client.subscribe(topic, { qos }, (error, res) => {
|
||||
if (error) {
|
||||
console.log('Subscribe to topics error', error)
|
||||
return
|
||||
|
@ -2133,8 +2065,8 @@ export default {
|
|||
},
|
||||
// 取消订阅
|
||||
doUnSubscribe() {
|
||||
const { topic, topic1 } = this.subscription
|
||||
this.client.unsubscribe([topic, topic1], error => {
|
||||
const { topic } = this.subscription
|
||||
this.client.unsubscribe(topic, error => {
|
||||
if (error) {
|
||||
console.log('Subscribe to topics error', error)
|
||||
}
|
||||
|
|
|
@ -1,239 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="searchForm" :model="searchForm" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="报警状态" prop="status">
|
||||
<el-select v-model="searchForm.status" style="width: 100%;">
|
||||
<el-option v-for="item in alarmStatusList" :key="item.value" :value="item.value" :label="item.name"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" label-width="10px" style="margin-left: 20px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="resetSearchForm">
|
||||
重置
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="listLoading" ref="multipleTable" :data="varList" :row-key="getRowKey" :header-cell-style="{'font-weight': 'bold','color': '#000'}" height="600px" tooltip-effect="dark" border fit highlight-current-row>
|
||||
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
|
||||
<el-table-column fixed="left" type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="alarmName" label="报警名称" width="100"/>
|
||||
<el-table-column v-if="false" prop="alarmMessage" label="报警信息" />
|
||||
<el-table-column v-if="false" prop="relatedFunctions" label="相关功能" />
|
||||
<el-table-column v-if="false" prop="typeName" label="类型名称" />
|
||||
<el-table-column prop="message" label="报警信息" width="200"/>
|
||||
<el-table-column v-if="false" prop="idRemak" label="其他系统备注" />
|
||||
<el-table-column v-if="false" prop="remark" label="备注" />
|
||||
<el-table-column prop="corpName" label="企业名称" width="150"/>
|
||||
<el-table-column v-if="false" prop="departmentName" label="部门名称" />
|
||||
<el-table-column prop="equipmentName" label="报警来源" width="100"/>
|
||||
<el-table-column prop="createdTime" label="创建时间" width="150"/>
|
||||
<el-table-column prop="level" label="报警等级" />
|
||||
<el-table-column prop="address" label="报警地址" />
|
||||
<el-table-column prop="statusName" label="状态名称" />
|
||||
<el-table-column prop="opinion" label="处理意见" width="200"/>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-if="row.status == null || row.status == '0'" icon="el-icon-view" type="danger" size="mini" @click="goInfo(row.dwAlarmId,'ignore')">忽略</el-button>
|
||||
<el-button v-if="row.status == null || row.status == '0'" icon="el-icon-view" type="primary" size="mini" @click="goInfo(row.dwAlarmId,'confirm')">确认</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<!-- <el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>-->
|
||||
<!-- <el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel">删除</el-button>-->
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogManageAlarm" :title="dialogType === 'ignore' ? '忽略报警' : '确认报警'" width="650px">
|
||||
<el-form ref="form" :model="manageAlarmForm" :rules="manageAlarmRules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="处理意见" prop="opinion">
|
||||
<el-input v-model="manageAlarmForm.opinion" :rows="4" type="textarea" placeholder="这里输入处理意见..." />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeManageAlarm()">取 消</el-button>
|
||||
<el-button type="primary" @click="manageAlarm()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
|
||||
multipleSelectionAll: [], // 所有选中的数据包含跨页数据
|
||||
multipleSelection: [], // 当前页选中的数据
|
||||
treeData: [], // 动火前管辖单位
|
||||
dialogType: 'ignore',
|
||||
replyListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
},
|
||||
loginUserID: '',
|
||||
loginRoleNumber: JSON.parse(sessionStorage.getItem('user')).RNUMBER,
|
||||
dialogManageAlarm: false,
|
||||
manageAlarmForm: {
|
||||
opinion: '', // 处理意见
|
||||
DW_ALARM_ID: '',
|
||||
status: ''
|
||||
},
|
||||
manageAlarmRules: {
|
||||
opinion: [{ required: true, message: '处理意见不能为空', trigger: 'blur' }]
|
||||
},
|
||||
searchForm: {
|
||||
status: ''
|
||||
},
|
||||
alarmStatusList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getEditMyInfo()
|
||||
this.getDictTreeData()
|
||||
this.getDictionary()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.dwAlarmId
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取登录人信息
|
||||
getEditMyInfo() {
|
||||
requestFN(
|
||||
'/user/goEditMyInfo',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.loginUserID = data.pd.USER_ID // 主职角色ID
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
resetSearchForm() {
|
||||
this.searchForm = {
|
||||
status: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/dingWei/getAlarmList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
status: this.searchForm.status
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.list
|
||||
this.total = data.page.total
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getDictionary() {
|
||||
requestFN(
|
||||
'/dingWei/getDictionary',
|
||||
{}
|
||||
).then((data) => {
|
||||
if (data.code === 200) {
|
||||
var alarmStatusList = JSON.parse(data.AlarmStatus)
|
||||
this.alarmStatusList = alarmStatusList
|
||||
}
|
||||
}).catch((e) => {
|
||||
|
||||
})
|
||||
},
|
||||
goInfo(id, type) {
|
||||
this.dialogManageAlarm = true
|
||||
this.dialogType = type
|
||||
this.manageAlarmForm.DW_ALARM_ID = id
|
||||
if (type === 'ignore') {
|
||||
this.manageAlarmForm.status = '2'
|
||||
} else {
|
||||
this.manageAlarmForm.status = '1'
|
||||
}
|
||||
},
|
||||
manageAlarm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/dingWei/manageAlarm',
|
||||
this.manageAlarmForm
|
||||
).then((data) => {
|
||||
if (data.code === 200) {
|
||||
this.closeManageAlarm()
|
||||
this.getList()
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
closeManageAlarm() {
|
||||
this.dialogManageAlarm = false
|
||||
this.resetForm()
|
||||
},
|
||||
resetForm() {
|
||||
this.manageAlarmForm = {
|
||||
opinion: '', // 处理意见
|
||||
DW_ALARM_ID: '',
|
||||
status: ''
|
||||
}
|
||||
},
|
||||
getDictTreeData() {
|
||||
return new Promise((resolve) => {
|
||||
requestFN(
|
||||
'/department/listTreeCorpDept',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
|
||||
resolve('ok')
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
|
@ -1,29 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName=='List'" ref="list" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
export default {
|
||||
components: {
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeName(val) {
|
||||
if (val == 'List') {
|
||||
this.$refs.list.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -1,372 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:append-to-body="appendToBody"
|
||||
:before-close="beforeClose"
|
||||
title="审批"
|
||||
width="1200px"
|
||||
destroy-on-close>
|
||||
<el-form ref="form" :model="material" :rules="rules" label-width="200px" label-position="right" type="flex">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="typeInfo" label="映射类型: ">
|
||||
<el-select v-model="material.typeInfo" filterable style="width:300px" placeholder="请选择" @change="saveInfo">
|
||||
<el-option v-for="item in dic.mapType" :key="item.value" :label="item.name" :value="JSON.stringify(item)"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
<el-input v-model="material.remark" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责部门:" prop="departmentId" style="width:300px">
|
||||
<Treeselect
|
||||
:options="dic.deptList"
|
||||
:normalizer="normalizer"
|
||||
v-model="material.departmentId"
|
||||
placeholder="请选择部门"
|
||||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
style="width: 300px"
|
||||
@select="getPeopleList($event)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人员:" prop="userInfo" >
|
||||
<el-select v-model="material.userInfo" style="width:300px" placeholder="请选择" @change="chooseUser">
|
||||
<el-option
|
||||
v-for="item in dic.userList"
|
||||
:key="item.USER_ID"
|
||||
:value="JSON.stringify(item)"
|
||||
:label="item.NAME"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人通讯号:" prop="userPhone">
|
||||
<el-input v-model="material.userPhone" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人身份证:" prop="userCardId">
|
||||
<el-input v-model="material.userCardId" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编号:" prop="deviceId">
|
||||
<el-input v-model="material.deviceId" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称:" prop="deviceName">
|
||||
<el-input v-model="material.deviceName" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他系统编号:" prop="id">
|
||||
<el-input v-model="material.id" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他系统编号备注:" prop="idRemark">
|
||||
<el-input v-model="material.idRemark" style="width: 300px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">关 闭</el-button>
|
||||
<el-button type="primary" @click="sendMessage('1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vueQr from 'vue-qr'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import uploadFile from '../../../util/uploadFile/index.vue'
|
||||
import UploadImg from '../../../util/uploadImg/index.vue'
|
||||
|
||||
export default {
|
||||
components: { UploadImg, uploadFile, Treeselect, vueQr },
|
||||
props: {
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
material: {
|
||||
typeInfo: '',
|
||||
type: '',
|
||||
typeName: '',
|
||||
deptInfo: '',
|
||||
departmentId: null,
|
||||
departmentName: '',
|
||||
userInfo: '',
|
||||
userId: '',
|
||||
userName: '',
|
||||
deviceId: '',
|
||||
deviceName: '',
|
||||
id: '',
|
||||
idRemark: '',
|
||||
remark: '',
|
||||
userCardId: '',
|
||||
userPhone: '',
|
||||
photo: []
|
||||
},
|
||||
form: {
|
||||
required: {
|
||||
type: '',
|
||||
typeName: '',
|
||||
departmentId: '',
|
||||
departmentName: '',
|
||||
userId: '',
|
||||
userName: '',
|
||||
deviceId: '',
|
||||
deviceName: '',
|
||||
id: '',
|
||||
userCardId: '',
|
||||
userPhone: ''
|
||||
},
|
||||
remark: '',
|
||||
idRemark: ''
|
||||
},
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.nodes
|
||||
}
|
||||
},
|
||||
|
||||
rules: {
|
||||
typeInfo: [
|
||||
{ required: true, message: '请选择映射类型', trigger: 'change' }
|
||||
],
|
||||
userInfo: [
|
||||
{ required: true, message: '请选择映射人', trigger: 'change' }
|
||||
],
|
||||
departmentId: [
|
||||
{ required: true, message: '请选择部门', trigger: 'change' }
|
||||
],
|
||||
deviceId: [
|
||||
{ required: true, message: '请填写其他系统编号', trigger: 'change' }
|
||||
],
|
||||
deviceName: [
|
||||
{ required: true, message: '请填写其他系统名称', trigger: 'change' }
|
||||
],
|
||||
id: [
|
||||
{ required: true, message: '请填写其他系统编号', trigger: 'change' }
|
||||
],
|
||||
idRemark: [
|
||||
{ required: true, message: '请填写其他系统编号备注', trigger: 'change' }
|
||||
],
|
||||
userPhone: [
|
||||
{ required: true, message: '请填写负责人通讯号', trigger: 'change' }
|
||||
],
|
||||
userCardId: [
|
||||
{ required: true, message: '请填写负责人身份证', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
heirloom: {},
|
||||
departmentTree: [],
|
||||
peopleList: [],
|
||||
dic: {
|
||||
alarmStatus: [],
|
||||
logType: [],
|
||||
mapType: [],
|
||||
deptList: [],
|
||||
userList: []
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(e) {
|
||||
this.visible = true
|
||||
await this.getDepartmentTree()
|
||||
await this.getDict()
|
||||
await this.getPeopleList({ id: e.departmentId })
|
||||
if (e) {
|
||||
await this.initInfo(e)
|
||||
}
|
||||
},
|
||||
initInfo(e) {
|
||||
return new Promise(resolve => {
|
||||
this.heirloom = e
|
||||
this.material.type = e.type
|
||||
this.material.typeName = e.typeName
|
||||
this.material.typeInfo = JSON.stringify({ name: e.typeName, value: e.type })
|
||||
this.material.userId = e.userId
|
||||
this.material.userName = e.userName
|
||||
this.material.departmentId = e.departmentId
|
||||
this.material.departmentName = e.departmentName
|
||||
this.material.userPhone = e.userPhone
|
||||
this.material.userCardId = e.userCardId
|
||||
this.material.deviceId = e.deviceId
|
||||
this.material.deviceName = e.deviceName
|
||||
this.material.id = e.id
|
||||
this.material.idRemark = e.idRemark
|
||||
this.material.userInfo = e.userName
|
||||
this.material.dwUserMapId = e.dwUserMapId
|
||||
this.material.remark = e.remark
|
||||
})
|
||||
},
|
||||
sendMessage(e) {
|
||||
console.log(this.material)
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (!valid) {
|
||||
this.$message.error('请填写完整信息')
|
||||
} else {
|
||||
this.form.required.type = this.material.type
|
||||
this.form.required.typeName = this.material.typeName
|
||||
this.form.required.departmentId = this.material.departmentId
|
||||
this.form.required.departmentName = this.material.departmentName
|
||||
this.form.required.userId = this.material.userId
|
||||
this.form.required.userName = this.material.userName
|
||||
this.form.required.deviceId = this.material.deviceId
|
||||
this.form.required.deviceName = this.material.deviceName
|
||||
this.form.required.id = this.material.id
|
||||
this.form.required.userCardId = this.material.userCardId
|
||||
this.form.required.userPhone = this.material.userPhone
|
||||
this.form.idRemark = this.material.idRemark
|
||||
this.form.remark = this.material.remark
|
||||
this.form.dwUserMapId = this.material.dwUserMapId
|
||||
|
||||
requestFN(
|
||||
'/dingWei/saveOrUpdateMap', { data: JSON.stringify(this.form) }
|
||||
).then((data) => {
|
||||
if (data.code === 200) {
|
||||
this.$message.success('操作成功')
|
||||
this.handleClose()
|
||||
this.$emit('flush')
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getPeopleList(e) {
|
||||
return new Promise(resolve => {
|
||||
this.material.departmentName = e.name
|
||||
requestFN(
|
||||
'/user/listAll',
|
||||
{
|
||||
DEPARTMENT_ID: e.id
|
||||
}
|
||||
).then((data) => {
|
||||
this.dic.userList = data.userList
|
||||
this.material.userInfo = ''
|
||||
resolve(true)
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseUser(e) {
|
||||
const entity = JSON.parse(e)
|
||||
this.material.userId = entity.USER_ID
|
||||
this.material.userName = entity.NAME
|
||||
},
|
||||
handleClose() {
|
||||
this.beforeClose()
|
||||
},
|
||||
beforeClose() {
|
||||
this.visible = false
|
||||
this.form = {
|
||||
required: {
|
||||
type: '',
|
||||
typeName: '',
|
||||
departmentId: '',
|
||||
departmentName: '',
|
||||
userId: '',
|
||||
userName: '',
|
||||
deviceId: '',
|
||||
deviceName: '',
|
||||
id: '',
|
||||
userCardId: '',
|
||||
userPhone: ''
|
||||
},
|
||||
remark: '',
|
||||
idRemark: ''
|
||||
}
|
||||
this.material = {
|
||||
typeInfo: '',
|
||||
type: '',
|
||||
typeName: '',
|
||||
deptInfo: '',
|
||||
departmentId: null,
|
||||
departmentName: '',
|
||||
userInfo: '',
|
||||
userId: '',
|
||||
userName: '',
|
||||
deviceId: '',
|
||||
deviceName: '',
|
||||
id: '',
|
||||
idRemark: '',
|
||||
remark: '',
|
||||
userCardId: '',
|
||||
userPhone: ''
|
||||
}
|
||||
this.$emit('flush')
|
||||
},
|
||||
saveInfo(e) {
|
||||
const info = JSON.parse(e)
|
||||
this.material.type = info.value
|
||||
this.material.typeName = info.name
|
||||
},
|
||||
getDict() {
|
||||
return new Promise(resolve => {
|
||||
requestFN('dingWei/getDictionary').then((data) => {
|
||||
this.dic.alarmStatus = JSON.parse(data.AlarmStatus)
|
||||
this.dic.logType = JSON.parse(data.LogType)
|
||||
this.dic.mapType = JSON.parse(data.MapType)
|
||||
resolve(true)
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
},
|
||||
getDepartmentTree() {
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/department/listTree',
|
||||
).then((data) => {
|
||||
this.dic.deptList = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
|
||||
resolve(true)
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
|
@ -1,197 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="condition.userName" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="false" :span="6">
|
||||
<el-form-item label="培训状态">
|
||||
<el-select v-model="STATUS" placeholder="请选择培训状态" style="width: 100%;" clearable>
|
||||
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</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 class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row>
|
||||
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column prop="typeName" label="映射类型" align="center"/>
|
||||
<el-table-column prop="userName" label="姓名" align="center"/>
|
||||
<el-table-column prop="departmentName" label="部门名称" align="center"/>
|
||||
<el-table-column prop="userPhone" label="用户手机号" align="center"/>
|
||||
<el-table-column prop="deviceId" label="设备id" align="center"/>
|
||||
<el-table-column prop="deviceName" label="设备名称" align="center"/>
|
||||
<el-table-column prop="id" label="其他系统编号" align="center"/>
|
||||
<el-table-column prop="idRemark" label="其他系统备注" align="center"/>
|
||||
<el-table-column prop="createdTime" label="创建时间" align="center"/>
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="danger" icon="el-icon-edit" size="mini" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination :total="listQuery.total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
|
||||
</div>
|
||||
<info ref="info" @flush="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import info from './info.vue'
|
||||
import vueQr from 'vue-qr'
|
||||
|
||||
export default {
|
||||
components: { Pagination, vueQr, info },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
condition: {
|
||||
userName: ''
|
||||
},
|
||||
config: config,
|
||||
listQuery: {
|
||||
page: 0,
|
||||
limit: 10,
|
||||
total: 0
|
||||
},
|
||||
listLoading: false,
|
||||
KEYWORDS: '',
|
||||
varList: [],
|
||||
add: false, // 新增按钮
|
||||
del: false, // 删除按钮
|
||||
edit: false // 修改按钮
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
handleSelectWithDifferentStatus(row, rowIndex) {
|
||||
return true
|
||||
},
|
||||
getQuery() {
|
||||
if (this.$refs.multipleTable) {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
}
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
limit: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
goKeyReset() {
|
||||
this.condition = {
|
||||
userName: ''
|
||||
}
|
||||
this.getQuery()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/dingWei/getMapList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
this.condition
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.list
|
||||
this.listQuery.total = Number(data.page.total)
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.info.init()
|
||||
},
|
||||
hasButton() {
|
||||
var keys = 'trainingbatch:add,trainingbatch:del,trainingbatch:edit,fhSms,email,fromExcel,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys, tm: new Date().getTime()
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result == 'success') {
|
||||
this.add = data.trainingbatchfhadminadd // 增
|
||||
this.del = data.trainingbatchfhadmindel // 删
|
||||
this.edit = data.trainingbatchfhadminedit // 改
|
||||
this.fromExcel = data.fromExcel // 从excel导入权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
} else if (data.result == 'exception') {
|
||||
// showException('按钮权限', data.exception)// 显示异常
|
||||
console.info('按钮权限:', data.exception)
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getDict: function() {
|
||||
requestFN('dingWei/getDictionary').then((data) => {
|
||||
this.wenhuachengduList = data.list
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('是否删除该条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/dingWei/deleteMap', { id: row.dwUserMapId }
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$refs.info.init(row)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<template>
|
||||
<component :is="activeName" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
export default {
|
||||
components: {
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
SUPERVISE_CORPINFO_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -217,7 +217,6 @@ export default {
|
|||
if (!valid) {
|
||||
this.$message.error('请填写完整信息')
|
||||
} else {
|
||||
this.loading = true
|
||||
const formData = new FormData()
|
||||
Object.keys(this.form).map(key => {
|
||||
formData.append(key, this.form[key])
|
||||
|
@ -233,11 +232,9 @@ export default {
|
|||
this.visible = false
|
||||
this.$emit('refresh', '')
|
||||
this.handleClose()
|
||||
this.loading = false
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue