Blame view

src/views/zhcx/lpcx/lpcx.vue 3.81 KB
1
<!--
yuanbo committed
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-07-24 14:04:47
5
-->
6 7
<template>
  <div class="from-clues">
jiaozeping@pashanhoo.com committed
8
    <!-- 楼盘查询 -->
9
    <div class="from-clues-header">
任超 committed
10
      <el-form :model="queryForm" @submit.native.prevent ref="queryForm" label-width="80px">
11 12
        <el-row>
          <el-col :span="5">
任超 committed
13
            <el-form-item label="项目名称" label-width="70px">
14
              <el-input placeholder="请输入项目名称" v-model="queryForm.xmmc" clearable class="width100">
15 16 17 18 19
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="项目编号">
20
              <el-input placeholder="请输入项目编号" v-model="queryForm.xmbh" clearable class="width100">
21 22 23 24 25
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="宗地代码">
26
              <el-input placeholder="请输入宗地代码" v-model="queryForm.zddm" clearable class="width100">
27 28 29 30 31
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="自然幢号">
32
              <el-input placeholder="请输入自然幢号" v-model="queryForm.zrzh" clearable class="width100">
33 34 35 36
              </el-input>
            </el-form-item>
          </el-col>

37
          <el-col :span="4" class="btnColRight">
38
            <el-form-item>
yangwei committed
39
              <el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button>
1  
jiaozeping@pashanhoo.com committed
40
              <el-button @click="moreQueryClick">高级查询</el-button>
41 42 43 44 45 46 47
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
任超 committed
48 49 50
      <lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort"
        :current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange"
        @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
51 52 53 54 55
      </lb-table>
    </div>
  </div>
</template>
<script>
56 57
  import table from "@/utils/mixin/table";
  import { datas, sendThis } from "./lpcxdata";
58
  import { getLpZrz } from "@/api/lpcx.js";
59 60 61 62 63 64
  export default {
    name: "lpcx",
    components: {},
    mixins: [table],
    mounted () {
      sendThis(this)
任超 committed
65
    },
66 67 68 69 70 71 72 73 74
    data () {
      return {
        queryForm: {
          xmmc: "",
          xmbh: "",
          zddm: "",
          zrzh: "",
        },
        tableData: {
75
          total: 0,
76 77
          columns: datas.columns(),
          data: [],
78 79
        }
      }
80
    },
81 82 83
    activated () {
      this.queryClick()
    },
84 85
    methods: {
      // 初始化数据
yuanbo committed
86 87 88 89
      /**
       * @description: 初始化数据
       * @author: renchao
       */
90 91 92 93 94
      queryClick () {
        this.$startLoading();
        getLpZrz({ ...this.queryForm, ...this.pageData }).then((res) => {
          this.$endLoading();
          if (res.code === 200) {
yangwei committed
95
            this.tableData.total = res.result.total ? res.result.total : 0;
96 97 98 99
            this.tableData.data = res.result.records;
          }
        });
      },
yuanbo committed
100 101 102 103 104 105
      /**
       * @description: handleSort
       * @param {*} name
       * @param {*} sort
       * @author: renchao
       */
106 107 108
      handleSort (name, sort) {
        console.log(name, sort);
      },
yuanbo committed
109 110 111 112 113
      // 高级查询
      /**
       * @description: 高级查询
       * @author: renchao
       */
114 115
      moreQueryClick () { },
      //打开楼盘表
yuanbo committed
116 117 118 119 120
      /**
       * @description: 打开楼盘表
       * @param {*} scope
       * @author: renchao
       */
121
      openlpbClick (scope) {
yangwei committed
122 123
        this.$popupDialog('楼盘表', 'lpb/index', {
          bsm: scope.row.bsm,
124
          onlyShow: true
yangwei committed
125
        }, '90%', true)
126 127 128
      }
    }
  }
129 130
</script>
<style scoped lang="scss">
131
  @import "~@/styles/public.scss";
132
</style>