Commit a80e811c authored by xulihui's avatar xulihui

修改应急响应,关联应急资源

parent fddcb462
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<template> <template>
<div class="devicea-wrapper"> <div class="devicea-wrapper">
<div class="title"> <div class="title">
{{deviceData.deviceName}} {{deviceData.resourceName}}
</div> </div>
<div class="close" @click="close"> <div class="close" @click="close">
<img src="@/assets/mapImages/closeBtn.png" alt="" /> <img src="@/assets/mapImages/closeBtn.png" alt="" />
...@@ -31,24 +31,15 @@ ...@@ -31,24 +31,15 @@
<div>联系电话:</div> <div>联系电话:</div>
</div> </div>
<div v-unValue title="123" class="right"> <div v-unValue title="123" class="right">
{{ deviceData.phone }} {{ deviceData.contactNumber }}
</div> </div>
</div> </div>
<div class="middle"> <div class="middle">
<div class="left"> <div class="left">
<div>设施地址</div> <div>资源描述</div>
</div> </div>
<div v-unValue title="123" class="right"> <div v-unValue title="123" class="right">
{{ deviceData.address }} {{ deviceData.resourceDescription }}
</div>
</div>
<div class="middle">
<div class="left">
<div>简介:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.introduce }}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -302,6 +302,7 @@ import { mapGetters, mapActions } from "vuex"; ...@@ -302,6 +302,7 @@ import { mapGetters, mapActions } from "vuex";
import { listDetectorInfo } from "@/api/detector/detectorInfo"; import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList } from "@/api/detector/detectorUser"; import { detectorUserList } from "@/api/detector/detectorUser";
import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive"; import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive";
import { listResources, getResources, delResources, addResources, updateResources, exportResources } from "@/api/emergencydrills/resources";
import { import {
pipeData, pipeData,
...@@ -353,9 +354,9 @@ export default { ...@@ -353,9 +354,9 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
open2: false, open2: false,
// 事件类型 1水灾 2火灾 3突发字典 // 事件类型 1 水灾 2 火灾 3 突发字典
eventTypeOptions: [], eventTypeOptions: [],
// 事件等级 1级 2级 3级字典 // 事件等级 1 级 2 级 3 级字典
eventGradeOptions: [], eventGradeOptions: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
...@@ -365,6 +366,8 @@ export default { ...@@ -365,6 +366,8 @@ export default {
devicePos:[], devicePos:[],
deviceList:[], deviceList:[],
enterpriseList:[], enterpriseList:[],
// 资源类型字典
resourceTypeOptions: [],
map: null, map: null,
show: false, show: false,
readonly:true, readonly:true,
...@@ -541,6 +544,9 @@ export default { ...@@ -541,6 +544,9 @@ export default {
this.getDicts("event_grade").then(response => { this.getDicts("event_grade").then(response => {
this.eventGradeOptions = response.data; this.eventGradeOptions = response.data;
}); });
this.getDicts("sys_resource_type").then(response => {
this.resourceTypeOptions = response.data;
});
}, },
async mounted() { async mounted() {
this.getList(); this.getList();
...@@ -608,21 +614,28 @@ export default { ...@@ -608,21 +614,28 @@ export default {
// this.$refs.mychild2.choice(this.selarr); // this.$refs.mychild2.choice(this.selarr);
}, },
methods: { methods: {
/** 查询应急设备列表 */ /** 查询应急资源列表 */
getList() { getList() {
var params = { var params = {
"pageNum": 1, "pageNum": 1,
"pageSize": 1000 "pageSize": 1000
}; };
listDevice(params).then(response => { listResources(params).then(response => {
response.rows.forEach((item) => { response.rows.forEach((item) => {
item.iconType = item.deviceType+9; item.iconType = parseInt(item.resourceType) + 9;
if(item.deviceType<5){ if(item.resourceType == '0'){
this.arr2[item.deviceType-1].num++; this.arr2[0].num++;
}else { }else if(item.resourceType == '1'){
this.arr2[item.deviceType-2].num++; this.arr2[1].num++;
}else if(item.resourceType == '2'){
this.arr2[2].num++;
}else if(item.resourceType == '3'){
this.arr2[3].num++;
}else if(item.resourceType == '4'){
this.arr2[4].num++;
}else if(item.resourceType == '5'){
this.arr2[5].num++;
} }
}); });
this.deviceList = response.rows; this.deviceList = response.rows;
//console.log(this.deviceList) //console.log(this.deviceList)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment