| | |
| | | </el-form> |
| | | </div> |
| | | <el-scrollbar style="height:264px"> |
| | | <div class="environmental-risk-list" ><!-- v-for="(item,index) in list" :key="index" --> |
| | | <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" @click="handleLocation(item)"><!-- --> |
| | | <i class="state"></i> |
| | | <div> |
| | | <h3>###炼化部</h3> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import WfsHelper from '@components/helpers/WfsHelper' |
| | | import AjaxUtils from '@utils/AjaxUtils' |
| | | import mapApi from '@/api/mapApi' |
| | | |
| | | // import WfsHelper from '@components/helpers/WfsHelper' |
| | | export default { |
| | | name: 'GasWasteSearch', |
| | | data () { |
| | |
| | | dataType: this.form.dataType |
| | | } |
| | | console.log(param) |
| | | var wfsHelper = new WfsHelper() |
| | | wfsHelper.addTypeName(this.form.query.layerName) |
| | | wfsHelper.addLike(this.form.query.key, this.form.keyword) |
| | | // var wfsHelper = new WfsHelper() |
| | | // wfsHelper.addTypeName(this.form.query.layerName) |
| | | // wfsHelper.addLike(this.form.query.key, this.form.keyword) |
| | | // const _this = this |
| | | const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}) |
| | | if (res.data instanceof Object && Object.prototype.hasOwnProperty.call(res.data, 'features')) { |
| | | this.list = res.data.features |
| | | } |
| | | // const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}) |
| | | const res = await mapApi.getWasteGas() |
| | | console.log(res) |
| | | this.list = res.Result.DataInfo |
| | | // if (res.data instanceof Object && Object.prototype.hasOwnProperty.call(res.data, 'features')) { |
| | | // this.list = res.data.features |
| | | // } |
| | | }, |
| | | handleLocation (val) { |
| | | console.log(val) |
| | | const bound = this.L.geoJSON([val], {}).getBounds() |
| | | var layer = window.serviceLayerHelper.getByLayerId(val.id) |
| | | layer && layer.openPopup() |
| | | this.$store.state.map.map.flyToBounds(bound) |
| | | const pos = [val.Latitude, val.Longitude] |
| | | window.map.flyTo(pos, 17) |
| | | } |
| | | } |
| | | } |