| | |
| | | const icon = this.form.dataType.icon |
| | | return icon ? 'assets/images/map/' + icon : '' |
| | | }, |
| | | handlePipelineType () { |
| | | handlePipelineType (val) { |
| | | console.log(val) |
| | | this.list = [] |
| | | for (let i = 0; i < this.items.length; i++) { |
| | | const item = this.items[i].name |
| | | if (val === item.name) { |
| | | this.subItems = item |
| | | return |
| | | } |
| | | } |
| | | // console.log('item') |
| | | if (this.form.pipelineType === '应急资源') { |
| | | this.form.pipelineType = '资源类型' |
| | |
| | | this.subItems = this.subItemsT |
| | | } |
| | | }, |
| | | handleDataType () { |
| | | console.log('item') |
| | | handleDataType (val) { |
| | | console.log(val) |
| | | this.list = [] |
| | | }, |
| | | async handleSearch () { |
| | | this.list = [] |
| | |
| | | // todo 现在企业应急还没区分开类型,后面改 |
| | | // this.wfsHelper.setTypeName([this.form.dataType.typeName]) |
| | | this.wfsHelper.setTypeName(['sewer:emergency']) |
| | | if (this.form.dataType) { |
| | | if (this.form.dataType === '全部环境' || this.form.dataType === '全部资源' || this.form.dataType === '') { |
| | | |
| | | } else { |
| | | this.wfsHelper.addEquals('type', '\'' + this.form.dataType + '\'') |
| | | } |
| | | } |
| | | if (this.form.keyword) { |
| | | this.wfsHelper.addLike('name', this.form.keyword) |
| | | } |
| | | const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {}) |
| | | console.log(res) |
| | | if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) { |
| | | this.list = res.features |
| | | } |
| | | }, |
| | | handleLocation (val, index) { |
| | | console.log(val) |
| | | this.activeNum = index |
| | | // layer && layer.openPopup() |
| | | // window.layerFactory.flyByFeature(val, this.form.dataType.code) |
| | | window.map.flyTo([val.properties.y, val.properties.x], 15) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |