Blame view

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

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


219
      },
xiaomiao committed
220
    },
221
  };
jiaozeping@pashanhoo.com committed
222 223
</script>
<style scoped lang="scss">
224
  @import "~@/styles/public.scss";
jiaozeping@pashanhoo.com committed
225
</style>