slectBdc.vue 1.55 KB
<template>
  <dialogBox :title="title" width="85%" :isButton="false" :isMain="true" @closeDialog="closeDialog" v-model="myValue">
    <component :is="editItem" @closeDialog="closeDialog" v-bind="$attrs" :isJump="isJump" id="slectBdc"
      @updateDialog="updateDialog" :djywbm="djywbm" :key="key" :djqxObj="djqxObj"/>
  </dialogBox>
</template>
<script>
import { queueDjywmc } from './slectBdcdata.js'
export default {
  props: {
    isJump: { type: Boolean, default: false },
    value: { type: Boolean, default: true },
    djywbm: { type: String, default: '' },
    djqxObj: { type: Object, default: {} }
  },
  data () {
    return {
      title:"",
      key: 0,
      editItem: '',
      myValue: this.value
    }
  },
  watch: {
    value (val) {
      this.myValue = val
      this.key++
      if (this.$route.query.sqywbm) {
        let dd = queueDjywmc(this.$route.query.sqywbm)
        this.editItem = this.loadView(dd)
      }
    },
    'djywbm' (val) {
      let dd = queueDjywmc(val)
      this.editItem = this.loadView(dd)
    }
  },
  methods: {
    loadView (view) {
      this.title ="申请业务:"+this.djqxObj.djywmc;
      return r => require.ensure([], () => r(require(`./components/${view}.vue`)))
    },
    closeDialog () {
      this.$emit("input", false)
    },
    updateDialog () {
      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>