932e738205a5ca61df3bfbc58d5e6b310d8a228d.svn-base 5.7 KB

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