|
|
@@ -5,10 +5,21 @@
|
|
|
<div id="map" style="width: 100%; height:100%"></div>
|
|
|
|
|
|
<el-dialog :title="companyInfo.org_name" width="500px" center :visible.sync="showInfo">
|
|
|
+ <template #title>
|
|
|
+ <div class="box-title">
|
|
|
+ <img :src="companyInfo.logo" alt="" />
|
|
|
+ <span>{{ companyInfo.org_name }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<div class="form-info">
|
|
|
<span class="name">企业介绍:</span>
|
|
|
<span class="val">{{ companyInfo.intro }}</span>
|
|
|
</div>
|
|
|
+ <div class="form-info">
|
|
|
+ <span class="name">企业法人:</span>
|
|
|
+ <span class="val">{{ companyInfo.contact_na }}</span>
|
|
|
+ </div>
|
|
|
<div class="form-info">
|
|
|
<span class="name">企业类型:</span>
|
|
|
<span class="val">{{ companyInfo.org_type }}</span>
|
|
|
@@ -95,7 +106,7 @@ export default {
|
|
|
});
|
|
|
var untiled2 = new ImageLayer({
|
|
|
source: new ImageWMS({
|
|
|
- url: 'http://10.5.23.172/geoserver/nc/wms',
|
|
|
+ url: 'https://10.5.23.172/geoserver/nc/wms',
|
|
|
params: {
|
|
|
FORMAT: 'image/png',
|
|
|
VERSION: '1.1.1',
|
|
|
@@ -122,7 +133,6 @@ export default {
|
|
|
});
|
|
|
|
|
|
map.on('singleclick', evt => {
|
|
|
- console.log(evt);
|
|
|
var view = map.getView();
|
|
|
var viewResolution = view.getResolution();
|
|
|
console.log(untiled2.get('visible'));
|
|
|
@@ -130,11 +140,11 @@ export default {
|
|
|
var url = source.getGetFeatureInfoUrl(evt.coordinate, viewResolution, 'EPSG:3857', {
|
|
|
INFO_FORMAT: 'application/json'
|
|
|
});
|
|
|
- console.log(url.toString());
|
|
|
-
|
|
|
axios.get(url).then(res => {
|
|
|
- if (res.features.length > 0) {
|
|
|
- this.companyInfo = res.features[0].properties;
|
|
|
+ console.log(res);
|
|
|
+ if (res.data.features.length > 0) {
|
|
|
+ this.companyInfo = res.data.features[0].properties;
|
|
|
+ this.showInfo = true;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
@@ -162,4 +172,34 @@ export default {
|
|
|
transform: translate(-50%, -50%);
|
|
|
}
|
|
|
}
|
|
|
+/deep/.el-dialog {
|
|
|
+ background-color: #00000090;
|
|
|
+ border-radius: 10px;
|
|
|
+}
|
|
|
+.box-title {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ img {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ margin-left: 12px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.form-info {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ .name {
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 12px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .val {
|
|
|
+ color: #ffffff99;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|