selectBdc.vue 1.02 KB
<!--
 * @Description: 
 * @Autor: renchao
 * @LastEditTime: 2023-04-17 09:33:12
-->
<template>
  <component :is="router" :sqywInfo="formData.sqywInfo" @updateDialog="updateDialog" />
</template>
<script>
import { queueDjywmc } from "./slectBdcdata.js";
export default {
  props: {
    formData: {
      type: Object,
      default: () => { }
    }
  },
  data () {
    return {
      title: "",
      router: ""
    }
  },
  mounted () {
    let view = queueDjywmc(this.formData?.sqywInfo?.djywbm || this.formData?.djywbm);
    this.router = this.loadView(view);
  },
  methods: {
    loadView (view) {
      console.log(view, 'viewviewviewview');
      return (r) =>
        require.ensure([], () => r(require(`./components/${view}.vue`)));
    },
    updateDialog () {
      this.$popupCacel()
      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>