|
@@ -1,44 +1,32 @@
|
|
|
<template>
|
|
|
- <div class="demolitionContainer">
|
|
|
- <!-- 房屋拆迁管理 -->
|
|
|
- <header class="queryContainer">
|
|
|
- <el-form ref="form" :inline="true" :model="form" class="demo-form-inline">
|
|
|
+
|
|
|
+ <div class="contant-box">
|
|
|
+ <div class="query-header">
|
|
|
+ <el-form :inline="true" :model="queryForm" label-width="75px">
|
|
|
<!-- <el-form-item label="楼盘地区:">
|
|
|
- <el-input v-model="form.bulidingArea"></el-input>
|
|
|
+ <el-input v-model="form.bulidingArea" placeholder="楼盘地区" size="small" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="楼盘编号:">
|
|
|
- <el-input v-model="form.buildingNo"></el-input>
|
|
|
+ <el-input v-model="form.buildingNo" placeholder="楼盘编号" size="small" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="幢号:">
|
|
|
- <el-input v-model="form.buildingNum"></el-input>
|
|
|
+ <el-input v-model="form.buildingNum" placeholder="幢号" size="small" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="房号:">
|
|
|
- <el-input v-model="form.bulidingName"></el-input>
|
|
|
+ <el-input v-model="form.houseNo" placeholder="房号" size="small" clearable></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" size="small" @click="queryHouseByDraw" style="width: 100px;">绘图查询</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="queryHouseAll" style="width: 100px;">重置</el-button>
|
|
|
</el-form-item>
|
|
|
- <el-button type="primary" @click="queryHouseInfo" style="width: 66px;padding: 12px 0px !important;">查询</el-button> -->
|
|
|
- <el-button type="primary" @click="queryHouseByDraw" style="width: 66px;padding: 12px 0px !important;">绘图查询</el-button>
|
|
|
- <el-button type="primary" @click="queryHouseAll" style="width: 66px;padding: 12px 0px !important;">查询全部</el-button>
|
|
|
</el-form>
|
|
|
- </header>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="my-table">
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- :data="tableData"
|
|
|
- highlight-current-row
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#dfeffe',color:'#333333'}"
|
|
|
- style="width: 100%;font-size: 14px"
|
|
|
- >
|
|
|
- <!-- <el-table-column type="selection" width="65" align="center"></el-table-column> -->
|
|
|
- <el-table-column
|
|
|
- v-for="(item,i) in columnList"
|
|
|
- :key="i"
|
|
|
- :property="item.prop"
|
|
|
- :label="item.label"
|
|
|
- show-overflow-tooltip
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <div class="table-box">
|
|
|
+ <el-table :data="tableData" stripe :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}"
|
|
|
+ style="width: 100%" height="100%" v-loading="queryStatus" @current-change="handleCurrentChange">
|
|
|
+ <el-table-column v-for="(item,i) in columnList" :key="i" :property="item.prop" :label="item.label" show-overflow-tooltip
|
|
|
+ align="center">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="200">
|
|
|
<template slot-scope='scope'>
|
|
@@ -46,18 +34,13 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- 分页器 -->
|
|
|
- <div class="pagination" style="box-sizing: border-box;float:right;padding-right:10px">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[50, 100, 150, 200]"
|
|
|
- :page-size="pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="totalCount"
|
|
|
- background
|
|
|
- ></el-pagination>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="table-pagination">
|
|
|
+ <el-pagination :current-page="currentPage" :page-sizes="[20, 50, 100, 200]" :page-size="pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next" :total="totalCount" @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange">
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
|
<!-- 查看信息对话框 -->
|
|
|
<el-dialog class='dialogViewInfo' :title="dialogTitle" width="50%" :visible.sync="lookVisible" @close="closeDialog">
|
|
@@ -65,43 +48,48 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="楼盘编号:">
|
|
|
- <el-input v-model="vData.buildingNo"></el-input>
|
|
|
+ <el-input v-model="vData.buildingNo" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="幢号:">
|
|
|
- <el-input v-model="vData.buildingNum"></el-input>
|
|
|
+ <el-input v-model="vData.buildingNum" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="坐落:">
|
|
|
- <el-input v-model="vData.bulidingArea"></el-input>
|
|
|
+ <el-input v-model="vData.bulidingArea" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="楼盘年份:">
|
|
|
- <el-input v-model="vData.bulidingDate"></el-input>
|
|
|
+ <el-input v-model="vData.bulidingDate" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="房号:">
|
|
|
- <el-input v-model="vData.bulidingName"></el-input>
|
|
|
+ <el-input v-model="vData.bulidingName" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="所在层数:">
|
|
|
- <el-input v-model="vData.floorNo"></el-input>
|
|
|
+ <el-input v-model="vData.floorNo" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="房屋状态:">
|
|
|
- <el-input v-model="vData.houseStatus"></el-input>
|
|
|
+ <el-input v-model="vData.houseStatus" readonly></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="套内面积:">
|
|
|
+ <el-input v-model="vData.usedArea" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="12">
|
|
@@ -113,76 +101,72 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="授权人名称:">
|
|
|
- <el-input v-model="vData.ownerName"></el-input>
|
|
|
+ <el-input v-model="vData.ownerName" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="用途:">
|
|
|
- <el-input v-model="vData.purpose"></el-input>
|
|
|
+ <el-input v-model="vData.purpose" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="分摊面积:">
|
|
|
- <el-input v-model="vData.sharedArea"></el-input>
|
|
|
+ <el-input v-model="vData.sharedArea" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="专用面积:">
|
|
|
- <el-input v-model="vData.specialArea"></el-input>
|
|
|
+ <el-input v-model="vData.specialArea" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="单元号:">
|
|
|
- <el-input v-model="vData.unitNo"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="套内面积:">
|
|
|
- <el-input v-model="vData.usedArea"></el-input>
|
|
|
+ <el-input v-model="vData.unitNo" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24" v-if="visibleOperation">
|
|
|
- <el-button type="primary" @click="_cancle" style="float:right;margin:10px 10px 0 10px;">退出</el-button>
|
|
|
+ <el-button type="primary" @click="_cancle" style="float:right;margin:10px 10px 0 10px;">退出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Range,TileSuperMapRest as olTileSuperMapRest,TileWMS,Vector as SourceVector} from "ol/source";
|
|
|
-import { Logo, TileSuperMapRest,FeatureService,QueryService,MapboxStyles, SuperMap} from '@supermap/iclient-ol';
|
|
|
-import { Style,Fill,Stroke,Circle,Text } from "ol/style";
|
|
|
+import { Range, TileSuperMapRest as olTileSuperMapRest, TileWMS, Vector as SourceVector } from "ol/source";
|
|
|
+import { Logo, TileSuperMapRest, FeatureService, QueryService, MapboxStyles, SuperMap } from '@supermap/iclient-ol';
|
|
|
+import { Style, Fill, Stroke, Circle, Text } from "ol/style";
|
|
|
import { Image, Vector as LayerVector, Tile as TileLayer } from 'ol/layer';
|
|
|
-import { Select,Pointer,Draw,Modify,Snap,Translate} from "ol/interaction";
|
|
|
-import { createRegularPolygon,createBox } from "ol/interaction/Draw";
|
|
|
+import { Select, Pointer, Draw, Modify, Snap, Translate } from "ol/interaction";
|
|
|
+import { createRegularPolygon, createBox } from "ol/interaction/Draw";
|
|
|
import { GeoJSON } from "ol/format";
|
|
|
-import { getCenter,boundingExtent } from "ol/extent";
|
|
|
-import { getPublicHouse,uploadFileList,getPublicHouseByBuildings } from '@/api/kxc/publicHouse';
|
|
|
+import { getCenter, boundingExtent } from "ol/extent";
|
|
|
+import { getPublicHouse, uploadFileList, getPublicHouseByBuildings } from '@/api/kxc/publicHouse';
|
|
|
export default {
|
|
|
props: ['data'],
|
|
|
data() {
|
|
|
return {
|
|
|
- map:null,
|
|
|
- config:null,
|
|
|
- roomDesignSrc:null,
|
|
|
+ queryStatus:false,
|
|
|
+ map: null,
|
|
|
+ config: null,
|
|
|
+ roomDesignSrc: null,
|
|
|
pageNum: 1, // 当前页码
|
|
|
pageTotalNum: 1, // 总页数
|
|
|
- viewDesignVisible:false,
|
|
|
- visibleOperation:false,
|
|
|
- uploadVisible:false, //是否允许上传
|
|
|
+ viewDesignVisible: false,
|
|
|
+ visibleOperation: false,
|
|
|
+ uploadVisible: false, //是否允许上传
|
|
|
form: {
|
|
|
buildingNo: '',
|
|
|
- bulidingArea:'',
|
|
|
- buildingNum:'',
|
|
|
- bulidingName:''
|
|
|
+ bulidingArea: '',
|
|
|
+ buildingNum: '',
|
|
|
+ bulidingName: ''
|
|
|
},
|
|
|
columnList: [
|
|
|
{
|
|
@@ -250,84 +234,85 @@ export default {
|
|
|
label: '套内面积'
|
|
|
}
|
|
|
],
|
|
|
- totalCount:0,
|
|
|
- pageSize:1,
|
|
|
- currentPage:50,
|
|
|
+ totalCount: 0,
|
|
|
+ pageSize: 1,
|
|
|
+ currentPage: 50,
|
|
|
tableData: [],
|
|
|
lookVisible: false,
|
|
|
dialogTitle: '',
|
|
|
// 查看具体数据
|
|
|
vData: {
|
|
|
- roomDesignUrl:'',
|
|
|
- HouseholdChartUrl:'',
|
|
|
- FramingChartUrl:'',
|
|
|
+ roomDesignUrl: '',
|
|
|
+ HouseholdChartUrl: '',
|
|
|
+ FramingChartUrl: '',
|
|
|
},
|
|
|
- drawTool:null,
|
|
|
- vectorSource:null,
|
|
|
- server:null,
|
|
|
- queryFeatures:null,
|
|
|
- queryVectorSource:null,
|
|
|
- queryResultLayer:null,
|
|
|
- demoVectorSource:null,
|
|
|
- demoResultLayer:null
|
|
|
+ drawTool: null,
|
|
|
+ vectorSource: null,
|
|
|
+ server: null,
|
|
|
+ queryFeatures: null,
|
|
|
+ queryVectorSource: null,
|
|
|
+ queryResultLayer: null,
|
|
|
+ demoVectorSource: null,
|
|
|
+ demoResultLayer: null
|
|
|
};
|
|
|
},
|
|
|
- created(){
|
|
|
+ created() {
|
|
|
this.config = this.data.that.config;
|
|
|
this.map = this.data.that.map;
|
|
|
- if(this.config.iServerUrl.webEditServer && this.config.iServerUrl.webEditServer.length > 0){
|
|
|
- this.server = this.config.iServerUrl.webEditServer.find( server => server.dataSetName == '公房');
|
|
|
+ if (this.config.iServerUrl.webEditServer && this.config.iServerUrl.webEditServer.length > 0) {
|
|
|
+ this.server = this.config.iServerUrl.webEditServer.find(server => server.dataSetName == '公房');
|
|
|
}
|
|
|
},
|
|
|
- mounted(){
|
|
|
- this.$nextTick(()=>{
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
this.getPublicHouseList();
|
|
|
this.totalCount = this.tableData.length;
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- destroyed() {
|
|
|
+ destroyed() {
|
|
|
this.removeInteraction();
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
/***/
|
|
|
- queryHouseInfo(){
|
|
|
+ queryHouseInfo() {
|
|
|
let param = {};
|
|
|
- for(let item in this.form){
|
|
|
- if(this.form[item] && this.form[item] != ''){
|
|
|
+ for (let item in this.form) {
|
|
|
+ if (this.form[item] && this.form[item] != '') {
|
|
|
param[item] = this.form[item];
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
this.getPublicHouseList(param);
|
|
|
},
|
|
|
/**
|
|
|
* 获取房屋信息
|
|
|
*/
|
|
|
- getPublicHouseList(param){
|
|
|
+ getPublicHouseList(param) {
|
|
|
+ this.queryStatus=true
|
|
|
let params = {
|
|
|
- current:this.pageSize,
|
|
|
- size:this.currentPage
|
|
|
+ current: this.pageSize,
|
|
|
+ size: this.currentPage
|
|
|
}
|
|
|
- if(param && !(JSON.stringify(param) == "{}")){
|
|
|
+ if (param && !(JSON.stringify(param) == "{}")) {
|
|
|
params = Object.assign(params, param)
|
|
|
}
|
|
|
- getPublicHouse(params).then( res=>{
|
|
|
- console.log('查询完成',res);
|
|
|
- if(res.code == 1){
|
|
|
+ getPublicHouse(params).then(res => {
|
|
|
+ console.log('查询完成', res);
|
|
|
+ if (res.code == 1) {
|
|
|
let result = res.result;
|
|
|
this.totalCount = result.total;
|
|
|
- result.records.forEach( item => {
|
|
|
- if(item.hasOwnProperty('houseStatus')){
|
|
|
+ result.records.forEach(item => {
|
|
|
+ if (item.hasOwnProperty('houseStatus')) {
|
|
|
//1、已出租、2、已出售、3、待售、4、不可售)
|
|
|
- item['houseStatus'] = item['houseStatus'] == 1 ? '已出租' :
|
|
|
- item['houseStatus'] == 2 ? '已出售' :
|
|
|
- item['houseStatus'] == 3 ? '待售' :
|
|
|
- item['houseStatus'] == 4 ? '不可售' : '不可售';
|
|
|
+ item['houseStatus'] = item['houseStatus'] == 1 ? '已出租' :
|
|
|
+ item['houseStatus'] == 2 ? '已出售' :
|
|
|
+ item['houseStatus'] == 3 ? '待售' :
|
|
|
+ item['houseStatus'] == 4 ? '不可售' : '不可售';
|
|
|
}
|
|
|
|
|
|
- if(item.hasOwnProperty('isDemolition')){
|
|
|
- item['isDemolition'] = item['isDemolition'] == 1 ? '是' :
|
|
|
- item['isDemolition'] == 2 ? '否' : '否';
|
|
|
+ if (item.hasOwnProperty('isDemolition')) {
|
|
|
+ item['isDemolition'] = item['isDemolition'] == 1 ? '是' :
|
|
|
+ item['isDemolition'] == 2 ? '否' : '否';
|
|
|
}
|
|
|
});
|
|
|
this.tableData = result.records;
|
|
@@ -336,31 +321,32 @@ export default {
|
|
|
this.$message('查询失败!失败原因:' + res.message);
|
|
|
}
|
|
|
})
|
|
|
- .catch( msg=>{
|
|
|
- console.log('出错',msg);
|
|
|
- })
|
|
|
- .finally(()=>{
|
|
|
- console.log('完成');
|
|
|
- });
|
|
|
+ .catch(msg => {
|
|
|
+ console.log('出错', msg);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ console.log('完成');
|
|
|
+ this.queryStatus=false
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 查询已拆迁的房屋
|
|
|
*/
|
|
|
- queryHouseByBuildNo(){
|
|
|
- if(this.tableData.length == 0) return;
|
|
|
- if(this.server == null){
|
|
|
+ queryHouseByBuildNo() {
|
|
|
+ if (this.tableData.length == 0) return;
|
|
|
+ if (this.server == null) {
|
|
|
this.$message.warning("请联系管理员配置查询服务(结点webEditServer)");
|
|
|
return;
|
|
|
}
|
|
|
let str = '';
|
|
|
- this.tableData.forEach((item,index)=>{
|
|
|
- if(item.hasOwnProperty("buildingNo") && item.hasOwnProperty("buildingNum")){
|
|
|
- str = (str == "" ? "" : str + " or " ) + "(COMMUNITYNUMBER='" + item.buildingNo + "' and " + "BUILDINGNUM=" + item.buildingNum + ")";
|
|
|
+ this.tableData.forEach((item, index) => {
|
|
|
+ if (item.hasOwnProperty("buildingNo") && item.hasOwnProperty("buildingNum")) {
|
|
|
+ str = (str == "" ? "" : str + " or ") + "(COMMUNITYNUMBER='" + item.buildingNo + "' and " + "BUILDINGNUM=" + item.buildingNum + ")";
|
|
|
}
|
|
|
})
|
|
|
console.log(str);
|
|
|
- if(str==null||str==""){
|
|
|
+ if (str == null || str == "") {
|
|
|
return;
|
|
|
}
|
|
|
//查询已拆的
|
|
@@ -388,13 +374,13 @@ export default {
|
|
|
this.featuresRes = features
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/***
|
|
|
* 标注拆迁房屋
|
|
|
*/
|
|
|
- setFontStyle(features){
|
|
|
- if(features.features.length <= 0) return;
|
|
|
- if(this.demoVectorSource){
|
|
|
+ setFontStyle(features) {
|
|
|
+ if (features.features.length <= 0) return;
|
|
|
+ if (this.demoVectorSource) {
|
|
|
this.demoVectorSource.clear();
|
|
|
}
|
|
|
this.demoVectorSource = new SourceVector({
|
|
@@ -402,90 +388,90 @@ export default {
|
|
|
wrapX: false
|
|
|
});
|
|
|
this.demoResultLayer = new LayerVector({
|
|
|
- source: this.demoVectorSource,
|
|
|
- style: new Style({
|
|
|
- //填充色
|
|
|
- fill: new Fill({
|
|
|
- color: 'rgba(255, 0, 0, 0.2)'
|
|
|
- }),
|
|
|
- text:new Text({
|
|
|
- font:'20px Microsoft YaHei',
|
|
|
- text:'拆',
|
|
|
- offsetX:0,
|
|
|
- offsetY:-7,
|
|
|
- placement:'point',
|
|
|
- backgroundStroke:new Stroke({
|
|
|
- color:'rgba(255,51,0,1)',
|
|
|
- lineCap:'round',
|
|
|
- width:3
|
|
|
- }),
|
|
|
- fill: new Fill({
|
|
|
- color:"#FF0000"
|
|
|
- })
|
|
|
- }),
|
|
|
- //边线颜色
|
|
|
- stroke: new Stroke({
|
|
|
- color: '#FF0000',
|
|
|
- width: 2
|
|
|
- }),
|
|
|
- //形状
|
|
|
- image: new Circle({
|
|
|
- radius: 4,
|
|
|
- fill: new Fill({
|
|
|
- color: '#ffcc33'
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
+ source: this.demoVectorSource,
|
|
|
+ style: new Style({
|
|
|
+ //填充色
|
|
|
+ fill: new Fill({
|
|
|
+ color: 'rgba(255, 0, 0, 0.2)'
|
|
|
+ }),
|
|
|
+ text: new Text({
|
|
|
+ font: '20px Microsoft YaHei',
|
|
|
+ text: '拆',
|
|
|
+ offsetX: 0,
|
|
|
+ offsetY: -7,
|
|
|
+ placement: 'point',
|
|
|
+ backgroundStroke: new Stroke({
|
|
|
+ color: 'rgba(255,51,0,1)',
|
|
|
+ lineCap: 'round',
|
|
|
+ width: 3
|
|
|
+ }),
|
|
|
+ fill: new Fill({
|
|
|
+ color: "#FF0000"
|
|
|
+ })
|
|
|
+ }),
|
|
|
+ //边线颜色
|
|
|
+ stroke: new Stroke({
|
|
|
+ color: '#FF0000',
|
|
|
+ width: 2
|
|
|
+ }),
|
|
|
+ //形状
|
|
|
+ image: new Circle({
|
|
|
+ radius: 4,
|
|
|
+ fill: new Fill({
|
|
|
+ color: '#ffcc33'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
});
|
|
|
this.map.addLayer(this.demoResultLayer);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 查询全部
|
|
|
*/
|
|
|
- queryHouseAll(){
|
|
|
+ queryHouseAll() {
|
|
|
this.removeInteraction();
|
|
|
//删除之前绘制图形
|
|
|
- if(this.vectorSource){
|
|
|
+ if (this.vectorSource) {
|
|
|
this.vectorSource.clear();
|
|
|
}
|
|
|
this.queryHouseInfo();
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 地图绘制查询按钮事件
|
|
|
*/
|
|
|
- queryHouseByDraw(){
|
|
|
+ queryHouseByDraw() {
|
|
|
let feature = null;
|
|
|
this.removeInteraction();
|
|
|
//删除之前绘制图形
|
|
|
- if(this.vectorSource){
|
|
|
+ if (this.vectorSource) {
|
|
|
this.vectorSource.clear();
|
|
|
}
|
|
|
- this.vectorSource = new SourceVector({wrapX: false});
|
|
|
+ this.vectorSource = new SourceVector({ wrapX: false });
|
|
|
let vectorLayer = new LayerVector({
|
|
|
- source: this.vectorSource
|
|
|
+ source: this.vectorSource
|
|
|
});
|
|
|
this.map.addLayer(vectorLayer);
|
|
|
let geometryFunction = createBox();
|
|
|
let maxPoint;
|
|
|
this.drawTool = new Draw({
|
|
|
- source: this.vectorSource ,
|
|
|
+ source: this.vectorSource,
|
|
|
wrapX: false,
|
|
|
maxPoints: maxPoint, //最大点数
|
|
|
type: "Circle",
|
|
|
- geometryFunction:geometryFunction
|
|
|
+ geometryFunction: geometryFunction
|
|
|
});
|
|
|
this.drawTool.on('drawstart', (evt) => {
|
|
|
//清理已绘制图形
|
|
|
- if(this.vectorSource){
|
|
|
+ if (this.vectorSource) {
|
|
|
this.vectorSource.clear();
|
|
|
console.log("清理已绘制图形....");
|
|
|
}
|
|
|
feature = evt.feature;
|
|
|
});
|
|
|
- this.drawTool.on('drawend', () =>{
|
|
|
+ this.drawTool.on('drawend', () => {
|
|
|
let geometry = feature.getGeometry();
|
|
|
this.drawFeature = feature;
|
|
|
this.singleLayerQuery();
|
|
@@ -498,8 +484,8 @@ export default {
|
|
|
* @layer 选择图层
|
|
|
* @index 选择图层序号
|
|
|
*/
|
|
|
- singleLayerQuery(){
|
|
|
- if(this.server == null){
|
|
|
+ singleLayerQuery() {
|
|
|
+ if (this.server == null) {
|
|
|
this.$message.warning("请联系管理员配置查询服务(结点webEditServer)");
|
|
|
return;
|
|
|
}
|
|
@@ -509,90 +495,90 @@ export default {
|
|
|
let polygon = this.drawFeature.getGeometry();
|
|
|
//创建集Bounds查询服务
|
|
|
let boundsParam = new SuperMap.GetFeaturesByBoundsParameters({
|
|
|
- datasetNames: [datasetName],
|
|
|
- bounds: polygon.getExtent()
|
|
|
+ datasetNames: [datasetName],
|
|
|
+ bounds: polygon.getExtent()
|
|
|
});
|
|
|
- new FeatureService(url).getFeaturesByBounds(boundsParam, (serviceResult) => {
|
|
|
- if(this.queryVectorSource){
|
|
|
- this.queryVectorSource.clear();
|
|
|
+ new FeatureService(url).getFeaturesByBounds(boundsParam, (serviceResult) => {
|
|
|
+ if (this.queryVectorSource) {
|
|
|
+ this.queryVectorSource.clear();
|
|
|
+ }
|
|
|
+ let features = serviceResult.result.features;
|
|
|
+ let buildings = [];
|
|
|
+ features.features.forEach(feature => {
|
|
|
+ if (feature.properties.hasOwnProperty('COMMUNITYNUMBER')) {
|
|
|
+ buildings.push({
|
|
|
+ buildingNo: feature.properties.COMMUNITYNUMBER,
|
|
|
+ buildingNum: "",
|
|
|
+ });
|
|
|
}
|
|
|
- let features = serviceResult.result.features;
|
|
|
- let buildings = [];
|
|
|
- features.features.forEach(feature =>{
|
|
|
- if(feature.properties.hasOwnProperty('COMMUNITYNUMBER')){
|
|
|
- buildings.push({
|
|
|
- buildingNo:feature.properties.COMMUNITYNUMBER,
|
|
|
- buildingNum:"",
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- this.getPublicHouses(buildings);
|
|
|
- this.queryVectorSource = new SourceVector({
|
|
|
- features: (new GeoJSON()).readFeatures(features),
|
|
|
- wrapX: false
|
|
|
- });
|
|
|
- this.queryResultLayer = new LayerVector({
|
|
|
- source: this.queryVectorSource,
|
|
|
- style: new Style({
|
|
|
- //填充色
|
|
|
- fill: new Fill({
|
|
|
- color: 'rgba(255, 255, 255, 0.2)'
|
|
|
- }),
|
|
|
- //边线颜色
|
|
|
- stroke: new Stroke({
|
|
|
- color: '#1E90FF',
|
|
|
- width: 5
|
|
|
- }),
|
|
|
- //形状
|
|
|
- image: new Circle({
|
|
|
- radius: 7,
|
|
|
- fill: new Fill({
|
|
|
- color: '#ffcc33'
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
- });
|
|
|
- this.map.addLayer(this.queryResultLayer);
|
|
|
});
|
|
|
+ this.getPublicHouses(buildings);
|
|
|
+ this.queryVectorSource = new SourceVector({
|
|
|
+ features: (new GeoJSON()).readFeatures(features),
|
|
|
+ wrapX: false
|
|
|
+ });
|
|
|
+ this.queryResultLayer = new LayerVector({
|
|
|
+ source: this.queryVectorSource,
|
|
|
+ style: new Style({
|
|
|
+ //填充色
|
|
|
+ fill: new Fill({
|
|
|
+ color: 'rgba(255, 255, 255, 0.2)'
|
|
|
+ }),
|
|
|
+ //边线颜色
|
|
|
+ stroke: new Stroke({
|
|
|
+ color: '#1E90FF',
|
|
|
+ width: 5
|
|
|
+ }),
|
|
|
+ //形状
|
|
|
+ image: new Circle({
|
|
|
+ radius: 7,
|
|
|
+ fill: new Fill({
|
|
|
+ color: '#ffcc33'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ });
|
|
|
+ this.map.addLayer(this.queryResultLayer);
|
|
|
+ });
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 根据楼栋编号查询
|
|
|
* @buildings 楼栋数据列表 [{buildingNo:"H1",buildingNum:"1"}]
|
|
|
*/
|
|
|
- getPublicHouses(buildings){
|
|
|
+ getPublicHouses(buildings) {
|
|
|
let param = {
|
|
|
- houseParams:buildings,
|
|
|
- current:1,
|
|
|
- size:9999
|
|
|
+ houseParams: buildings,
|
|
|
+ current: 1,
|
|
|
+ size: 9999
|
|
|
};
|
|
|
- getPublicHouseByBuildings(param).then( res=>{
|
|
|
- if(res.code == 1){
|
|
|
+ getPublicHouseByBuildings(param).then(res => {
|
|
|
+ if (res.code == 1) {
|
|
|
let result = res.result;
|
|
|
this.totalCount = result.total;
|
|
|
- result.records.forEach( item => {
|
|
|
- if(item.hasOwnProperty('houseStatus')){
|
|
|
+ result.records.forEach(item => {
|
|
|
+ if (item.hasOwnProperty('houseStatus')) {
|
|
|
//1、已出租、2、已出售、3、待售、4、不可售)
|
|
|
- item['houseStatus'] = item['houseStatus'] == 1 ? '已出租' :
|
|
|
- item['houseStatus'] == 2 ? '已出售' :
|
|
|
- item['houseStatus'] == 3 ? '待售' :
|
|
|
- item['houseStatus'] == 4 ? '不可售' : '不可售';
|
|
|
+ item['houseStatus'] = item['houseStatus'] == 1 ? '已出租' :
|
|
|
+ item['houseStatus'] == 2 ? '已出售' :
|
|
|
+ item['houseStatus'] == 3 ? '待售' :
|
|
|
+ item['houseStatus'] == 4 ? '不可售' : '不可售';
|
|
|
}
|
|
|
|
|
|
- if(item.hasOwnProperty('isDemolition')){
|
|
|
+ if (item.hasOwnProperty('isDemolition')) {
|
|
|
//1、已出租、2、已出售、3、待售、4、不可售)
|
|
|
- item['isDemolition'] = item['isDemolition'] == 1 ? '是' :
|
|
|
- item['isDemolition'] == 2 ? '否' : '否';
|
|
|
+ item['isDemolition'] = item['isDemolition'] == 1 ? '是' :
|
|
|
+ item['isDemolition'] == 2 ? '否' : '否';
|
|
|
}
|
|
|
});
|
|
|
this.tableData = result.records;
|
|
|
this.queryHouseByBuildNo(); //查询已拆迁的房屋
|
|
|
}
|
|
|
- else{
|
|
|
+ else {
|
|
|
this.$message.error("查询失败!");
|
|
|
}
|
|
|
- }).catch(msg =>{
|
|
|
- this.$message.error("查询出错!错误原因:"+msg);
|
|
|
+ }).catch(msg => {
|
|
|
+ this.$message.error("查询出错!错误原因:" + msg);
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
@@ -600,7 +586,7 @@ export default {
|
|
|
*/
|
|
|
queryBuilding(buildingNo, buildingNum) {
|
|
|
//指定SQL查询处理
|
|
|
- if(this.server == null){
|
|
|
+ if (this.server == null) {
|
|
|
this.$message.warning("请联系管理员配置查询服务(结点webEditServer)");
|
|
|
return;
|
|
|
}
|
|
@@ -622,7 +608,7 @@ export default {
|
|
|
new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
|
|
|
//获取返回的features数据
|
|
|
let features = serviceResult.result.features
|
|
|
- if(this.queryVectorSource){
|
|
|
+ if (this.queryVectorSource) {
|
|
|
this.queryVectorSource.clear();
|
|
|
}
|
|
|
this.queryVectorSource = new SourceVector({
|
|
@@ -654,18 +640,18 @@ export default {
|
|
|
/**
|
|
|
* 移除清理
|
|
|
*/
|
|
|
- removeInteraction(){
|
|
|
+ removeInteraction() {
|
|
|
this.drawFeature = null;
|
|
|
if (this.drawTool) {
|
|
|
this.map.removeInteraction(this.drawTool);
|
|
|
}
|
|
|
- if(this.vectorSource){
|
|
|
+ if (this.vectorSource) {
|
|
|
this.vectorSource.clear();
|
|
|
}
|
|
|
- if(this.queryVectorSource){
|
|
|
+ if (this.queryVectorSource) {
|
|
|
this.queryVectorSource.clear();
|
|
|
}
|
|
|
- if(this.demoVectorSource){
|
|
|
+ if (this.demoVectorSource) {
|
|
|
this.demoVectorSource.clear();
|
|
|
}
|
|
|
},
|
|
@@ -686,16 +672,16 @@ export default {
|
|
|
pageLoaded(e) {
|
|
|
this.curPageNum = e
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 抛出错误的回调函数。
|
|
|
pdfError(error) {
|
|
|
console.error(error)
|
|
|
},
|
|
|
|
|
|
- _cancle(){
|
|
|
+ _cancle() {
|
|
|
this.lookVisible = false;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
handleSizeChange(val) {
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
},
|
|
@@ -703,8 +689,8 @@ export default {
|
|
|
* @description 改变当前页
|
|
|
*/
|
|
|
handleCurrentChange(val) {
|
|
|
- if(val && val.hasOwnProperty('buildingNo') && val.hasOwnProperty('buildingNum'))
|
|
|
- this.queryBuilding(val.buildingNo,val.buildingNum);
|
|
|
+ if (val && val.hasOwnProperty('buildingNo') && val.hasOwnProperty('buildingNum'))
|
|
|
+ this.queryBuilding(val.buildingNo, val.buildingNum);
|
|
|
console.log(`当前页: ${val}`);
|
|
|
},
|
|
|
/**
|
|
@@ -726,131 +712,62 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-
|
|
|
<style lang="scss" scoped>
|
|
|
-.demolitionContainer {
|
|
|
+.contant-box {
|
|
|
width: 100%;
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
- .queryContainer {
|
|
|
- box-sizing: border-box;
|
|
|
+ height: 100%;
|
|
|
+ position: relative;
|
|
|
+ .query-header {
|
|
|
width: 100%;
|
|
|
height: 40px;
|
|
|
- line-height: 40px;
|
|
|
- padding: 0 10px;
|
|
|
- margin: 8px 0;
|
|
|
- .el-form {
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
- >>> .el-form--inline .el-form-item__content {
|
|
|
- // display: inline-block;
|
|
|
- vertical-align: middle !important;
|
|
|
- }
|
|
|
- .op-button {
|
|
|
- float: right;
|
|
|
- height: 100%;
|
|
|
- .el-button {
|
|
|
- display: inline-block;
|
|
|
- width: 52px;
|
|
|
- height: 30px;
|
|
|
- padding: 0;
|
|
|
- margin-left: 10px;
|
|
|
- padding-right: 4px;
|
|
|
- }
|
|
|
- .el-button--primary:focus {
|
|
|
- color: #ffffff;
|
|
|
- background-color: #2d74e7;
|
|
|
- border-color: #2d74e7;
|
|
|
- }
|
|
|
- .el-form-item {
|
|
|
- display: inline-block;
|
|
|
- width: 260px;
|
|
|
- margin-left: 10px;
|
|
|
- margin-bottom: 0 !important;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .drawingDialog{
|
|
|
- /deep/.el-dialog{
|
|
|
- margin: 30px auto;
|
|
|
- width: 1200px;
|
|
|
- height: 800px;
|
|
|
- }
|
|
|
-
|
|
|
- /deep/.tools{
|
|
|
- .btnFloat{
|
|
|
- float: right;
|
|
|
- }
|
|
|
+ // background-color: #ccc;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 4px 5px;
|
|
|
+ >>> .el-input__inner {
|
|
|
+ width: 200px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .my-table {
|
|
|
- box-sizing: border-box;
|
|
|
- border: 1px solid #ccc !important;
|
|
|
- margin: 0px 6px;
|
|
|
+ .table-box {
|
|
|
+ width: 100%;
|
|
|
+ top: 45px;
|
|
|
position: absolute;
|
|
|
- width: calc(100% - 10px);
|
|
|
- height: calc(100% - 66px);
|
|
|
- max-height: calc(100% - 66px);
|
|
|
- overflow-y: hidden;
|
|
|
- >>> .el-table{
|
|
|
- height: calc(100% - 43px);
|
|
|
- .el-table__body-wrapper{
|
|
|
- height: calc(100% - 50px);
|
|
|
- }
|
|
|
- }
|
|
|
- >>> .el-table__header tr,
|
|
|
- >>> .el-table__header th {
|
|
|
- padding: 0;
|
|
|
- height: 50px;
|
|
|
- }
|
|
|
- >>> .el-table__body tr,
|
|
|
- >>> .el-table__body td {
|
|
|
- padding: 0;
|
|
|
- height: 30px;
|
|
|
- color: #333333;
|
|
|
- }
|
|
|
- >>> .el-table__body tr {
|
|
|
- cursor: pointer;
|
|
|
- &:nth-child(2n) {
|
|
|
- background-color: #f7f7f7 !important;
|
|
|
- }
|
|
|
- }
|
|
|
- >>> .el-table th.is-leaf,
|
|
|
- >>> .el-table td {
|
|
|
- border: none;
|
|
|
- }
|
|
|
+ bottom: 42px;
|
|
|
+ background-color: #f40;
|
|
|
}
|
|
|
- .el-dialog__wrapper {
|
|
|
- >>> .el-form-item__content {
|
|
|
- // width: 400px;
|
|
|
- margin-bottom: 10px;
|
|
|
+ >>> .el-table td,
|
|
|
+ >>> .el-table th {
|
|
|
+ padding: 6px 0 !important;
|
|
|
+ }
|
|
|
+ >>> .el-table {
|
|
|
+ .el-button {
|
|
|
+ padding: 0 !important;
|
|
|
}
|
|
|
}
|
|
|
- .pagination {
|
|
|
+ >>> .file-table {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .table-pagination {
|
|
|
width: 100%;
|
|
|
- text-align: right;
|
|
|
- border-top: 1px solid #ccc;
|
|
|
- z-index: 99;
|
|
|
- padding: 5px 0;
|
|
|
+ height: 32px;
|
|
|
position: absolute;
|
|
|
- bottom: 0;
|
|
|
+ bottom: 5px;
|
|
|
+ // background-color: #9edd9c;
|
|
|
}
|
|
|
-
|
|
|
- .dialogViewInfo{
|
|
|
- .form-chart{
|
|
|
- /deep/canvas{
|
|
|
- height: 190px!important;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- /deep/ .el-upload-list{
|
|
|
- position:absolute;
|
|
|
- bottom: 0px;
|
|
|
- width: 70%;
|
|
|
+ .el-dialog__wrapper {
|
|
|
+ >>> .el-dialog__body {
|
|
|
+ max-height: 700px !important;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ >>> .el-form-item__content {
|
|
|
+ // width: 100% !important;
|
|
|
+ min-width: 200px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+ .upload-form {
|
|
|
+ >>> .el-form-item__content {
|
|
|
+ margin-bottom: 10px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|