5cf785e9239ca27e94e499e33698a9239e82e3bb.svn-base 4.2 KB

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