From 7b2f20f1299306f087d89aa202b52708df7ec4e6 Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期三, 07 四月 2021 09:14:44 +0800
Subject: [PATCH] 统一样式修改部分完成。
---
src/components/panel/topicSearch/SewersSearch.vue | 204 ++++++++++++++++++++++++++------------------------
1 files changed, 105 insertions(+), 99 deletions(-)
diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue
index 22d6997..46e94a3 100644
--- a/src/components/panel/topicSearch/SewersSearch.vue
+++ b/src/components/panel/topicSearch/SewersSearch.vue
@@ -1,16 +1,10 @@
<template>
- <div id="sewers-search">
- <div class="el-message-box__header panel_header">
- <div class="el-message-box__title panel_title"><!----><span>{{ title }}</span>
- </div>
- </div>
- <div class="el-message-box__content" style="padding:6px;font-size: 13px;">
- <div class="box__content" v-if="gdVisible">
- <div>
- <el-card class="search-panel">
+ <div class="sewers-search" v-if="gdVisible">
+ <div class="search-title">{{title}}</div>
+ <div class="search-panel ">
<el-form ref="form" :model="form" label-width="90px" class="search-form">
- <el-form-item label="璁炬柦绫诲瀷锛�" size="mini">
- <el-select v-model="form.pipelineType" @change="handlePipelineType" popper-class="select-down">
+ <el-form-item label="璁炬柦绫诲瀷锛�" size="mini" class="search-panel-item">
+ <el-select style="width: 100%" v-model="form.pipelineType" @change="handlePipelineType" :popper-class="'select-down'">
<el-option
v-for="item in pipelineTypeOptions"
:key="item.value"
@@ -19,8 +13,8 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鏁版嵁绫诲瀷锛�">
- <el-select v-model="form.dataType" size="mini" popper-class="select-down">
+ <el-form-item :label="form.pipelineType+'锛�'" size="mini">
+ <el-select style="width: 100%" v-model="form.dataType" @change="handleDataType" :popper-class="'select-down'">
<el-option
v-for="item in dataTypeOptions"
:key="item.value"
@@ -29,68 +23,65 @@
</el-option>
</el-select>
</el-form-item>
-<!-- <el-form-item >-->
- <el-input v-model="form.key" size="mini"
- placeholder="鍦ㄦ杈撳叆鍏抽敭瀛楁悳绱�">
-<!-- <el-button slot="append" icon="el-icon-search" size="mini"></el-button>-->
- <span><i class="el-icon-edit"></i></span>
+ <!-- <el-form-item >-->
+ <div class="rightButtonSearch">
+ <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>-->
+ <!-- <i slot="suffix" class="search-btn el-input__icon el-icon-search" @click="handleSearch"></i> -->
</el-input>
-<!-- </el-form-item>-->
-<!-- <el-form-item>-->
-<!-- <input type="button" class="btn-ok" @click="handleSearch" value="鏌ヨ">-->
-<!-- <input type="button" class="btn-reset" @click="handleSearch" value="閲嶇疆">-->
-<!-- </el-form-item>-->
+ <el-buttom class="el-icon-search" @click="handleSearch"></el-buttom>
+ </div>
+ <!-- </el-form-item>-->
+ <!-- <el-form-item>-->
+ <!-- <input type="button" class="btn-ok" @click="handleSearch" value="鏌ヨ">-->
+ <!-- <input type="button" class="btn-reset" @click="handleSearch" value="閲嶇疆">-->
+ <!-- </el-form-item>-->
</el-form>
- </el-card>
- <el-card class="search-result" style="height:271px;">
+ </div>
+ <el-scrollbar style="height:380.44px;" >
<div class="B-TMD-table-list" v-for="(item,index) in list" :key="index">
<div class="B-TMD-table-list-title">
<div class="B-TMD-table-list-head">
<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"
- :title="item.transNo">
- <span class="B-TMD-table-list-title-y-alarm">{{ item.transNo }}</span>
+ <!-- <span>杩愬崟鍙凤細</span>-->
+ <span id="waybillNumber" class=""
+ :title="item.properties.pipename">
+ <span class="location-btn" @click="handleLocation(item)">{{ item.properties.pipename }}</span>
</span>
</div>
- <div class="B-TMD-table-list-title-c">
- 杞藉叿鍙凤細
- <span id="plateNumber_p">
- <span id="plateNumber_n"><a href="#">{{ item.vehicleNo }}</a></span>
- </span>
- </div>
+ <!-- <div class="B-TMD-table-list-title-c">-->
+ <!-- {{ labelList[0] }}锛�-->
+ <!-- <span id="plateNumber_p">-->
+ <!-- <span id="plateNumber_n"><a href="#">{{ item.properties.item.p1 }}</a></span>-->
+ <!-- </span>-->
+ <!-- </div>-->
</div>
- <div class="B-TMD-table-icons" style="float:right">
- <ul>
- <li class="B-TMD-table-list-title-y-adress"
- @click="handleLocation(item)"></li>
- <li :class="[{'B-TMD-table-list-title-y-car': item.vehicleStatus ==='910002', 'B-TMD-table-list-title-y-car-offline': item.vehicleStatus ==='910001','B-TMD-table-list-title-y-car-warning': item.vehicleStatus==='910003' }]"></li>
- </ul>
- </div>
+ <!-- <div class="B-TMD-table-icons" style="float:right">-->
+ <!-- <ul>-->
+ <!-- <li class="B-TMD-table-list-title-y-adress"-->
+ <!-- @click="handleLocation(item)"></li>-->
+ <!-- <li :class="[{'B-TMD-table-list-title-y-car': item.vehicleStatus ==='910002', 'B-TMD-table-list-title-y-car-offline': item.vehicleStatus ==='910001','B-TMD-table-list-title-y-car-warning': item.vehicleStatus==='910003' }]"></li>-->
+ <!-- </ul>-->
+ <!-- </div>-->
</div>
<div class="B-TMD-table-list-content">
- <div>
- <span>鍙戣揣浼佷笟锛�</span>
- <span id="b_twe_consignment" :title="item.outWarehouseName">{{
- item.outWarehouseName == null ? "鏆傛棤" : item.outWarehouseName
- }}</span>
- </div>
- <div>
- <span>鎵� 杩� 鍟嗭細</span>
- <span id="b_twe_loan" :title="item.carrierName">{{ item.carrierName }}</span>
- </div>
- <div><span>鏀惰揣浼佷笟锛�</span> <span
- id="b_twe_loan1" :title="item.recvWarehouseName">{{ item.recvWarehouseName }}</span>
- </div>
- </div>
- <div class="B-TMD-table-list-bottom">
- <div class="B-TMD-table-list-bottom-name">
- 璐х墿鍚嶇О锛�<span :title="item.materialName">{{ item.materialName }}</span></div>
- </div>
- </div>
- </el-card>
+ <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-->
+ <!-- id="b_twe_loan1" :title="item.recvWarehouseName">{{ item.recvWarehouseName }}</span>-->
+ <!-- </div>-->
+ </div>
+ <!-- <div class="B-TMD-table-list-bottom">-->
+ <!-- <div class="B-TMD-table-list-bottom-name">-->
+ <!-- 璐х墿鍚嶇О锛�<span :title="item.materialName">{{ item.materialName }}</span></div>-->
+ <!-- </div>-->
+ </div>
+ </el-scrollbar>
<el-card class="footer-page" v-if="total > 10">
<el-pagination
small
@@ -104,75 +95,90 @@
</el-pagination>
</el-card>
</div>
- </div>
<!-- <div class="monitor2" v-if="hbVisible">-->
<!-- <env-protect-search></env-protect-search>-->
<!-- </div>-->
<!-- <div class="monitor2" v-if="pkVisible">-->
<!-- <discharge-search></discharge-search>-->
<!-- </div>-->
- </div>
- </div>
-
</template>
<script>
-import { PipelineTypeOptions, OutletOptions, AttachOptions, PipelineOptions, EnvironmentOptions, SurroundingsOptions } from '@/conf/LayerSewers'
+import { PipelineTypeOptions } from '@/conf/layers/LayerSewers'
+import WfsHelper from '@components/helpers/WfsHelper'
+import AjaxUtils from '@utils/AjaxUtils'
export default {
name: 'SewersSearch',
data () {
return {
gdVisible: true,
list: [],
+ labelList: PipelineTypeOptions[0].labelList,
total: 0,
pipelineTypeOptions: PipelineTypeOptions,
- outletOptions: OutletOptions,
- dataTypeOptions: [],
-
- attachOptions: AttachOptions,
- pipelineOptions: PipelineOptions,
- environmentOptions: EnvironmentOptions,
- surroundingsOptions: SurroundingsOptions,
+ dataTypeOptions: PipelineTypeOptions[0].options,
form: {
- transNo: null,
- carrierName: null,
- transMode: null,
- vehicleNo: null,
- orderState: null,
- size: 10,
- current: 1
+ pipelineType: PipelineTypeOptions[0].label,
+ dataType: PipelineTypeOptions[0].options[0].label,
+ query: PipelineTypeOptions[0].options[0],
+ keyword: '鐮旂┒闄�01璺痀S000001'
+ // ,
+ // size: 10,
+ // current: 1
},
- pageSize: 10,
- current: 1,
+ // pageSize: 10,
+ // current: 1,
isWaybillHover: true,
isRouteHover: false
}
},
props: ['title'],
methods: {
- handlePipelineType (item) {
- console.log(item)
- if (item === '2') {
- this.dataTypeOptions = this.outletOptions
- } else if (item === '1') {
- this.dataTypeOptions = this.pipelineOptions
- } else if (item === '3') {
- this.dataTypeOptions = this.attachOptions
- } else if (item === '4') {
- this.dataTypeOptions = this.environmentOptions
- } else if (item === '5') {
- this.dataTypeOptions = this.surroundingsOptions
+ handlePipelineType (val) {
+ this.pipelineTypeOptions.forEach((itm) => {
+ if (val === itm.value) {
+ this.dataTypeOptions = itm.options
+ this.form.pipelineType = itm.label
+ this.form.labelList = itm.labelList
+ }
+ })
+ this.form.dataType = this.dataTypeOptions[0].label
+ this.form.key = this.dataTypeOptions[0].key
+ },
+ handleDataType (val) {
+ this.dataTypeOptions.forEach((itm) => {
+ if (val === itm.value) {
+ this.form.query = itm
+ }
+ })
+ },
+ async handleSearch () {
+ const param = {
+ pipelineType: this.form.pipelineType,
+ dataType: this.form.dataType
+ }
+ console.log(param)
+ var wfsHelper = new WfsHelper()
+ wfsHelper.addTypeName(this.form.query.layerName)
+ wfsHelper.addLike(this.form.query.key, this.form.keyword)
+ // const _this = this
+ const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {})
+ if (res.data instanceof Object && Object.prototype.hasOwnProperty.call(res.data, 'features')) {
+ this.list = res.data.features
}
},
- handleSearch () {
-
+ handleLocation (val) {
+ console.log(val)
+ const bound = this.L.geoJSON([val], {}).getBounds()
+ var layer = window.serviceLayerHelper.getByLayerId(val.id)
+ layer && layer.openPopup()
+ this.$store.state.map.map.flyToBounds(bound)
}
}
}
</script>
-<style lang="less">
-@import '@assets/css/map/map-elem-ui';
+<style lang="less" scoped>
</style>
--
Gitblit v1.8.0