From da18d27c9e3d75b65864c83474c576beb46daf5b Mon Sep 17 00:00:00 2001
From: ChenZeping02609 <chenzeping02609@163.com>
Date: 星期四, 13 五月 2021 16:42:08 +0800
Subject: [PATCH] 企业应急修改资源查询修改

---
 src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue
index f8df59b..4a7ece9 100644
--- a/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue
+++ b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue
@@ -89,7 +89,16 @@
       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 = '璧勬簮绫诲瀷'
@@ -98,8 +107,9 @@
         this.subItems = this.subItemsT
       }
     },
-    handleDataType () {
-      console.log('item')
+    handleDataType (val) {
+      console.log(val)
+      this.list = []
     },
     async handleSearch () {
       this.list = []
@@ -107,25 +117,30 @@
       // 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>

--
Gitblit v1.8.0