f99182a7a2bcea2e9913b0039dadd1b5738ce0c2.svn-base 6.2 KB

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