From 67b2f8943983bd65e2272a7ee3f55d31a7361356 Mon Sep 17 00:00:00 2001
From: YANGDL <114714267@qq.com>
Date: 星期二, 02 三月 2021 17:34:52 +0800
Subject: [PATCH] 修改专题搜索结果面板样式
---
src/assets/css/map/map-elem-ui.less | 6 ++
src/components/panel/topicSearch/SewersSearch.vue | 38 ++++++++++++++-----
src/conf/LayerSewers.js | 70 ++++++++++++++++++++++++++++++++++-
3 files changed, 101 insertions(+), 13 deletions(-)
diff --git a/src/assets/css/map/map-elem-ui.less b/src/assets/css/map/map-elem-ui.less
index daf4784..5b99031 100644
--- a/src/assets/css/map/map-elem-ui.less
+++ b/src/assets/css/map/map-elem-ui.less
@@ -51,7 +51,11 @@
}
- .el-input__icon:hover{
+ location-btn{
+
+ }
+
+ .location-btn:hover,.el-input__icon:hover{
color: @color;
cursor: pointer;
}
diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue
index 2df6bbe..4eb6302 100644
--- a/src/components/panel/topicSearch/SewersSearch.vue
+++ b/src/components/panel/topicSearch/SewersSearch.vue
@@ -30,7 +30,7 @@
</el-select>
</el-form-item>
<!-- <el-form-item >-->
- <el-input v-model="form.key" size="mini"
+ <el-input v-model="form.keyword" size="mini"
placeholder="鍦ㄦ杈撳叆鍏抽敭瀛楁悳绱�">
<!-- <el-button slot="append" icon="el-icon-search" size="mini"></el-button>-->
<!-- <i slot="prefix" class="el-input__icon el-icon-search"></i>-->
@@ -50,9 +50,9 @@
<div class="B-TMD-table-list-title-y"
:class="['B-TMD-table-list-title-y-nam', { 'warning': item.vehicleStatus==='910003' }, { 'offline': item.vehicleStatus==='910001' }]">
<!-- <span>杩愬崟鍙凤細</span>-->
- <span id="waybillNumber" class="B-TMD-table-list-title-y-num"
+ <span id="waybillNumber" class=""
:title="item.properties.pipename">
- <span class="B-TMD-table-list-title-y-alarm">{{ item.properties.pipename }}</span>
+ <span class="location-btn" @click="handleLocation(item)">{{ item.properties.pipename }}</span>
</span>
</div>
<!-- <div class="B-TMD-table-list-title-c">-->
@@ -72,8 +72,8 @@
</div>
<div class="B-TMD-table-list-content">
- <div v-for="itm in labelList" :key="itm">
- <span>{{ itm.label }}锛氾細</span>
+ <div v-for="itm in labelList" :key="itm.label">
+ <span>{{ itm.label }}锛�</span>
<span id="b_twe_loan" :title="item.properties[itm.key] ">{{ item.properties[itm.key] }}</span>
</div>
<!-- <div><span>鏀惰揣浼佷笟锛�</span> <span-->
@@ -113,8 +113,10 @@
</template>
<script>
-import { PipelineTypeOptions, pipelineDataTest } from '@/conf/LayerSewers'
+import { PipelineTypeOptions } from '@/conf/LayerSewers'
+import WfsHelper from '@components/helpers/WfsHelper'
+import AjaxUtils from '@utils/AjaxUtils'
export default {
name: 'SewersSearch',
data () {
@@ -127,7 +129,9 @@
dataTypeOptions: PipelineTypeOptions[0].options,
form: {
pipelineType: PipelineTypeOptions[0].label,
- dataType: PipelineTypeOptions[0].options[0].label
+ dataType: PipelineTypeOptions[0].options[0].label,
+ query: PipelineTypeOptions[0].options[0],
+ keyword: '鐮旂┒闄�01璺痀S000001'
// ,
// size: 10,
// current: 1
@@ -149,9 +153,14 @@
}
})
this.form.dataType = this.dataTypeOptions[0].label
+ this.form.key = this.dataTypeOptions[0].key
},
- handleDataType (item) {
-
+ handleDataType (val) {
+ this.dataTypeOptions.forEach((itm) => {
+ if (val === itm.value) {
+ this.form.query = itm
+ }
+ })
},
handleSearch () {
const param = {
@@ -159,7 +168,16 @@
dataType: this.form.dataType
}
console.log(param)
- this.list = pipelineDataTest.features
+ var wfsHelper = new WfsHelper()
+ wfsHelper.addTypeName(this.form.query.layerName)
+ wfsHelper.addLike(this.form.query.key, this.form.keyword)
+ // const _this = this
+ AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}, (res) => {
+ this.list = res.features
+ })
+ },
+ handleLocation (val) {
+ console.log(val)
}
}
}
diff --git a/src/conf/LayerSewers.js b/src/conf/LayerSewers.js
index 890858a..814251f 100644
--- a/src/conf/LayerSewers.js
+++ b/src/conf/LayerSewers.js
@@ -381,30 +381,48 @@
label: '绠$嚎鏈綋',
options: [{
value: '1',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '鍏ㄩ儴绠$嚎'
}, {
value: '2',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '鐢熸椿姹℃按绠$嚎'
}, {
value: '3',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '鍚洂绠$嚎'
}, {
value: '4',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '闆ㄦ按绠$嚎'
}, {
value: '5',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '鍚补绠$嚎'
}, {
value: '6',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '浜嬫晠姘寸绾�'
}, {
value: '7',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '鍚⒈绠$嚎'
}, {
value: '8',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '寰幆姘寸绾�'
}, {
value: '9',
+ layerName: '绠$綉',
+ key: 'pipename',
label: '鍑�鍖栨按绠$嚎'
}],
labelList: [{ label: '杈撻�佷粙璐�', key: 'mediumtype' }, { label: '闀垮害(m)', key: 'length' }]
@@ -413,12 +431,18 @@
label: '鎺掑彛淇℃伅',
options: [{
value: '1',
+ layerName: '',
+ key: '',
label: '鍏ㄩ儴鎺掑彛'
}, {
value: '2',
+ layerName: '',
+ key: '',
label: '鍐呮帓鍙�'
}, {
value: '3',
+ layerName: '',
+ key: '',
label: '澶栨帓鍙�'
}],
labelList: []
@@ -428,24 +452,38 @@
options: [
{
value: '1',
+ layerName: '',
+ key: '',
label: '鍏ㄩ儴璁炬柦'
}, {
value: '2',
+ layerName: '',
+ key: '',
label: '闃�闂�'
}, {
value: '3',
+ layerName: '',
+ key: '',
label: '绠″粖'
}, {
value: '4',
+ layerName: '',
+ key: '',
label: '绠℃灦'
}, {
value: '5',
+ layerName: '',
+ key: '',
label: '涓夐��'
}, {
value: '6',
+ layerName: '',
+ key: '',
label: '鍥涢��'
}, {
value: '7',
+ layerName: '',
+ key: '',
label: '寮ご'
}],
labelList: []
@@ -455,30 +493,48 @@
options: [
{
value: '1',
+ layerName: '',
+ key: '',
label: '鍏ㄩ儴璁炬柦'
}, {
value: '2',
+ layerName: '',
+ key: '',
label: '闆ㄧ瀛�'
}, {
value: '3',
+ layerName: '',
+ key: '',
label: '闃茬伀鍫�'
}, {
value: '4',
+ layerName: '',
+ key: '',
label: '闆嗘按姹�'
}, {
value: '5',
+ layerName: '',
+ key: '',
label: '鏀堕泦缃�'
}, {
value: '6',
+ layerName: '',
+ key: '',
label: '鎴祦闂�'
}, {
value: '7',
+ layerName: '',
+ key: '',
label: '婧㈡祦鍫�'
}, {
value: '8',
+ layerName: '',
+ key: '',
label: '闅旀补姹�'
}, {
value: '9',
+ layerName: '',
+ key: '',
label: '娉�'
}],
labelList: []
@@ -487,28 +543,38 @@
label: '鍛ㄨ竟鐜',
options: [{
value: '1',
+ layerName: '',
+ key: '',
label: '鍏ㄩ儴鍛ㄨ竟鐜'
}, {
value: '2',
+ layerName: '',
+ key: '',
label: '鍖婚櫌'
}, {
value: '3',
+ layerName: '',
+ key: '',
label: '鏅尯'
}, {
value: '4',
+ layerName: '',
+ key: '',
label: '鑷劧淇濇姢鍖�'
}, {
value: '5',
+ layerName: '',
+ key: '',
label: '娑堥槻'
}, {
value: '6',
+ layerName: '',
+ key: '',
label: '姘翠綋'
}
],
labelList: []
}]
-
-export const pipelineLabel = ['']
/* eslint-disable */
--
Gitblit v1.8.0