selectBdc.vue
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!--
* @Description: 选择不动产单元号
* @Autor: renchao
* @LastEditTime: 2023-05-18 10:59:48[文件:bdcdj-index.html]
-->
<template>
<component :is="router" :sqywInfo="formData.sqywInfo" :isJump="formData.isJump ? formData.isJump : false"
@updateDialog="updateDialog" />
</template>
<script>
import { queueDjywmc } from "./javascript/slectBdcdata.js";
export default {
props: {
formData: {
type: Object,
default: () => { }
}
},
data () {
return {
title: "",
router: ""
}
},
mounted () {
if (this.formData?.sqywInfo?.djywbm || this.formData?.djywbm) {
let view = queueDjywmc(this.formData?.sqywInfo?.djywbm || this.formData?.djywbm, this.formData?.sqywInfo?.nodecode || this.formData?.nodecode);
this.router = this.loadView(view);
} else {
let view = queueDjywmc(this.$route.query?.sqywbm);
this.router = this.loadView(view);
}
},
methods: {
/**
* @description: loadView
* @param {*} view
* @author: renchao
*/
loadView (view) {
console.log(view, 'viewviewview');
return (r) =>
require.ensure([], () => r(require(`./components/${view}.vue`)));
},
/**
* @description: updateDialog
* @author: renchao
*/
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>