Blame view

src/views/ywbl/ywsq/slectBdc.vue 1.17 KB
任超 committed
1 2
<template>
  <dialogBox title="查询权利信息" width="85%" :isButton="false" @closeDialog="closeDialog" v-model="myValue">
3
    <component :is="editItem" @closeDialog="closeDialog" :bsmSqyw="bsmSqyw" :djqxObj='djqxObj' :djywbm="djywbm" />
任超 committed
4 5 6
  </dialogBox>
</template>
<script>
7
import { queueDjywmc } from './slectBdcdata.js';
任超 committed
8 9 10 11 12
export default {
  props: {
    value: { type: Boolean, default: true },
    bsmSqyw: { type: String, default: '' },
    djywbm: { type: String, default: '' },
任超 committed
13
    djqxObj: { type: Object, default: '' }
任超 committed
14 15 16 17 18 19 20 21 22 23 24 25
  },
  data () {
    return {
      editItem: '',
      myValue: this.value,
    };
  },
  watch: {
    value (val) {
      this.myValue = val
    },
    djywbm (val) {
任超 committed
26
      let dd = queueDjywmc(val);
27
      this.editItem = this.loadView(dd);
任超 committed
28 29 30 31
    },
  },
  methods: {
    loadView (view) {
任超 committed
32
      console.log(view);
33
      return r => require.ensure([], () => r(require(`./components/${view}.vue`)))
任超 committed
34 35 36 37
    },
    closeDialog () {
      this.$emit("input", false);
    }
任超 committed
38
  }
任超 committed
39 40 41 42 43
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
任超 committed
44

任超 committed
45 46 47 48 49
/deep/.submit_button {
  text-align: center;
  padding: 10px;
  margin: 10px;
}
任超 committed
50
</style>