a02e1128267de98c1a2d369dcd91d1260b2dd11a.svn-base 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. v-if="currentViewId == option.label"
  18. :is="option.value"
  19. :currentObjectRgstrId="currentObjectRgstrId"
  20. :currentObjectName="currentObjectName"
  21. :currentResCode="currentResCode"
  22. :currentObjectId="currentObjectId"
  23. :activeLabel="activeLabel"
  24. :pType="pType"
  25. @cancelHandler="cancelHandler"
  26. @addShuiKuSuccess="addShuiKuSuccess"
  27. ></component>
  28. </el-tab-pane>
  29. </el-tabs>
  30. </el-main>
  31. <!-- </el-container> -->
  32. </el-container>
  33. <!-- <span slot="footer" class="dialog-footer" style="justify-content: flex-end;display: flex;margin-right: 20px;">
  34. <el-button @click="closeHandler">关 闭</el-button>
  35. <el-button type="primary" @click="submitHandler">提 交</el-button>
  36. </span> -->
  37. <!-- 添加/编辑人员弹窗 -->
  38. </el-dialog>
  39. </div>
  40. </template>
  41. <script>
  42. import request from "../../utils/gw_ajax_request.js";
  43. import guanlizerentixi from "./difang/guanlizerentixi.vue";
  44. import gongchengshitijiancha from "./difang/gongchengshitijiancha.vue"
  45. import richangguanliweihu from "./difang/richangguanliweihu.vue"
  46. import jichuxinxi from "./difang/jichuxinxi.vue"
  47. import anquanguanli from "./difang/anquanguanli.vue"
  48. import problemList from './difangProblemList.vue'
  49. import problemDialog from '../duChaWenTi/problemDialog.vue'
  50. import {getrgstrIdObject} from "../../api/duChaTianBao.js";
  51. export default {
  52. components: {
  53. guanlizerentixi: guanlizerentixi,
  54. gongchengshitijiancha: gongchengshitijiancha,
  55. richangguanliweihu: richangguanliweihu,
  56. jichuxinxi: jichuxinxi,
  57. anquanguanli: anquanguanli,
  58. problemDialog: problemDialog,
  59. problemList: problemList,
  60. },
  61. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType'],
  62. data() {
  63. return {
  64. options: [
  65. {
  66. value: "jichuxinxi",
  67. label: "基础信息纠错"
  68. }, {
  69. value: "guanlizerentixi",
  70. label: '管理责任体系'
  71. }, {
  72. value: "anquanguanli",
  73. label: '安全管理'
  74. }, {
  75. value: "richangguanliweihu",
  76. label: '日常管理与维护'
  77. }, {
  78. value: "gongchengshitijiancha",
  79. label: '工程实体检查'
  80. }, {
  81. value: "problemList",
  82. label: '问题清单'
  83. }
  84. ],
  85. value: "",
  86. dialogShow: false,
  87. currentViewId: "基础信息纠错",
  88. dialogFormVisible: true,
  89. activeLabel: ''
  90. };
  91. },
  92. computed: {
  93. persId() {
  94. return localStorage.getItem("userid")
  95. ? localStorage.getItem("userid")
  96. : "1098101939614724096";
  97. }
  98. },
  99. mounted() {
  100. },
  101. watch: {},
  102. methods: {
  103. submitHandler() {
  104. var _self = this;
  105. getrgstrIdObject(this.rowData.code, this.rowData.objId).then(
  106. (res) => {
  107. if (res.data.baseStat == '0') {
  108. this.$message({
  109. message: '请填写重点环节落实情况!',
  110. type: 'warning'
  111. });
  112. return
  113. } else if (res.data.presStat == '0') {
  114. this.$message({
  115. message: '请填写责任人状态!',
  116. type: 'warning'
  117. });
  118. return
  119. } else if (res.data.resRunStat == '0') {
  120. this.$message({
  121. message: '请填写水库工程实体和运行管理情况!',
  122. type: 'warning'
  123. });
  124. return
  125. } else if (res.data.viewStat == '0') {
  126. this.$message({
  127. message: '走访用户状态!',
  128. type: 'warning'
  129. });
  130. return
  131. }
  132. this.$confirm('请确认所有信息填报完毕?', '提示', {
  133. confirmButtonText: '确定',
  134. cancelButtonText: '取消',
  135. type: 'warning'
  136. }).then(() => {
  137. let formObj = {
  138. "rgstrId": this.currentObjectRgstrId,
  139. "state": "2"
  140. }
  141. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  142. if (res.success) {
  143. _self.$emit("addShuiKuSuccess");
  144. _self.$message.success("提交成功");
  145. } else {
  146. _self.$emit('cancelHandler');
  147. }
  148. });
  149. }).catch(() => {
  150. });
  151. }, (err) => {
  152. });
  153. },
  154. closeHandler() {
  155. this.dialogShow = false
  156. this.$emit("addShuiKuSuccess");
  157. },
  158. appearDialog(type) {
  159. this.dialogShow = true
  160. // this.problemSmallType = type
  161. },
  162. closePDialog() {
  163. this.dialogShow = false
  164. },
  165. showDialog() {
  166. this.dialogFormVisible = true;
  167. },
  168. cancelHandler() {
  169. this.$emit('cancelHandler');
  170. },
  171. addShuiKuSuccess() {
  172. this.$emit('addShuiKuSuccess');
  173. },
  174. closeDialog() {
  175. this.$confirm('确认退出吗?', '提示', {
  176. confirmButtonText: '确定',
  177. cancelButtonText: '取消',
  178. type: 'warning'
  179. }).then(() => {
  180. this.$emit('cancelHandler');
  181. }).catch(() => {
  182. });
  183. },
  184. tabIndexChange(item) {
  185. if (item.label == '问题清单') {
  186. this.activeLabel = item.label
  187. } else {
  188. this.activeLabel = ''
  189. }
  190. }
  191. }
  192. };
  193. </script>
  194. <style>
  195. #shuikutianbaoId .el-dialog {
  196. margin-top: 10vh;
  197. }
  198. </style>