6548d3300feddbb4741a3ea77cb97211a1b19a74.svn-base 5.9 KB

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