d3498fe7a616353dec9c46a863b06306fbd509fa.svn-base 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. :currentGroupId="currentGroupId"
  15. :currentResCode="currentResCode"
  16. :currentObjectId="currentObjectId"
  17. :currentObjectName="currentObjectName"
  18. showOrEdit="show">
  19. </component>
  20. </el-tab-pane>
  21. </el-tabs>
  22. </el-dialog>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. components: {
  28. jichuxinxi:resolve => {require(['./jichuxinxi.vue'], resolve)},//基础信息
  29. luoshi:resolve => {require(['./luoshi.vue'], resolve)},//落实
  30. safe:resolve => {require(['./safe.vue'], resolve)},//安全管理
  31. yanghu:resolve => {require(['./yanghu.vue'], resolve)},//维修养护
  32. shiti:resolve => {require(['./shiti.vue'], resolve)},//维修养护
  33. problemList:resolve => {require(['./problemList.vue'], resolve)},//问题列表
  34. },
  35. props:['currentDuchaTpe','currentObjectRgstrId','currentGroupId','currentResCode','currentObjectId','currentObjectName','showOrEdit'],
  36. data() {
  37. return {
  38. currentViewId:'基础信息',
  39. dialogFormVisible:true,
  40. options: [],
  41. options_ducha: [
  42. {
  43. value: "jichuxinxi",
  44. label: "基础信息"
  45. },
  46. {
  47. value: "luoshi",
  48. label: "管理责任体系建设和落实情况"
  49. },
  50. {
  51. value: "safe",
  52. label: "安全管理情况"
  53. },
  54. {
  55. value: "yanghu",
  56. label: "日常管理和维修养护情况"
  57. },
  58. {
  59. value: "shiti",
  60. label: "工程实体情况"
  61. },
  62. {
  63. value: "problemList",
  64. label: "问题列表"
  65. }
  66. ],
  67. options_base: [
  68. {
  69. value: "jichuxinxi",
  70. label: "基础信息"
  71. }
  72. ]
  73. };
  74. },
  75. computed: {},
  76. watch: {},
  77. //生命周期 - 创建完成(可以访问当前this实例)
  78. created() {
  79. },
  80. //生命周期 - 挂载完成(可以访问DOM元素)
  81. mounted() {
  82. if(this.currentDuchaTpe){
  83. this.options = this.options_ducha;
  84. }else{
  85. this.options = this.options_base;
  86. }
  87. },
  88. beforeCreate() {}, //生命周期 - 创建之前
  89. beforeMount() {}, //生命周期 - 挂载之前
  90. beforeUpdate() {}, //生命周期 - 更新之前
  91. updated() {}, //生命周期 - 更新之后
  92. beforeDestroy() {}, //生命周期 - 销毁之前
  93. destroyed() {}, //生命周期 - 销毁完成
  94. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  95. methods: {
  96. closeDialog() {
  97. this.$emit("cancelHandler");
  98. },
  99. showDialog() {
  100. this.dialogFormVisible = true;
  101. },
  102. },
  103. }
  104. </script>
  105. <style scoped>
  106. /*@import url(); 引入公共css类*/
  107. .el-dialog__header{
  108. text-align: center !important;
  109. border-bottom: 1px dashed #C5C6C8 !important;
  110. }
  111. .el-dialog{
  112. border-radius: 4px !important;
  113. }
  114. </style>