Blame view

src/views/ywbl/ywsq/selectBdc.vue 1.61 KB
1
<!--
2
 * @Description: 选择不动产单元号
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-10-18 14:03:27
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
        this.router = this.loadView(view);
      } else {
        let view = queueDjywmc(this.$route.query?.sqywbm);
        this.router = this.loadView(view);
      }
    },
    methods: {
yuanbo committed
35 36 37 38 39
      /**
       * @description: loadView
       * @param {*} view
       * @author: renchao
       */
xiaomiao committed
40 41

      loadView (view) {
42
        console.log(view, 'viewviewview');
43 44 45
        return (r) =>
          require.ensure([], () => r(require(`./components/${view}.vue`)));
      },
yuanbo committed
46 47 48 49
      /**
       * @description: updateDialog
       * @author: renchao
       */
50 51
      updateDialog () {
        this.$popupCacel()
52
        this.$emit("updateDialog", true)
53
      }
54 55
    }
  }
田浩浩 committed
56 57
</script>
<style scoped lang="scss">
58 59
  @import "~@/styles/mixin.scss";
  @import "~@/styles/public.scss";
田浩浩 committed
60

61 62 63 64 65
  /deep/.submit_button {
    text-align: center;
    padding: 10px;
    margin: 10px;
  }
田浩浩 committed
66
</style>