847396b2f332bf8cf80069ced1871f58ff31f6df.svn-base 6.8 KB

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