d1eb8c6dac941eb06edd59e8bcc826a7de7cf02e.svn-base 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. :is="option.value"
  15. :currentObjectRgstrId="currentObjectRgstrId"
  16. :currentObjectName="currentObjectName"
  17. :currentResCode="currentResCode"
  18. :currentObjectId="currentObjectId"
  19. :activeLabel="activeLabel"
  20. :pType="pType"
  21. :openType="openType"
  22. :labelList="signatureLabelList"
  23. @cancelHandler="cancelHandler"
  24. @addShuiKuSuccess="addShuiKuSuccess"
  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 jichuxinxi from "./xskcxjg/jichuxinxi.vue"
  36. import baseInfo from "./xskcxjg/baseInfo.vue"
  37. import localStat from "./xskcxjg/localStat.vue"
  38. import problemList from "./xskcxjgProblemList"
  39. import pblmConfirmShett from "../duChaDuiXiang/pblmConfirmShett"
  40. export default {
  41. components: {
  42. jichuxinxi:jichuxinxi,
  43. baseInfo:baseInfo,
  44. localStat:localStat,
  45. problemList:problemList,
  46. pblmConfirmShett
  47. },
  48. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType','openType'],
  49. data() {
  50. return {
  51. options: [
  52. {
  53. value: "jichuxinxi",
  54. label: "基础信息"
  55. },
  56. {
  57. value: "baseInfo",
  58. label: "基本情况"
  59. },
  60. {
  61. value: "localStat",
  62. label: "现场检查照片"
  63. },
  64. {
  65. value: "problemList",
  66. label: '问题清单'
  67. },
  68. {
  69. value: "pblmConfirmShett",
  70. label: '问题确认单'
  71. }
  72. ],
  73. value: "",
  74. dialogShow: false,
  75. currentViewId: "基础信息",
  76. dialogFormVisible: true,
  77. activeLabel: '',
  78. signatureLabelList: ['督查人员','被检查单位']
  79. };
  80. },
  81. computed: {
  82. persId() {
  83. return localStorage.getItem("userid")
  84. ? localStorage.getItem("userid")
  85. : "1098101939614724096";
  86. },
  87. currentRlcode() {
  88. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  89. }
  90. },
  91. mounted() {
  92. },
  93. watch: {},
  94. methods: {
  95. submitHandler() {
  96. var _self = this;
  97. getRsByRgstrId(this.currentObjectRgstrId, this.pType).then(
  98. (res) => {
  99. if (res.data.baseStat == '0') {
  100. this.$message({
  101. message: '请填写重点环节落实情况!',
  102. type: 'warning'
  103. });
  104. return
  105. } else if (res.data.presStat == '0') {
  106. this.$message({
  107. message: '请填写责任人状态!',
  108. type: 'warning'
  109. });
  110. return
  111. } else if (res.data.resRunStat == '0') {
  112. this.$message({
  113. message: '请填写水库工程实体和运行管理情况!',
  114. type: 'warning'
  115. });
  116. return
  117. } else if (res.data.viewStat == '0') {
  118. this.$message({
  119. message: '走访用户状态!',
  120. type: 'warning'
  121. });
  122. return
  123. }
  124. this.$confirm('请确认所有信息填报完毕?', '提示', {
  125. confirmButtonText: '确定',
  126. cancelButtonText: '取消',
  127. type: 'warning'
  128. }).then(() => {
  129. let formObj = {
  130. "rgstrId": this.currentObjectRgstrId,
  131. "state": "2"
  132. }
  133. let url = '/dc/insp/rsvrRgstr/update';
  134. if(this.pType==22){
  135. url = '/bis/insp/rsml/rgstr';
  136. }
  137. request.post(url, formObj).then((res) => {
  138. if (res.success) {
  139. _self.$emit("addShuiKuSuccess");
  140. _self.$message.success("提交成功");
  141. } else {
  142. _self.$emit('cancelHandler');
  143. }
  144. });
  145. }).catch(() => {
  146. });
  147. }, (err) => {
  148. });
  149. },
  150. closeHandler() {
  151. this.dialogShow = false
  152. this.$emit("addShuiKuSuccess");
  153. },
  154. appearDialog(type) {
  155. this.dialogShow = true
  156. // this.problemSmallType = type
  157. },
  158. closePDialog() {
  159. this.dialogShow = false
  160. },
  161. showDialog() {
  162. this.dialogFormVisible = true;
  163. },
  164. cancelHandler() {
  165. this.$emit('cancelHandler');
  166. },
  167. addShuiKuSuccess() {
  168. this.$emit('addShuiKuSuccess');
  169. },
  170. closeDialog() {
  171. this.$confirm('确认退出吗?', '提示', {
  172. confirmButtonText: '确定',
  173. cancelButtonText: '取消',
  174. type: 'warning'
  175. }).then(() => {
  176. this.$emit('cancelHandler');
  177. }).catch(() => {
  178. });
  179. },
  180. tabIndexChange(item) {
  181. if (item.label == '问题清单') {
  182. this.activeLabel = item.label
  183. } else {
  184. this.activeLabel = ''
  185. }
  186. }
  187. }
  188. };
  189. </script>
  190. <style>
  191. #shuikutianbaoId .el-dialog {
  192. margin-top: 10vh;
  193. }
  194. </style>