d48fa5d73cd998678a8e879991029ffd7de912aa.svn-base 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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-container> -->
  7. <el-main id="dxdcListMain" style="padding:5px 20px;">
  8. <!-- <el-button type="primary" style="margin-bottom: 10px;position: relative;margin-left: 90%;" @click="appearDialog()">添加问题</el-button>
  9. <problem-dialog v-if="dialogShow" :objType="0" :villType="0" :objId="currentObjectId" :objName="currentObjectName" :problemMiddleType="'小水库'" :problemSmallType="problemSmallType" @closeDialog="closePDialog" :currentObjectRgstrId="currentObjectRgstrId"></problem-dialog> -->
  10. <el-tabs v-model="currentViewId" type="card" @tab-click="tabIndexChange">
  11. <el-tab-pane
  12. :label="option.label"
  13. :name="option.label"
  14. v-for="option in options"
  15. :key="option.value">
  16. <component
  17. :is="option.value"
  18. :currentObjectRgstrId="currentObjectRgstrId"
  19. :currentObjectName="currentObjectName"
  20. :currentResCode="currentResCode"
  21. :currentObjectId="currentObjectId"
  22. :activeLabel="activeLabel"
  23. :pType="pType"
  24. :openType="openType"
  25. :labelList="signatureLabelList"
  26. @cancelHandler="cancelHandler"
  27. @addShuiKuSuccess="addShuiKuSuccess"
  28. ></component>
  29. </el-tab-pane>
  30. </el-tabs>
  31. </el-main>
  32. <!-- </el-container> -->
  33. </el-container>
  34. <!-- <span slot="footer" class="dialog-footer" style="justify-content: flex-end;display: flex;margin-right: 20px;">
  35. <el-button @click="closeHandler">关 闭</el-button>
  36. <el-button type="primary" @click="submitHandler">提 交</el-button>
  37. </span> -->
  38. <!-- 添加/编辑人员弹窗 -->
  39. </el-dialog>
  40. </div>
  41. </template>
  42. <script>
  43. import request from "@util/gw_ajax_request.js";
  44. import {getrgstrIdObject, getRsByRgstrId} from "@api/duChaTianBao.js";
  45. import jichuxinxi from "./jieshuizaitifuhe/jichuxinxi.vue"
  46. import signature from "./jieshuizaitifuhe/signature.vue"
  47. import jieshuizaitifuhe from "./jieshuizaitifuhe/jieshuizaitifuhe.vue"
  48. import problemList from "./jsztfhProblemList"
  49. import {optionsForNation} from './jieshuizaitifuhe/forDifferentProvince.js'
  50. export default {
  51. components: {
  52. jichuxinxi:jichuxinxi,
  53. signature:signature,
  54. jieshuizaitifuhe:jieshuizaitifuhe,
  55. problemList:problemList,
  56. },
  57. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType','openType'],
  58. data() {
  59. return {
  60. options: [],
  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. if (this.pType == '54') {
  81. this.options = optionsForNation;
  82. } else {
  83. this.options = optionsForNation;
  84. }
  85. },
  86. watch: {},
  87. methods: {
  88. submitHandler() {
  89. var _self = this;
  90. getRsByRgstrId(this.currentObjectRgstrId, this.pType).then(
  91. (res) => {
  92. if (res.data.baseStat == '0') {
  93. this.$message({
  94. message: '请填写重点环节落实情况!',
  95. type: 'warning'
  96. });
  97. return
  98. } else if (res.data.presStat == '0') {
  99. this.$message({
  100. message: '请填写责任人状态!',
  101. type: 'warning'
  102. });
  103. return
  104. } else if (res.data.resRunStat == '0') {
  105. this.$message({
  106. message: '请填写水库工程实体和运行管理情况!',
  107. type: 'warning'
  108. });
  109. return
  110. } else if (res.data.viewStat == '0') {
  111. this.$message({
  112. message: '走访用户状态!',
  113. type: 'warning'
  114. });
  115. return
  116. }
  117. this.$confirm('请确认所有信息填报完毕?', '提示', {
  118. confirmButtonText: '确定',
  119. cancelButtonText: '取消',
  120. type: 'warning'
  121. }).then(() => {
  122. let formObj = {
  123. "rgstrId": this.currentObjectRgstrId,
  124. "state": "2"
  125. }
  126. let url = '/dc/insp/rsvrRgstr/update';
  127. if(this.pType==22){
  128. url = '/bis/insp/rsml/rgstr';
  129. }
  130. request.post(url, formObj).then((res) => {
  131. if (res.success) {
  132. _self.$emit("addShuiKuSuccess");
  133. _self.$message.success("提交成功");
  134. } else {
  135. _self.$emit('cancelHandler');
  136. }
  137. });
  138. }).catch(() => {
  139. });
  140. }, (err) => {
  141. });
  142. },
  143. closeHandler() {
  144. this.dialogShow = false
  145. this.$emit("addShuiKuSuccess");
  146. },
  147. appearDialog(type) {
  148. this.dialogShow = true
  149. // this.problemSmallType = type
  150. },
  151. closePDialog() {
  152. this.dialogShow = false
  153. },
  154. showDialog() {
  155. this.dialogFormVisible = true;
  156. },
  157. cancelHandler() {
  158. this.$emit('cancelHandler');
  159. },
  160. addShuiKuSuccess() {
  161. this.$emit('addShuiKuSuccess');
  162. },
  163. closeDialog() {
  164. this.$confirm('确认退出吗?', '提示', {
  165. confirmButtonText: '确定',
  166. cancelButtonText: '取消',
  167. type: 'warning'
  168. }).then(() => {
  169. this.$emit('cancelHandler');
  170. }).catch(() => {
  171. });
  172. },
  173. tabIndexChange(item) {
  174. if (item.label == '问题清单') {
  175. this.activeLabel = item.label
  176. } else {
  177. this.activeLabel = ''
  178. }
  179. }
  180. }
  181. };
  182. </script>
  183. <style>
  184. #shuikutianbaoId .el-dialog {
  185. margin-top: 10vh;
  186. }
  187. </style>