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