Blame view

src/views/ywbl/fqsq/fqsq.vue 10.7 KB
任超 committed
1
<template>
田浩浩 committed
2
  <div class="fqsq">
任超 committed
3 4
    <div class="fqsq-header">
      <ul>
田浩浩 committed
5 6 7 8 9
        <li
          @click="operation(index, item)"
          v-for="(item, index) in headerleftList"
          :key="index"
        >
任超 committed
10
          <svg-icon :icon-class="item.icon" />
任超 committed
11
          <span class="iconName">{{ item.name }}</span>
任超 committed
12 13 14
        </li>
      </ul>
      <ul>
田浩浩 committed
15 16 17 18 19
        <li
          @click="operation(index, item)"
          v-for="(item, index) in headerRightList"
          :key="index"
        >
任超 committed
20
          <svg-icon class="icon" :icon-class="item.icon" />
任超 committed
21
          <span class="iconName">{{ item.name }}</span>
任超 committed
22 23 24
        </li>
      </ul>
    </div>
任超 committed
25
    <div class="tabsList">
任超 committed
26
      <div class="tabsList-left">
田浩浩 committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
        <div
          class="map-drawer-click"
          v-if="!isShowdrawer"
          @click="
            () => {
              this.isShowdrawer = !this.isShowdrawer;
            }
          "
        ></div>
        <div
          class="map-drawer-expand"
          v-else
          @click="
            () => {
              this.isShowdrawer = !this.isShowdrawer;
            }
          "
        ></div>
        <ul v-if="this.isShowdrawer">
          <p class="title">申请单元列表({{ unitData.length }})</p>
          <div v-for="(item, index) in unitData" :key="index">
            <li @click="unitClick(item)">
              <p>{{ item.bdcdyh }}</p>
              <p>{{ item.zl }}</p>
任超 committed
51
            </li>
liangyifan committed
52 53
            <div class="xian"></div>
          </div>
liangyifan committed
54 55
        </ul>
      </div>
任超 committed
56
      <div class="tabsList-right">
liangyifan committed
57 58
        <div class="fenpin" v-show="issplitScreen">
          <p class="splitScreen tabsList-title">材料信息</p>
任超 committed
59
          <div class="splitScreen"></div>
liangyifan committed
60
        </div>
田浩浩 committed
61 62 63 64 65 66 67 68
        <div style="width: 100%">
          <el-tabs v-model="activeName" @tab-click="activeClick">
            <el-tab-pane
              :label="item.name"
              :name="item.value"
              v-for="(item, index) in tabList"
              :key="index"
            >
任超 committed
69 70 71
            </el-tab-pane>
          </el-tabs>
          <div class="splitScreen-con">
田浩浩 committed
72 73 74 75 76
            <component
              ref="slxx"
              v-if="activeName == 'slsq'"
              :is="editItem"
              :flag="flag"
77
              :fetch='fetch'
田浩浩 committed
78 79
              :key="key"
            />
80
            <component :is="editItem" v-else :key="key" />
任超 committed
81 82
          </div>
        </div>
任超 committed
83
      </div>
任超 committed
84
    </div>
田浩浩 committed
85 86 87 88 89 90 91
    <zc ref="zcDialogRef" v-model="zcDialog" :queryForm="queryForm" />
    <thDialog
      ref="thdialogRef"
      v-model="thflag"
      :bsmBusiness="bsmBusiness"
      :queryForm="queryForm"
    />
蔡俊立 committed
92
    <zslqDialog ref="zslqDialog" v-model="zslqDialog" />
田浩浩 committed
93
    <zsylDialog v-model="zsylFlag" />
任超 committed
94 95 96
  </div>
</template>
<script>
田浩浩 committed
97 98 99 100 101
import { leftMenu, stepExpandInfo, record } from "@/api/fqsq.js";
import comMsg from "@/views/components/comMsg.vue";
import zc from "./components/zc.vue";
import thDialog from "./components/th.vue";
import zsylDialog from "./components/zsyl";
蔡俊立 committed
102
import zslqDialog from "./components/zslq";
任超 committed
103 104
export default {
  /**注册组件*/
蔡俊立 committed
105
  components: { zc, thDialog, zsylDialog, comMsg,zslqDialog},
田浩浩 committed
106
  data() {
任超 committed
107
    return {
任超 committed
108 109 110
      zsylFlag: false,
      zcDialog: false,
      thflag: false,
蔡俊立 committed
111
      zslqDialog: false,
任超 committed
112 113 114
      queryForm: {
        bsmSlsq: "",
        bestepid: "",
115
        bsmBusiness: ""
liangyifan committed
116
      },
liangyifan committed
117
      isShowdrawer: true,
任超 committed
118
      key: 0,
任超 committed
119
      flag: false,
任超 committed
120
      headerleftList: [],
蔡俊立 committed
121
      headerRightList: [],
122
      activeName: "",
任超 committed
123
      tabList1: [],
任超 committed
124
      tabList: [],
田浩浩 committed
125
      editItem: "",
liangyifan committed
126
      issplitScreen: false,
任超 committed
127
      unitData: [],
任超 committed
128
      bsmBusiness: "",
129
      fetch: false
任超 committed
130 131
    };
  },
任超 committed
132 133
  watch: {
    activeName: {
田浩浩 committed
134 135 136
      handler(newName, oldName) {
        if (newName === "qlxx") {
          this.editItem = this.loadViewSlsq();
任超 committed
137
        } else {
田浩浩 committed
138
          this.editItem = this.loadView(newName);
任超 committed
139
        }
任超 committed
140
      },
田浩浩 committed
141 142
      immediate: true,
    },
任超 committed
143
  },
田浩浩 committed
144
  mounted() {
任超 committed
145
    if (this.$route.query.bsmSlsq) {
任超 committed
146
      this.expandInfo(this.$route.query.bsmSlsq, this.$route.query.bestepid);
田浩浩 committed
147 148
      this.queryForm.bsmSlsq = this.$route.query.bsmSlsq;
      this.queryForm.bestepid = this.$route.query.bestepid;
149 150
      this.queryForm.bsmBusiness = this.$route.query.bsmBusiness;
      this.list();
liangyifan committed
151
    }
任超 committed
152
  },
任超 committed
153
  methods: {
liangyifan committed
154
    // 获取左侧列表
155
    list() {
田浩浩 committed
156
      let that = this;
任超 committed
157
      var formdata = new FormData();
158 159 160
      formdata.append("bsmSlsq", that.queryForm.bsmSlsq);
      formdata.append("bestepid", that.queryForm.bestepid);
      formdata.append("bsmBusiness", that.queryForm.bsmBusiness);
田浩浩 committed
161
      leftMenu(formdata).then((res) => {
liangyifan committed
162
        if (res.code === 200) {
田浩浩 committed
163
          this.unitData = res.result ? res.result : [];
liangyifan committed
164
          setTimeout(() => {
田浩浩 committed
165 166
            that.$refs.slxx?.[0].list(that.unitData?.[0]?.bsmSldy);
            this.bsmBusiness = that.unitData?.[0]?.bsmBusiness;
liangyifan committed
167
          }, 300);
liangyifan committed
168
        }
田浩浩 committed
169
      });
任超 committed
170
    },
蔡俊立 committed
171
    //获取环节扩展信息
田浩浩 committed
172 173
    expandInfo(bsmSlsq, bestepid) {
      let that = this;
任超 committed
174
      var formdata = new FormData();
蔡俊立 committed
175
      formdata.append("bsmSlsq", bsmSlsq);
任超 committed
176
      formdata.append("bestepid", bestepid);
田浩浩 committed
177
      stepExpandInfo(formdata).then((res) => {
任超 committed
178
        if (res.code === 200) {
田浩浩 committed
179 180
          this.tabList1 = [...res.result.form];
          this.tabList = res.result.form;
181
          this.activeName = res.result.form[0].value;
蔡俊立 committed
182 183
          this.headerleftList = res.result.button;
          this.headerRightList = res.result.operation;
任超 committed
184
        }
田浩浩 committed
185
      });
任超 committed
186
    },
田浩浩 committed
187 188
    activeClick(tab, event) {
      if (tab.name == "slxx") {
189
        this.list();
liangyifan committed
190 191
      }
    },
任超 committed
192
    //  左侧列表点击调用接口
蔡俊立 committed
193
    unitClick (item) {  
liangyifan committed
194
      this.bsmBusiness = item.bsmBusiness
蔡俊立 committed
195 196 197 198 199 200 201 202 203 204 205 206
      var activeTabName = this.activeName
      if(activeTabName == 'slxx'){
        //受理信息页面接口调取
        this.$nextTick(() => {
          this.$refs.slxx[0].list(item.bsmSldy)
        })
      }else if(activeTabName == 'spyj'){
        //审批页面接口调取
        this.$nextTick(() => {
          this.$refs.spyj[0].list(this.bsmBusiness,this.queryForm.bestepid)
        })  
      }
任超 committed
207
    },
田浩浩 committed
208
    operation(index, item) {
田浩浩 committed
209
      let that = this;
田浩浩 committed
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
      switch (item.value) {
        case "zsyl":
          this.zsylFlag = true;
          break;
        case "clfp":
          this.key++;
          this.issplitScreen = !this.issplitScreen;
          this.flag = !this.flag;
          if (this.issplitScreen) {
            this.tabList.splice(1, 1);
          } else {
            this.tabList = [...this.tabList1];
          }
          break;
        case "th":
          this.thflag = true;
          this.$nextTick(() => {
            this.$refs.thdialogRef.tablelistFn();
          });
          break;
        case "zc":
          this.zcDialog = true;
          this.$refs.zcDialogRef.tablelistFn();
          break;
        case "tc":
          window.close();
          break;
蔡俊立 committed
237 238 239 240
        case "zslq":
          this.zslqDialog = true;
          this.$refs.zslqDialog.tablelistFn();
          break;  
田浩浩 committed
241
        case "db":
田浩浩 committed
242 243 244
          var formdata = new FormData();
          formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
          formdata.append("bestepid", this.$route.query.bestepid);
田浩浩 committed
245 246 247 248 249 250 251 252 253 254 255
          // comMsg;
          this.$confirm("请确认是否登簿", "提示", {
            iconClass: "el-icon-question", //自定义图标样式
            confirmButtonText: "确认", //确认按钮文字更换
            cancelButtonText: "取消", //取消按钮文字更换
            showClose: true, //是否显示右上角关闭按钮
            type: "warning", //提示类型  success/info/warning/error
          })
            .then(function () {
              record(formdata).then((res) => {
                if (res.code === 200 || res.code === 2002) {
田浩浩 committed
256
                  that.$alert(res.message);
田浩浩 committed
257 258 259
                }
              });
            });
田浩浩 committed
260
          break;
任超 committed
261 262
      }
    },
田浩浩 committed
263 264
    loadView(view) {
      return (r) =>
265
       require.ensure([], () => r(require(`./components/${view}.vue`)));
任超 committed
266
    },
田浩浩 committed
267 268 269 270 271
    loadViewSlsq() {
      return (r) =>
        require.ensure([], () =>
          r(require("../../components/jsydsyq/jsydsyq.vue"))
        );
任超 committed
272
    },
任超 committed
273
  },
田浩浩 committed
274
};
任超 committed
275 276 277
</script>
<style scoped lang='scss'>
@import "~@/styles/mixin.scss";
任超 committed
278 279

/deep/.svg-icon {
任超 committed
280 281
  width: 2.5em;
  height: 2.5em;
liangyifan committed
282
}
任超 committed
283

任超 committed
284 285 286 287 288 289 290
/deep/.el-tabs__nav-wrap {
  padding: 5px 0 0 15px;
}

/deep/.el-tabs__nav-wrap::after {
  height: 1px;
}
任超 committed
291 292

.iconName {
任超 committed
293 294
  line-height: 24px;
  font-size: 12px;
liangyifan committed
295
}
任超 committed
296

任超 committed
297 298
/deep/.el-tabs__header {
  margin: 0 !important;
任超 committed
299 300 301 302 303
}

.splitScreen-con {
  padding: 0 15px;
  box-sizing: border-box;
任超 committed
304
  height: calc(100% - 350px);
任超 committed
305 306
}

任超 committed
307 308 309
.fqsq {
  width: 100%;
  height: 100%;
liangyifan committed
310
  padding: 0;
任超 committed
311
  box-sizing: border-box;
任超 committed
312
  background-color: #ffffff;
liangyifan committed
313
  overflow: hidden;
liangyifan committed
314

任超 committed
315
  .splitScreen {
任超 committed
316
    min-width: 50%;
任超 committed
317 318
  }

任超 committed
319 320 321
  &-header {
    @include flex;
    width: 100%;
任超 committed
322
    height: 80px;
田浩浩 committed
323
    background-color: #3498db;
任超 committed
324 325 326
    color: #ffffff;
    justify-content: space-between;
    padding-left: 15px;
任超 committed
327 328 329
    position: sticky;
    top: 0;
    z-index: 100;
任超 committed
330 331 332 333 334 335 336 337 338

    ul {
      @include flex;

      li {
        @include flex-center;
        cursor: pointer;
        flex-direction: column;
        margin-right: 15px;
任超 committed
339 340 341 342 343 344 345 346
        box-sizing: border-box;
        width: 70px;
        margin: 0 5px;
      }

      li:hover {
        border: 1px solid #ffffff;
        border-radius: 5px;
347
        //color: $light-blue ;
任超 committed
348 349

        .svg-icon {
350
          //color: $light-blue ;
任超 committed
351
        }
任超 committed
352 353 354
      }
    }
  }
任超 committed
355

liangyifan committed
356
  .map-drawer-expand {
任超 committed
357 358
    width: 20px;
    height: 77px;
田浩浩 committed
359
    background: url("../../../image/right.png");
任超 committed
360 361 362 363
    background-size: cover;
    position: absolute;
    right: 0%;
    top: 30%;
蔡俊立 committed
364
    z-index: 99;
任超 committed
365 366 367 368 369 370
    cursor: pointer;
  }

  .map-drawer-click {
    width: 20px;
    height: 77px;
田浩浩 committed
371
    background: url("../../../image/left.png");
任超 committed
372 373 374 375 376 377 378 379 380 381 382 383
    background-size: cover;
    position: absolute;
    left: 0%;
    top: 30%;
    z-index: 999;
    cursor: pointer;
  }

  .hide {
    display: none;
  }

任超 committed
384 385 386 387 388 389 390
  .tabsList {
    width: 100%;
    position: sticky;
    top: 80px;
    background-color: #ffffff;
    z-index: 100;
    @include flex;
任超 committed
391 392

    .tabsList-left {
田浩浩 committed
393
      border-right: 1px solid #ebeef5;
liangyifan committed
394
      position: relative;
任超 committed
395
      box-sizing: border-box;
任超 committed
396

任超 committed
397 398
      ul {
        position: relative;
liangyifan committed
399

任超 committed
400
        .xian {
田浩浩 committed
401
          background: #f2f2f2;
任超 committed
402 403 404
          padding: 2px;
        }

liangyifan committed
405
        .title {
任超 committed
406 407 408
          padding: 20px;
          text-align: center;
        }
liangyifan committed
409

任超 committed
410 411 412 413
        li {
          padding: 10px;
          font-size: 14px;
          color: #606266;
liangyifan committed
414
          line-height: 20px;
任超 committed
415 416 417
        }

        li:hover {
田浩浩 committed
418 419
          color: #0f93f6;
          cursor: pointer;
任超 committed
420 421
        }
      }
liangyifan committed
422
    }
任超 committed
423 424 425

    .tabsList-right {
      .fenpin {
liangyifan committed
426
        min-width: 50%;
田浩浩 committed
427
        border-right: 1px solid #ebeef5;
liangyifan committed
428
      }
任超 committed
429 430 431 432 433 434

      background-color: #ffffff;
      width: 100%;
      height: 100%;
      z-index: 100;
      @include flex;
liangyifan committed
435
    }
任超 committed
436 437 438 439 440 441 442 443 444 445
  }

  .tabsList-title {
    display: block;
    line-height: 59px;
  }

  /deep/.el-tabs {
    width: 100%;
  }
任超 committed
446 447
}
</style>