247e33e8f6b4b0efde537a5dc63fb6cbc7e0ec6a.svn-base 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <div id="shuikutianbaoId">
  3. <el-dialog :title="currentObjectName+'督查填报'" width="60%" :before-close="closeDialog" :visible.sync="dialogFormVisible">
  4. <el-container>
  5. <el-main id="dxdcListMain" style="padding:5px 20px;">
  6. <el-tabs v-model="currentViewId" type="card" @tab-click="tabIndexChange">
  7. <el-tab-pane
  8. :label="option.label"
  9. :name="option.label"
  10. v-for="option in options"
  11. :key="option.value">
  12. <component
  13. :is="option.value"
  14. :currentObjectRgstrId="currentObjectRgstrId"
  15. :currentObjectName="currentObjectName"
  16. :currentObjectId="currentObjectId"
  17. :activeLabel="activeLabel"
  18. :rowData="rowData"
  19. :openType="openType"
  20. @cancelHandler="cancelHandler"
  21. @addxinRenYinSuccess="addxinRenYinSuccess"
  22. ></component>
  23. </el-tab-pane>
  24. </el-tabs>
  25. </el-main>
  26. </el-container>
  27. </el-dialog>
  28. </div>
  29. </template>
  30. <script>
  31. import request from "@util/gw_ajax_request.js";
  32. import xjbtNcysTab1 from './xjbtNcysTab1.vue'
  33. import xjbtNcysTab2 from './xjbtNcysTab2.vue'
  34. import problemList from './ProblemList2.vue'
  35. import {getrgstrIdObject} from "@api/duChaTianBao.js";
  36. export default {
  37. components: {
  38. xjbtNcysTab1,
  39. xjbtNcysTab2,
  40. problemList
  41. },
  42. props: ['rowData','currentObjectRgstrId','currentObjectId','currentObjectName','openType'],
  43. data() {
  44. return {
  45. options: [
  46. {
  47. value: "xjbtNcysTab1",
  48. label: '师水利局履职尽职情况'
  49. },
  50. {
  51. value: "xjbtNcysTab2",
  52. label: '农村饮水维修养护工程及建设情况'
  53. },
  54. {
  55. value: "problemList",
  56. label: '问题清单'
  57. }
  58. ],
  59. value: "",
  60. dialogShow:false,
  61. currentViewId: "师水利局履职尽职情况",
  62. dialogFormVisible:true,
  63. activeLabel: ''
  64. };
  65. },
  66. computed: {
  67. persId() {
  68. return localStorage.getItem("userid")
  69. ? localStorage.getItem("userid")
  70. : "1098101939614724096";
  71. }
  72. },
  73. mounted() {
  74. console.log(this.currentObjectRgstrId);
  75. },
  76. watch: {},
  77. methods: {
  78. submitHandler(){
  79. var _self = this;
  80. getrgstrIdObject(this.rowData.code,this.rowData.objId).then(
  81. (res) =>{
  82. this.$confirm('请确认所有信息填报完毕?', '提示', {
  83. confirmButtonText: '确定',
  84. cancelButtonText: '取消',
  85. type: 'warning'
  86. }).then(() => {
  87. let formObj = {
  88. "rgstrId":this.currentObjectRgstrId,
  89. "state":"2"
  90. }
  91. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  92. if (res.success) {
  93. _self.$emit("addxinRenYinSuccess");
  94. _self.$message.success("提交成功");
  95. } else {
  96. _self.$emit('cancelHandler');
  97. }
  98. });
  99. }).catch(() => {
  100. });
  101. },(err) =>{
  102. });
  103. },
  104. closeHandler(){
  105. this.dialogShow = false
  106. this.$emit("addxinRenYinSuccess");
  107. },
  108. appearDialog(type){
  109. this.dialogShow = true
  110. // this.problemSmallType = type
  111. },
  112. closePDialog(){
  113. this.dialogShow = false
  114. },
  115. showDialog(){
  116. this.dialogFormVisible = true;
  117. },
  118. cancelHandler(){
  119. this.$emit('cancelHandler');
  120. },
  121. addxinRenYinSuccess(){
  122. this.$emit('addxinRenYinSuccess');
  123. },
  124. closeDialog(){
  125. this.$confirm('确认退出吗?', '提示', {
  126. confirmButtonText: '确定',
  127. cancelButtonText: '取消',
  128. type: 'warning'
  129. }).then(() => {
  130. this.$emit('cancelHandler');
  131. }).catch(() => {
  132. });
  133. },
  134. tabIndexChange(item){
  135. if(item.label == '问题清单'){
  136. this.activeLabel = item.label
  137. }else{
  138. this.activeLabel = ''
  139. }
  140. },
  141. addxinRenYinSuccess(){
  142. this.$emit('addxinRenYinSuccess');
  143. }
  144. }
  145. };
  146. </script>
  147. <style>
  148. #shuikutianbaoId .el-dialog{
  149. margin-top: 10vh;
  150. }
  151. </style>