全流程测试遇到的bug修复
parent
a8d7c0dccf
commit
eb8928f37f
|
@ -272,8 +272,11 @@ export default {
|
|||
// 当前点击后选择的二级坐标点位分类集合
|
||||
currSubControlPoint: [],
|
||||
subControlPointIndex: 0,
|
||||
webSocket: {},
|
||||
REPORT_ID: '1'
|
||||
webSocket: null,
|
||||
heartbeat: null,
|
||||
REPORT_ID: null,
|
||||
FIRERESERVEPLAN_ID: null,
|
||||
CORPIFNO_ID: sessionStorage.getItem('user').CORPIFNO_ID
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -285,10 +288,22 @@ export default {
|
|||
this.currSubControlPoint = this.subControlPoint['0']
|
||||
},
|
||||
created() {
|
||||
console.log(this.$route.query)
|
||||
this.REPORT_ID = this.$route.query.REPORT_ID
|
||||
this.FIRERESERVEPLAN_ID = this.$route.query.FIRERESERVEPLAN_ID
|
||||
this.initInfo()
|
||||
this.initWebsocket()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.webSocket) {
|
||||
console.log('关闭websocket')
|
||||
this.webSocket.close()
|
||||
}
|
||||
if (this.heartbeat) {
|
||||
console.log('清除定时器')
|
||||
clearInterval(this.heartbeat)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 地图初始化 */
|
||||
mapInit() {
|
||||
|
@ -297,7 +312,6 @@ export default {
|
|||
mapInstance.enableScrollWheelZoom(true) // 开启鼠标滚轮缩放能力
|
||||
},
|
||||
setActive(item, index) {
|
||||
console.log('item :>> ', item)
|
||||
// 设置被选中项的索引
|
||||
this.activeIndex = index
|
||||
},
|
||||
|
@ -417,8 +431,6 @@ export default {
|
|||
item.check = false
|
||||
}
|
||||
})
|
||||
console.log('item :>> ', item)
|
||||
console.log('index :>> ', index)
|
||||
this.currSubControlPoint = this.subControlPoint[index]
|
||||
},
|
||||
// 二级坐标点位点击事件
|
||||
|
@ -430,7 +442,6 @@ export default {
|
|||
item.check = false
|
||||
}
|
||||
})
|
||||
console.log('sos :>> ', sos)
|
||||
},
|
||||
// 接收子组件传递出来的指令发送的事件
|
||||
handlerOrderMessage() {
|
||||
|
@ -446,12 +457,11 @@ export default {
|
|||
requestFN(
|
||||
'/bi/emergency/getYjBiInformation',
|
||||
{
|
||||
FIRERESERVEPLAN_ID: '1458bd17152c44e1aa733408d3b84b98',
|
||||
REPORT_ID: '4a225c74482140c0a4838704304cfb47',
|
||||
CORP_ID: '13cf0f4ec77e4d98ae8cdd9c3386ae0c'
|
||||
FIRERESERVEPLAN_ID: this.FIRERESERVEPLAN_ID,
|
||||
REPORT_ID: this.REPORT_ID,
|
||||
CORP_ID: this.CORPIFNO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
if (data.result === 'success') {
|
||||
// 值班列表
|
||||
this.info.dutyInfoData = data.dutyList
|
||||
|
@ -459,7 +469,6 @@ export default {
|
|||
this.info.reservePlan = data.planInfo
|
||||
this.info.addressBook = data.addressBookList
|
||||
this.chatData = data.instructList
|
||||
console.log(data.instructList)
|
||||
}
|
||||
loading.close()
|
||||
}).catch((e) => {
|
||||
|
@ -472,16 +481,30 @@ export default {
|
|||
this.webSocket = new WebSocket(encodeURI(wsUrl))
|
||||
this.webSocket.onopen = () => {
|
||||
console.info('指挥调度的webSocket链接成功')
|
||||
this.webSocket.send('链接成功')
|
||||
}
|
||||
this.webSocket.onerror = function() {
|
||||
console.info('指挥调度的webSocket连接失败')
|
||||
this.$message.error('消息链接失败!')
|
||||
this.webSocket.onerror = () => {
|
||||
this.$router.back()
|
||||
}
|
||||
this.webSocket.onclose = () => {
|
||||
this.$router.push('/emergen_cyrescue/incident_management')
|
||||
}
|
||||
var _this = this
|
||||
this.webSocket.onmessage = function(message) {
|
||||
console.log(message)
|
||||
_this.initInfo()
|
||||
}
|
||||
// 新建心跳,持续监听链接是否存活
|
||||
this.heartbeat = setInterval(() => {
|
||||
console.log('发送心跳')
|
||||
try {
|
||||
if (this.webSocket) {
|
||||
this.webSocket.send('心跳')
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('链接已断开')
|
||||
}
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" size="mini" @click="handleRescue(row.ID)">是否救援</el-button>
|
||||
<el-button v-if="row.RESCUE_SITUATION !== '1'" type="primary" size="mini" @click="handleRescue(row.ID)">是否救援</el-button>
|
||||
<el-button type="primary" icon="el-icon-document" size="mini" @click="goList('detail', row.ID, '1')">查看</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID, true)">生成专报</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)">编辑</el-button>
|
||||
|
@ -621,110 +621,6 @@ export default {
|
|||
{ required: true, message: '是否救援不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
// rules: {
|
||||
// EVENT_NAME: [
|
||||
// { required: true, message: '事件标题不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// INCOMING_PHONE: [
|
||||
// { required: true, message: '呼入电话不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// OWNER_NAME: [
|
||||
// { required: true, message: '机主姓名不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// CALLER_ADDRESS: [
|
||||
// { required: true, message: '主叫地址不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// ACCESS_MODE: [
|
||||
// { required: true, message: '接入方式不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// EVENT_TYPE: [
|
||||
// { required: true, message: '事件类型不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// NAME: [
|
||||
// { required: true, message: '姓名不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// CONTACT_PHONE: [
|
||||
// { required: true, message: '联系电话不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// REGION: [
|
||||
// { required: true, message: '所在区域不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// UNIT_NAME: [
|
||||
// { required: true, message: '单位名称不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// UNIT_ADDRESS: [
|
||||
// { required: true, message: '单位地址不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// INDUSTRY_TYPE: [
|
||||
// { required: true, message: '行业类型不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// ECONOMIC_TYPE: [
|
||||
// { required: true, message: '经济类型不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// MAJOR_HAZARD: [
|
||||
// { required: true, message: '重大危险源不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// REPORT_TIME: [
|
||||
// { required: true, message: '接报时间不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// OCCURRENCE_TIME: [
|
||||
// { required: true, message: '发生时间不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// LOCATION_ADDRESS: [
|
||||
// { required: true, message: '所在地址不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// REPORT_TYPE: [
|
||||
// { required: true, message: '接报类型不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// ACCIDENT_TITLE: [
|
||||
// { required: true, message: '事故标题不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// ACCIDENT_LEVEL: [
|
||||
// { required: true, message: '事故级别不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// INJURY_TYPE: [
|
||||
// { required: true, message: '伤害类型不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// ACCIDENT_TYPE: [
|
||||
// { required: true, message: '事故类型不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// TRAPPED_PEOPLE_COUNT: [
|
||||
// { required: true, message: '被困人数不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// MISSING_PEOPLE_COUNT: [
|
||||
// { required: true, message: '失踪人数不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// DEATH_PEOPLE_COUNT: [
|
||||
// { required: true, message: '死亡人数不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// SERIOUS_INJURY_PEOPLE_COUNT: [
|
||||
// { required: true, message: '重伤人数不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// MINOR_INJURY_PEOPLE_COUNT: [
|
||||
// { required: true, message: '轻伤人数不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// POISONING_PEOPLE_COUNT: [
|
||||
// { required: true, message: '中毒人数不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// DIRECT_ECONOMIC_LOSS: [
|
||||
// { required: true, message: '直接经济损失不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// BRIEF_PROCESS: [
|
||||
// { required: true, message: '简要经过不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// DISPOSAL_SITUATION: [
|
||||
// { required: true, message: '处置情况不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// OPERATOR: [
|
||||
// { required: true, message: '修改人不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// CREATETIME: [
|
||||
// { required: true, message: '添加时间不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// CREATOR: [
|
||||
// { required: true, message: '添加人不能为空', trigger: 'blur' }
|
||||
// ]
|
||||
// },
|
||||
FFILE: [],
|
||||
caseSummaryList: [],
|
||||
regionData: [],
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="primary" icon="el-icon-document" size="mini" @click="goList('detail', row.ID, '1')">查看</el-button>
|
||||
<el-button v-if="row.RESCUE_SITUATION === '1'" type="primary" icon="el-icon-document" size="mini" @click="command('detail', row.ID, '1')">指挥</el-button>
|
||||
<el-button v-if="row.RESCUE_SITUATION === '1'" type="primary" icon="el-icon-document" size="mini" @click="command(row)">指挥</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -85,7 +85,7 @@ export default {
|
|||
this.$parent.ticketType = ticketType
|
||||
},
|
||||
command(row) {
|
||||
this.$router.push({ path: '/emergen_cyrescue/emergency_map', query: { REPORT_ID: row.ID }})
|
||||
this.$router.push({ path: '/emergen_cyrescue/emergency_map', query: { REPORT_ID: row.ID, FIRERESERVEPLAN_ID: row.FIRERESERVEPLAN_ID }})
|
||||
},
|
||||
getDetail(id) {
|
||||
const params = { Id: id }
|
||||
|
|
Loading…
Reference in New Issue