f79994d5b739dffbc40aa08bb51ce36a88d5e6b8.svn-base 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div id="shuikutianbaoId">
  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="option.label == currentViewId"
  15. :is="option.value"
  16. :currentObjectRgstrId="currentObjectRgstrId"
  17. :ssxMid="ssxMid"
  18. :currentObjectName="currentObjectName"
  19. :currentObjectCode="currentObjectCode"
  20. :currentObjectWintCode="currentObjectWintCode"
  21. :currentObjectId="currentObjectId"
  22. :activeLabel="activeLabel"
  23. :szRuls="szRuls"
  24. :baseId="baseId"
  25. @cancelHandler="cancelHandler"
  26. @addQuShuiKouSuccess="addQuShuiKouSuccess"
  27. ></component>
  28. </el-tab-pane>
  29. </el-tabs>
  30. </el-main>
  31. </el-container>
  32. </el-dialog>
  33. </div>
  34. </template>
  35. <script>
  36. import request from "@util/gw_ajax_request.js";
  37. import jichuxinxi from "./shuiZiYuanGuanLiBaseinfo.vue"
  38. import waterPipeControlGroundwater from "./waterPipeControlGroundwater.vue"
  39. import waterIntakeSupervisionList from "./waterIntakeSupervisionList.vue"
  40. import pblZhengGaiLuoShiList from "./pblmZhenggaiLuoshiList.vue"
  41. import problemList from './shuiZiYuanGuanLiProblemList.vue'
  42. import {getrgstrIdObject} from "@api/duChaTianBao.js";
  43. export default {
  44. components: {
  45. jichuxinxi: jichuxinxi,
  46. waterPipeControlGroundwater: waterPipeControlGroundwater,
  47. waterIntakeSupervisionList: waterIntakeSupervisionList,
  48. pblZhengGaiLuoShiList: pblZhengGaiLuoShiList,
  49. problemList: problemList
  50. },
  51. props: ['rowData', 'currentObjectRgstrId', 'currentObjectCode', 'baseId', 'ssxMid', 'currentObjectWintCode', 'currentObjectId', 'currentObjectName'],
  52. data() {
  53. return {
  54. options: [
  55. {
  56. value: "jichuxinxi",
  57. label: "基础信息纠错"
  58. },
  59. {
  60. value: "waterPipeControlGroundwater",
  61. label: '取用水管控及地下水监管情况'
  62. },
  63. // {
  64. // value: "waterIntakeSupervisionList",
  65. // label: '取水口取水监管情况'
  66. // },
  67. {
  68. value: "pblZhengGaiLuoShiList",
  69. label: '2019年问题整改落实情况表'
  70. },
  71. {
  72. value: "problemList",
  73. label: '问题清单'
  74. }
  75. ],
  76. value: "",
  77. dialogShow: false,
  78. currentViewId: "基础信息纠错",
  79. dialogFormVisible: true,
  80. activeLabel: '',
  81. tableName: '',
  82. szRuls: []
  83. };
  84. },
  85. computed: {
  86. persId() {
  87. return localStorage.getItem("userid")
  88. ? localStorage.getItem("userid")
  89. : "1098101939614724096";
  90. }
  91. },
  92. mounted() {
  93. this.getPblmType()
  94. },
  95. watch: {
  96. tableName() {
  97. this.getPblmType();
  98. }
  99. },
  100. methods: {
  101. submitHandler() {
  102. var _self = this;
  103. getrgstrIdObject(this.rowData.code, this.rowData.objId).then(
  104. (res) => {
  105. this.$confirm('请确认所有信息填报完毕?', '提示', {
  106. confirmButtonText: '确定',
  107. cancelButtonText: '取消',
  108. type: 'warning'
  109. }).then(() => {
  110. let formObj = {
  111. "rgstrId": this.currentObjectRgstrId,
  112. "state": "2"
  113. }
  114. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  115. if (res.success) {
  116. _self.$emit("addQuShuiKouSuccess");
  117. _self.$message.success("提交成功");
  118. } else {
  119. _self.$emit('cancelHandler');
  120. }
  121. });
  122. }).catch(() => {
  123. });
  124. }, (err) => {
  125. });
  126. },
  127. closeHandler() {
  128. this.dialogShow = false
  129. this.$emit("addQuShuiKouSuccess");
  130. },
  131. appearDialog(type) {
  132. this.dialogShow = true
  133. // this.problemSmallType = type
  134. },
  135. closePDialog() {
  136. this.dialogShow = false
  137. },
  138. showDialog() {
  139. this.dialogFormVisible = true;
  140. },
  141. cancelHandler() {
  142. this.$emit('cancelHandler');
  143. },
  144. addQuShuiKouSuccess() {
  145. this.$emit('addQuShuiKouSuccess');
  146. },
  147. closeDialog() {
  148. this.$confirm('确认退出吗?', '提示', {
  149. confirmButtonText: '确定',
  150. cancelButtonText: '取消',
  151. type: 'warning'
  152. }).then(() => {
  153. this.$emit('cancelHandler');
  154. }).catch(() => {
  155. });
  156. },
  157. tabIndexChange(item) {
  158. if (item.index == 1) {
  159. this.tableName = 'BIS_INSP_WRM_RGSTR_MACOWIAG';
  160. } else if (item.index == 2){
  161. this.tableName = 'BIS_INSP_WRM_RGSTR_WINT';
  162. }
  163. },
  164. handleClickTabs(tab, event) {
  165. this.activedName = tab.label;
  166. },
  167. getPblmType() {
  168. const obj = {
  169. tname: this.tableName
  170. }
  171. request.post("/bis/insp/item/ques/info/findItemByType", obj).then(res => {
  172. console.log(res);
  173. this.szRuls = res.data;
  174. })
  175. }
  176. }
  177. };
  178. </script>
  179. <style>
  180. #shuikutianbaoId .el-dialog {
  181. margin-top: 10vh;
  182. }
  183. </style>