|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<div class='query' v-drag="'.query .ant-card-head'">
|
|
|
<a-card v-show='value' title='查询' class='queryPanel'>
|
|
|
- <a-icon slot='extra' class='panelClose' type='close' @click="$emit('input',false)"/>
|
|
|
+ <a-icon slot='extra' class='panelClose' type='close' @click="$emit('input',false)" />
|
|
|
<a-input-group compact>
|
|
|
<a-select v-model='queryType' style='width:45%' @change='selectChange'>
|
|
|
<a-select-option v-for='(item,index) in list' :key='item.id' :value='item.tablename'>
|
|
@@ -15,40 +15,34 @@
|
|
|
{{ item.chinesename }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
- <j-dict-select-tag style='width:76%;margin-top: 3%' v-if="this.queryList.includes('sf')" type='list' v-model='keyword' dictCode='sfgyz' placeholder='' />
|
|
|
-<!-- <a-select v-if="this.queryList.includes('SF')" @pressEnter='handleSearch' v-model='keyword'-->
|
|
|
-<!-- style='width:76%;margin-top: 3%'>-->
|
|
|
-<!-- <a-select-option value='是'>-->
|
|
|
-<!-- 是-->
|
|
|
-<!-- </a-select-option>-->
|
|
|
-<!-- </a-select>-->
|
|
|
- <a-select v-else-if="this.queryList.includes('sy')" @pressEnter='handleSearch' v-model='keyword'
|
|
|
+ <j-dict-select-tag style='width:76%;margin-top: 3%' v-if="this.queryList.includes('sf')" type='list'
|
|
|
+ v-model='keyword' dictCode='sfgyz' placeholder='' />
|
|
|
+ <a-select v-else-if="this.queryList.includes('tdsyxz')" @pressEnter='handleSearch' v-model='keyword'
|
|
|
style='width:76%;margin-top: 3%'>
|
|
|
- <a-select-option value='出让'>
|
|
|
- 出让
|
|
|
- </a-select-option>
|
|
|
- <a-select-option value='划拨'>
|
|
|
- 划拨
|
|
|
- </a-select-option>
|
|
|
- <a-select-option value='转让'>
|
|
|
- 转让
|
|
|
- </a-select-option>
|
|
|
- <a-select-option value='作价出资'>
|
|
|
- 作价出资
|
|
|
+ <a-select-option value='闲置低效土地'>
|
|
|
+ 闲置低效土地
|
|
|
</a-select-option>
|
|
|
+ <!-- <a-select-option aria-selected='true' value='待盘活'>-->
|
|
|
+ <!-- 待盘活-->
|
|
|
+ <!-- </a-select-option>-->
|
|
|
+ <!-- <a-select-option value='正常使用'>-->
|
|
|
+ <!-- 正常使用-->
|
|
|
+ <!-- </a-select-option>-->
|
|
|
</a-select>
|
|
|
- <JAreaSelect v-else-if="this.queryList.includes('xz')" style='width:76%;margin-top: 3%' ref="JArea" @Area="SelectArea"></JAreaSelect>
|
|
|
-<!-- <j-area-linkage v-else-if="this.queryList.includes('XZ')" style='width:76%;margin-top: 3%' type="cascader" v-model="keyword" placeholder="请输入省市区"/>-->
|
|
|
+ <JAreaSelect v-else-if="this.queryList.includes('xz')" style='width:76%;margin-top: 3%' ref='JArea'
|
|
|
+ @Area='SelectArea'></JAreaSelect>
|
|
|
+ <!-- <j-area-linkage v-else-if="this.queryList.includes('XZ')" style='width:76%;margin-top: 3%' type="cascader" v-model="keyword" placeholder="请输入省市区"/>-->
|
|
|
|
|
|
<a-input-search v-else allow-clear :loading='isLoading' style='width: 86%;margin-top: 3%' v-model='keyword'
|
|
|
@search='handleSearch' :placeholder='placeholder'
|
|
|
- @pressEnter='handleSearch'/>
|
|
|
+ @pressEnter='handleSearch' />
|
|
|
|
|
|
- <a-tooltip placement='bottom' v-if="this.queryList.includes('sf')||this.queryList.includes('sy')||this.queryList.includes('xz')||this.queryList.includes('sf')">
|
|
|
+ <a-tooltip placement='bottom'
|
|
|
+ v-if="this.queryList.includes('sf')||this.queryList.includes('tdsyxz')||this.queryList.includes('xz')||this.queryList.includes('sf')">
|
|
|
<template slot='title'>
|
|
|
<span>搜索</span>
|
|
|
</template>
|
|
|
- <a-button icon="search" style='width: 10%;margin-top: 3%' @click='handleSearch'></a-button>
|
|
|
+ <a-button icon='search' style='width: 10%;margin-top: 3%' @click='handleSearch'></a-button>
|
|
|
</a-tooltip>
|
|
|
|
|
|
<a-tooltip placement='bottom'>
|
|
@@ -78,28 +72,29 @@
|
|
|
</a-list>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div v-if="isLoading" style="margin-top: 5%">
|
|
|
- <a-spin tip="Loading...">
|
|
|
- <div class="spin-content">
|
|
|
+ <div v-if='isLoading' style='margin-top: 5%'>
|
|
|
+ <a-spin tip='Loading...'>
|
|
|
+ <div class='spin-content'>
|
|
|
</div>
|
|
|
</a-spin>
|
|
|
</div>
|
|
|
- <a-list v-else style='margin-top: 20px;' item-layout='horizontal' :data-source='data' :pagination='pagination'>
|
|
|
+ <a-list v-else style='margin-top: 20px;' item-layout='horizontal' :data-source='data'
|
|
|
+ :pagination='pagination'>
|
|
|
|
|
|
- <a-list-item slot='renderItem' slot-scope='item, index'>
|
|
|
- <a-list-item-meta @click='handleCoord(item)' :description='item.name'>
|
|
|
- <span slot='title'>{{ item.otherInfo }}</span>
|
|
|
- <a-avatar slot='avatar' class='result' :src='require(`../static/result${index+1}.png`)'>
|
|
|
- </a-avatar>
|
|
|
- </a-list-item-meta>
|
|
|
- <!-- <a-tag color='blue' style='padding-left: 0.5em;'>-->
|
|
|
- <!-- {{ item.layerName }}-->
|
|
|
- <!-- </a-tag>-->
|
|
|
- <!-- <a-button slot='actions' type='primary' ghost size='small' @click='handleDetail(item)'>-->
|
|
|
- <!-- 详情-->
|
|
|
- <!-- </a-button>-->
|
|
|
- </a-list-item>
|
|
|
- </a-list>
|
|
|
+ <a-list-item slot='renderItem' slot-scope='item, index'>
|
|
|
+ <a-list-item-meta @click='handleCoord(item)' :description='item.name'>
|
|
|
+ <span slot='title'>{{ item.otherInfo }}</span>
|
|
|
+ <a-avatar slot='avatar' class='result' :src='require(`../static/result${index+1}.png`)'>
|
|
|
+ </a-avatar>
|
|
|
+ </a-list-item-meta>
|
|
|
+ <!-- <a-tag color='blue' style='padding-left: 0.5em;'>-->
|
|
|
+ <!-- {{ item.layerName }}-->
|
|
|
+ <!-- </a-tag>-->
|
|
|
+ <!-- <a-button slot='actions' type='primary' ghost size='small' @click='handleDetail(item)'>-->
|
|
|
+ <!-- 详情-->
|
|
|
+ <!-- </a-button>-->
|
|
|
+ </a-list-item>
|
|
|
+ </a-list>
|
|
|
|
|
|
</template>
|
|
|
</a-card>
|
|
@@ -111,15 +106,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getAction, httpAction} from '../../../api/manage';
|
|
|
-import LocateByGeoinfo from './LocateByGeoinfo';
|
|
|
-import QueryInfo from './QueryInfo';
|
|
|
-import JAreaSelect from "@comp/jeecg/JAreaSelect";
|
|
|
+import { getAction, httpAction } from '../../../api/manage'
|
|
|
+import LocateByGeoinfo from './LocateByGeoinfo'
|
|
|
+import QueryInfo from './QueryInfo'
|
|
|
+import JAreaSelect from '@comp/jeecg/JAreaSelect'
|
|
|
|
|
|
|
|
|
export default {
|
|
|
name: 'queryTool',
|
|
|
- components: {QueryInfo, LocateByGeoinfo,JAreaSelect},
|
|
|
+ components: { QueryInfo, LocateByGeoinfo, JAreaSelect },
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
@@ -139,9 +134,9 @@ export default {
|
|
|
queryLists: [],
|
|
|
pagination: {
|
|
|
onChange: page => {
|
|
|
- this.pagination.current = page;
|
|
|
- this.onPage = true;
|
|
|
- this.handleSearch();
|
|
|
+ this.pagination.current = page
|
|
|
+ this.onPage = true
|
|
|
+ this.handleSearch()
|
|
|
},
|
|
|
disabled: false,
|
|
|
pageSize: 10,
|
|
@@ -150,7 +145,7 @@ export default {
|
|
|
current: 1
|
|
|
},
|
|
|
infoShow: false
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
props: {
|
|
|
value: {
|
|
@@ -172,29 +167,29 @@ export default {
|
|
|
if (val === false) {
|
|
|
//清空搜索框
|
|
|
// this.keyword = '';
|
|
|
- this.infoShow = false;
|
|
|
+ this.infoShow = false
|
|
|
} else {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
inject: ['basicMap'],
|
|
|
async created() {
|
|
|
- let {success, result} = await getAction(this.queryConfigUrl, {
|
|
|
+ let { success, result } = await getAction(this.queryConfigUrl, {
|
|
|
username: this.$store.state.user.info.username,
|
|
|
topicId: this.basicMap.topicId
|
|
|
- });
|
|
|
+ })
|
|
|
if (success) {
|
|
|
if (result.length == 0) {
|
|
|
- this.$message.warn('没有查询到配置信息,请联系管理员!');
|
|
|
+ this.$message.warn('没有查询到配置信息,请联系管理员!')
|
|
|
} else {
|
|
|
- this.list = result;
|
|
|
- this.queryType = this.list[0].tablename;
|
|
|
- this.placeholder = this.list[0].inputTip;
|
|
|
- this.returntree = this.list[0].returntree == 'true' ? true : false;
|
|
|
- this.queryLists = this.list[0].queryList;
|
|
|
+ this.list = result
|
|
|
+ this.queryType = this.list[0].tablename
|
|
|
+ this.placeholder = this.list[0].inputTip
|
|
|
+ this.returntree = this.list[0].returntree == 'true' ? true : false
|
|
|
+ this.queryLists = this.list[0].queryList
|
|
|
}
|
|
|
} else {
|
|
|
- this.$message.warn('没有查询到配置信息,请联系管理员!');
|
|
|
+ this.$message.warn('没有查询到配置信息,请联系管理员!')
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -211,87 +206,87 @@ export default {
|
|
|
async handleSearch() {
|
|
|
|
|
|
if (this.queryType && this.keyword && this.queryList.length > 0) {
|
|
|
- this.infoShow = false;
|
|
|
+ this.infoShow = false
|
|
|
if (this.queryType !== this.lastType) {
|
|
|
- this.pagination.current = 1;
|
|
|
+ this.pagination.current = 1
|
|
|
if (this.lastType != '') {
|
|
|
- this.basicMap.changeLayerVisibleByTableName(this.lastType, false);
|
|
|
+ this.basicMap.changeLayerVisibleByTableName(this.lastType, false)
|
|
|
}
|
|
|
}
|
|
|
- this.basicMap.changeLayerVisibleByTableName(this.queryType, true);
|
|
|
+ this.basicMap.changeLayerVisibleByTableName(this.queryType, true)
|
|
|
|
|
|
if (!this.onPage) {
|
|
|
- this.pagination.current = 1;
|
|
|
+ this.pagination.current = 1
|
|
|
}
|
|
|
- this.lastType = this.queryType;
|
|
|
- this.isLoading = true;
|
|
|
- this.pagination.disabled = true;
|
|
|
+ this.lastType = this.queryType
|
|
|
+ this.isLoading = true
|
|
|
+ this.pagination.disabled = true
|
|
|
// let queryItem = this.list.find((item) => {
|
|
|
// return item.tablename === this.queryType;
|
|
|
// });
|
|
|
- this.onPage = false;
|
|
|
+ this.onPage = false
|
|
|
|
|
|
- let {success, message, result} = await getAction(this.queryUrl, {
|
|
|
+ let { success, message, result } = await getAction(this.queryUrl, {
|
|
|
queryType: this.queryType,
|
|
|
queryList: this.queryList,
|
|
|
returntree: this.returntree,
|
|
|
queryInfo: this.keyword,
|
|
|
pageNo: this.pagination.current,
|
|
|
pageSize: 10
|
|
|
- });
|
|
|
+ })
|
|
|
if (success) {
|
|
|
- this.isLoading = false;
|
|
|
- this.pagination.disabled = false;
|
|
|
+ this.isLoading = false
|
|
|
+ this.pagination.disabled = false
|
|
|
if (result.total === 0 || result === '') {
|
|
|
- this.$message.error('没有查询到信息');
|
|
|
- this.data = [];
|
|
|
- this.pagination.total = 0;
|
|
|
- return;
|
|
|
+ this.$message.error('没有查询到信息')
|
|
|
+ this.data = []
|
|
|
+ this.pagination.total = 0
|
|
|
+ return
|
|
|
}
|
|
|
- this.data = result.records;
|
|
|
- this.pagination.total = result.total;
|
|
|
+ this.data = result.records
|
|
|
+ this.pagination.total = result.total
|
|
|
} else {
|
|
|
- this.$message.info(message);
|
|
|
+ this.$message.info(message)
|
|
|
}
|
|
|
} else {
|
|
|
- this.$message.warn('请输入查询关键字!');
|
|
|
+ this.$message.warn('请输入查询关键字!')
|
|
|
}
|
|
|
},
|
|
|
selectChange(val) {
|
|
|
- let temp = [];
|
|
|
- this.queryList = [];
|
|
|
+ let temp = []
|
|
|
+ this.queryList = []
|
|
|
temp = this.list.filter((item) => {
|
|
|
- return item.tablename === val;
|
|
|
- });
|
|
|
- this.data = [];
|
|
|
+ return item.tablename === val
|
|
|
+ })
|
|
|
+ this.data = []
|
|
|
// this.placeholder = temp[0].inputTip;
|
|
|
- this.returntree = temp[0].returntree == 'true' ? true : false;
|
|
|
- this.queryLists = temp[0].queryList;
|
|
|
+ this.returntree = temp[0].returntree == 'true' ? true : false
|
|
|
+ this.queryLists = temp[0].queryList
|
|
|
|
|
|
},
|
|
|
handleCoord(item) {
|
|
|
|
|
|
- this.$refs.locateByGeoinfo.locate(item);
|
|
|
+ this.$refs.locateByGeoinfo.locate(item)
|
|
|
},
|
|
|
handleAttributes(event, item) {
|
|
|
- event.stopPropagation();
|
|
|
- this.infoShow = true;
|
|
|
- this.$refs.detail.loadDetail(item.attributes);
|
|
|
+ event.stopPropagation()
|
|
|
+ this.infoShow = true
|
|
|
+ this.$refs.detail.loadDetail(item.attributes)
|
|
|
},
|
|
|
handleDetail(item) {
|
|
|
- this.handleCoord(item);
|
|
|
- this.infoShow = true;
|
|
|
- this.$refs.detail.loadDetail(item.attributes);
|
|
|
+ this.handleCoord(item)
|
|
|
+ this.infoShow = true
|
|
|
+ this.$refs.detail.loadDetail(item.attributes)
|
|
|
},
|
|
|
clear() {
|
|
|
- this.$refs.locateByGeoinfo.clear();
|
|
|
+ this.$refs.locateByGeoinfo.clear()
|
|
|
},
|
|
|
reset() {
|
|
|
- this.data = [];
|
|
|
- this.pagination.total = 0;
|
|
|
- this.infoShow = false;
|
|
|
- this.keyword = '';
|
|
|
- this.clear();
|
|
|
+ this.data = []
|
|
|
+ this.pagination.total = 0
|
|
|
+ this.infoShow = false
|
|
|
+ this.keyword = ''
|
|
|
+ this.clear()
|
|
|
}
|
|
|
/*createVectorLayer() {
|
|
|
if (this.map === '' || this.vectorLayer === '') return
|
|
@@ -321,7 +316,7 @@ export default {
|
|
|
}*/
|
|
|
}
|
|
|
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style>
|