water_xu 2024-04-22 17:38:38 +08:00
commit d67da275d3
12 changed files with 1086 additions and 59 deletions

View File

@ -25,4 +25,7 @@ export default {
font-size: 14px !important;
font-weight: 500;
}
.el-loading-mask{
z-index: 9999 !important;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="renyuan">
<div class="block1">
<div v-if="false" 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 class="block2">
<div v-if="false" class="block2">
<layout-title title="定位状态数据"/>
<div class="options">
<div class="bg"/>
@ -29,7 +29,7 @@
</div>
</div>
</div>
<div class="block3">
<div v-if="false" class="block3">
<layout-title title="定位标签状态"/>
<div class="content">
<div class="options">
@ -56,18 +56,42 @@
</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: [
@ -131,12 +155,26 @@ 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)
})
}
}
}
@ -321,6 +359,48 @@ 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 {

View File

@ -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" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" corp-id="035958e685cf4850bc40151c5e0617a6" />
<!-- 重点工程 start -->
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />

View File

@ -8,19 +8,25 @@
<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.NAME:'' }}</td>
<td >{{ info?info.userName:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">公司</td>
<td >{{ info?info.corpName:'' }}</td>
<td class="bbg-transparent">部门</td>
<td >{{ info?info.DEPARTMENT_NAME:'' }}</td>
<td class="bbg-transparent">岗位</td>
<td >{{ info?info.POST_NAME:'' }}</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>
</tr>
<tr>
<td class="bbg-transparent">人员类型</td>
<td >{{ info?info.PERSON_TYPE:'' }}</td>
<td class="bbg-transparent">是否为隐患确认人</td>
<td >{{ info.IS_HAZARDCONFIRMER == 0 ?'否':'是' }}</td>
<td>{{ otherInfo?otherInfo.personType:'' }}</td>
<td class="bbg-transparent">岗位</td>
<td>{{ otherInfo?otherInfo.postName:'' }}</td>
</tr>
</table>
</div>
@ -42,12 +48,19 @@ export default {
default() {
return ''
}
},
corpId: {
type: String,
default() {
return ''
}
}
},
data() {
return {
config: config,
info: {}
info: {},
otherInfo: {}
}
},
created() {
@ -58,10 +71,12 @@ export default {
requestFN(
'/map/getPersonByCardNo',
{
CARDNO: this.id
CARDNO: this.id,
corpId: this.corpId
}
).then((data) => {
this.info = data.pd
this.info = data.info.required
this.otherInfo = data.otherInfo
}).catch((e) => {
})
}

View File

@ -1053,6 +1053,7 @@ export default {
},
subscription: {
topic: '+/UwbBQ/+/prop',
topic1: '+/+/+/alarm',
qos: 0
},
@ -1073,7 +1074,8 @@ export default {
CORP_INFO_ID: '',
longitude: '',
latitude: ''
}
},
trajectoryEntityCollection: {}
}
},
mounted() {
@ -1184,6 +1186,58 @@ 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) {
@ -1521,6 +1575,7 @@ export default {
this.destroyConnection()
this.clearAllBottomOptionsItemsCheck()
this.clearAllBottomOptionsItemsEntityCollection()
this.removeTrajectory()
this.onePerLocArr = []
this.perLocArr = []
this.clearMqttPoint()
@ -1563,6 +1618,7 @@ export default {
this.addBranchPoint()
this.clearAllBottomOptionsItemsCheck()
this.clearAllBottomOptionsItemsEntityCollection()
this.removeTrajectory()
},
bottomOptionsClick(index) {
if (this.bottomClickDisable) return
@ -1632,6 +1688,7 @@ 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()
@ -1676,7 +1733,8 @@ export default {
}
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
this.doUnSubscribe()
this.clearMqttPoint('1698584148364034050/UwbBQ/')
this.clearMqttPoint('+/UwbBQ/')
this.removeTrajectory()
}
this.bottomOptionsList[pindex].list[index].check = false
if (this.gangkouActive === '00004') {
@ -1998,6 +2056,7 @@ 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)) {
@ -2041,6 +2100,15 @@ export default {
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'
})
}
})
},
clearMqttPoint(prefix) {
@ -2053,8 +2121,8 @@ export default {
},
//
doSubscribe() {
const { topic, qos } = this.subscription
this.client.subscribe(topic, { qos }, (error, res) => {
const { topic, topic1, qos } = this.subscription
this.client.subscribe([topic, topic1], { qos }, (error, res) => {
if (error) {
console.log('Subscribe to topics error', error)
return
@ -2065,8 +2133,8 @@ export default {
},
//
doUnSubscribe() {
const { topic } = this.subscription
this.client.unsubscribe(topic, error => {
const { topic, topic1 } = this.subscription
this.client.unsubscribe([topic, topic1], error => {
if (error) {
console.log('Subscribe to topics error', error)
}

View File

@ -0,0 +1,239 @@
<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 + '&currentPage=' + 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>

View File

@ -0,0 +1,29 @@
<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>

View File

@ -0,0 +1,372 @@
<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>

View File

@ -0,0 +1,197 @@
<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 + '&currentPage=' + 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>

View File

@ -0,0 +1,21 @@
<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>

View File

View File

@ -217,6 +217,7 @@ 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])
@ -232,9 +233,11 @@ export default {
this.visible = false
this.$emit('refresh', '')
this.handleClose()
this.loading = false
})
.catch((e) => {
console.log(e)
this.loading = false
})
}
})