10c33e5ab4c6e8cabf1fcadde599ba801a848fea.svn-base 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <template>
  2. <div id="shuikutianbaoId">
  3. <el-dialog
  4. :title="currentObjectName+'督查填报'"
  5. :before-close="closeDialog"
  6. :visible.sync="dialogFormVisible"
  7. width='70%'
  8. >
  9. <el-container>
  10. <el-main id="dxdcListMain" style="padding:5px 20px;">
  11. <problem-dialog
  12. v-if="dialogShow"
  13. :objType="0"
  14. :villType="0"
  15. :objId="currentObjectId"
  16. :objName="currentObjectName"
  17. :problemMiddleType="'小水库'"
  18. :problemSmallType="problemSmallType"
  19. @closeDialog="closePDialog"
  20. :currentObjectRgstrId="currentObjectRgstrId"
  21. ></problem-dialog>
  22. <el-tabs v-model="currentViewId" type="card" @tab-click="handleClickTabs">
  23. <el-tab-pane
  24. :label="option.label"
  25. :name="option.label"
  26. v-for="option in options"
  27. :key="option.value"
  28. >
  29. <component
  30. :is="option.value"
  31. :currentObjectRgstrId="currentObjectRgstrId"
  32. :currentAdcode="currentAdcode"
  33. :currentObjectName="currentObjectName"
  34. :currentResCode="currentResCode"
  35. :currentObjectId="currentObjectId"
  36. :gdX="gdX"
  37. :gdY="gdY"
  38. :szRuls="szRuls"
  39. :swhsId="swhsId"
  40. :showOrEdit="showOrEdit"
  41. :activedName="activedName"
  42. :baseForm="baseForm"
  43. @cancelHandler="cancelHandler"
  44. @addShuiKuSuccess="addShuiKuSuccess"
  45. ></component>
  46. </el-tab-pane>
  47. </el-tabs>
  48. </el-main>
  49. </el-container>
  50. </el-dialog>
  51. </div>
  52. </template>
  53. <script>
  54. import request from "../../utils/gw_ajax_request.js";
  55. import SydTb_AqBzDb from "../duChaRenYuan/SydTb_AqBzDb.vue";
  56. import SydTb_BaseInfo from "../duChaRenYuan/SydTb_BaseInfo.vue";
  57. import { getrgstrIdObject } from "../../api/duChaTianBao.js";
  58. import problemDialog from "../duChaWenTi/problemDialog.vue";
  59. import SydTb_Wtqd from "../duChaRenYuan/SydTb_Wtqd.vue";
  60. import SydTb_BhCsJg from '../duChaRenYuan/SydTb_BhCsJg.vue'
  61. export default {
  62. components: {
  63. SydTb_AqBzDb: SydTb_AqBzDb,
  64. SydTb_BaseInfo: SydTb_BaseInfo,
  65. problemDialog: problemDialog,
  66. SydTb_Wtqd: SydTb_Wtqd,
  67. SydTb_BhCsJg:SydTb_BhCsJg
  68. },
  69. props: [
  70. "rowData",
  71. "currentObjectRgstrId",
  72. "currentAdcode",
  73. "currentResCode",
  74. "currentObjectId",
  75. "showOrEdit",
  76. "currentObjectName",
  77. "gdX","gdY","baseForm","swhsId"
  78. ],
  79. data() {
  80. return {
  81. options: [
  82. {
  83. value: "SydTb_BaseInfo",
  84. label: "基础信息纠错"
  85. },
  86. // {
  87. // value: "SydTb_AqBzDb",
  88. // label: "安全保障达标落实情况"
  89. // },
  90. {
  91. value: "SydTb_BhCsJg",
  92. label: "全国重要饮用水水源地管理情况"
  93. },
  94. {
  95. value: "SydTb_Wtqd",
  96. label: "问题清单"
  97. }
  98. ],
  99. value: "",
  100. dialogShow: false,
  101. currentViewId: "基础信息纠错",
  102. dialogFormVisible: true,
  103. szRuls: [],
  104. activedName:"" ,
  105. tableName:''
  106. };
  107. },
  108. created(){
  109. },
  110. computed: {
  111. persId() {
  112. return localStorage.getItem("userid")
  113. ? localStorage.getItem("userid")
  114. : "1098101939614724096";
  115. }
  116. },
  117. mounted() {
  118. this.getPblmType();
  119. },
  120. watch: {
  121. tableName(){
  122. this.getPblmType();
  123. }
  124. },
  125. methods: {
  126. submitHandler() {
  127. var _self = this;
  128. getrgstrIdObject(this.rowData.code, this.rowData.objId).then(
  129. res => {
  130. if (res.data.baseStat == "0") {
  131. this.$message({
  132. message: "请填写重点环节落实情况!",
  133. type: "warning"
  134. });
  135. return;
  136. } else if (res.data.presStat == "0") {
  137. this.$message({
  138. message: "请填写责任人状态!",
  139. type: "warning"
  140. });
  141. return;
  142. } else if (res.data.resRunStat == "0") {
  143. this.$message({
  144. message: "请填写水库工程实体和运行管理情况!",
  145. type: "warning"
  146. });
  147. return;
  148. } else if (res.data.viewStat == "0") {
  149. this.$message({
  150. message: "走访用户状态!",
  151. type: "warning"
  152. });
  153. return;
  154. }
  155. this.$confirm("请确认所有信息填报完毕?", "提示", {
  156. confirmButtonText: "确定",
  157. cancelButtonText: "取消",
  158. type: "warning"
  159. })
  160. .then(() => {
  161. let formObj = {
  162. rgstrId: this.currentObjectRgstrId,
  163. state: "2"
  164. };
  165. request.post("/dc/insp/rsvrRgstr/update", formObj).then(res => {
  166. if (res.success) {
  167. _self.$emit("addShuiKuSuccess");
  168. _self.$message.success("提交成功");
  169. } else {
  170. _self.$emit("cancelHandler");
  171. }
  172. });
  173. })
  174. .catch(() => {});
  175. },
  176. err => {}
  177. );
  178. },
  179. closeHandler() {
  180. this.dialogShow = false;
  181. this.$emit("addShuiKuSuccess");
  182. },
  183. appearDialog(type) {
  184. this.dialogShow = true;
  185. // this.problemSmallType = type
  186. },
  187. closePDialog() {
  188. this.dialogShow = false;
  189. },
  190. showDialog() {
  191. this.dialogFormVisible = true;
  192. },
  193. cancelHandler() {
  194. this.$emit("cancelHandler");
  195. },
  196. addShuiKuSuccess() {
  197. this.$emit("addShuiKuSuccess");
  198. },
  199. closeDialog() {
  200. let _self = this;
  201. this.$confirm("确认退出吗?", "提示", {
  202. confirmButtonText: "确定",
  203. cancelButtonText: "取消",
  204. type: "warning"
  205. })
  206. .then(() => {
  207. _self.$emit("cancelHandler");
  208. })
  209. .catch(() => {});
  210. },
  211. handleClickTabs(tab,event){
  212. console.log(tab.label);
  213. this.activedName = tab.label;
  214. if(this.activedName ==='安全保障达标落实情况'){
  215. this.tableName = 'BIS_INSP_SWHS_RGSTR_SAFETY';
  216. }else if(this.activedName ==='全国重要饮用水水源地管理情况'){
  217. this.tableName = 'BIS_INSP_SWHS_RGSTR_MEASURES';
  218. }
  219. },
  220. getPblmType(){
  221. const obj ={
  222. tname: this.tableName
  223. }
  224. request.post("/bis/insp/item/ques/info/findItemByType",obj).then(res =>{
  225. console.log(res);
  226. this.szRuls = res.data;
  227. })
  228. }
  229. }
  230. };
  231. </script>
  232. <style>
  233. #shuikutianbaoId .el-dialog {
  234. margin-top: 10vh;
  235. }
  236. </style>