5e6168f77d68ffe51c2cf8df486fd9d72ebd4587.svn-base 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <el-dialog class="custom_dialog" :title="objName + '新增问题'" :visible.sync="showAddProblemDialog" append-to-body="true" @close="dialogClose">
  3. <!-- <p class="title"><i class="el-icon-edit"></i>{{classify}}{{type}}</p> -->
  4. <div style="text-align: center;">
  5. <component :is="curComponent" :objId="objId" :objType="objType" :villType="villType" :villCode="villCode" :cwsCode="cwsCode" :grwCode="grwCode" :objName="objName" :problemMiddleType="problemMiddleType" :problemSmallType="problemSmallType" :stationType="stationType" :regId="regId" :currentObjectRgstrId="currentObjectRgstrId" @closeDialog="dialogClose"></component>
  6. </div>
  7. </el-dialog>
  8. </template>
  9. <script>
  10. import yuDiBa from "./yuDiBawenti.vue"
  11. import shuiYuanDi from './shuiYuanDiwenti'
  12. import fenshuiGuankong from './fenshuiJguankongwenti'
  13. import jieshuiGuanLiWenti from './jieshuiGuanLiWenti.vue'
  14. export default {
  15. props: {
  16. // 1 小水库 2 人饮 3 水毁
  17. objType: {
  18. default: '2',
  19. // required: true
  20. },
  21. //对象类型 0 小水库 1 行政村 2 水源地 3 饮水工程 4 水毁工程
  22. villType: {
  23. default: '1',
  24. // required: true
  25. },
  26. villCode: {
  27. default: '1',
  28. // required: true
  29. },
  30. //对象id
  31. objId: {
  32. default: '',
  33. // required: true
  34. },
  35. //对象名称
  36. objName: {
  37. default: '行政村',
  38. // required: true
  39. },
  40. //问题中类型
  41. problemMiddleType: {
  42. default: '用水户情况'
  43. },
  44. //问题小类型
  45. problemSmallType: {
  46. default: '水质'
  47. },
  48. cwsCode: {
  49. default: ''
  50. },
  51. grwCode: {
  52. default: ''
  53. },
  54. stationType:{
  55. default: ''
  56. },
  57. regId:{
  58. default: ''
  59. },
  60. currentObjectRgstrId:{
  61. default: ''
  62. },
  63. showAddProblemDialog:{
  64. default: false
  65. },
  66. problData: {
  67. default: ""
  68. },
  69. },
  70. components: {
  71. 'yuDiBa': yuDiBa,
  72. 'shuiYuanDi': shuiYuanDi,
  73. 'fenshuiGuankong':fenshuiGuankong,
  74. 'jieshuiGuanLiWenti':jieshuiGuanLiWenti
  75. },
  76. data(){
  77. return{
  78. dialogTableVisible: true,
  79. curComponent: ''
  80. }
  81. },
  82. created(){
  83. if(this.objName == '淤地坝'){
  84. this.curComponent = 'yuDiBa';
  85. }else if(this.objName == '水源地'){
  86. this.curComponent = 'shuiYuanDi';
  87. }else if(this.objName == '分水及管控'){
  88. this.curComponent = 'fenshuiGuankong';
  89. }else if(this.objName == '节水管理与评价'){
  90. this.curComponent = 'jieshuiGuanLiWenti';
  91. }
  92. },
  93. methods:{
  94. dialogClose(){
  95. this.$emit('closeDialog')
  96. }
  97. }
  98. }
  99. </script>
  100. <style>
  101. .title{
  102. font-size: 16px;
  103. }
  104. .el-icon-edit{
  105. margin-right: 10px;
  106. }
  107. .custom_dialog .el-dialog{
  108. width: 55%;
  109. }
  110. .custom_dialog .el-dialog__body {
  111. padding: 30px 20px;
  112. color: #606266;
  113. font-size: 14px;
  114. height: 60vh;
  115. overflow: auto;
  116. }
  117. </style>