b3b032795b5ffcd448a068ef3f7d431d308a8d40.svn-base 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!-- -->
  2. <template>
  3. <div id="popupContainer" class=''>
  4. <el-dialog :title="currentObjectName" @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. :currentObjectRgstrId="currentObjectRgstrId"
  14. :currentObjectName="currentObjectName"
  15. :currentObjectId="currentObjectId">
  16. </component>
  17. </el-tab-pane>
  18. </el-tabs>
  19. </el-dialog>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. components: {
  25. jichuxinxi: resolve => {
  26. require(['./jichuxinxi.vue'], resolve)
  27. },//基础信息
  28. dengjixinxi: resolve => {
  29. require(['./dengjixinxi.vue'], resolve)
  30. }//登记信息
  31. },
  32. props: ["currentObjectRgstrId", "currentObjectId", "currentObjectName", "activeName"],
  33. data() {
  34. return {
  35. currentViewId: '基础信息',
  36. dialogFormVisible: true,
  37. options: [
  38. {
  39. value: "jichuxinxi",
  40. label: "基础信息"
  41. }, {
  42. value: "dengjixinxi",
  43. label: "登记信息"
  44. }
  45. ]
  46. };
  47. },
  48. computed: {},
  49. watch: {},
  50. //生命周期 - 创建完成(可以访问当前this实例)
  51. created() {
  52. },
  53. //生命周期 - 挂载完成(可以访问DOM元素)
  54. mounted() {
  55. this.$nextTick(() => {
  56. this.currentViewId = this.activeName;
  57. })
  58. },
  59. beforeCreate() {
  60. }, //生命周期 - 创建之前
  61. beforeMount() {
  62. }, //生命周期 - 挂载之前
  63. beforeUpdate() {
  64. }, //生命周期 - 更新之前
  65. updated() {
  66. }, //生命周期 - 更新之后
  67. beforeDestroy() {
  68. }, //生命周期 - 销毁之前
  69. destroyed() {
  70. }, //生命周期 - 销毁完成
  71. activated() {
  72. }, //如果页面有keep-alive缓存功能,这个函数会触发
  73. methods: {
  74. closeDialog() {
  75. this.$emit("cancelHandler");
  76. },
  77. showDialog() {
  78. this.dialogFormVisible = true;
  79. },
  80. },
  81. }
  82. </script>
  83. <style scoped>
  84. /*@import url(); 引入公共css类*/
  85. .el-dialog__header {
  86. text-align: center !important;
  87. border-bottom: 1px dashed #C5C6C8 !important;
  88. }
  89. .el-dialog {
  90. border-radius: 4px !important;
  91. }
  92. </style>