| | |
| | | <div class="el-select el-select--mini">8888</div> |
| | | </el-form-item> --> |
| | | <el-form-item label="设施类型:" size="mini" class="search-panel-item"> |
| | | <el-select style="width: 100%" v-model="dataType" @change="handleDataType" :popper-class="'select-down'"> |
| | | <el-option v-for="(item,index) in classification" :key="index" :label="item.name" :value="item.name"></el-option> |
| | | <el-select style="width: 100%" v-model="dataType" value-key="code" @change="handleDataType" :popper-class="'select-down'"> |
| | | <el-option v-for="(item,index) in classification" :key="index" :label="item.name" :value="item"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="rightButtonSearch"> |
| | |
| | | </el-form> |
| | | </div> |
| | | <el-scrollbar style="height:300px;"> |
| | | <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" :class="activeNum==index?'hover':''"> |
| | | <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" :class="activeNum===index?'hover':''"> |
| | | <img class="state" :src="getImgSrc()" style="background: none"/> |
| | | <div> |
| | | <h3 @click="handleLocation(item,index)">{{ item.properties.pipename }}</h3> |
| | |
| | | }, |
| | | methods: { |
| | | getImgSrc () { |
| | | const icon = this.form.dataType.icon |
| | | const icon = this.dataType.icon |
| | | return icon ? 'assets/images/map/' + icon : '' |
| | | }, |
| | | handleClose (done) { |
| | |
| | | window.layerFactory.flyByFeature(val1, val.code) |
| | | }, |
| | | handleDataType () { |
| | | console.log(this.dataType) |
| | | this.list = [] |
| | | }, |
| | | async handleSearch () { |
| | | var wfsHelper = new WfsHelper() |
| | | // todo 现在管网还没区分开类型,后面改 |
| | | wfsHelper.addTypeName(this.dataType) |
| | | wfsHelper.addLike('name', this.form.keyword) |
| | | wfsHelper.addTypeName(this.dataType.typeName) |
| | | if (this.form.keyword) { |
| | | wfsHelper.addLike('name', this.form.keyword) |
| | | } |
| | | // const _this = this |
| | | |
| | | const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}) |
| | | // console.log(res) |
| | | |
| | | if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) { |
| | | const datas = res.features |
| | | const arrs = [] |
| | | for (let i = 0; i < 7; i++) { |
| | | arrs.push(datas[i]) |
| | | } |
| | | this.list = arrs |
| | | this.list = res.features |
| | | |
| | | // this.$forceUpdate() |
| | | } |
| | | }, |
| | | handleLocation (val, index) { |
| | | this.activeNum = index |
| | | window.layerFactory.flyByFeature(val, this.form.dataType.code) |
| | | window.layerFactory.flyByFeature(val, this.dataType.code) |
| | | } |
| | | } |
| | | } |