Blame view

src/views/ywbl/ywsq/selectBdc.vue 1.41 KB
1
<!--
2
 * @Description: 选择不动产单元号
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-05-18 10:59:48[文件:bdcdj-index.html]
5
-->
田浩浩 committed
6
<template>
7 8
  <component :is="router" :sqywInfo="formData.sqywInfo" :isJump="formData.isJump ? formData.isJump : false"
    @updateDialog="updateDialog" />
田浩浩 committed
9 10
</template>
<script>
11
  import { queueDjywmc } from "./javascript/slectBdcdata.js";
12 13 14 15 16 17
  export default {
    props: {
      formData: {
        type: Object,
        default: () => { }
      }
田浩浩 committed
18
    },
19 20 21 22 23 24 25 26
    data () {
      return {
        title: "",
        router: ""
      }
    },
    mounted () {
      if (this.formData?.sqywInfo?.djywbm || this.formData?.djywbm) {
27
        let view = queueDjywmc(this.formData?.sqywInfo?.djywbm || this.formData?.djywbm,this.formData?.sqywInfo?.nodecode || this.formData?.nodecode);
28 29 30 31 32 33 34 35 36 37 38 39 40
        this.router = this.loadView(view);
      } else {
        let view = queueDjywmc(this.$route.query?.sqywbm);
        this.router = this.loadView(view);
      }
    },
    methods: {
      loadView (view) {
        return (r) =>
          require.ensure([], () => r(require(`./components/${view}.vue`)));
      },
      updateDialog () {
        this.$popupCacel()
41
        this.$emit("updateDialog", true)
42
      }
43 44
    }
  }
田浩浩 committed
45 46
</script>
<style scoped lang="scss">
47 48
  @import "~@/styles/mixin.scss";
  @import "~@/styles/public.scss";
田浩浩 committed
49

50 51 52 53 54
  /deep/.submit_button {
    text-align: center;
    padding: 10px;
    margin: 10px;
  }
田浩浩 committed
55
</style>