5d175aa7a4d6275adb5f38609b100553675b5b38.svn-base 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. :openType="openType"
  24. :wellType="wellType"
  25. @cancelHandler="cancelHandler"
  26. @addxinRenYinSuccess="addyiGongLiSuccess"
  27. @changeWellType="changeWellType"
  28. ></component>
  29. </el-tab-pane>
  30. </el-tabs>
  31. </el-main>
  32. </el-container>
  33. </el-dialog>
  34. </div>
  35. </template>
  36. <script>
  37. import request from "@util/gw_ajax_request.js";
  38. import {getrgstrIdObject} from "@api/duChaTianBao.js";
  39. import jichuxinxi from "./jichuxinxi.vue";
  40. import problemList from './problemList.vue';
  41. import inner from './inner.vue';
  42. import outside from './outside.vue';
  43. import save from './save.vue';
  44. import close from './close.vue';
  45. import signature from './signature.vue';
  46. export default {
  47. components: {
  48. jichuxinxi,
  49. signature,
  50. inner,
  51. outside,
  52. save,
  53. close,
  54. problemList
  55. },
  56. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType','wellType'],
  57. data() {
  58. return {
  59. options: [],
  60. value: "",
  61. dialogShow: false,
  62. currentViewId: "基础信息",
  63. dialogFormVisible: true,
  64. activeLabel: ''
  65. };
  66. },
  67. computed: {
  68. persId() {
  69. return localStorage.getItem("userid")
  70. ? localStorage.getItem("userid")
  71. : "1098101939614724096";
  72. }
  73. },
  74. mounted() {
  75. this.initTab();
  76. },
  77. watch: {},
  78. methods: {
  79. changeWellType(val){
  80. this.wellType=val;
  81. this.initTab();
  82. },
  83. initTab(){
  84. if(this.wellType=='1'){
  85. this.options=[
  86. {
  87. value: "jichuxinxi",
  88. label: '基础信息'
  89. },
  90. {
  91. value: "inner",
  92. label: '市域内保留井'
  93. },
  94. {
  95. value: "signature",
  96. label: '签字确认'
  97. },
  98. {
  99. value: "problemList",
  100. label: '问题清单'
  101. }
  102. ]
  103. }
  104. if(this.wellType=='2'){
  105. this.options=[
  106. {
  107. value: "jichuxinxi",
  108. label: '基础信息'
  109. },
  110. {
  111. value: "outside",
  112. label: '市域外保留井'
  113. },
  114. {
  115. value: "signature",
  116. label: '签字确认'
  117. },
  118. {
  119. value: "problemList",
  120. label: '问题清单'
  121. }
  122. ]
  123. }
  124. if(this.wellType=='3'){
  125. this.options=[
  126. {
  127. value: "jichuxinxi",
  128. label: '基础信息'
  129. },
  130. {
  131. value: "save",
  132. label: '封存抗旱井'
  133. },
  134. {
  135. value: "signature",
  136. label: '签字确认'
  137. },
  138. {
  139. value: "problemList",
  140. label: '问题清单'
  141. }
  142. ]
  143. }
  144. if(this.wellType=='4'){
  145. this.options=[
  146. {
  147. value: "jichuxinxi",
  148. label: '基础信息'
  149. },
  150. {
  151. value: "close",
  152. label: '关闭井'
  153. },
  154. {
  155. value: "signature",
  156. label: '签字确认'
  157. },
  158. {
  159. value: "problemList",
  160. label: '问题清单'
  161. }
  162. ]
  163. }
  164. },
  165. submitHandler() {
  166. var _self = this;
  167. getrgstrIdObject(this.rowData.code, this.rowData.objId).then(
  168. (res) => {
  169. this.$confirm('请确认所有信息填报完毕?', '提示', {
  170. confirmButtonText: '确定',
  171. cancelButtonText: '取消',
  172. type: 'warning'
  173. }).then(() => {
  174. let formObj = {
  175. "rgstrId": this.currentObjectRgstrId,
  176. "state": "2"
  177. }
  178. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  179. if (res.success) {
  180. _self.$emit("addyiGongLiSuccess");
  181. _self.$message.success("提交成功");
  182. } else {
  183. _self.$emit('cancelHandler');
  184. }
  185. });
  186. }).catch(() => {
  187. });
  188. }, (err) => {
  189. });
  190. },
  191. closeHandler() {
  192. this.dialogShow = false
  193. this.$emit("addyiGongLiSuccess");
  194. },
  195. appearDialog(type) {
  196. this.dialogShow = true
  197. // this.problemSmallType = type
  198. },
  199. closePDialog() {
  200. this.dialogShow = false
  201. },
  202. showDialog() {
  203. this.dialogFormVisible = true;
  204. },
  205. cancelHandler() {
  206. this.$emit('cancelHandler');
  207. },
  208. addyiGongLiSuccess() {
  209. this.$emit('addyiGongLiSuccess');
  210. },
  211. closeDialog() {
  212. this.$confirm('确认退出吗?', '提示', {
  213. confirmButtonText: '确定',
  214. cancelButtonText: '取消',
  215. type: 'warning'
  216. }).then(() => {
  217. this.$emit('cancelHandler');
  218. }).catch(() => {
  219. });
  220. },
  221. tabIndexChange(item) {
  222. },
  223. addyiGongLiSuccess() {
  224. this.$emit('addyiGongLiSuccess');
  225. }
  226. }
  227. };
  228. </script>
  229. <style>
  230. #yigonglitianbaoId .el-dialog {
  231. margin-top: 10vh;
  232. }
  233. </style>