3b97a02b7f4cb1459122cf882fc7808c754c744b.svn-base 5.3 KB

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