f566b43581ff531d28d0dde190fc076ab3e13f4e.svn-base 2.8 KB

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