Blame view

src/views/ywbl/ywsq/selectBdc.vue 1.28 KB
田浩浩 committed
1
<template>
2
  <dialogBox :title="title" width="85%" @closeDialog="closeDialog" v-model="value" isMain :isButton="false">
任超 committed
3
    <component :is="router" :sqywInfo="sqywInfo" @closeDialog="closeDialog" @updateDialog="updateDialog" />
田浩浩 committed
4 5 6 7 8 9 10
  </dialogBox>
</template>
<script>
import { queueDjywmc } from "./slectBdcdata.js";
export default {
  props: {
    value: { type: Boolean, default: true },
任超 committed
11
    sqywInfo: { type: Object, default: () => { } },
田浩浩 committed
12
  },
任超 committed
13
  data () {
田浩浩 committed
14 15 16 17 18 19
    return {
      title: "",
      router: "",
    };
  },
  watch: {
任超 committed
20
    value (val) {
田浩浩 committed
21
      if (val) {
22 23
        this.title = "申请业务:" + this.sqywInfo?.djywmc ? this.sqywInfo?.djywmc : '';
        let view = queueDjywmc(this.sqywInfo?.djywbm);
任超 committed
24
        this.router = this.loadView(view);
田浩浩 committed
25 26 27 28
      }
    },
  },
  methods: {
任超 committed
29 30
    loadView (view) {
      console.log(view, 'viewviewview');
田浩浩 committed
31 32 33
      return (r) =>
        require.ensure([], () => r(require(`./components/${view}.vue`)));
    },
任超 committed
34
    closeDialog () {
田浩浩 committed
35 36
      this.$emit("input", false);
    },
任超 committed
37
    updateDialog () {
田浩浩 committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
      this.$emit("input", false);
      this.$emit("updateDialog", true);
    },
  },
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";

/deep/.submit_button {
  text-align: center;
  padding: 10px;
  margin: 10px;
}
</style>