e9fa3a689bc6940befd5de3201bbc9eb4d6d36aa.svn-base 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. :currentYsdwCode="currentYsdwCode"
  16. :currentObjectId="currentObjectId"
  17. :currentObjectType="currentObjectType">
  18. </component>
  19. </el-tab-pane>
  20. </el-tabs>
  21. </el-dialog>
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. components: {
  27. jichuxinxi:resolve => {require(['./jichuxinxi.vue'], resolve)},//基础信息
  28. dengjixinxi:resolve => {require(['./dengjixinxi.vue'], resolve)},//登记信息
  29. ysdwjyys:resolve => {require(['./ysdwjyys.vue'], resolve)},//用水单位节约用水情况抽查表
  30. jsxdw:resolve => {require(['./jsxdw.vue'], resolve)},//节水型单位节约用水情况抽查表
  31. problemList:resolve => {require(['./problemList.vue'], resolve)},//问题清单
  32. },
  33. props: ["currentDuchaTpe","currentObjectRgstrId","currentYsdwCode","currentObjectId","currentObjectName","currentObjectType"],
  34. data() {
  35. return {
  36. currentViewId:'基础信息',
  37. dialogFormVisible:true,
  38. options:[],
  39. options_ducha: [
  40. {
  41. value: "jichuxinxi",
  42. label: "基础信息"
  43. },{
  44. value: "dengjixinxi",
  45. label: "登记信息"
  46. },{
  47. value: "ysdwjyys",
  48. label: "用水单位节约用水情况抽查表"
  49. },{
  50. value: "jsxdw",
  51. label: "节水型单位节约用水情况抽查表"
  52. },{
  53. value: "problemList",
  54. label: "问题清单"
  55. }
  56. ],
  57. options_ducha_feijishui: [
  58. {
  59. value: "jichuxinxi",
  60. label: "基础信息"
  61. },{
  62. value: "dengjixinxi",
  63. label: "登记信息"
  64. },{
  65. value: "ysdwjyys",
  66. label: "用水单位节约用水情况抽查表"
  67. },{
  68. value: "problemList",
  69. label: "问题清单"
  70. }
  71. ],
  72. options_base: [
  73. {
  74. value: "jichuxinxi",
  75. label: "基础信息"
  76. }
  77. ],
  78. };
  79. },
  80. computed: {},
  81. watch: {
  82. currentDuchaTpe(n,o){
  83. if(n){
  84. this.options = this.options_ducha;
  85. }else{
  86. this.options = this.options_base;
  87. }
  88. }
  89. },
  90. //生命周期 - 创建完成(可以访问当前this实例)
  91. created() {
  92. },
  93. //生命周期 - 挂载完成(可以访问DOM元素)
  94. mounted() {
  95. if(this.currentDuchaTpe){
  96. if(this.currentObjectType == '1'){
  97. this.options = this.options_ducha;//节水型
  98. }else{
  99. this.options = this.options_ducha_feijishui;//非节水型
  100. }
  101. }else{
  102. this.options = this.options_base;
  103. }
  104. },
  105. beforeCreate() {}, //生命周期 - 创建之前
  106. beforeMount() {}, //生命周期 - 挂载之前
  107. beforeUpdate() {}, //生命周期 - 更新之前
  108. updated() {}, //生命周期 - 更新之后
  109. beforeDestroy() {}, //生命周期 - 销毁之前
  110. destroyed() {}, //生命周期 - 销毁完成
  111. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  112. methods: {
  113. closeDialog() {
  114. this.$emit("cancelHandler");
  115. },
  116. showDialog() {
  117. this.dialogFormVisible = true;
  118. },
  119. },
  120. }
  121. </script>
  122. <style scoped>
  123. /*@import url(); 引入公共css类*/
  124. .el-dialog__header{
  125. text-align: center !important;
  126. border-bottom: 1px dashed #C5C6C8 !important;
  127. }
  128. .el-dialog{
  129. border-radius: 4px !important;
  130. }
  131. </style>