Blame view

src/views/sqcx/jtfc/jtfc.vue 3.74 KB
1
<!--
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-11-15 16:28:13
5
-->
jiaozeping@pashanhoo.com committed
6 7
<template>
  <div class="from-clues">
jiaozeping@pashanhoo.com committed
8
    <!-- 家庭房产 -->
jiaozeping@pashanhoo.com committed
9
    <div class="from-clues-header">
任超 committed
10
      <el-form :model="queryForm" @submit.native.prevent ref="queryForm" label-width="70px">
jiaozeping@pashanhoo.com committed
11 12
        <el-row>
          <el-col :span="5">
liangyifan committed
13
            <el-form-item label="查询编号">
任超 committed
14
              <el-input placeholder="请输入查询编号" @clear="queryClick()" v-model="queryForm.cxbh" clearable class="width100">
任超 committed
15
              </el-input>
liangyifan committed
16 17 18 19
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="申请人">
任超 committed
20
              <el-input placeholder="请输入申请人" @clear="queryClick()" v-model="queryForm.sqr" clearable class="width100">
任超 committed
21
              </el-input>
liangyifan committed
22 23
            </el-form-item>
          </el-col>
任超 committed
24
          <el-col :span="11" class="flex">
25
            <el-form-item label="查询时间">
26
              <el-date-picker v-model="queryForm.sqr" type="date" placeholder="开始日期" value-format="yyyy-MM-dd" clearable>
27
              </el-date-picker>
28
              <el-date-picker v-model="queryForm.sqr" type="date" placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
29 30 31
              </el-date-picker>
            </el-form-item>
          </el-col>
任超 committed
32
          <el-col :span="3" class="btnColRight">
33
            <el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button>
任超 committed
34
            <el-button type="primary" @click="handleAdd">新增</el-button>
jiaozeping@pashanhoo.com committed
35 36 37 38 39
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
任超 committed
40
    <div class="from-clues-content">
任超 committed
41
      <lb-table :page-size="pageData.size" class="loadingtext" :current-page.sync="pageData.current"
任超 committed
42 43
        :total="tableData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
        :column="tableData.columns" :data="tableData.data">
jiaozeping@pashanhoo.com committed
44 45 46 47 48
      </lb-table>
    </div>
  </div>
</template>
<script>
49 50
  import table from "@/utils/mixin/table";
  import { datas, sendThis } from "./jtfcdata";
51
  import { getSqcxPage } from "@/api/jtfc.js";
52 53 54 55 56 57
  export default {
    name: "jtfc",
    mixins: [table],
    mounted () {
      sendThis(this);
      this.queryClick();
1  
jiaozeping@pashanhoo.com committed
58
    },
59 60 61 62 63 64 65 66 67 68 69 70 71
    data () {
      return {
        sqcxBsm: "",
        queryForm: {
          cxbh: "",
          sqr: "",
          cxlx: '1'
        },
        tableData: {
          columns: datas.columns(),
          data: [],
        },
      };
jiaozeping@pashanhoo.com committed
72
    },
73 74 75
    activated () {
      this.queryClick();
    },
76 77
    methods: {
      // 初始化数据
yuanbo committed
78 79 80 81
      /**
       * @description: 初始化数据
       * @author: renchao
       */
82 83 84 85 86 87 88 89 90 91 92
      queryClick () {
        this.$startLoading();
        getSqcxPage({ ...this.queryForm, ...this.pageData }).then((res) => {
          this.$endLoading();
          if (res.code === 200) {
            let { records, total } = res.result;
            this.tableData.data = records;
            this.tableData.total = total;
          }
        });
      },
yuanbo committed
93 94 95 96 97 98
      /**
       * @description: handleSort
       * @param {*} name
       * @param {*} sort
       * @author: renchao
       */
99 100 101
      handleSort (name, sort) {
        console.log(name, sort);
      },
yuanbo committed
102 103 104 105
      /**
       * @description: handleAdd
       * @author: renchao
       */
106
      handleAdd () {
107
        this.$popupDialog("登记情况", "sqcx/jtfc/components/addjtfc", {
108
          sqcxBsm: ''
109
        }, '80%')
110
      },
yuanbo committed
111 112 113 114 115
      /**
       * @description: handleAdd
       * @param {*} row
       * @author: renchao
       */
116
      handleViewClick (row) {
117
        this.$popupDialog("登记情况", "sqcx/jtfc/components/addjtfc", {
118
          sqcxBsm: row.bsmSqcx
119
        }, '80%')
120
      }
121 122
    }
  }
jiaozeping@pashanhoo.com committed
123 124
</script>
<style scoped lang="scss">
125
  @import "~@/styles/public.scss";
jiaozeping@pashanhoo.com committed
126
</style>