earthsitesInfo.vue
8.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<template>
<div v-loading="loading" style="border:1px solid black;">
<el-row class="bd_bottom" >
<el-col :span="6" class="bd_right bd_padding">建筑垃圾处理场所名称</el-col>
<el-col :span="6" class="bd_padding">{{infoData.site.name}}</el-col>
<el-col :span="6" class="bd_left bd_right bd_padding">证书编号</el-col>
<el-col :span="6" class="bd_padding">{{infoData.certificateNo}}</el-col>
</el-row>
<el-row class="bd_bottom" >
<el-col :span="6" class="bd_right bd_padding">所在地址</el-col>
<el-col :span="6" class="bd_padding">{{infoData.site.address}}</el-col>
<el-col :span="6" class="bd_right bd_padding bd_lefts">工程类型</el-col>
<el-col :span="6" class="bd_padding">{{infoData.projectTypeName}}</el-col>
</el-row>
<el-row class="bd_bottom">
<el-col :span="6" class="bd_right bd_padding">处理场所类型</el-col>
<el-col :span="6" class="bd_padding">{{infoData.typeName}}</el-col>
<el-col :span="6" class="bd_left bd_right bd_padding">所在区域</el-col>
<el-col :span="6" class="bd_padding">{{infoData.areaName}}</el-col>
</el-row>
<el-row class="bd_bottom" >
<el-col :span="6" class="bd_right bd_padding">作业区域</el-col>
<el-col :span="6" class="bd_padding">{{infoData.workAreaCodeName}}</el-col>
<el-col :span="6" class="bd_left bd_right bd_padding">可受纳建筑垃圾类型</el-col>
<el-col :span="6" class="bd_padding">{{infoData.buildWasteTypeName}}</el-col>
</el-row>
<el-row class="bd_bottom">
<el-col :span="6" class="bd_padding">建设单位名称</el-col>
<el-col :span="6" class="bd_padding bd_right bd_left">{{infoData.buildCompany}}</el-col>
<el-col :span="6" class="bd_padding">建筑单位责任人</el-col>
<el-col :span="6" class="bd_padding bd_left">{{infoData.site.principal}}</el-col>
</el-row>
<el-row class="bd_bottom" >
<el-col :span="6" class="bd_right bd_padding">责任人联系电话</el-col>
<el-col :span="6" class="bd_padding ">{{infoData.site.principalPhoneNo}}</el-col>
<el-col :span="6" class="bd_right bd_padding bd_left">审批方量(m3)</el-col>
<el-col :span="6" class="bd_padding ">{{infoData.capacity}}</el-col>
</el-row>
<el-row class="bd_bottom">
<el-col :span="6" class="bd_right bd_padding">有效期开始时间</el-col>
<el-col :span="6" class="bd_padding">{{infoData.site.effectiveFrom}}</el-col>
<el-col :span="6" class="bd_left bd_right bd_padding">有效期结束时间</el-col>
<el-col :span="6" class="bd_padding">{{infoData.site.effectiveEnd}}</el-col>
</el-row>
<el-row class="bd_bottom">
<el-col :span="6" class="bd_right bd_padding">洗车作业设施</el-col>
<el-col :span="6" class="bd_padding">{{infoData.washingPlatformName}}</el-col>
<el-col :span="6" class="bd_left bd_right bd_padding">出口道路状况</el-col>
<el-col :span="6" class="bd_padding">{{infoData.exitRoadConditionsName}}</el-col>
</el-row>
<el-row class="bd_bottom">
<el-col :span="6" class="bd_right bd_padding">照明设施</el-col>
<el-col :span="6" class="bd_padding">{{infoData.lightingName}}</el-col>
<el-col :span="6" class="bd_left bd_right bd_padding">视频监控设施</el-col>
<el-col :span="6" class="bd_padding">{{infoData.monitorName}}</el-col>
</el-row>
<el-row class="bd_bottom">
<el-col :span="6" class="bd_right bd_padding">填表人名称</el-col>
<el-col :span="6" class="bd_padding">{{infoData.filledBy}}</el-col>
</el-row>
<el-row class="">
<el-col :span="6" class="bd_right bd_padding">申请意见</el-col>
<el-col :span="18" class="bd_padding">{{infoData.applyOpinion}}</el-col>
</el-row>
<!-- <el-button style="color:blue;margin: 5px;" @click="showMap">查看电子围栏</el-button>
<el-dialog title="电子围栏" :visible.sync="open" width="400px" append-to-body>
<div id="container"></div>
</el-dialog> -->
</div>
</template>
<style scoped>
#container{
padding:0px;
margin: 0px;
width: 100%;
height: 400px;
}
</style>
<script>
import AMapLoader from '@amap/amap-jsapi-loader';
import store from "@/store";
import {
getToken
} from "@/utils/auth";
import {
earthsitesById,
getArea,
getDict
} from "@/api/dict";
export default {
name: "ThreestepInfo",
props: {
businessKey: {
type: String
},
},
data() {
return {
sign: store.getters.avatar, //裁剪图片的地址
areas: [],
loading: null,
open:false,
infoData: {},
}
},
created() {
this.loading = true;
this.getInfo();
},
methods: {
showMap(){
if(!this.map){
AMapLoader.load({
key:"cfe6a9d5adbdb09212d25d3257a7a082", // 申请好的Web端开发者Key,首次调用 load 时必填
version:"2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins:[''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
}).then((AMap)=>{
this.map = new AMap.Map("container",{ //设置地图容器id
});
let arr = this.infoData.site.coord.split(";");
let path = [];
for(let i in arr){
path.push(new AMap.LngLat(arr[i].split(",")[0],arr[i].split(",")[1]));
}
let polygon = new AMap.Polygon({
path: path,
fillColor: '#fff', // 多边形填充颜色
borderWeight: 1, // 线条宽度,默认为 1
strokeColor: 'red', // 线条颜色
});
this.map.add(polygon);
this.map.setFitView([ polygon ]);
}).catch(e=>{
console.log(e);
})
}else{
let arr = this.infoData.site.coord.split(";");
let path = [];
for(let i in arr){
path.push(new AMap.LngLat(arr[i].split(",")[0],arr[i].split(",")[1]));
}
let polygon = new AMap.Polygon({
path: path,
fillColor: '#fff', // 多边形填充颜色
borderWeight: 1, // 线条宽度,默认为 1
strokeColor: 'red', // 线条颜色
});
this.map.add(polygon);
this.map.setFitView([ polygon ]);
}
this.open = true;
},
getInfo() {
let id;
if (this.businessKey.split(":").length == 2) {
id = this.businessKey.split(":")[1];
} else {
id = this.businessKey;
}
earthsitesById(id).then(response => {
this.infoData = response.result;
let type = {"type":"CSDisSiteType"};
getDict(type).then(res=>{
for(var i in res.result){
if(this.infoData.disposalType == res.result[i].code){
this.infoData.disposalType = res.result[i].name;
}
}
});
type = {"type":"CSDisSiteProjectType"};
getDict(type).then(res=>{
for(var i in res.result){
if(this.infoData.projectType == res.result[i].code){
this.infoData.projectType = res.result[i].name;
}
}
});
// type = {"type":"CSDisSiteType"};
// getDict(type).then(res=>{
// for(var i in res.result){
// // for(let j in this.infoData.buildWasteType.split(,)){
// // }
// // if(this.infoData.buildWasteType == res.result[i].code){
// // this.infoDate.buildWasteType = res.result[i].name;
// // }
// }
// });
this.loading = false;
});
},
}
}
</script>