From 33f8b1658371b0bfab97f7834286d326b2e4fadc Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期三, 26 五月 2021 10:23:09 +0800 Subject: [PATCH] 搜索分页及返回数功能添加 --- src/components/panel/topicSearch/GasWasteSearch.vue | 83 ++++++++++++++++++----------------------- 1 files changed, 37 insertions(+), 46 deletions(-) diff --git a/src/components/panel/topicSearch/GasWasteSearch.vue b/src/components/panel/topicSearch/GasWasteSearch.vue index d25e810..57b7faa 100644 --- a/src/components/panel/topicSearch/GasWasteSearch.vue +++ b/src/components/panel/topicSearch/GasWasteSearch.vue @@ -48,6 +48,12 @@ <el-radio v-for="(item,index) in levelOfRisk" :label="item.value" :key="index"><span class="levelOfRisk-type">{{item.name}}</span></el-radio> </el-radio-group> <!-- <el-form-item >--> + <div class="page_total"> + <p>鍏辫 + <span>{{total}}</span> + 鏉¤褰� + </p> + </div> <div class="rightButtonSearch"> <el-input v-model="form.keyword" size="mini" placeholder="鍦ㄦ杈撳叆鍏抽敭瀛楁悳绱�"> <!-- <el-button slot="append" icon="el-icon-search" size="mini"></el-button>--> @@ -65,10 +71,10 @@ </div> <el-scrollbar style="height:264px"> <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" @click="handleLocation(item)"><!-- --> - <i class="state"></i> + <img src="../../../../public/assets/images/map/exhaust/fq_green2.png" alt="" class="state"/> <div> - <h3>###鐐煎寲閮�</h3> - <p>鎵�灞為儴闂細<span>鐐煎寲閮�</span></p> + <h3>{{ item.Name }}</h3> + <p>鎵�灞為儴闂細<span>{{ item.porltName }}</span></p> <p>椋庨櫓绾у埆锛�<span>涓夌骇</span></p> </div> </div> @@ -98,14 +104,19 @@ <script> import mapApi from '@/api/mapApi' -import publicBounced from '@/components/BaseNav/PublicBounced/PublicBounced'// import WfsHelper from '@components/helpers/WfsHelper' +import WasteWaterIndex from '../../base-page/WasteWater/WasteWaterIndex' +import { pulseEffect, setPanTo } from '../../../utils/utils' + export default { name: 'GasWasteSearch', + props: ['title'], data () { return { gdVisible: true, list: [], total: 0, + // 鍒嗛〉 + pageSize: 10, inareaTypeOptions: [], enterpriseTypeOptions: [], enterpriseSubunitsTypeOptions: [], @@ -117,8 +128,6 @@ }, // pageSize: 10, // current: 1, - isWaybillHover: true, - isRouteHover: false, levelOfRisk: [ { name: '鍏ㄩ儴', value: '1' }, { name: '姝e父', value: '2' }, @@ -128,8 +137,12 @@ ] } }, - props: ['title'], methods: { + // 椤甸潰鍒囨崲 鍒嗛〉鍔熻兘 + handlePage (page) { + // this.wfsHelper.setPage(page) + this.handleSearch() + }, // 鍖哄煙绛涢�� areaType (val) { this.pipelineTypeOptions.forEach((itm) => { @@ -156,51 +169,29 @@ pipelineType: this.form.pipelineType, dataType: this.form.dataType } - console.log(param) - const res = await mapApi.getWasteGas() - console.log(res) + // console.log(param) + const res = await mapApi.getWasteGas(param) + // console.log(res) this.list = res.Result.DataInfo + console.log(this.list) }, // 寮圭獥灞曠ず async handleLocation (val) { console.log(val) const pos = [val.Latitude, val.Longitude] - window.map.flyTo(pos, 13) - const t1 = setTimeout(async () => { - const dataValue = { - StoragePlaceId: val.StoragePlaceId - } - // 寮规鏍囬 - const title = val.Name - console.log(title) - // 鍩烘湰淇℃伅 tabs - const result = await mapApi.getWasteGas(dataValue) - const GasOnlinedata = { - onLineMonEmissPointId: '23', - monItemId: '28,31', - beginTime: '2020-04-06 15:13:20', - endTime: '2020-04-07 15:13:20', - dataType: '1' - } - const GasManualData = { - companyId: '3900100145', - labMonPointId: '219', - beginTime: '2020-04-06 15:13:20', - endTime: ' 2020-04-07 15:13:20' - } - const ManualData = await mapApi.getWasteGasManualData(GasManualData) - const Mondata = await mapApi.getWasteGasMonData(GasOnlinedata) - // 缁戝畾寮规瀹炰緥 - this.instance && this.instance.closePopup() - const PublicBounced = window.Vue.extend(publicBounced) - this.instance = new PublicBounced().$mount() - document.body.appendChild(this.instance.$el) - // document.body.removeChild(instance.$el) - // 閫氳繃鏂规硶 鍚戠粦瀹氬脊妗嗕紶閫掓暟鎹� - this.instance.setGasData(title, result.Result.DataInfo, Mondata.Result.DataInfo, ManualData.Result.DataInfo, 'feiqi') - // this.setPanTo(pos, 250) - }, 1000) - console.log(t1) + window.map.setView(pos, 15) + window.$layer.open({ + content: { + comp: WasteWaterIndex, // 缁勪欢 + parent: this, // 鐖剁粍浠� + data: { // 浼犻�掔殑鍙傛暟 + storagePlaceId: val + } + }, + title: '澶╂触鐭冲寲 ' + val.Name + }) + pulseEffect([val.Latitude, val.Longitude]) + setPanTo(pos, 250) } } } -- Gitblit v1.8.0