4d63801ba69ebd10f422253944edfcf74976fba6.svn-base 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <div id="yigonglitianbaoId">
  3. <el-dialog :title="currentObjectName+'督查填报'" width="60%" :before-close="closeDialog"
  4. :visible.sync="dialogFormVisible">
  5. <el-container>
  6. <el-main id="dxdcListMain" style="padding:5px 20px;">
  7. <el-tabs v-model="currentViewId" type="card" @tab-click="tabIndexChange">
  8. <el-tab-pane
  9. :label="option.label"
  10. :name="option.label"
  11. v-for="option in options"
  12. :key="option.value">
  13. <component
  14. v-if="currentViewId == option.label"
  15. :is="option.value"
  16. :currentObjectRgstrId="currentObjectRgstrId"
  17. :currentObjectName="currentObjectName"
  18. :currentResCode="currentResCode"
  19. :currentObjectId="currentObjectId"
  20. :activeLabel="activeLabel"
  21. :rowData="rowData"
  22. :name="option.label"
  23. @cancelHandler="cancelHandler"
  24. @addxinRenYinSuccess="addyiGongLiSuccess"
  25. ></component>
  26. </el-tab-pane>
  27. </el-tabs>
  28. </el-main>
  29. </el-container>
  30. </el-dialog>
  31. </div>
  32. </template>
  33. <script>
  34. import request from "@util/gw_ajax_request.js";
  35. import {getrgstrIdObject} from "@api/duChaTianBao.js";
  36. export default {
  37. components: {
  38. engineeringOperationList: resolve => {
  39. require(["./engineeringOperationList.vue"], resolve);
  40. },
  41. countySymposium: resolve => {
  42. require(["./countySymposium.vue"], resolve);
  43. },
  44. yongShuiHuGuanGaiYongShui: resolve => {
  45. require(["./yongShuiHuGuanGaiYongShui.vue"], resolve);
  46. },
  47. problemList: resolve => {
  48. require(["./problemList.vue"], resolve);
  49. }
  50. },
  51. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName'],
  52. data() {
  53. return {
  54. options: [
  55. {
  56. value: "yongShuiHuGuanGaiYongShui",
  57. label: '用水户和工程情况表'
  58. },
  59. {
  60. value: "engineeringOperationList",
  61. label: '乡镇交流情况表'
  62. },
  63. {
  64. value: "countySymposium",
  65. label: '县级座谈情况表'
  66. },
  67. {
  68. value: "problemList",
  69. label: '问题清单'
  70. }
  71. ],
  72. // options: [
  73. // {
  74. // value: "engineeringOperationList",
  75. // label: "用水户和工程情况表",
  76. // type: '11'
  77. // },
  78. // {
  79. // value: "engineeringOperationList",
  80. // label: '工程运行管理情况表(渠道)',
  81. // type: '10'
  82. // },
  83. // {
  84. // value: "engineeringOperationList",
  85. // label: '工程运行管理情况表(管道)',
  86. // type: '9'
  87. // },
  88. // {
  89. // value: "engineeringOperationList",
  90. // label: '工程运行管理情况表(喷灌)',
  91. // type: '8'
  92. // },
  93. // {
  94. // value: "engineeringOperationList",
  95. // label: '工程运行管理情况表(微灌)',
  96. // type: '7'
  97. // },
  98. // {
  99. // value: "engineeringOperationList",
  100. // label: '工程运行管理情况表(泵站)',
  101. // type: '6'
  102. // },
  103. // {
  104. // value: "engineeringOperationList",
  105. // label: '工程运行管理情况表(塘坝)',
  106. // type: '5'
  107. // },
  108. // {
  109. // value: "engineeringOperationList",
  110. // label: '工程运行管理情况表(水窖、水池等小型蓄水设施)',
  111. // type: '4'
  112. // },
  113. // {
  114. // value: "engineeringOperationList",
  115. // label: '工程运行管理情况表(堰闸)',
  116. // type: '3'
  117. // },
  118. // {
  119. // value: "engineeringOperationList",
  120. // label: '工程运行管理情况表(机井)',
  121. // type: '2'
  122. // },
  123. // {
  124. // value: "engineeringOperationList",
  125. // label: '乡镇交流情况表',
  126. // type: '1'
  127. // },
  128. // {
  129. // value: "countySymposium",
  130. // label: '县级座谈情况表'
  131. // }
  132. // ],
  133. value: "",
  134. dialogShow: false,
  135. currentViewId: "用水户和工程情况表",
  136. dialogFormVisible: true,
  137. activeLabel: ''
  138. };
  139. },
  140. computed: {
  141. persId() {
  142. return localStorage.getItem("userid")
  143. ? localStorage.getItem("userid")
  144. : "1098101939614724096";
  145. }
  146. },
  147. mounted() {
  148. },
  149. watch: {},
  150. methods: {
  151. submitHandler() {
  152. var _self = this;
  153. getrgstrIdObject(this.rowData.code, this.rowData.objId).then(
  154. (res) => {
  155. this.$confirm('请确认所有信息填报完毕?', '提示', {
  156. confirmButtonText: '确定',
  157. cancelButtonText: '取消',
  158. type: 'warning'
  159. }).then(() => {
  160. let formObj = {
  161. "rgstrId": this.currentObjectRgstrId,
  162. "state": "2"
  163. }
  164. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  165. if (res.success) {
  166. _self.$emit("addyiGongLiSuccess");
  167. _self.$message.success("提交成功");
  168. } else {
  169. _self.$emit('cancelHandler');
  170. }
  171. });
  172. }).catch(() => {
  173. });
  174. }, (err) => {
  175. });
  176. },
  177. closeHandler() {
  178. this.dialogShow = false
  179. this.$emit("addyiGongLiSuccess");
  180. },
  181. appearDialog(type) {
  182. this.dialogShow = true
  183. // this.problemSmallType = type
  184. },
  185. closePDialog() {
  186. this.dialogShow = false
  187. },
  188. showDialog() {
  189. this.dialogFormVisible = true;
  190. },
  191. cancelHandler() {
  192. this.$emit('cancelHandler');
  193. },
  194. addyiGongLiSuccess() {
  195. this.$emit('addyiGongLiSuccess');
  196. },
  197. closeDialog() {
  198. this.$confirm('确认退出吗?', '提示', {
  199. confirmButtonText: '确定',
  200. cancelButtonText: '取消',
  201. type: 'warning'
  202. }).then(() => {
  203. this.$emit('cancelHandler');
  204. }).catch(() => {
  205. });
  206. },
  207. tabIndexChange(item) {
  208. },
  209. addyiGongLiSuccess() {
  210. this.$emit('addyiGongLiSuccess');
  211. }
  212. }
  213. };
  214. </script>
  215. <style>
  216. #yigonglitianbaoId .el-dialog {
  217. margin-top: 10vh;
  218. }
  219. </style>