cae154c7ad997900b86618598fbcbd3a20d02829.svn-base 2.3 KB

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