Blame view

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

84
          <el-col :span="4" class="btnColRight">
jiaozeping@pashanhoo.com committed
85
            <el-form-item>
86
              <el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button>
1  
jiaozeping@pashanhoo.com committed
87
              <el-button @click="moreQueryClick">高级查询</el-button>
jiaozeping@pashanhoo.com committed
88 89 90
            </el-form-item>
          </el-col>
        </el-row>
任超 committed
91 92 93
        <el-row class="advanced-search">
          <span>高级搜索条件:</span>
          <ul>
任超 committed
94 95
            <li v-for="(item, index) in searchList" :key="index">
              {{ item.name }}:{{ item.value }}
xiaomiao committed
96 97
              <i
                class="el-icon-circle-close"
98
                @click="handelItem(item, index)"></i>
任超 committed
99 100
            </li>
          </ul>
xiaomiao committed
101 102 103 104
          <el-button
            class="clean-btn"
            type="text"
            v-if="searchList.length > 0"
105
            @click.native="hanldeCleanAll">清除全部
任超 committed
106
          </el-button>
任超 committed
107
        </el-row>
jiaozeping@pashanhoo.com committed
108 109 110 111
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
xiaomiao committed
112 113 114 115 116
      <lb-table
        :page-size="pageData.size"
        class="loadingtext"
        @sort-change="handleSort"
        :current-page.sync="pageData.currentPage"
117
        :heightNum="305"
xiaomiao committed
118 119 120 121
        :total="tableData.total"
        @size-change="handleSizeChange"
        @p-current-change="handleCurrentChange"
        :column="tableData.columns"
122
        :data="tableData.data">
jiaozeping@pashanhoo.com committed
123 124
      </lb-table>
    </div>
xiaomiao committed
125
    <searchBox v-model="isSearch" @getSearch="getSearch" :advancedForm="otherForm" />
jiaozeping@pashanhoo.com committed
126 127 128
  </div>
</template>
<script>
129 130 131 132
  import { mapGetters } from "vuex";
  import searchMin from "../components/mixin/index";
  import table from "@/utils/mixin/table";
  import { datas, sendThis } from "./ybxdata";
133
  import { searchTaskDone } from "@/api/workflow/search.js";
134 135 136 137 138 139 140 141 142 143
  import searchBox from "../components/search.vue";
  export default {
    name: "ybx",
    components: { searchBox },
    mixins: [table, searchMin],
    mounted () {
      sendThis(this);
    },
    computed: {
      ...mapGetters(["dictData"]),
任超 committed
144
    },
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
    data () {
      return {
        queryForm: {
          ywly: "",
          qllx: "",
          djlx: "",
          ywh: "",
        },
        searchForm: {
          ywlymc: "",
          qllxmc: "",
          djlxmc: "",
          ywh: "",
        },
        tableData: {
          total: 0,
          columns: datas.columns(),
          data: [],
        },
      };
jiaozeping@pashanhoo.com committed
165
    },
166
    activated () {
167 168 169 170
      this.queryClick()
      window["getBpageList"] = () => {
        this.queryClick()
      }
171
    },
172 173
    methods: {
      // 列表渲染接口
yuanbo committed
174 175 176 177
      /**
       * @description: 列表渲染接口
       * @author: renchao
       */
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
      queryClick () {
        this.$startLoading();
        this.searchForm.ywh = this.queryForm.ywh;
        this.iterationData();
        searchTaskDone({
          ...this.queryForm,
          ...this.otherForm,
          ...this.pageData,
        }).then((res) => {
          this.$endLoading();
          if (res.code === 200) {
            let { total, records } = res.result;
            records.forEach((item) => {
              item.qlrmc = item.qlrmc.join(",");
              item.ywh = item.ywh.join(",");
              item.zl = item.zl.join(",");
              item.outstepdate = item.outstepdate[0];
            });
            this.tableData.total = total ? total : 0;
            this.tableData.data = records ? records : [];
          }
        });
      },
yuanbo committed
201 202 203 204 205
      /**
       * @description: handleSort
       * @param {*} val
       * @author: renchao
       */
206 207 208 209 210
      handleSort (val) {
        this.queryForm.sortField = val.prop;
        this.queryForm.sortOrder = val.order == "ascending" ? "asc" : "desc";
        this.queryClick();
      },
yuanbo committed
211 212 213 214 215
      /**
       * @description: ywhClick
       * @param {*} item
       * @author: renchao
       */
216
      ywhClick (item) {
217 218 219 220 221 222
        //有任务权限
        if (item.sjlx == "3") {
          const { href } = this.$router.resolve(
            "/djbworkFrameview?bsmSlsq=" +
            item.bsmSlsq +
            "&bestepid=" +
xiaomiao committed
223
            item.bestepid
224
          );
xiaomiao committed
225
          window.open(href, `djbworkFrameview${item.bsmSlsq}`);
226 227 228 229 230
        } else {
          const { href } = this.$router.resolve(
            "/workFrameView?bsmSlsq=" +
            item.bsmSlsq +
            "&bestepid=" +
xiaomiao committed
231
            item.bestepid
232
          );
xiaomiao committed
233
          window.open(href, `workFrameView${item.bsmSlsq}`);
234
        }
235 236 237
      }
    }
  }
jiaozeping@pashanhoo.com committed
238 239
</script>
<style scoped lang="scss">
240
  @import "~@/styles/public.scss";
jiaozeping@pashanhoo.com committed
241
</style>