421c41f49cadba4b2bdb87f52ccb3d6680e3eeba.svn-base 6.6 KB

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