17bd636b01a34257a0c351105d65c8d5a6557c8c.svn-base 5.6 KB

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