应急管理指挥调度实时更新功能
							parent
							
								
									eb8928f37f
								
							
						
					
					
						commit
						79772b5eda
					
				|  | @ -14,7 +14,7 @@ | |||
|         </div> | ||||
|         <!-- 右侧面板 --> | ||||
|         <div class="right"> | ||||
|           <sysChat :chat-data="chatData" @orderMessage="handlerOrderMessage"/> | ||||
|           <sysChat :chat-data="chatData" @orderMessage="handlerOrderMessage" @reFlush="initInfo()"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="top_search"> | ||||
|  | @ -276,7 +276,7 @@ export default { | |||
|       heartbeat: null, | ||||
|       REPORT_ID: null, | ||||
|       FIRERESERVEPLAN_ID: null, | ||||
|       CORPIFNO_ID: sessionStorage.getItem('user').CORPIFNO_ID | ||||
|       CORPIFNO_ID: JSON.parse(sessionStorage.getItem('user')).CORPIFNO_ID | ||||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|  | @ -288,7 +288,6 @@ 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() | ||||
|  | @ -458,8 +457,7 @@ export default { | |||
|         '/bi/emergency/getYjBiInformation', | ||||
|         { | ||||
|           FIRERESERVEPLAN_ID: this.FIRERESERVEPLAN_ID, | ||||
|           REPORT_ID: this.REPORT_ID, | ||||
|           CORP_ID: this.CORPIFNO_ID | ||||
|           REPORT_ID: this.REPORT_ID | ||||
|         } | ||||
|       ).then((data) => { | ||||
|         if (data.result === 'success') { | ||||
|  | @ -496,10 +494,9 @@ export default { | |||
|       } | ||||
|       // 新建心跳,持续监听链接是否存活 | ||||
|       this.heartbeat = setInterval(() => { | ||||
|         console.log('发送心跳') | ||||
|         try { | ||||
|           if (this.webSocket) { | ||||
|             this.webSocket.send('心跳') | ||||
|             this.webSocket.send('企业端' + this.REPORT_ID) | ||||
|           } | ||||
|         } catch (e) { | ||||
|           console.log('链接已断开') | ||||
|  |  | |||
|  | @ -3,11 +3,13 @@ | |||
|     <div v-for="(item, ind) in chatData" :key="ind" class="chat_body"> | ||||
|       <p class="chat_title">{{ item.info.MESS }}</p> | ||||
|       <p v-for="(answer, indx) in item.list" :key="indx" :class="{ 'ready': answer.READ_STATUS === '1'}" class="chat_item"> | ||||
|         <span v-if="answer.IDENT_SIGN === '1'" class="chat_item_head">{{ answer.RECEIVED_MEN_NAME + ' 回复:' }} </span> | ||||
|         <span v-if="answer.IDENT_SIGN === '1'" class="chat_item_head">{{ answer.SEND_MEN_NAME + ' 回复:' }} </span> | ||||
|         <span v-if="answer.IDENT_SIGN === '1'" class="chat_item_content">{{ answer.MESS }}</span> | ||||
|         <span v-if="answer.IDENT_SIGN === '2'" class="chat_item_head">{{ answer.RECEIVED_MEN_NAME + ' :' }}</span> | ||||
|         <span v-if="answer.READ_STATUS === '1'" class="chat_ready">已读</span> | ||||
|         <span v-if="answer.READ_STATUS === '0'" class="chat_ready">未读</span> | ||||
|         <span v-if="answer.READ_STATUS === '1' && answer.IDENT_SIGN !== '1'" class="chat_ready">已读</span> | ||||
|         <span v-if="answer.READ_STATUS === '0' && answer.IDENT_SIGN !== '1'" class="chat_ready">未读</span> | ||||
|         <span v-if="answer.READ_STATUS === '1' && answer.IDENT_SIGN === '1'" class="chat_ready">已确认</span> | ||||
|         <span v-if="answer.READ_STATUS === '0' && answer.IDENT_SIGN === '1'" class="chat_ready" @click="confirmReceipt(answer)">未确认</span> | ||||
|       </p> | ||||
|     </div> | ||||
|     <div class="order"> | ||||
|  | @ -17,6 +19,7 @@ | |||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import { requestFN } from '@/utils/request' | ||||
| export default { | ||||
| 
 | ||||
|   props: { | ||||
|  | @ -34,6 +37,18 @@ export default { | |||
|   methods: { | ||||
|     sendOrderBtn() { | ||||
|       this.$emit('orderMessage') | ||||
|     }, | ||||
|     confirmReceipt(answer) { | ||||
|       requestFN('/bi/emergency/readInstruct', { ID: answer.ID }) | ||||
|         .then((data) => { | ||||
|           this.$message({ | ||||
|             message: '确认已收到指令', | ||||
|             type: 'success' | ||||
|           }) | ||||
|           this.$emit('reFlush', '') | ||||
|         }).catch((error) => { | ||||
|           console.log(error) | ||||
|         }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | @ -114,7 +129,7 @@ export default { | |||
|       } | ||||
| 
 | ||||
|       .chat_item_head { | ||||
|         color: #1b6fae; | ||||
|         color: #ffffff; | ||||
|       } | ||||
| 
 | ||||
|       .chat_item_content { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue