全流程测试遇到的bug修复

liujun0703-新项目开发
liujun 2024-08-09 11:08:53 +08:00
parent a8d7c0dccf
commit eb8928f37f
3 changed files with 40 additions and 121 deletions

View File

@ -272,8 +272,11 @@ export default {
// //
currSubControlPoint: [], currSubControlPoint: [],
subControlPointIndex: 0, subControlPointIndex: 0,
webSocket: {}, webSocket: null,
REPORT_ID: '1' heartbeat: null,
REPORT_ID: null,
FIRERESERVEPLAN_ID: null,
CORPIFNO_ID: sessionStorage.getItem('user').CORPIFNO_ID
} }
}, },
mounted() { mounted() {
@ -285,10 +288,22 @@ export default {
this.currSubControlPoint = this.subControlPoint['0'] this.currSubControlPoint = this.subControlPoint['0']
}, },
created() { created() {
console.log(this.$route.query)
this.REPORT_ID = this.$route.query.REPORT_ID this.REPORT_ID = this.$route.query.REPORT_ID
this.FIRERESERVEPLAN_ID = this.$route.query.FIRERESERVEPLAN_ID
this.initInfo() this.initInfo()
this.initWebsocket() this.initWebsocket()
}, },
beforeDestroy() {
if (this.webSocket) {
console.log('关闭websocket')
this.webSocket.close()
}
if (this.heartbeat) {
console.log('清除定时器')
clearInterval(this.heartbeat)
}
},
methods: { methods: {
/** 地图初始化 */ /** 地图初始化 */
mapInit() { mapInit() {
@ -297,7 +312,6 @@ export default {
mapInstance.enableScrollWheelZoom(true) // mapInstance.enableScrollWheelZoom(true) //
}, },
setActive(item, index) { setActive(item, index) {
console.log('item :>> ', item)
// //
this.activeIndex = index this.activeIndex = index
}, },
@ -417,8 +431,6 @@ export default {
item.check = false item.check = false
} }
}) })
console.log('item :>> ', item)
console.log('index :>> ', index)
this.currSubControlPoint = this.subControlPoint[index] this.currSubControlPoint = this.subControlPoint[index]
}, },
// //
@ -430,7 +442,6 @@ export default {
item.check = false item.check = false
} }
}) })
console.log('sos :>> ', sos)
}, },
// //
handlerOrderMessage() { handlerOrderMessage() {
@ -446,12 +457,11 @@ export default {
requestFN( requestFN(
'/bi/emergency/getYjBiInformation', '/bi/emergency/getYjBiInformation',
{ {
FIRERESERVEPLAN_ID: '1458bd17152c44e1aa733408d3b84b98', FIRERESERVEPLAN_ID: this.FIRERESERVEPLAN_ID,
REPORT_ID: '4a225c74482140c0a4838704304cfb47', REPORT_ID: this.REPORT_ID,
CORP_ID: '13cf0f4ec77e4d98ae8cdd9c3386ae0c' CORP_ID: this.CORPIFNO_ID
} }
).then((data) => { ).then((data) => {
console.log(data)
if (data.result === 'success') { if (data.result === 'success') {
// //
this.info.dutyInfoData = data.dutyList this.info.dutyInfoData = data.dutyList
@ -459,7 +469,6 @@ export default {
this.info.reservePlan = data.planInfo this.info.reservePlan = data.planInfo
this.info.addressBook = data.addressBookList this.info.addressBook = data.addressBookList
this.chatData = data.instructList this.chatData = data.instructList
console.log(data.instructList)
} }
loading.close() loading.close()
}).catch((e) => { }).catch((e) => {
@ -472,16 +481,30 @@ export default {
this.webSocket = new WebSocket(encodeURI(wsUrl)) this.webSocket = new WebSocket(encodeURI(wsUrl))
this.webSocket.onopen = () => { this.webSocket.onopen = () => {
console.info('指挥调度的webSocket链接成功') console.info('指挥调度的webSocket链接成功')
this.webSocket.send('链接成功')
} }
this.webSocket.onerror = function() { this.webSocket.onerror = () => {
console.info('指挥调度的webSocket连接失败') this.$router.back()
this.$message.error('消息链接失败!') }
this.webSocket.onclose = () => {
this.$router.push('/emergen_cyrescue/incident_management')
} }
var _this = this var _this = this
this.webSocket.onmessage = function(message) { this.webSocket.onmessage = function(message) {
console.log(message) console.log(message)
_this.initInfo() _this.initInfo()
} }
//
this.heartbeat = setInterval(() => {
console.log('发送心跳')
try {
if (this.webSocket) {
this.webSocket.send('心跳')
}
} catch (e) {
console.log('链接已断开')
}
}, 3000)
} }
} }
} }

View File

@ -41,7 +41,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="500"> <el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}"> <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-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, true)">生成专报</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)"></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' } { 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: [], FFILE: [],
caseSummaryList: [], caseSummaryList: [],
regionData: [], regionData: [],

View File

@ -23,7 +23,7 @@
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<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-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> <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -85,7 +85,7 @@ export default {
this.$parent.ticketType = ticketType this.$parent.ticketType = ticketType
}, },
command(row) { 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) { getDetail(id) {
const params = { Id: id } const params = { Id: id }