a92b346d47fa8073d2af8dd0201dd8066655be99.svn-base 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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-main id="dxdcListMain" style="padding:5px 20px;">
  7. <el-tabs v-model="currentViewId" type="card" @tab-click="tabIndexChange">
  8. <el-tab-pane
  9. :label="option.label"
  10. :name="option.label"
  11. v-for="option in options"
  12. :key="option.value">
  13. <component
  14. :is="option.value"
  15. :currentObjectRgstrId="currentObjectRgstrId"
  16. :currentObjectName="currentObjectName"
  17. :currentResCode="currentResCode"
  18. :currentObjectId="currentObjectId"
  19. :activeLabel="activeLabel"
  20. :pType="pType"
  21. :openType="openType"
  22. :labelList="signatureLabelList"
  23. @cancelHandler="cancelHandler"
  24. @addShuiKuSuccess="addShuiKuSuccess"
  25. ></component>
  26. </el-tab-pane>
  27. </el-tabs>
  28. </el-main>
  29. </el-container>
  30. </el-dialog>
  31. </div>
  32. </template>
  33. <script>
  34. import request from "@util/gw_ajax_request.js";
  35. import {getrgstrIdObject, getRsByRgstrId} from "@api/duChaTianBao.js";
  36. import jichuxinxi from "./xsdyhgl/jichuxinxi.vue"
  37. import signature from "./xsdyhgl/signature.vue"
  38. import bldfltState from "./xsdyhgl/bldfltState.vue"
  39. import devState from "./xsdyhgl/devState.vue"
  40. import safeState from "./xsdyhgl/safeState.vue"
  41. import runState from "./xsdyhgl/runState.vue"
  42. import dutyState from "./xsdyhgl/dutyState.vue"
  43. import otherState from "./xsdyhgl/otherState.vue"
  44. import problemList from "./xsdyhglProblemList"
  45. import pblmConfirmShett from "../duChaDuiXiang/pblmConfirmShett"
  46. export default {
  47. components: {
  48. jichuxinxi:jichuxinxi,
  49. signature:signature,
  50. bldfltState:bldfltState,
  51. devState:devState,
  52. safeState:safeState,
  53. runState:runState,
  54. dutyState:dutyState,
  55. otherState:otherState,
  56. problemList:problemList,
  57. pblmConfirmShett:pblmConfirmShett
  58. },
  59. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType','openType'],
  60. data() {
  61. return {
  62. optionList:[],
  63. options: [
  64. {
  65. value: "jichuxinxi",
  66. label: "基础信息"
  67. },
  68. // {
  69. // value: "signature",
  70. // label: '签字确认'
  71. // },
  72. {
  73. value: "bldfltState",
  74. label: '水工建筑物和金属结构'
  75. },
  76. {
  77. value: "devState",
  78. label: '设备设施'
  79. },
  80. {
  81. value: "safeState",
  82. label: '安全管理'
  83. },
  84. {
  85. value: "runState",
  86. label: '运行人员'
  87. },
  88. {
  89. value: "dutyState",
  90. label: '安全责任主体落实情况'
  91. },
  92. {
  93. value: "otherState",
  94. label: '其他情况说明'
  95. },
  96. {
  97. value: "problemList",
  98. label: '问题清单'
  99. },
  100. // {
  101. // value: "pblmConfirmShett",
  102. // label: '问题确认单'
  103. // }
  104. ],
  105. value: "",
  106. dialogShow: false,
  107. currentViewId: "基础信息",
  108. dialogFormVisible: true,
  109. activeLabel: '',
  110. signatureLabelList: ['检查人员签字确认','被检查单位签字确认']
  111. };
  112. },
  113. computed: {
  114. persId() {
  115. return localStorage.getItem("userid")
  116. ? localStorage.getItem("userid")
  117. : "1098101939614724096";
  118. },
  119. currentRlcode() {
  120. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  121. }
  122. },
  123. mounted() {
  124. this.initTab();
  125. },
  126. watch: {},
  127. methods: {
  128. initTab(){
  129. this.optionList = [];
  130. this.optionList = this.options;
  131. if(this.rowData.ndstyType=='1'){
  132. this.optionList = this.optionList.concat(this.options1);
  133. }
  134. if(this.rowData.isUnit=='1'){
  135. this.optionList = this.optionList.concat(this.options2);
  136. }
  137. this.optionList = this.optionList.concat(this.options3);
  138. },
  139. submitHandler() {
  140. var _self = this;
  141. getRsByRgstrId(this.currentObjectRgstrId, this.pType).then(
  142. (res) => {
  143. if (res.data.baseStat == '0') {
  144. this.$message({
  145. message: '请填写重点环节落实情况!',
  146. type: 'warning'
  147. });
  148. return
  149. } else if (res.data.presStat == '0') {
  150. this.$message({
  151. message: '请填写责任人状态!',
  152. type: 'warning'
  153. });
  154. return
  155. } else if (res.data.resRunStat == '0') {
  156. this.$message({
  157. message: '请填写水库工程实体和运行管理情况!',
  158. type: 'warning'
  159. });
  160. return
  161. } else if (res.data.viewStat == '0') {
  162. this.$message({
  163. message: '走访用户状态!',
  164. type: 'warning'
  165. });
  166. return
  167. }
  168. this.$confirm('请确认所有信息填报完毕?', '提示', {
  169. confirmButtonText: '确定',
  170. cancelButtonText: '取消',
  171. type: 'warning'
  172. }).then(() => {
  173. let formObj = {
  174. "rgstrId": this.currentObjectRgstrId,
  175. "state": "2"
  176. }
  177. let url = '/dc/insp/rsvrRgstr/update';
  178. if(this.pType==22){
  179. url = '/bis/insp/rsml/rgstr';
  180. }
  181. request.post(url, formObj).then((res) => {
  182. if (res.success) {
  183. _self.$emit("addShuiKuSuccess");
  184. _self.$message.success("提交成功");
  185. } else {
  186. _self.$emit('cancelHandler');
  187. }
  188. });
  189. }).catch(() => {
  190. });
  191. }, (err) => {
  192. });
  193. },
  194. closeHandler() {
  195. this.dialogShow = false
  196. this.$emit("addShuiKuSuccess");
  197. },
  198. appearDialog(type) {
  199. this.dialogShow = true
  200. // this.problemSmallType = type
  201. },
  202. closePDialog() {
  203. this.dialogShow = false
  204. },
  205. showDialog() {
  206. this.dialogFormVisible = true;
  207. },
  208. cancelHandler() {
  209. this.$emit('cancelHandler');
  210. },
  211. addShuiKuSuccess() {
  212. this.$emit('addShuiKuSuccess');
  213. },
  214. addShuiKuSuccess1(obj) {
  215. this.optionList = [];
  216. this.optionList = this.options;
  217. if(obj.ndstyType=='1'){
  218. this.optionList = this.optionList.concat(this.options1);
  219. }
  220. if(obj.isUnit=='1'){
  221. this.optionList = this.optionList.concat(this.options2);
  222. }
  223. this.optionList = this.optionList.concat(this.options3);
  224. this.$emit('addShuiKuSuccess');
  225. },
  226. closeDialog() {
  227. this.$confirm('确认退出吗?', '提示', {
  228. confirmButtonText: '确定',
  229. cancelButtonText: '取消',
  230. type: 'warning'
  231. }).then(() => {
  232. this.$emit('cancelHandler');
  233. }).catch(() => {
  234. });
  235. },
  236. tabIndexChange(item) {
  237. if (item.label == '问题清单') {
  238. this.activeLabel = item.label
  239. } else {
  240. this.activeLabel = ''
  241. }
  242. }
  243. }
  244. };
  245. </script>
  246. <style>
  247. #shuikutianbaoId .el-dialog {
  248. margin-top: 10vh;
  249. }
  250. </style>