Blame view

src/views/ywbl/dbx/dbx.vue 10.5 KB
1
<!--
xiaomiao committed
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2024-02-01 13:34:04
5
-->
6
<template>
任超 committed
7 8
  <div class="from-clues">
    <div class="from-clues-header">
xiaomiao committed
9 10 11 12
      <el-form
        :model="queryForm"
        ref="queryForm"
        @submit.native.prevent
13
        label-width="100px">
任超 committed
14 15
        <el-row>
          <el-col :span="5">
16
            <el-form-item label="业务来源">
xiaomiao committed
17 18 19 20 21 22 23
              <el-select
                v-model="queryForm.ywly"
                class="width100"
                filterable
                @change="handleSelect('ywly', 'ywlymc', 'ywly')"
                @clear="handleEmpty('ywlymc')"
                clearable
24
                placeholder="请选择业务来源">
xiaomiao committed
25 26 27 28
                <el-option
                  v-for="item in dictData['ywly']"
                  :key="item.dcode"
                  :label="item.dname"
29
                  :value="item.dcode">
任超 committed
30 31 32 33 34 35
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="权利类型">
xiaomiao committed
36 37 38 39 40 41 42
              <el-select
                v-model="queryForm.qllx"
                class="width100"
                @change="handleSelect('A8', 'qllxmc', 'qllx')"
                @clear="handleEmpty('qllxmc')"
                filterable
                clearable
43
                placeholder="请选择权利类型">
xiaomiao committed
44 45 46 47
                <el-option
                  v-for="item in dictData['A8']"
                  :key="item.dcode"
                  :label="item.dname"
48
                  :value="item.dcode">
任超 committed
49 50 51 52 53 54
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="登记类型">
xiaomiao committed
55 56 57 58 59 60 61
              <el-select
                v-model="queryForm.djlx"
                class="width100"
                @change="handleSelect('A21', 'djlxmc', 'djlx')"
                @clear="handleEmpty('djlxmc')"
                filterable
                clearable
62
                placeholder="请选择登记类型">
xiaomiao committed
63 64 65 66
                <el-option
                  v-for="item in dictData['A21']"
                  :key="item.dcode"
                  :label="item.dname"
67
                  :value="item.dcode">
任超 committed
68 69 70 71
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
72
          <el-col :span="6">
任超 committed
73
            <el-form-item label="业务号">
xiaomiao committed
74 75
              <el-input
                placeholder="请输入业务号"
76
                v-model.trim="queryForm.ywh"
xiaomiao committed
77
                clearable
78
                class="width100">
任超 committed
79 80 81
              </el-input>
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
82

83
          <el-col :span="3" class="btnColRight">
任超 committed
84
            <el-form-item>
xiaomiao committed
85 86 87
              <el-button
                type="primary"
                native-type="submit"
88
                @click="handleSearch">查询</el-button>
任超 committed
89
              <el-button @click="moreQueryClick">高级查询</el-button>
任超 committed
90 91 92
            </el-form-item>
          </el-col>
        </el-row>
93
        <el-row>
94
          <el-col :span="5">
95
            <el-form-item label="不动产单元号">
xiaomiao committed
96 97
              <el-input
                placeholder="请输入不动产单元号"
98
                v-model.trim="queryForm.bdcdyh"
xiaomiao committed
99
                clearable
100
                class="width100">
101 102 103
              </el-input>
            </el-form-item>
          </el-col>
104
          <el-col :span="5">
105
            <el-form-item label="申请人">
xiaomiao committed
106 107
              <el-input
                placeholder="如需要模糊查询,前后输入%"
108
                v-model.trim="queryForm.sqrmc"
xiaomiao committed
109
                clearable
110
                class="width100">
111 112 113
              </el-input>
            </el-form-item>
          </el-col>
114
          <el-col :span="5">
115
            <el-form-item label="申请人证件号">
xiaomiao committed
116 117
              <el-input
                placeholder="如需要模糊查询,前后输入%"
118
                v-model.trim="queryForm.sqrzjhm"
xiaomiao committed
119
                clearable
120
                class="width100">
121 122 123
              </el-input>
            </el-form-item>
          </el-col>
124
          <el-col :span="9">
125
            <el-form-item label="坐落">
xiaomiao committed
126 127 128 129
              <el-input
                placeholder="如需要模糊查询,前后输入%"
                v-model.trim="queryForm.zl"
                clearable
130
                class="width100">
131 132 133 134
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
任超 committed
135
        <el-row class="advanced-search">
任超 committed
136
          <span>搜索条件:</span>
任超 committed
137
          <ul>
任超 committed
138 139
            <li v-for="(item, index) in searchList" :key="index">
              {{ item.name }}:{{ item.value }}
xiaomiao committed
140 141
              <i
                class="el-icon-circle-close"
142
                @click="handelItem(item, index)"></i>
任超 committed
143
            </li>
144 145 146 147 148 149
            <el-button
              class="clean-btn"
              type="text"
              v-if="searchList.length > 0"
              @click.native="hanldeCleanAll">清除全部
            </el-button>
任超 committed
150 151
          </ul>
        </el-row>
任超 committed
152
      </el-form>
153
    </div>
任超 committed
154
    <div class="from-clues-content">
xiaomiao committed
155
      <lb-table
156
        ref="Lbtable"
xiaomiao committed
157 158 159 160 161 162 163 164
        :page-size="pageData.size"
        class="loadingtext"
        @sort-change="handleSort"
        :current-page.sync="pageData.currentPage"
        :total="tableData.total"
        @size-change="handleSizeChange"
        @p-current-change="handleCurrentChange"
        :column="tableData.columns"
165
        :data="tableData.data">
任超 committed
166 167
      </lb-table>
    </div>
xiaomiao committed
168 169 170
    <searchBox
      v-model="isSearch"
      @getSearch="getSearch"
171
      :advancedForm="otherForm" />
任超 committed
172
  </div>
173 174
</template>
<script>
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
  import { mapGetters } from "vuex";
  import searchBox from "../components/search.vue";
  import table from "@/utils/mixin/table";
  import searchMin from "../components/mixin/index";
  import { datas, sendThis } from "./dbxdata";
  import { searchTaskToDo } from "@/api/workflow/search.js";
  import {
    judgeUserTaskPermission,
    deleteFlow,
    claimTask,
  } from "@/api/workFlow.js";
  export default {
    components: { searchBox },
    mixins: [table, searchMin],
    computed: {
      ...mapGetters(["dictData", "transfer"]),
xiaomiao committed
191
    },
192 193 194 195 196 197 198 199 200 201 202 203
    data () {
      return {
        queryForm: {},
        searchForm: {
          ywlymc: "",
          qllxmc: "",
          djlxmc: "",
          ywh: "",
        },
        tableData: {
          total: 0,
          columns: datas.columns(),
204
          data: []
205
        },
206 207
        jumpid: ""
      }
208
    },
209 210 211 212
    mounted () {
      sendThis(this);
    },
    activated () {
xiaomiao committed
213
      this.queryClick();
214 215 216
      window["getBpageList"] = () => {
        this.queryClick();
      };
xiaomiao committed
217
    },
218 219 220 221 222 223 224
    methods: {
      /**
       * @description: 列表渲染接口
       * @author: renchao
       */
      queryClick () {
        this.$startLoading();
225 226 227 228 229 230
        const { ywh, bdcdyh, sqrmc, sqrzjhm, zl } = this.queryForm;
        this.searchForm.ywh = ywh;
        this.searchForm.bdcdyh = bdcdyh;
        this.searchForm.sqrmc = sqrmc;
        this.searchForm.sqrzjhm = sqrzjhm;
        this.searchForm.zl = zl;
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
        this.iterationData();
        searchTaskToDo({
          ...this.queryForm,
          ...this.otherForm,
          ...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 : [];
          }
        });
      },
      /**
       * @description: handleSort
       * @param {*} val
       * @author: renchao
       */
      handleSort (val) {
        this.queryForm.sortField = val.prop;
        this.queryForm.sortOrder = val.order == "ascending" ? "asc" : "desc";
        this.queryClick();
      },
      /**
       * @description: del
       * @param {*} item
       * @author: renchao
       */
      del (item) {
        let formdata = new FormData();
        formdata.append("bsmSlsq", item.bsmSlsq);
        this.$confirm("确定要删除吗, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
266
          type: "warning"
267
        })
268 269 270 271 272 273 274 275
          .then(() => {
            deleteFlow(formdata).then((res) => {
              if (res.code === 200) {
                this.handleDel();
                this.$message({
                  type: "success",
                  message: "删除成功!",
                });
276
                this.queryClick()
277
              } else {
278
                this.$message.error(res.message)
279 280 281 282 283 284
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
285 286 287
              message: "已取消删除"
            })
          })
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
      },
      /**
       * @description: ywhClick
       * @param {*} item
       * @author: renchao
       */
      ywhClick (item) {
        //判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面
        judgeUserTaskPermission({
          bsmSlsq: item.bsmSlsq,
          bestepid: item.bestepid,
        }).then((res) => {
          if (res.code == 200) {
            if (res.result) {
              //有任务权限
              if (item.sjlx == "3") {
                const { href } = this.$router.resolve(
305 306 307
                  "/djbworkFrame?bsmSlsq=" + item.bsmSlsq +
                  "&bestepid=" + item.bestepid +
                  "&zbhj=" + item.zbhj
308 309 310
                );
                window.open(href, `djbworkFrame${item.bsmSlsq}`);
              } else {
1  
renchao@pashanhoo.com committed
311
                const { href } = this.$router.resolve(
312
                  "/workFrame?bsmSlsq=" + item.bsmSlsq +
313
                  "&bestepid=" + item.bestepid + "&djywbm=" + item.djywbm +
314 315 316
                  "&zbhj=" + item.zbhj
                )
                window.open(href, `workFrame${item.bsmSlsq}`)
317 318 319 320 321 322 323 324 325
              }
              //从待办箱进入的调取任务领取接口
              claimTask(item.bsmSlsq, item.bestepid);
            } else {
              //无任务权限
              this.$message.error("无该任务操作权限,或已被他人抢办,请重新操作");
              //刷新页面
              this.queryClick();
            }
任超 committed
326
          } else {
327
            this.$message.error("用户任务权限判断失败,请联系管理员");
蔡俊立 committed
328
          }
329 330 331 332
        })
      }
    }
  }
333 334
</script>
<style scoped lang="scss">
335
  @import "~@/styles/public.scss";
336
  /deep/ .back {
yangwei committed
337 338 339 340 341 342 343 344
    display: inline-block;
    font-size: 14px;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    line-height: 20px;
    margin-right: 4px;
    text-align: center;
345 346
    background-color: rgba(171, 12, 12, 0.1);
    color: #b44747;
yangwei committed
347
  }
348
</style>