Blame view

src/views/zhcx/jdcx/jdcx.vue 7.37 KB
1
<!--
yuanbo committed
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-10-31 14:44:39
5
-->
6 7 8 9
<template>
  <div class="from-clues">
    <!-- 表单部分 -->
    <div class="from-clues-header">
10
      <el-form :model="queryForm" ref="queryForm" @submit.native.prevent label-width="100px">
11
        <el-row>
tianhaohao@pashanhoo.com committed
12
          <el-col :span="6">
13
            <el-form-item label="业务来源" prop="ywly">
任超 committed
14
              <el-select v-model="queryForm.ywly" class="width100" filterable clearable placeholder="请选择业务来源">
任超 committed
15
                <el-option v-for="item in dictData['ywly']" :key="item.dcode" :label="item.dname" :value="item.dcode">
16 17 18 19 20
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
21
            <el-form-item label="权利类型" prop="qllx">
任超 committed
22
              <el-select v-model="queryForm.qllx" class="width100" filterable clearable placeholder="请选择权利类型">
任超 committed
23
                <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode">
24 25 26 27 28
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
29
            <el-form-item label="登记类型" prop="djlx">
任超 committed
30
              <el-select v-model="queryForm.djlx" class="width100" filterable clearable placeholder="请选择登记类型">
任超 committed
31
                <el-option v-for="item in  dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode">
32 33 34 35 36
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
37 38
            <el-form-item label="业务号" prop="ywh">
              <el-input placeholder="请输入业务号" v-model.trim="queryForm.ywh" clearable class="width200px">
39 40 41
              </el-input>
            </el-form-item>
          </el-col>
tianhaohao@pashanhoo.com committed
42
          <el-col :span="3" class="btnColRight">
43
            <!-- <el-button @click="handleReset">重置</el-button>       -->
44 45
          </el-col>
        </el-row>
46
        <el-row>
tianhaohao@pashanhoo.com committed
47
          <el-col :span="6">
48 49
            <el-form-item label="不动产单元号" prop="bdcdyh">
              <el-input placeholder="请输入不动产单元号" v-model.trim="queryForm.bdcdyh" clearable class="width100">
50 51 52
              </el-input>
            </el-form-item>
          </el-col>
53
          <el-col :span="5">
54 55
            <el-form-item label="申请人" prop="sqrmc">
              <el-input placeholder="如需要模糊查询,前后输入%" v-model.trim="queryForm.sqrmc" clearable class="width100">
56 57 58
              </el-input>
            </el-form-item>
          </el-col>
59
          <el-col :span="5">
60 61
            <el-form-item label="申请人证件号" prop="sqrzjhm">
              <el-input placeholder="如需要模糊查询,前后输入%" v-model.trim="queryForm.sqrzjhm" clearable class="width100">
62 63 64
              </el-input>
            </el-form-item>
          </el-col>
65
          <el-col :span="5">
66
            <el-form-item label="坐落" prop="zl">
xiaomiao committed
67
              <el-input placeholder="如需要模糊查询,前后输入%" v-model.trim="queryForm.zl" clearable class="width100">
68 69 70
              </el-input>
            </el-form-item>
          </el-col>
tianhaohao@pashanhoo.com committed
71 72 73 74
          <el-col :span="3" class="btnColRight">
            <el-form-item>
              <el-button @click="handleReset">重置</el-button>
              <el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button>
75
              <el-button @click="export_fun">导出</el-button>
tianhaohao@pashanhoo.com committed
76 77
            </el-form-item>
          </el-col>
78
        </el-row>
79 80 81 82
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
83 84
      <lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort"
        :current-page.sync="pageData.currentPage" :total="tableData.total" @size-change="handleSizeChange"
任超 committed
85
        @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
86 87 88 89 90
      </lb-table>
    </div>
  </div>
</template>
<script>
xiaomiao committed
91 92 93
  import { mapGetters } from 'vuex'
  import table from "@/utils/mixin/table";
  import { datas, sendThis } from "./jdcxdata";
94
  import { getJdcxBysearch,exportJdcxExcel } from "@/api/search.js"
xiaomiao committed
95 96 97 98 99 100 101 102 103
  export default {
    name: "jdcx",
    components: {},
    mixins: [table],
    mounted () {
      sendThis(this);
    },
    computed: {
      ...mapGetters(['dictData'])
任超 committed
104
    },
xiaomiao committed
105 106 107 108 109 110 111 112 113 114
    data () {
      return {
        queryForm: {
        },
        tableData: {
          total: 0,
          columns: datas.columns(),
          data: []
        }
      }
任超 committed
115
    },
116 117 118
    activated () {
      this.queryClick()
    },
xiaomiao committed
119
    methods: {
yuanbo committed
120 121 122 123
      /**
       * @description: 初始化数据
       * @author: renchao
       */
xiaomiao committed
124 125 126 127 128 129 130 131 132 133 134
      queryClick () {
        this.$startLoading()
        getJdcxBysearch({ ...this.queryForm, ...this.pageData }).then(res => {
          this.$endLoading()
          if (res.code === 200) {
            let { total, records } = res.result
            this.tableData.total = total ? total : 0;
            this.tableData.data = records ? records : [];
          }
        })
      },
135 136 137
      handleReset () {
        this.$refs.queryForm.resetFields();
      },
yuanbo committed
138 139 140 141 142 143
      /**
       * @description: handleSort
       * @param {*} name
       * @param {*} sort
       * @author: renchao
       */
xiaomiao committed
144 145 146
      handleSort (name, sort) {
        console.log(name, sort);
      },
yuanbo committed
147 148 149 150 151
      /**
       * @description: openDialog
       * @param {*} item
       * @author: renchao
       */
xiaomiao committed
152
      openDialog (item) {
153 154 155 156 157
        if (item.sjlx == "3") {
          item.djywbm = "DJBBL";
          const { href } = this.$router.resolve(
            "/djbworkFrameview?bsmSlsq=" +
            item.bsmSlsq +
158 159
            "&bsmBusiness=" +
            item.bsmBusiness +
160 161 162 163 164 165 166 167
            "&sqywbm=" +
            item.djywbm
          );
          window.open(href, `djbworkFrameview${item.bsmSlsq}`);
        } else {
          const { href } = this.$router.resolve(
            "/workFrameView?bsmSlsq=" +
            item.bsmSlsq +
168
            "&bsmBusiness=" +
169
            item.bsmBusiness + '&type=jdcx'
170
          );
171
          window.open(href, `workFrameView${item.bsmSlsq}`)
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
      },
    // 导出
    export_fun() {
      this.$confirm(
        `确认导出数据吗,是否继续?`,
        "提示",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(() => {
          // 导出函数
          this.dataExport({ ...this.queryForm });
        })
        .catch((err) => {

          this.$message({
            type: "info",
            message: "已取消导出",
          });
        });
    },
        // 导出选中项
    dataExport(arr) {
      exportJdcxExcel({ ...this.queryForm }).then((res) => {
        // 下载后台传过来的流文件(excel)后解决乱码问题
        const _a = document.createElement("a");
        let blob = new Blob([res], { type: "application/vnd.ms-excel" });
        _a.style.display = "none";
        _a.href = URL.createObjectURL(blob);
        // _a.download = res.headers['content-disposition'] //                      下载后文件名
        _a.download = "进度查询" + new Date().toLocaleString(); //               下载的文件名
        document.body.appendChild(_a);
        _a.click();
        document.body.removeChild(_a);
      });
    },

任超 committed
213 214
    }
  }
215 216
</script>
<style scoped lang="scss">
xiaomiao committed
217
  @import "~@/styles/public.scss";
218
</style>