username 3 년 전
부모
커밋
f4cbeb0b15

+ 2 - 2
src/views/currentSystem/authorityManagement/serviceConfig/index.vue

@@ -222,8 +222,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="12" v-if="form2.systemName!='5'&&form2.systemName=='2'">
-            <el-form-item label="管点数据集名称:">
-              <el-input v-model="form2.pipeNodeDatasetsName" size="medium " placeholder="管线对应管点数据集名称"></el-input>
+            <el-form-item label="管点(线)数据集名称:">
+              <el-input v-model="form2.pipeNodeDatasetsName" size="medium " placeholder="管线(点)对应管点(线)数据集名称"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12" v-if="form2.systemName!='5'&&form2.systemName=='2'">

+ 284 - 367
src/views/kxcSystem/PublicHouseManage/demolitionMng/widget.vue

@@ -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>

+ 81 - 283
src/views/kxcSystem/PublicHouseManage/fileManagement/widget.vue

@@ -1,73 +1,50 @@
 <template>
-  <div class="drawFilesContainer">
-    <!-- 图纸档案管理 -->
-    <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="form" 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-select v-model="form.region" placeholder="阳华河" size="medium">
-            <el-option label="光华公园" value="shanghai"></el-option>
-            <el-option label="西河" value="beijing"></el-option>
-          </el-select> -->
-          <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.houseNo"></el-input>
-        </el-form-item>  
-         <!-- <el-button type="primary" @click="addData">新增</el-button> -->
-        <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-input v-model="form.houseNo" placeholder="房号" size="small" clearable></el-input>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button type="primary" size="small" @click="queryHouseInfo" style="width: 100px;">查询</el-button>
+          <el-button type="primary" size="small" @click="queryHouseByDraw" style="width: 100px;">绘图查询</el-button>
+        </el-form-item>
       </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" highlight-current-row @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="120">
           <template slot-scope='scope'>
             <el-button type="text" size="mini" @click="viewData(scope)">查看</el-button>
             <el-button type="text" size="mini" @click="_upload(scope)" style="color:#E6A23C;">上传</el-button>
-            <!-- <el-button type="text" size="mini" @click="chartEditor(scope)" style="color:#E6A23C;">图纸上传下载</el-button> -->
-            <!-- <el-button type="text" size="mini" @click="_delete(scope)" style="color:red;">删除</el-button> -->
-
           </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-change="handleCurrentChange"
-          :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">
       <ViewComponent :houseData="vData" :showVisible="lookVisible"></ViewComponent>
     </el-dialog>
@@ -76,33 +53,22 @@
       <UploadComponent :houseData="vData" :closePanal="closeUpload"></UploadComponent>
     </el-dialog>
 
-
-    <el-dialog 
-     class="drawingDialog"
-     title="房屋设计图纸" 
-     width="90%" 
-     :visible.sync="viewDesignVisible"
-     :fullscreen="true"
-     :before-close="handleClose"
-     @close="closeViewDesignChart">
+    <el-dialog class="drawingDialog" title="房屋设计图纸" width="90%" :visible.sync="viewDesignVisible" :fullscreen="true"
+               :before-close="handleClose" @close="closeViewDesignChart">
       <div class="tools">
-          <el-button @click="prePage" class="mr10"> 上一页</el-button>
-          <span class="page">{{pageNum}}/{{pageTotalNum}} </span>
-          <el-button @click="nextPage" class="mr10"> 下一页</el-button>
-          
-          <el-button @click="handleClose" class="mr10 btn-cancel btnFloat"> 取消</el-button>
-          <el-button @click="downPDF" class="mr10 dowmBtn btnFloat"> 下载</el-button>
-        </div>
-        <pdf ref="pdf" 
-          :src="roomDesignSrc" 
-          :page="pageNum"
-          @page-loaded="pageLoaded($event)"
-          @num-pages="pageTotalNum=$event"
-          @error="pdfError($event)"
-          @link-clicked="page = $event">
-        </pdf>
+        <el-button @click="prePage" class="mr10"> 上一页</el-button>
+        <span class="page">{{pageNum}}/{{pageTotalNum}} </span>
+        <el-button @click="nextPage" class="mr10"> 下一页</el-button>
+
+        <el-button @click="handleClose" class="mr10 btn-cancel btnFloat"> 取消</el-button>
+        <el-button @click="downPDF" class="mr10 dowmBtn btnFloat"> 下载</el-button>
+      </div>
+      <pdf ref="pdf" :src="roomDesignSrc" :page="pageNum" @page-loaded="pageLoaded($event)" @num-pages="pageTotalNum=$event"
+           @error="pdfError($event)" @link-clicked="page = $event">
+      </pdf>
     </el-dialog>
   </div>
+
 </template>
 
 <script>
@@ -110,230 +76,62 @@ import template from "./template.js";
 export default template;
 </script>
 
-
 <style lang="scss" scoped>
-.drawFilesContainer {
+.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);
-        overflow-y: auto !important;
-      }
-    }
-    >>> .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{
-      .fileContainer{
-        height:300px;
-        border:1px solid #DCDFE6; 
-        border-radius:4px;
-        .fileList{
-          width: 100%;
-          height: calc(100% - 76px);
-          overflow: overlay;
-          .fileItem{
-            height: 38px;
-            margin: 6px 4px;
-            .fileName{
-              width: calc(100% - 80px);
-              overflow:hidden;
-              text-overflow:ellipsis;
-              white-space:nowrap;
-              float: left;
-            }
-            .optBtn{
-              width: 36px;
-              height: 28px;
-              margin: 5px 2px;
-              line-height: 28px;
-              float: left;
-              text-align: center;
-              border-radius: 4px;
-              color: #fff;
-              cursor: pointer;
-            }
-          }
-        }
-
-        .levelContent{
-          height: 38px;
-          width: 100%;
-          background: #d9d9d9;
-          /deep/.el-form-item{
-            .el-form-item__label{
-              width: 80px !important;
-              height: 38px;
-              line-height: 38px!important;
-              padding: 0px!important;
-            }
-            .el-form-item__content{
-              margin-left: 80px !important;
-              height: 38px !important;
-              line-height: 38px !important;
-              margin-bottom: 0px !important;
-              .el-input__inner{
-                height: 38px !important;
-              }
-            }
-          }
-        }
-        .btnUpload{
-          height: 38px;
-          width: 100%;
-          background: #2d2df3;
-          color: #fff;
-          text-align: center;
-          cursor: pointer;
-          .avatar-uploader{
-            .el-upload {
-              border: 1px dashed #d9d9d9;
-              border-radius: 6px;
-              cursor: pointer;
-              position: relative;
-              overflow: hidden;
-            }
-            .el-upload:hover {
-              border-color: #409EFF;
-            }
-          }
-          .avatar-uploader-icon {
-            font-size: 28px;
-            color: #fff;
-            width: 178px;
-            height: 38px;
-            line-height: 38px;
-            text-align: center;
-          }
-          .avatar {
-            width: 178px;
-            height: 38px;
-            display: block;
-          }
-        }
-        .btnUpload:hover{
-          background: #6666f7;
-        }
-      }
-      /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-dialog{
-      .el-dialog__body{
-        padding: 10px !important;
+    >>> .el-form-item__content {
+      // width: 100% !important;
+      min-width: 200px;
+      margin-bottom: 15px;
+    }
+    .upload-form {
+      >>> .el-form-item__content {
+        margin-bottom: 10px;
       }
     }
-
   }
 }
 </style>

+ 28 - 16
src/views/kxcSystem/PublicHouseManage/groundQuery/widget.vue

@@ -2,7 +2,6 @@
   <!-- 宗地信息属性查询 -->
   <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="queryForm.GROUNDNUMBER" placeholder="宗地编号" size="small" clearable></el-input>
@@ -16,6 +15,7 @@
         <el-form-item>
           <el-button type="primary" size="small" :loading="queryStatus" :disabled="queryStatus" @click="query()" style="width:100px">查 询
           </el-button>
+          <el-button type="danger" size="small" style="width:100px" @click="clear">重 置</el-button>
           <download-excel style="display:inline-block;margin-left:10px" :data="allFeatures" :fields="fields" type="xls" name="宗地信息">
             <el-button type="primary" size="small" style="width:100px">导 出</el-button>
           </download-excel>
@@ -49,11 +49,11 @@
     </div>
 
     <el-dialog width="1000px" title="宗地详情" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
-      <el-form label-width="135px" label-position="right" class="demo-form-inline">
+      <el-form label-width="135px" label-position="right" class="demo-form-inline" top="10">
         <el-row>
           <el-col :span="8">
             <el-form-item label="宗地代码:">
-              <el-input v-model="formData.GROUNDNUMBER" :readonly="true" ></el-input>
+              <el-input v-model="formData.GROUNDNUMBER" :readonly="true"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -102,7 +102,6 @@
             </el-form-item>
           </el-col>
 
-
           <el-col :span="8">
             <el-form-item label="权利性质:">
               <el-input v-model="formData.RIGHTNATURE" :readonly="true"></el-input>
@@ -113,7 +112,7 @@
               <el-input v-model="formData.RIGHTTYPE" :readonly="true"></el-input>
             </el-form-item>
           </el-col>
-         
+
           <el-col :span="8">
             <el-form-item label="批准用途:">
               <el-input v-model="formData.APPROVED_USE" :readonly="true"></el-input>
@@ -186,11 +185,11 @@
 
           <el-col :span="10">
             <el-form-item label="批准面积(m2):">
-              <el-input v-model="formData.APPROVED_AREA" :readonly="true" ></el-input>
+              <el-input v-model="formData.APPROVED_AREA" :readonly="true"></el-input>
             </el-form-item>
           </el-col>
 
-           <el-col :span="14">
+          <el-col :span="14">
             <el-form-item label="占地总面积(m2):">
               <el-input v-model="formData.BUILDING_AREA" :readonly="true"></el-input>
             </el-form-item>
@@ -210,10 +209,10 @@
 
           <el-col :span="24">
             <el-form-item label="说明:">
-              <el-input type="textarea"  v-model="formData.LAND_REMARK" :readonly="true"></el-input>
+              <el-input type="textarea" v-model="formData.LAND_REMARK" :readonly="true"></el-input>
             </el-form-item>
           </el-col>
-          
+
         </el-row>
 
       </el-form>
@@ -270,14 +269,12 @@
     <el-dialog title="上传证明材料" :visible.sync="dialogFormVisible3" width="360px" top="260px" @closed="upLoadClose"
                :close-on-click-modal="false">
       <el-form :model="upLoadForm" ref="upLoadForm" class="upload-form" label-width="80px">
-        <el-form-item label="文件级别" prop="fileLevel" :rules="[{ required: true, message: '', trigger: [] }]"
-                      style="margin-bottom:15px">
+        <el-form-item label="文件级别" prop="fileLevel" :rules="[{ required: true, message: '', trigger: [] }]" style="margin-bottom:15px">
           <el-select v-model="upLoadForm.fileLevel" placeholder="选择文件级别" size="small">
             <el-option v-for="item in fileLevel" :key="item.code" :label="item.value" :value="item.code"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="选择文件" prop="fileName" :rules="[{ required: true, message: '', trigger: [] }]"
-                      style="margin-bottom:15px">
+        <el-form-item label="选择文件" prop="fileName" :rules="[{ required: true, message: '', trigger: [] }]" style="margin-bottom:15px">
           <el-input v-model="upLoadForm.fileName" placeholder="文件路径" size="small" :readonly="true">
             <el-upload slot="append" action="#" ref="fileUpload" :auto-upload="false" :show-file-list="false" accept=".doc, .pdf"
                        :file-list="fileList" :on-change="handleUploadChange" :http-request="httpRequest" :before-upload="beforeUpload">
@@ -381,7 +378,7 @@ export default {
 
       //指定SQL查询处理
       var url = mapConfig.iServerUrl.publicHouseDataServer.url
-      // 查询的宗地数据集
+      // 查询的宗地数据集列表
       let datasetNames = mapConfig.iServerUrl.publicHouseDataServer.groundDataSets.map(item => {
         return mapConfig.iServerUrl.publicHouseDataServer.dataSource + ':' + item.name
       })
@@ -394,6 +391,11 @@ export default {
       });
       //向服务器发送请求,并对返回的结果进行处理
       new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
+        if (serviceResult.type == "processFailed") {
+        this.$message.error('获取结果失败!')
+        this.queryStatus = false
+        return
+      }
         //获取返回的features数据
         let features = serviceResult.result.features.features
 
@@ -406,7 +408,9 @@ export default {
           // 表格加载
           this.calcPageData()
         } else {
-          this.$message.error('未查询到结果!');
+          this.allFeatures=[]
+          this.pagination = { current: 1, size: 20, total: this.allFeatures.length }
+           this.calcPageData()
         }
         this.queryStatus = false // 查询完成状态
       })
@@ -502,11 +506,19 @@ export default {
      * 下载地籍表
      */
     downLoadQuestionnaire(scope) {
-      console.log('输出:', scope)
+      // console.log('输出:', scope)
       let value = JSON.parse(JSON.stringify(scope.row))
       value['geometry'] = undefined;
       exportQuestionnaire(value, scope.row.GROUNDNUMBER)
     },
+    /**
+     * 重置查询
+     */
+    clear() {
+      this.clearVectLayer()
+      this.queryForm = this.$options.data().queryForm
+      this.query()
+    },
     /**
      * 证明材料管理
      */

+ 149 - 70
src/views/kxcSystem/PublicHouseManage/houseQuery/widget.vue

@@ -1,70 +1,65 @@
 <template>
-  <!-- 宗地信息属性查询 -->
+  <!-- 公房信息查询 -->
   <div class="contant-box">
     <div class="query-header">
-      <div class="radio-contant" >
+      <div class="radio-contant">
         <el-radio v-model="queryType" label="1">属性查询</el-radio>
         <el-radio v-model="queryType" label="2">几何查询</el-radio>
         <el-radio v-model="queryType" label="3">缓冲区</el-radio>
       </div>
       <!-- 属性查询表单 -->
-      <el-form :inline="true" :model="queryForm" label-width="4.3rem" v-if="queryType=='1'" style="width:calc(100% - 16rem);float:left;">
-        <el-col :span="4">
-          <el-form-item label="地区">
-            <el-input v-model="queryForm.bulidingArea" placeholder="所在地区" size="small" clearable></el-input>
+      <el-form :inline="true" :model="queryForm" v-if="queryType=='1'" style="margin-left:20px">
+        <el-col :span="6">
+          <el-form-item label="房屋编号">
+            <el-input v-model="queryForm.houseSid" placeholder="房屋编号" size="small" clearable></el-input>
           </el-form-item>
         </el-col>
-        <!-- <el-col :span="4">
-          <el-form-item label="小区">
-            <el-input v-model="queryForm.bulidingName" placeholder="小区名称" size="small" clearable></el-input>
-          </el-form-item>
-        </el-col> -->
-        <el-col :span="4">
-          <el-form-item label="年份">
-            <el-date-picker v-model="queryForm.bulidingDate" type="year" placeholder="楼盘年份" size="small" clearable style="width:140px">
-            </el-date-picker>
+        <el-col :span="6">
+          <el-form-item label="楼栋编号">
+            <el-input v-model="queryForm.buildingNo" placeholder="楼栋编号" size="small" clearable></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
-          <el-form-item label="产权人">
-            <el-input v-model="queryForm.ownerName" placeholder="产权人名称" size="small" clearable></el-input>
+        <el-col :span="6">
+          <el-form-item label="宗地编号">
+            <el-input v-model="queryForm.groundNo" placeholder="宗地编号" size="small" clearable></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
+        <!-- <el-col :span="4">
           <el-form-item label="租售状态">
-            <el-select v-model.number="queryForm.houseStatus" placeholder="选择租售状态" size="small" clearable style="width:120px">
+            <el-select v-model.number="queryForm.houseStatus" placeholder="选择租售状态" size="small" clearable>
               <el-option label="已出租" :value='1'></el-option>
               <el-option label="已出售" :value='2'></el-option>
               <el-option label="待售" :value='3'></el-option>
               <el-option label="不可售" :value='4'></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="4">
           <el-form-item class="btn-container">
-            <el-button type="primary" size="small" :loading="queryStatus" :disabled="queryStatus" @click="query" style="margin-left: 2rem;">查 询</el-button>
-            <el-button type="danger" size="small" @click="clearGeometryQuery()" style="margin-left: 0.2rem;">清 除</el-button>
+            <el-button type="primary" size="small" :loading="queryStatus" :disabled="queryStatus" @click="query" style="width:100px">查 询
+            </el-button>
+            <el-button type="danger" size="small" @click="clearGeometryQuery()" style="width:100px">清 除</el-button>
           </el-form-item>
         </el-col>
       </el-form>
       <!-- 空间查询 -->
       <div class="spatialQuery" v-if="queryType=='2'">
-        <el-button type="primary" size="small" style="width:4rem" @click="geometryQuery(1)">圆查询</el-button>
-        <el-button type="primary" size="small" style="width:4rem;padding: 10px 0;" @click="geometryQuery(2)">多边形查询</el-button>
-        <el-button type="danger" size="small" style="width:4rem" @click="clearGeometryQuery()">清 除</el-button>
+        <el-button type="primary" size="small" style="width:100px" @click="geometryQuery(1)">圆查询</el-button>
+        <el-button type="primary" size="small" style="width:100px;padding: 10px 0;" @click="geometryQuery(2)">多边形查询</el-button>
+        <el-button type="danger" size="small" style="width:100px" @click="clearGeometryQuery()">清 除</el-button>
       </div>
       <!-- 空间查询 -->
       <div class="spatialQuery" v-if="queryType=='3'">
-        <el-button type="primary" size="small" style="width:4rem" @click="geometryQuery(3)">点缓冲</el-button>
-        <el-button type="primary" size="small" style="width:4rem" @click="geometryQuery(4)">线缓冲</el-button>
-        <el-button type="primary" size="small" style="width:4rem" @click="geometryQuery(5)">面缓冲</el-button>
+        <el-button type="primary" size="small" style="width:100px" @click="geometryQuery(3)">点缓冲</el-button>
+        <el-button type="primary" size="small" style="width:100px" @click="geometryQuery(4)">线缓冲</el-button>
+        <el-button type="primary" size="small" style="width:100px" @click="geometryQuery(5)">面缓冲</el-button>
         <el-form :inline="true" label-width="7rem">
           <el-form-item label="缓冲距离(米)" style="display:inline-block" class="buffer-input">
             <el-input v-model.number="bufferDistence" placeholder="输入缓冲距离" size="small" clearable></el-input>
           </el-form-item>
         </el-form>
-        <el-button type="primary" size="small" style="width:4rem;padding: 10px 0;" @click="bufferQuery()">开始分析</el-button>
-        <el-button type="danger" size="small" style="width:4rem" @click="clearGeometryQuery()">清 除</el-button>
+        <el-button type="primary" size="small" style="width:100px;padding: 10px 0;" @click="bufferQuery()">开始分析</el-button>
+        <el-button type="danger" size="small" style="width:100px" @click="clearGeometryQuery()">清 除</el-button>
       </div>
     </div>
 
@@ -221,7 +216,7 @@ export default {
     return {
       queryType: '1',
       queryForm: {
-        houseStatus:'',
+        houseStatus: '',
       },
       queryByGeo: { houseParams: [] }, // 几何查询时的请求参数
       bufferDistence: 200, //缓冲距离
@@ -236,7 +231,8 @@ export default {
       dialogFormVisible: false,
       formData: {},
       queryDraw: null, // 空间查询的绘制对象
-      drawLayer: null
+      drawLayer: null,
+      allBuilding: [] // 用户能查询的所有楼栋
     }
   },
   mounted() {
@@ -257,7 +253,9 @@ export default {
       type: 'Point',
       source: this.vectorLayer.getSource(),
     })
+    this.queryBuilding('', false) // 获取所有的楼栋信息
     this.query()
+
   },
   watch: {
     '$store.state.map.halfP_editableTabsValue': function (val, oldVal) {
@@ -286,10 +284,12 @@ export default {
      * 查询
      */
     query() {
+      // this.filtersQuerParam()
       if (this.queryType == '1') {
-        let parmas = this.queryForm
-        Object.assign(parmas, this.pagination)
-        this.getHouseList(parmas)
+        // let parmas = this.queryForm
+        // Object.assign(parmas, this.pagination)
+        let parmas = this.filtersQuerParam()
+        this.getPublicHouseByBuildings(parmas)
       } else {
         // alert('111')
         let parmas = this.queryByGeo
@@ -356,7 +356,7 @@ export default {
         // 查询具体的房屋
         let features = serviceResult.result.features.features
         this.queryByGeo.houseParams = []
-        if (features.length < 1){
+        if (features.length < 1) {
           this.$message.info('未获取到楼房信息!');
           return;
         }
@@ -368,8 +368,10 @@ export default {
     },
     /**
      * iServer属性查询,根据小区编号和楼栋查询具体楼栋要素
+     * param 查询过滤条件
+     * show 是否在地图上显示
      */
-    queryBuilding(buildingNo, buildingNum) {
+    queryBuilding(param, show) {
       //指定SQL查询处理
       var url = mapConfig.iServerUrl.publicHouseDataServer.url
       // 查询的宗地数据集
@@ -381,19 +383,95 @@ export default {
         toIndex: -1,
         maxFeatures: 10000000,
         datasetNames: datasetNames,
-        queryParameter: { attributeFilter: "COMMUNITYNUMBER = '" + buildingNo + "' AND BUILDINGNUM = " + buildingNum }
+        queryParameter: { attributeFilter: param }
       });
       //向服务器发送请求,并对返回的结果进行处理
       new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
         //获取返回的features数据
         let features = serviceResult.result.features
-        this.vectorLayer.getSource().clear()
-        this.vectorLayer.getSource().addFeatures(new GeoJSON().readFeatures(features))
-        setTimeout(() => {
-          this.data.that.map.getView().fit(this.vectorLayer.getSource().getExtent(), { duration: 600 })
-        }, 200);
+        if (show) {
+          this.vectorLayer.getSource().clear()
+          this.vectorLayer.getSource().addFeatures(new GeoJSON().readFeatures(features))
+          setTimeout(() => {
+            this.data.that.map.getView().fit(this.vectorLayer.getSource().getExtent(), { duration: 600 })
+          }, 200);
+        } else {
+          // 查询所有的楼栋信息
+          this.allBuilding = JSON.parse(JSON.stringify(features.features))
+          console.log("房屋信息:--》", this.allBuilding)
+        }
       })
     },
+    /**
+     * 过滤查询条件
+     * 输入宗地编号和房屋编号首先在已有权限的结果中过滤再请求查询列表数据
+     */
+    filtersQuerParam() {
+      let groundNo = this.queryForm.groundNo ? this.queryForm.groundNo : null
+      let houseSid = this.queryForm.houseSid ? this.queryForm.houseSid : null
+      let buildingNo = this.queryForm.buildingNo ? this.queryForm.buildingNo : null
+      console.log('9999000', groundNo, houseSid, buildingNo)
+
+      let paramSids = [] // 参数ids
+
+      // 1.只输入了宗地
+      if (groundNo && !houseSid && !buildingNo) {
+        this.allBuilding.forEach(item => {
+          if (groundNo && item.properties.GROUNDNUMBER.search(groundNo) > -1)
+            paramSids.push({ buildingNo: item.properties.SID })
+        });
+      }
+
+      // 2.只输入了楼栋
+      if (buildingNo && !houseSid && !groundNo) {
+        this.allBuilding.forEach(item => {
+          if (buildingNo && item.properties.SID.search(buildingNo) > -1)
+            paramSids.push({ buildingNo: item.properties.SID })
+        });
+      }
+
+      // 3.只输入了房屋id
+      if (houseSid && !buildingNo && !groundNo) {
+        this.allBuilding.forEach(item => {
+          paramSids.push({ buildingNo: item.properties.SID })
+        });
+      }
+
+      // 4.输入了宗地和楼栋
+      if (!houseSid && buildingNo && groundNo) {
+        this.allBuilding.forEach(item => {
+          // 匹配宗地号
+          if (item.properties.GROUNDNUMBER.search(groundNo) > -1)
+            paramSids.push({ buildingNo: item.properties.SID })
+          // 匹配楼栋号
+          if (item.properties.SID.search(buildingNo) > -1)
+            paramSids.push({ buildingNo: item.properties.SID })
+        });
+      }
+
+      // 5.输入了宗地和房子id
+      if (houseSid && !buildingNo && groundNo) {
+        if (item.properties.GROUNDNUMBER.search(groundNo) > -1)
+          paramSids.push({ buildingNo: item.properties.SID })
+      }
+
+      // 输入了楼栋和房子id
+      if (houseSid && buildingNo && !groundNo) {
+        if (item.properties.SID.search(buildingNo) > -1)
+          paramSids.push({ buildingNo: item.properties.SID })
+      }
+
+      // 无条件
+      if (!houseSid && !buildingNo && !groundNo) {
+        this.allBuilding.forEach(item => {
+          paramSids.push({ buildingNo: item.properties.SID })
+        });
+      }
+
+      let params = { houseParams: paramSids, houseNo: houseSid?houseSid.toString():"" }
+      console.log("过滤的查询参数:",params)
+      return params
+    },
     /**
      * 缓冲区分析
      */
@@ -456,7 +534,8 @@ export default {
      */
     rowClick(row) {
       this.vectorLayer.getSource().clear()
-      this.queryBuilding(row.buildingNo, row.buildingNum)
+      let param = "COMMUNITYNUMBER = '" + row.buildingNo + "' AND BUILDINGNUM = " + row.buildingNum
+      this.queryBuilding(param, true)
     },
     /**
      * 查看详情
@@ -481,47 +560,47 @@ export default {
     // background-color: #ccc;
     box-sizing: border-box;
     padding: 4px 5px;
-    .radio-contant{
+    .radio-contant {
       height: 2.6rem;
       width: 16rem;
       line-height: 2.6rem;
       float: left;
-      >>>label{
-        width: 3.6rem!important;
+      >>> label {
+        width: 3.6rem !important;
       }
     }
-    >>>.el-form{
-       display: inline-block;
-       .el-form-item{
-          .el-form-item__content{
-            width: calc(100% - 4.3rem);
-            .el-input{
-              input{
-                width: 100%!important;
-                padding: 0 1.3rem !important;
-              }
-            }
-            .el-date-editor{
-              width: 100%!important;
+    >>> .el-form {
+      display: inline-block;
+      .el-form-item {
+        .el-form-item__content {
+          width: calc(100% - 4.3rem);
+          .el-input {
+            input {
+              width: 100% !important;
+              padding: 0 1.3rem !important;
             }
           }
-       }
+          .el-date-editor {
+            width: 100% !important;
+          }
+        }
+      }
     }
-    .btn-container{
-      >>>.el-form-item__content{
-        width: 100%!important;
-        button{
+    .btn-container {
+      >>> .el-form-item__content {
+        width: 100% !important;
+        button {
           width: 3rem;
           padding: 0.6rem 0;
         }
       }
     }
-    
+
     .spatialQuery {
       display: inline-block;
-      .buffer-input{
-        >>>.el-form-item__content{
-          width: calc(100% - 7rem)!important;
+      .buffer-input {
+        >>> .el-form-item__content {
+          width: calc(100% - 7rem) !important;
         }
       }
     }