From f8865d1c7f36c4ffa66002e0dd3a9d5e99e4fe6b Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期日, 30 五月 2021 13:45:44 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
---
src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue | 139 +++++++++++++++++++++++++++------------------
1 files changed, 83 insertions(+), 56 deletions(-)
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
index b7e9d69..3e9cbff 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
@@ -1,6 +1,6 @@
<template>
<div class="ReportLocationSection">
- <el-form :model="form" label-width="90px">
+ <el-form :model="form" label-width="120px">
<el-row class="pipe-line-search">
<el-col :span="12">
<el-form-item label="绠$嚎鍚嶇О:">
@@ -17,14 +17,21 @@
</el-col>
</el-row>
<el-row>
- <el-col :span="12">
+ <el-col :span="24">
<el-form-item label="绠℃缂栫爜:">
<el-input v-model="form.sectionName" disabled></el-input>
</el-form-item>
</el-col>
+ </el-row>
+ <el-row>
<el-col :span="12">
- <el-form-item label="闄勫睘璁炬柦:">
+ <el-form-item label="闄勫睘璁炬柦鍚嶇О:">
<el-input v-model="form.affiliatedFacilities" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="闄勫睘璁炬柦缂栫爜:">
+ <el-input v-model="form.affiliatedFacilitiesCode" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
@@ -141,7 +148,7 @@
</el-card>
</div>
<el-row style="text-align: right;margin: 10px">
- <el-button type="primary" @click="confirm">纭</el-button>
+ <el-button type="primary" @click="confirm" size="small">纭</el-button>
</el-row>
</div>
</template>
@@ -160,7 +167,8 @@
form: {
pipeName: '',
sectionName: '',
- affiliatedFacilities: ''
+ affiliatedFacilities: '',
+ affiliatedFacilitiesCode: ''
},
// 绠$嚎鏌ヨ鏁版嵁鍒楄〃
tableList: [],
@@ -196,57 +204,72 @@
this.tableList = res.features
}
this.wfsHelper = new WfsHelper()
- this.form.pipeName = ''
+ // this.form.pipeName = ''
this.form.sectionName = ''
this.form.affiliatedFacilities = ''
+ this.form.affiliatedFacilitiesCode = ''
},
// 鐐瑰嚮绠$嚎鍒楄〃 灞曠ず绠℃鍐呭 鍜岄檮灞炶鏂藉唴瀹�
- async sectionShowClick (val) {
- console.log(val)
- // 濡傛灉 SectionAndAffFacTableJudge === true 鏄悳绱㈡暟鎹粨鏋滅殑鍒楄〃 鍙互杩涜 绠℃ 闄勫睘璁炬柦浜や簰 鐐瑰嚮瀹氫綅鏌ヨ缁撴灉 涓嶈繘琛岀偣鍑讳氦浜�
+ sectionShowClick (val) {
+ // console.log(val)
+ // this.SectionAndAffFacTableJudge = true
if (this.SectionAndAffFacTableJudge === true) {
- // 绠℃鏌ヨ
- const sectionNameSearch = val.properties.pipename
- this.tableListSection = []
- this.wfsHelper.clearFilter()
- this.wfsHelper.setTypeName(['sewer:pipesegment'])
- this.wfsHelper.addLike('pipename', sectionNameSearch)
- this.wfsHelper.addEquals('pipename', '\'' + sectionNameSearch + '\'')
- const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
- // console.log(res)
- if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
- this.tableListSection = res.features
- }
- this.wfsHelper = new WfsHelper()
- // 闄勫睘璁炬柦鏌ヨ
- this.tableDataAffFac = []
- const AffFacSearch = val.properties.pipecode
- console.log(AffFacSearch)
- this.wfsHelper.clearFilter()
- this.wfsHelper.setTypeName(['sewer:view_pipeline'])
- this.wfsHelper.addLike('pipecode', AffFacSearch)
- // this.wfsHelper.addEquals('type', '\'' + AffFacSearch + '\'')
- const resAffFac = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
- console.log(resAffFac)
- if (resAffFac instanceof Object && Object.prototype.hasOwnProperty.call(resAffFac, 'features')) {
- // for (let i = 0; i < resAffFac.features.length; i++) {
- // // console.log(resAffFac.features[i])
- // this.tableDataAffFac.push(resAffFac.features[i].properties)
- // }
- this.tableDataAffFac = resAffFac.features
- }
- this.wfsHelper = new WfsHelper()
+ this.searchSection(val)
+ this.searchAffFacData(val)
+ }
+ },
+ // 绠℃鏌ヨ
+ async searchSection (val) {
+ const sectionNameSearch = val.properties.pipename
+ this.tableListSection = []
+ this.wfsHelper.clearFilter()
+ this.wfsHelper.setTypeName(['sewer:pipesegment'])
+ this.wfsHelper.addLike('pipename', sectionNameSearch)
+ this.wfsHelper.addEquals('pipename', '\'' + sectionNameSearch + '\'')
+ const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
+ // console.log(res)
+ if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
+ this.tableListSection = res.features
+ }
+ },
+ // 闄勫睘璁炬柦鏌ヨ
+ async searchAffFacData (val) {
+ this.tableDataAffFac = []
+ const AffFacSearch = val.properties.pipecode
+ this.wfsHelper.clearFilter()
+ this.wfsHelper.setTypeName(['sewer:view_pipeline'])
+ this.wfsHelper.addLike('pipecode', AffFacSearch)
+ // this.wfsHelper.addEquals('type', '\'' + AffFacSearch + '\'')
+ const resAffFac = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
+ console.log(resAffFac)
+ if (resAffFac instanceof Object && Object.prototype.hasOwnProperty.call(resAffFac, 'features')) {
+ this.tableDataAffFac = resAffFac.features
+ }
+ },
+ // 鎼滅储鐨勫叕鍏辨柟娉曚紭鍖�
+ async publicSearch (searchVal, searchKeyword, searchTypeName, tableListData) {
+ tableListData = []
+ this.wfsHelper = new WfsHelper()
+ this.wfsHelper.clearFilter()
+ this.wfsHelper.setTypeName(searchTypeName)
+ this.wfsHelper.addLike(searchKeyword, searchVal)
+ this.wfsHelper.addEquals(searchKeyword, '\'' + searchVal + '\'')
+ const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
+ // console.log(res)
+ if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
+ tableListData = res.features
}
},
// 鐐瑰嚮绠℃鍒楄〃 绠℃缂栫爜浼犻��
sectionCode (val) {
// console.log(val)
- this.form.sectionName = val.properties.pipecode
+ this.form.sectionName = val.properties.pipesegcode
},
// 鐐瑰嚮闄勫睘璁炬柦鍒楄〃 绠℃缂栫爜浼犻��
affFacName (val) {
- // console.log(val)
+ console.log(val)
this.form.affiliatedFacilities = val.properties.name
+ this.form.affiliatedFacilitiesCode = val.properties.code
},
// 瀹氫綅鍔熻兘
localAdr (val) {
@@ -258,23 +281,27 @@
pipeClickLocation () {
// 璁炬柦涓嶈繘琛� 绠$嚎琛ㄦ牸鏁版嵁鐨勭偣鍑讳氦浜�
this.SectionAndAffFacTableJudge = false
- // 鐐瑰嚮鑾峰彇鏁版嵁
- window.map.on('click', (e) => {
- // 鐐瑰嚮鍦板浘鍏抽棴寮规
- window.mapManager.clickDialogSwitch = false
- // 绠$嚎鐐瑰嚮鏁版嵁
- this.pipeData(e)
- // 绠℃鐐瑰嚮鏁版嵁
- this.sectionData(e)
- // 闄勫睘璁炬柦鏁版嵁
- this.affFacData(e)
- // 鍏抽棴鐐瑰嚮浜嬩欢
- window.map.off('click')
- })
+ if (this.SectionAndAffFacTableJudge === false) {
+ // 鐐瑰嚮鑾峰彇鏁版嵁
+ window.map.on('click', (e) => {
+ this.SectionAndAffFacTableJudge = false
+ // 鐐瑰嚮鍦板浘鍏抽棴寮规
+ window.mapManager.clickDialogSwitch = false
+ // 绠$嚎鐐瑰嚮鏁版嵁
+ this.pipeData(e)
+ // 绠℃鐐瑰嚮鏁版嵁
+ this.sectionData(e)
+ // 闄勫睘璁炬柦鏁版嵁
+ this.affFacData(e)
+ // 鍏抽棴鐐瑰嚮浜嬩欢
+ window.map.off('click')
+ })
+ }
// 鏁版嵁 閲嶆柊鑾峰彇 杩涜缃┖
this.form.pipeName = ''
this.form.sectionName = ''
this.form.affiliatedFacilities = ''
+ this.form.affiliatedFacilitiesCode = ''
this.tableList = []
this.tableListSection = []
this.tableDataAffFac = []
@@ -317,7 +344,7 @@
BBOX: window.map.getBounds().toBBoxString()
}, defaultWmsParams)
AjaxUtils.get4JsonDataByUrl(WMS_URL, wmsParams, (res) => {
- console.log(res)
+ // console.log(res)
for (let i = 0; i < res.data.features.length; i++) {
dataList.push(res.data.features[i])
}
--
Gitblit v1.8.0