daada642a1ee112b2e7482462c1fa6892670ad64.svn-base 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!-- -->
  2. <template>
  3. <div id="popupContainer" class=''>
  4. <el-dialog @close="closeDialog" width="50%" :visible.sync="dialogFormVisible">
  5. <el-tabs v-model="currentViewId" type="card">
  6. <el-tab-pane
  7. :label="option.label"
  8. :name="option.label"
  9. v-for="option in options"
  10. :key="option.value">
  11. <component
  12. :is="option.value"
  13. :currentYdbCode="currentYdbCode">
  14. </component>
  15. </el-tab-pane>
  16. </el-tabs>
  17. </el-dialog>
  18. </div>
  19. </template>
  20. <script>
  21. import dengjixinxi from "./duchajichuxinxi_ydb.vue"
  22. import problemList from './problemListYdb.vue'
  23. export default {
  24. components: {
  25. jichuxinxi:resolve => {require(['./jichuxinxi.vue'], resolve)},//基础信息
  26. dengjixinxi:dengjixinxi,
  27. problemList:problemList
  28. },
  29. props: ["currentYdbCode","currentObjectName","activeName"],
  30. data() {
  31. return {
  32. currentViewId:'基础信息',
  33. dialogFormVisible:true,
  34. options: [
  35. {
  36. value: "jichuxinxi",
  37. label: "基础信息"
  38. },
  39. {
  40. value: "dengjixinxi",
  41. label: "登记信息"
  42. },
  43. {
  44. value: "problemList",
  45. label: '问题清单'
  46. }
  47. ]
  48. };
  49. },
  50. computed: {},
  51. watch: {
  52. activeName(n,o){
  53. this.currentViewId = n;
  54. }
  55. },
  56. //生命周期 - 创建完成(可以访问当前this实例)
  57. created() {
  58. },
  59. //生命周期 - 挂载完成(可以访问DOM元素)
  60. mounted() {
  61. this.$nextTick(() =>{
  62. this.currentViewId = this.activeName;
  63. })
  64. },
  65. beforeCreate() {}, //生命周期 - 创建之前
  66. beforeMount() {}, //生命周期 - 挂载之前
  67. beforeUpdate() {}, //生命周期 - 更新之前
  68. updated() {}, //生命周期 - 更新之后
  69. beforeDestroy() {}, //生命周期 - 销毁之前
  70. destroyed() {}, //生命周期 - 销毁完成
  71. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  72. methods: {
  73. closeDialog() {
  74. this.$emit("closeModal");
  75. },
  76. showDialog() {
  77. this.dialogFormVisible = true;
  78. },
  79. },
  80. }
  81. </script>
  82. <style scoped>
  83. /*@import url(); 引入公共css类*/
  84. </style>