d0c4dcc2c15439b3b75b89d064f9b9efe4a26aa8.svn-base 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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 optionList"
  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. @addShuiKuSuccess1="addShuiKuSuccess1"
  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 "./pwuawiu/jichuxinxi.vue"
  38. import signature from "./pwuawiu/signature.vue"
  39. import planUseCheck from "./pwuawiu/planUseCheck.vue"
  40. import saveWaterCheck from "./pwuawiu/saveWaterCheck.vue"
  41. import useUnitCheck from "./pwuawiu/useUnitCheck.vue"
  42. import problemList from "./pwuawiuProblemList"
  43. export default {
  44. components: {
  45. jichuxinxi:jichuxinxi,
  46. signature:signature,
  47. planUseCheck:planUseCheck,
  48. saveWaterCheck:saveWaterCheck,
  49. useUnitCheck:useUnitCheck,
  50. problemList:problemList
  51. },
  52. props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType','openType'],
  53. data() {
  54. return {
  55. optionList:[],
  56. options: [
  57. {
  58. value: "jichuxinxi",
  59. label: "基础信息"
  60. },
  61. {
  62. value: "signature",
  63. label: '签字确认'
  64. },
  65. {
  66. value: "planUseCheck",
  67. label: '计划用水户现场考核'
  68. }
  69. ],
  70. options1: [
  71. {
  72. value: "saveWaterCheck",
  73. label: '节水型载体现场考核'
  74. }
  75. ],
  76. options2: [
  77. {
  78. value: "useUnitCheck",
  79. label: '取水单位现场考核'
  80. }
  81. ],
  82. options3: [
  83. {
  84. value: "problemList",
  85. label: '问题清单'
  86. }
  87. ],
  88. value: "",
  89. dialogShow: false,
  90. currentViewId: "基础信息",
  91. dialogFormVisible: true,
  92. activeLabel: '',
  93. signatureLabelList: ['检查人员签字确认','被检查单位签字确认']
  94. };
  95. },
  96. computed: {
  97. persId() {
  98. return localStorage.getItem("userid")
  99. ? localStorage.getItem("userid")
  100. : "1098101939614724096";
  101. },
  102. currentRlcode() {
  103. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  104. }
  105. },
  106. mounted() {
  107. this.initTab();
  108. },
  109. watch: {},
  110. methods: {
  111. initTab(){
  112. this.optionList = [];
  113. this.optionList = this.options;
  114. if(this.rowData.ndstyType=='1'){
  115. this.optionList = this.optionList.concat(this.options1);
  116. }
  117. if(this.rowData.isUnit=='1'){
  118. this.optionList = this.optionList.concat(this.options2);
  119. }
  120. this.optionList = this.optionList.concat(this.options3);
  121. },
  122. submitHandler() {
  123. var _self = this;
  124. getRsByRgstrId(this.currentObjectRgstrId, this.pType).then(
  125. (res) => {
  126. if (res.data.baseStat == '0') {
  127. this.$message({
  128. message: '请填写重点环节落实情况!',
  129. type: 'warning'
  130. });
  131. return
  132. } else if (res.data.presStat == '0') {
  133. this.$message({
  134. message: '请填写责任人状态!',
  135. type: 'warning'
  136. });
  137. return
  138. } else if (res.data.resRunStat == '0') {
  139. this.$message({
  140. message: '请填写水库工程实体和运行管理情况!',
  141. type: 'warning'
  142. });
  143. return
  144. } else if (res.data.viewStat == '0') {
  145. this.$message({
  146. message: '走访用户状态!',
  147. type: 'warning'
  148. });
  149. return
  150. }
  151. this.$confirm('请确认所有信息填报完毕?', '提示', {
  152. confirmButtonText: '确定',
  153. cancelButtonText: '取消',
  154. type: 'warning'
  155. }).then(() => {
  156. let formObj = {
  157. "rgstrId": this.currentObjectRgstrId,
  158. "state": "2"
  159. }
  160. let url = '/dc/insp/rsvrRgstr/update';
  161. if(this.pType==22){
  162. url = '/bis/insp/rsml/rgstr';
  163. }
  164. request.post(url, formObj).then((res) => {
  165. if (res.success) {
  166. _self.$emit("addShuiKuSuccess");
  167. _self.$message.success("提交成功");
  168. } else {
  169. _self.$emit('cancelHandler');
  170. }
  171. });
  172. }).catch(() => {
  173. });
  174. }, (err) => {
  175. });
  176. },
  177. closeHandler() {
  178. this.dialogShow = false
  179. this.$emit("addShuiKuSuccess");
  180. },
  181. appearDialog(type) {
  182. this.dialogShow = true
  183. // this.problemSmallType = type
  184. },
  185. closePDialog() {
  186. this.dialogShow = false
  187. },
  188. showDialog() {
  189. this.dialogFormVisible = true;
  190. },
  191. cancelHandler() {
  192. this.$emit('cancelHandler');
  193. },
  194. addShuiKuSuccess() {
  195. this.$emit('addShuiKuSuccess');
  196. },
  197. addShuiKuSuccess1(obj) {
  198. this.optionList = [];
  199. this.optionList = this.options;
  200. if(obj.ndstyType=='1'){
  201. this.optionList = this.optionList.concat(this.options1);
  202. }
  203. if(obj.isUnit=='1'){
  204. this.optionList = this.optionList.concat(this.options2);
  205. }
  206. this.optionList = this.optionList.concat(this.options3);
  207. this.$emit('addShuiKuSuccess');
  208. },
  209. closeDialog() {
  210. this.$confirm('确认退出吗?', '提示', {
  211. confirmButtonText: '确定',
  212. cancelButtonText: '取消',
  213. type: 'warning'
  214. }).then(() => {
  215. this.$emit('cancelHandler');
  216. }).catch(() => {
  217. });
  218. },
  219. tabIndexChange(item) {
  220. if (item.label == '问题清单') {
  221. this.activeLabel = item.label
  222. } else {
  223. this.activeLabel = ''
  224. }
  225. }
  226. }
  227. };
  228. </script>
  229. <style>
  230. #shuikutianbaoId .el-dialog {
  231. margin-top: 10vh;
  232. }
  233. </style>