ed8a722d304ed14cbcecfde17388d4f2fdf6da28.svn-base 6.7 KB

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