index.vue 20.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619
<template>
  <div class="content-layout">
    <div class="title">电控集团宗地出租情况查询</div>
    <el-form style="padding: 0 10px;" :model="queryForm" inline label-width="115px" v-form>
          <el-form-item label="宗地编号:">
            <el-select v-model="queryForm.id_" multiple collapse-tags placeholder="请选择" >
              <el-option
                v-for="item in zdbhOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <ht-form-item label="所属企业">
            <ht-org-selector-input
              v-model="orgname"
              display-style="block"
              :config="{ id: 'queryForm.f_qyid' }"
              append-to-body
            ></ht-org-selector-input>
          </ht-form-item>
          <el-form-item label="土地证办理情况:">
            <el-select v-model="queryForm.f_tdzjblqk" multiple collapse-tags placeholder="请选择" >
              <el-option
                v-for="item in tdzblOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="区域范围:">
            <el-select v-model="queryForm.f_tdqyfw" multiple collapse-tags placeholder="请选择" >
              <el-option
                v-for="item in qyfwOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="所属划区:">
            <el-select v-model="queryForm.f_ssqh" multiple collapse-tags placeholder="请选择">
              <el-option
                v-for="item in ssqhOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="土地开发类型:" >
            <el-select v-model="queryForm.f_tdkflx" multiple collapse-tags placeholder="请选择">
              <el-option
                v-for="item in tdkflxOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="现状使用情况:" >
            <el-select v-model="queryForm.f_xzsyqk" multiple collapse-tags placeholder="请选择">
              <el-option
                v-for="item in xzsyqkOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="现规划性质:" >
            <el-select v-model="queryForm.f_xghxz" multiple collapse-tags placeholder="请选择">
              <el-option
                v-for="item in xzsyqkOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="土地实际用途:" >
            <el-select v-model="queryForm.f_sjytlx" clearable placeholder="请选择">
              <el-option
                v-for="item in tdsjytOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select v-model="queryForm.f_sjytlx2" style="width: 100px;" clearable placeholder="请选择">
              <el-option
                v-for="item in compareOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
            <el-input placeholder="请输入" v-model.trim="queryForm.f_sjytmj" maxlength="10" style="width: 80px;margin-left: 4px;"></el-input>
            <span style="margin: 0 4px;" :style="{visibility: showtd ? 'visible' : 'hidden'}">至</span>
            <el-input placeholder="请输入" :style="{visibility: showtd ? 'visible' : 'hidden'}" v-model.trim="queryForm.f_sjytmj2" style="width: 80px;" maxlength="10"></el-input>
            <span style="margin-left: 2px;">平方米</span>
          </el-form-item>
          <el-form-item label="土地出让意向:" >
            <el-select v-model="queryForm.f_tdcryx" multiple collapse-tags placeholder="请选择">
              <el-option
                v-for="item in tdcryxOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="容积率:" clearable>
            <el-select v-model="queryForm.f_rjl" placeholder="请选择">
              <el-option
                v-for="item in rjlOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="面积:">
            <div style="width: 100%;height: 100%;display: flex;flex-wrap: wrap;justify-content: center;align-items: center;">
              <el-input style="width: 90px;" placeholder="最小值" v-model="queryForm.f_tdmj"></el-input>
              <span style="margin: 0 10px;" >至</span>
              <el-input style="width: 90px;" placeholder="最大值" v-model="queryForm.f_tdmj2"></el-input>
            </div>
          </el-form-item>
          <el-form-item>
            <el-button icon="el-icon-search" type="primary" @click="handleSearch">查询</el-button>
            <el-button icon="el-icon-refresh-left" @click="handleReset">重置</el-button>
            <el-button icon="el-icon-connection" type="warning" @click="handleCompare">对比</el-button>
          </el-form-item>
    </el-form>
    <div style='width: 100%;min-height: calc(100% - 265px);overflow-y: auto'>
      <div style="width: 100%;height: 280px;display: flex;justify-content: center;align-items: center">
        <HolPieChart chart-id="chartOne" :data="chartDataOne" class="pieBox" :tiplabel="'合同数'" :title="'所属企业'" :unit="'份'" :show-center="true" :center-value="9999"></HolPieChart>
        <HolPieChart chart-id="chartTwo" :data="chartDataTwo" class="pieBox" :tiplabel="'出租率'" :title="'出租率'"></HolPieChart>
        <BarChart chart-id="chartThree" :data="chartDataThree" class="pieBox" :title="'租金&物业费'"></BarChart>
        <HolPieChart chart-id="chartFour" :data="chartDataFour" class="pieBox" :tiplabel="'面积'" :title="'出租面积&空置面积'"></HolPieChart>
      </div>
      <div style="width: 100%;min-height: calc(100% - 280px);height: auto">
        <div style="width: 100%; height: 50px;line-height: 50px;font-size:16px;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;">查询报告</div>
        <div class="search_result_box">
          <div >查询结果涉及企业XX家,包括:牡丹、益泰、科林</div>
          <div >查询结果涉及宗地XX块,土地总面积XXXXXX平米,有证土地面积XXXX平米,房产总面积XXX平米,可出租面积XXXXX平米,已出租面积XXXX平米。</div>
          <div >查询结果涉及X个园区,X栋楼宇,XXXX个房间。目前已经出租XXX个房间,出租率为X%。</div>
          <div >查询结果中平均租金为XX元,最高XX元,最低为XX元。</div>
        </div>
      </div>
    </div>
  </div>

</template>

<script>
import {
  getByParentAndDemToTree, getCompareList,
  getQyfwlList, getRjlList,
  getSsqhlList, getTdbhList,
  getTdcryxList, getTdInfoList,
  getTdkflxList,
  getTdytList,
  getTdzblList,
  getXzsyqkList
} from "@/api/mapView";
import {getUserSelectorDem} from "@/api/uc";
import { tile2nest } from "@/utils/array";
import HolPieChart from "@/views/components/HolPieChart.vue"
import BarChart from "@/views/components/BarChart.vue";

export default {
  components: {
    BarChart,
    HolPieChart
  },
  data() {
    return {
      orgData: [],
      dataList: [],
      totalInfo: {
        total: 0,
        tdzmj: 0,
        yztdmj: 0,
        fczmj: 0,
        kczmj: 0,
        yczmj: 0
      },
      queryForm: {
        id_: [],
        f_qyid: '',
        f_tdzjblqk: [],
        f_tdqyfw: [],
        f_ssqh: [],
        f_tdkflx: [],
        f_xzsyqk: [],
        f_xghxz: [],
        f_sjytlx: '',
        f_sjytlx2: '',
        f_sjytmj: '',
        f_sjytmj2: '',
        f_tdcryx: [],
        f_rjl: '',
        f_tdmj: '',
        f_tdmj2: '',
      },
      options: [],
      zdbhOptions: [],
      tdzblOptions: [],
      qyfwOptions: [],
      ssqhOptions: [],
      tdkflxOptions: [],
      xzsyqkOptions: [],
      tdsjytOptions: [],
      tdcryxOptions: [],
      compareOptions: [],
      rjlOptions: [],
      defaultExpandedKeys:["0"],
      f_qyidsearch: "",
      orgname: '',
      showtd: false,
      chartDataOne: [
        {name: 'dsadsadsa',value: 52},
        {name: 'dsadsasadasdadsa',value: 343},
        {name: 'cxzcx',value: 254},
      ],
      chartDataTwo: [
        {name: 'dsadsadsa',value: 52},
        {name: 'dsadsasadasdadsa',value: 343},
        {name: 'cxzcx',value: 254},
      ],
      chartDataThree: [
        {name: '物业费',value: 52},
        {name: '租金',value: 52},
      ],
      chartDataFour: [
        {name: '出租面积',value: 52},
        {name: '空置面积',value: 343},
      ],
    }
  },
  watch: {
    'queryForm.f_sjytlx2':{
      handler(newval,oldval) {
        console.log("newval",newval)
        if (newval == '介于') {
          this.showtd = true
        } else {
          this.showtd = false
        }
      }
    }
  },
  created() {},
  async mounted() {
    await this.fenchOptions()
    this.getList()
  },
  methods: {
    handleCompare() {
      this.$router.push('/compare')
    },
    handleLocation(item) {
      console.log("item",item)
      this.$refs.map.setLocation(item.f_jd, item.f_wd)
    },
    getList(type) {
      let queryData = {
        pageBean: {page: 1, pageSize: 10, showTotal: true},
        querys: []
      }
      if (this.queryForm.id_.length > 0) {
        queryData.querys.push({property: "id_", value: this.queryForm.id_.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_qyid && !type) {
        queryData.querys.push({property: "f_qyid", value: this.queryForm.f_qyid , group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.f_qyidsearch && type) {
        queryData.querys.push({property: "f_qyid", value: this.f_qyidsearch , group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_tdzjblqk.length > 0) {
        queryData.querys.push({property: "f_tdzjblqk", value: this.queryForm.f_tdzjblqk.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_tdqyfw.length > 0) {
        queryData.querys.push({property: "f_tdqyfw", value: this.queryForm.f_tdqyfw.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_ssqh.length > 0) {
        queryData.querys.push({property: "f_ssqh", value: this.queryForm.f_ssqh.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_tdkflx.length > 0) {
        queryData.querys.push({property: "f_tdkflx", value: this.queryForm.f_tdkflx.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_xzsyqk.length > 0) {
        queryData.querys.push({property: "f_xzsyqk", value: this.queryForm.f_xzsyqk.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_xghxz.length > 0) {
        queryData.querys.push({property: "f_xghxz", value: this.queryForm.f_xghxz.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_sjytlx) {
        queryData.querys.push({property: "f_sjytlx", value: this.queryForm.f_sjytlx, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_sjytlx2) {
        queryData.querys.push({property: "f_sjytlx", value: this.queryForm.f_sjytlx2, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_sjytmj) {
        queryData.querys.push({property: "f_sjytlx", value: this.queryForm.f_sjytmj, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_sjytmj2) {
        queryData.querys.push({property: "f_sjytlx", value: this.queryForm.f_sjytmj2, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_tdcryx.length > 0) {
        queryData.querys.push({property: "f_tdcryx", value: this.queryForm.f_tdcryx.join(','), group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_rjl) {
        queryData.querys.push({property: "f_rjl", value: this.queryForm.f_rjl, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_tdmj) {
        queryData.querys.push({property: "f_tdmj", value: this.queryForm.f_tdmj, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      if (this.queryForm.f_tdmj2) {
        queryData.querys.push({property: "f_tdmj2", value: this.queryForm.f_tdmj2, group: "advance", relation: "AND", operation: "EQUAL"})
      }
      getTdInfoList(queryData).then(res => {
        console.log("resaabb",res)
        this.dataList = res.rows || []
        console.log("this.dataList",this.dataList)
        if (this.dataList.length > 0) {
          let temptdzmj = 0
          let tempyztdmj = 0
          let tempfczmj = 0
          let tempkczmj = 0
          let tempyczmj = 0

          this.dataList.forEach((item) => {
            if (item.f_tdmj) {
              temptdzmj += Number(item.f_tdmj)
            }
            if (item.f_yztdmj) {
              tempyztdmj += Number(item.f_yztdmj)
            }
            if (item.f_fczmj) {
              tempfczmj += Number(item.f_fczmj)
            }
            if (item.f_kczmj) {
              tempkczmj += Number(item.f_kczmj)
            }
            if (item.f_yczmj) {
              tempyczmj += Number(item.f_yczmj)
            }
          })
          this.totalInfo = {
            total: res.total,
            tdzmj: temptdzmj,
            yztdmj: tempyztdmj,
            fczmj: tempfczmj,
            kczmj: tempkczmj,
            yczmj: tempyczmj
          }
        } else {
          this.totalInfo = {
            total: 0,
            tdzmj: 0,
            yztdmj: 0,
            fczmj: 0,
            kczmj: 0,
            yczmj: 0
          }
        }
      })
    },
   async getAllData() {
     await getUserSelectorDem().then(res => {
        if (res && res.length > 0) {
          let params = {
            demId: res[0].id
          }
          getByParentAndDemToTree(params).then(res => {
            this.orgData = tile2nest(res)
          })
        }
      })
    },
    resetForm() {
      this.queryForm = {
        id_: [],
        f_qyid: '',
        f_tdzjblqk: [],
        f_tdqyfw: [],
        f_ssqh: [],
        f_tdkflx: [],
        f_xzsyqk: [],
        f_xghxz: [],
        f_sjytlx: '',
        f_sjytlx2: '',
        f_sjytmj: '',
        f_sjytmj2: '',
        f_tdcryx: [],
        f_rjl: '',
        f_tdmj: '',
        f_tdmj2: '',
      }
      this.orgname = ''
      this.f_qyidsearch = ''
    },
    handleSearch() {
      this.getList()
    },
    handleReset() {
      this.resetForm()
      this.getList()
    },
    async fenchOptions() {
      await this.getTdbhOptions()
      await this.getTdzblOptions()
      await this.getQyfwOptions()
      await this.getSsqhOptions()
      await this.getTdkflxOptions()
      await this.getXzsyqkOptions()
      await this.getTdsjytOptions()
      await this.getTdcryxOptions()
      await this.getRjlOptions()
      await this.getCompareOptions()
      await this.getAllData()
    },
    async getCompareOptions() {
      await getCompareList([]).then(res => {
        this.compareOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    async getRjlOptions() {
      await getRjlList([]).then(res => {
        this.rjlOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //土地证办理情况下拉
    async getTdbhOptions() {
      let query = {
        pageBean: {
          page: 1,
          pageSize: 10,
          showTotal: true
        }
      }

      await getTdbhList(query).then(res => {
        this.zdbhOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.f_zdbh,
            value: item.id_
          }
        }) : []
      })
    },
    //土地证办理情况下拉
    async getTdzblOptions() {
      await getTdzblList([]).then(res => {
        this.tdzblOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //区域范围下拉
    async getQyfwOptions() {
      await getQyfwlList([]).then(res => {
        this.qyfwOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //所属区划下拉
    async getSsqhOptions() {
      await getSsqhlList([]).then(res => {
        this.ssqhOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //土地开发类型下拉
   async getTdkflxOptions() {
     await getTdkflxList([]).then(res => {
        this.tdkflxOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //现状使用情况下拉
   async getXzsyqkOptions() {
     await getXzsyqkList([]).then(res => {
        this.xzsyqkOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //土地实际用途下拉
   async getTdsjytOptions() {
     await getTdytList([]).then(res => {
        this.tdsjytOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    //土地出让意向下拉
   async getTdcryxOptions() {
     await getTdcryxList([]).then(res => {
        this.tdcryxOptions = res.rows && res.rows.length > 0 ? res.rows.map(item => {
          return {
            label: item.value,
            value: item.code
          }
        }) : []
      })
    },
    handleCheck(data, checkedObj) {
      console.log("data-checkedObj",data, checkedObj)
      if (checkedObj.checkedKeys.length > 0) {
        let tempqyids = checkedObj.checkedKeys.filter(item => item != 0)
        console.log("tempqyids",tempqyids)
        this.f_qyidsearch = tempqyids.join(',')
        console.log("this.f_qyidsearch",this.f_qyidsearch)
        this.getList('left')
      }
    },
    menuNodeClick(node) {
      console.log("node",node)
      this.f_qyidsearch = node.id
      this.getList()
      // if (node.id === this.rootMenuId) {
      //   this.currentMenuId = null
      // } else {
      //   this.currentMenuId = node.id
      // }
      // this.checkAll = true
      // this.curTagList.map(item => {
      //   item.check = false
      // })
      // this.loadMenuTagsData()
      // this.loadAppData()
    },
    menuTreeRefresh(cb) {
      this.getAllData()
      this.f_qyidsearch = ''
      // this.currentMenuId = null
      // this.curTagList = []
      // this.pageResult.page = 1
      // this.loadMenuData(cb)
      // this.loadAppData()
    },
  },
}
</script>

<style lang="scss" scoped>
@mixin background-color {
  background-color: $base-color-white;
}

.content-layout {
  height: 100%;
  overflow-y: auto;
  position: relative;
  @include background-color;
}
.title {
  width: 100%;
  height: 60px;
  line-height: 60px;
  text-align: center;
  font-size: 18px;
}
.search_result_box {
  width: 100%;
  min-height: calc(100% - 50px);
  height: auto;
  box-sizing: border-box;
  padding: 16px;
  font-size: 16px;
  div{
    line-height: 30px;
  }
}

.pieBox {
  width: 25%;
  height: 100%;
}
</style>