acd5ed321a0e836fc2fd4df7d769abdcf098d3b6.svn-base 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. :currentNodeId="currentNodeId"
  22. :openType="openType"
  23. :labelList="signatureLabelList"
  24. @cancelHandler="cancelHandler"
  25. @addShuiKuSuccess="addShuiKuSuccess"
  26. ></component>
  27. </el-tab-pane>
  28. </el-tabs>
  29. </el-main>
  30. </el-container>
  31. </el-dialog>
  32. </div>
  33. </template>
  34. <script>
  35. import request from "@util/gw_ajax_request.js";
  36. import {getrgstrIdObject, getRsByRgstrId} from "@api/duChaTianBao.js";
  37. import jichuxinxi from "./guanlidanwei/jichuxinxi.vue"
  38. import mubiaozhizePage from "./guanlidanwei/mubiaozhizePage.vue"
  39. import zhiduhuaguanliPage from "./guanlidanwei/zhiduhuaguanliPage.vue"
  40. import peixunjiaoyuPage from "./guanlidanwei/peixunjiaoyuPage.vue"
  41. import xianchangguanliPage from "./guanlidanwei/xianchangguanliPage.vue"
  42. import anquanfengxianPage from "./guanlidanwei/anquanfengxianPage.vue"
  43. import yingjiguanliPage from "./guanlidanwei/yingjiguanliPage.vue"
  44. import shiguguanliPage from "./guanlidanwei/shiguguanliPage.vue"
  45. import chixugaijinPage from "./guanlidanwei/chixugaijinPage.vue"
  46. export default {
  47. components: {
  48. jichuxinxi:jichuxinxi,
  49. mubiaozhizePage:mubiaozhizePage,
  50. zhiduhuaguanliPage:zhiduhuaguanliPage,
  51. peixunjiaoyuPage:peixunjiaoyuPage,
  52. xianchangguanliPage:xianchangguanliPage,
  53. anquanfengxianPage:anquanfengxianPage,
  54. yingjiguanliPage:yingjiguanliPage,
  55. shiguguanliPage:shiguguanliPage,
  56. chixugaijinPage:chixugaijinPage,
  57. },
  58. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType','openType','currentNodeId'],
  59. data() {
  60. return {
  61. options:[ {
  62. value: "jichuxinxi",
  63. label: "基础信息"
  64. },
  65. {
  66. value: "xianchangguanliPage",
  67. label: '现场管理'
  68. },
  69. {
  70. value: "anquanfengxianPage",
  71. label: '安全风险管控及隐患排查治理'
  72. }
  73. ],
  74. options_group:[
  75. {
  76. value: "jichuxinxi",
  77. label: "基础信息"
  78. },
  79. {
  80. value: "mubiaozhizePage",
  81. label: '目标职责'
  82. },
  83. {
  84. value: "zhiduhuaguanliPage",
  85. label: '制度化管理'
  86. },
  87. {
  88. value: "peixunjiaoyuPage",
  89. label: '培训教育'
  90. },
  91. {
  92. value: "xianchangguanliPage",
  93. label: '现场管理'
  94. },
  95. {
  96. value: "anquanfengxianPage",
  97. label: '安全风险管控及隐患排查治理'
  98. },
  99. {
  100. value: "yingjiguanliPage",
  101. label: '应急管理'
  102. },
  103. {
  104. value: "shiguguanliPage",
  105. label: '事故管理'
  106. },
  107. {
  108. value: "chixugaijinPage",
  109. label: '持续改进'
  110. },
  111. ],
  112. option_scene: [
  113. {
  114. value: "jichuxinxi",
  115. label: "基础信息"
  116. },
  117. {
  118. value: "xianchangguanliPage",
  119. label: '现场管理'
  120. },
  121. {
  122. value: "anquanfengxianPage",
  123. label: '安全风险管控及隐患排查治理'
  124. },
  125. ],
  126. options_offsite:[
  127. {
  128. value: "jichuxinxi",
  129. label: "基础信息"
  130. },
  131. {
  132. value: "mubiaozhizePage",
  133. label: '目标职责'
  134. },
  135. {
  136. value: "zhiduhuaguanliPage",
  137. label: '制度化管理'
  138. },
  139. {
  140. value: "peixunjiaoyuPage",
  141. label: '培训教育'
  142. },
  143. {
  144. value: "yingjiguanliPage",
  145. label: '应急管理'
  146. },
  147. {
  148. value: "shiguguanliPage",
  149. label: '事故管理'
  150. },
  151. {
  152. value: "chixugaijinPage",
  153. label: '持续改进'
  154. },
  155. ],
  156. value: "",
  157. dialogShow: false,
  158. currentViewId: "基础信息",
  159. dialogFormVisible: true,
  160. activeLabel: '',
  161. signatureLabelList: ['督查人员','被检查人员']
  162. };
  163. },
  164. computed: {
  165. persId() {
  166. return localStorage.getItem("userid")
  167. ? localStorage.getItem("userid")
  168. : "1098101939614724096";
  169. },
  170. currentRlcode() {
  171. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  172. },
  173. isGdPriv(){
  174. return this.ownPriv('isGdExpert')
  175. },
  176. isDjPriv(){
  177. return this.ownPriv('isDjExpert')
  178. }
  179. },
  180. created() {
  181. // this.setOptions()
  182. },
  183. mounted() {
  184. },
  185. watch: {},
  186. methods: {
  187. setOptions() {
  188. request.post('/bis/insp/fjpjlgl/getTabPri', {type: 122}).then(res => {
  189. if(res.data.key == 1) { // 管理员/组长
  190. this.options = this.options_group;
  191. }else if(res.data.key == 2) { // 现场专家
  192. this.options = this.option_scene;
  193. }else if(res.data.key == 3) { // 非现场专家
  194. this.options = this.options_offsite;
  195. }else if(res.data.key == 4) { // 其他
  196. }
  197. })
  198. },
  199. submitHandler() {
  200. var _self = this;
  201. getRsByRgstrId(this.currentObjectRgstrId, this.pType).then(
  202. (res) => {
  203. if (res.data.baseStat == '0') {
  204. this.$message({
  205. message: '请填写重点环节落实情况!',
  206. type: 'warning'
  207. });
  208. return
  209. } else if (res.data.presStat == '0') {
  210. this.$message({
  211. message: '请填写责任人状态!',
  212. type: 'warning'
  213. });
  214. return
  215. } else if (res.data.resRunStat == '0') {
  216. this.$message({
  217. message: '请填写水库工程实体和运行管理情况!',
  218. type: 'warning'
  219. });
  220. return
  221. } else if (res.data.viewStat == '0') {
  222. this.$message({
  223. message: '走访用户状态!',
  224. type: 'warning'
  225. });
  226. return
  227. }
  228. this.$confirm('请确认所有信息填报完毕?', '提示', {
  229. confirmButtonText: '确定',
  230. cancelButtonText: '取消',
  231. type: 'warning'
  232. }).then(() => {
  233. let formObj = {
  234. "rgstrId": this.currentObjectRgstrId,
  235. "state": "2"
  236. }
  237. let url = '/dc/insp/rsvrRgstr/update';
  238. if(this.pType==22){
  239. url = '/bis/insp/rsml/rgstr';
  240. }
  241. request.post(url, formObj).then((res) => {
  242. if (res.success) {
  243. _self.$emit("addShuiKuSuccess");
  244. _self.$message.success("提交成功");
  245. } else {
  246. _self.$emit('cancelHandler');
  247. }
  248. });
  249. }).catch(() => {
  250. });
  251. }, (err) => {
  252. });
  253. },
  254. closeHandler() {
  255. this.dialogShow = false
  256. this.$emit("addShuiKuSuccess");
  257. },
  258. appearDialog(type) {
  259. this.dialogShow = true
  260. // this.problemSmallType = type
  261. },
  262. closePDialog() {
  263. this.dialogShow = false
  264. },
  265. showDialog() {
  266. this.dialogFormVisible = true;
  267. },
  268. cancelHandler() {
  269. this.$emit('cancelHandler');
  270. },
  271. addShuiKuSuccess() {
  272. this.$emit('addShuiKuSuccess');
  273. },
  274. closeDialog() {
  275. this.$confirm('确认退出督查填报?', '提示', {
  276. confirmButtonText: '确定',
  277. cancelButtonText: '取消',
  278. type: 'warning'
  279. }).then(() => {
  280. this.$emit('cancelHandler');
  281. }).catch(() => {
  282. });
  283. },
  284. tabIndexChange(item) {
  285. if (item.label == '问题清单') {
  286. this.activeLabel = item.label
  287. } else {
  288. this.activeLabel = ''
  289. }
  290. }
  291. }
  292. };
  293. </script>
  294. <style>
  295. #shuikutianbaoId .el-dialog {
  296. margin-top: 10vh;
  297. }
  298. </style>