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