Commit a80e811c authored by xulihui's avatar xulihui

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

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