Blame view

src/views/sqcx/jtfc/jtfc.vue 2.88 KB
jiaozeping@pashanhoo.com committed
1 2
<template>
  <div class="from-clues">
jiaozeping@pashanhoo.com committed
3
    <!-- 家庭房产 -->
jiaozeping@pashanhoo.com committed
4
    <div class="from-clues-header">
任超 committed
5
      <el-form :model="queryForm" @submit.native.prevent ref="queryForm" label-width="70px">
jiaozeping@pashanhoo.com committed
6 7
        <el-row>
          <el-col :span="5">
liangyifan committed
8
            <el-form-item label="查询编号">
任超 committed
9
              <el-input placeholder="请输入查询编号" @clear="queryClick()" v-model="queryForm.cxbh" clearable class="width100">
任超 committed
10
              </el-input>
liangyifan committed
11 12 13 14
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="申请人">
任超 committed
15
              <el-input placeholder="请输入申请人" @clear="queryClick()" v-model="queryForm.sqr" clearable class="width100">
任超 committed
16
              </el-input>
liangyifan committed
17 18
            </el-form-item>
          </el-col>
19
          <el-col :span="14" class="btnColRight">
任超 committed
20
            <el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button>
任超 committed
21
            <el-button type="primary" @click="handleAdd">新增</el-button>
jiaozeping@pashanhoo.com committed
22 23 24 25 26
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
任超 committed
27
    <div class="from-clues-content">
任超 committed
28
      <lb-table :page-size="pageData.size" class="loadingtext" :current-page.sync="pageData.current"
任超 committed
29 30
        :total="tableData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
        :column="tableData.columns" :data="tableData.data">
jiaozeping@pashanhoo.com committed
31 32
      </lb-table>
    </div>
jiaozeping@pashanhoo.com committed
33
    <addjtfc v-model="isDialog" />
jiaozeping@pashanhoo.com committed
34 35 36
  </div>
</template>
<script>
1  
jiaozeping@pashanhoo.com committed
37 38
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./jtfcdata";
jiaozeping@pashanhoo.com committed
39
import { getJtfcPage } from "@/api/jtfc";
jiaozeping@pashanhoo.com committed
40
import addjtfc from "./components/addjtfc.vue";
jiaozeping@pashanhoo.com committed
41 42
export default {
  name: "jtfc",
jiaozeping@pashanhoo.com committed
43
  components: { addjtfc },
jiaozeping@pashanhoo.com committed
44
  mixins: [table],
任超 committed
45
  mounted () {
jiaozeping@pashanhoo.com committed
46
    sendThis(this);
任超 committed
47
    this.queryClick()
jiaozeping@pashanhoo.com committed
48
  },
任超 committed
49
  data () {
jiaozeping@pashanhoo.com committed
50
    return {
任超 committed
51
      isDialog: false,
任超 committed
52 53
      sqrOption: [],
      cxytOption: [],
jiaozeping@pashanhoo.com committed
54
      queryForm: {
任超 committed
55
        cxbh: "",
jiaozeping@pashanhoo.com committed
56
        sqr: "",
jiaozeping@pashanhoo.com committed
57
      },
jiaozeping@pashanhoo.com committed
58

jiaozeping@pashanhoo.com committed
59 60
      tableData: {
        columns: datas.columns(),
jiaozeping@pashanhoo.com committed
61
        data: [],
jiaozeping@pashanhoo.com committed
62 63 64 65 66
      },
    };
  },
  methods: {
    // 初始化数据
任超 committed
67 68
    queryClick () {
      this.$startLoading();
jiaozeping@pashanhoo.com committed
69 70 71 72 73 74 75
      getJtfcPage({ ...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;
        }
1  
jiaozeping@pashanhoo.com committed
76
      });
任超 committed
77
    },
任超 committed
78
    handleSort (name, sort) {
jiaozeping@pashanhoo.com committed
79
      console.log(name, sort);
1  
jiaozeping@pashanhoo.com committed
80
    },
任超 committed
81
    handleAdd () {
jiaozeping@pashanhoo.com committed
82
      this.isDialog = true;
jiaozeping@pashanhoo.com committed
83
    },
任超 committed
84 85 86 87 88 89 90 91 92 93 94 95
    handleViewClick (scope) {
      var sqcxBsm = scope.row.bsmSqcx;
      this.$popup("申请查询记录", "sqcx/sqcxjl/components/sqcxjlInfo", {
        formData: {
          sqcxBsm: sqcxBsm,
        },
        cancel: function () { }, //取消事件的回调
        confirm: function () { },
      });
    }
  }
}
jiaozeping@pashanhoo.com committed
96 97 98 99
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
</style>