cfe572479e9dd7b4d1ec24ba34714c4a49f69b2e.svn-base 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. @cancelHandler="cancelHandler"
  20. @addxinRenYinSuccess="addxinRenYinSuccess"
  21. ></component>
  22. </el-tab-pane>
  23. </el-tabs>
  24. </el-main>
  25. </el-container>
  26. </el-dialog>
  27. </div>
  28. </template>
  29. <script>
  30. import request from "@util/gw_ajax_request.js";
  31. import waterPricePolicy from './waterPricePolicy.vue'
  32. import nongyinAndgongshui from './nongyinAndgongshui.vue'
  33. import problemList from './ProblemList.vue'
  34. import {getrgstrIdObject} from "@api/duChaTianBao.js";
  35. export default {
  36. components: {
  37. waterPricePolicy,
  38. nongyinAndgongshui,
  39. problemList
  40. },
  41. props: ['rowData','currentObjectRgstrId','currentObjectId','currentObjectName'],
  42. data() {
  43. return {
  44. options: [
  45. {
  46. value: "waterPricePolicy",
  47. label: "水价相关政策制度制定情况"
  48. },
  49. {
  50. value: "nongyinAndgongshui",
  51. label: '农饮安全和供水工程情况'
  52. },
  53. {
  54. value: "problemList",
  55. label: '问题清单'
  56. }
  57. ],
  58. value: "",
  59. dialogShow:false,
  60. currentViewId: "水价相关政策制度制定情况",
  61. dialogFormVisible:true,
  62. activeLabel: ''
  63. };
  64. },
  65. computed: {
  66. persId() {
  67. return localStorage.getItem("userid")
  68. ? localStorage.getItem("userid")
  69. : "1098101939614724096";
  70. }
  71. },
  72. mounted() {
  73. console.log(this.currentObjectRgstrId);
  74. },
  75. watch: {},
  76. methods: {
  77. submitHandler(){
  78. var _self = this;
  79. getrgstrIdObject(this.rowData.code,this.rowData.objId).then(
  80. (res) =>{
  81. this.$confirm('请确认所有信息填报完毕?', '提示', {
  82. confirmButtonText: '确定',
  83. cancelButtonText: '取消',
  84. type: 'warning'
  85. }).then(() => {
  86. let formObj = {
  87. "rgstrId":this.currentObjectRgstrId,
  88. "state":"2"
  89. }
  90. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  91. if (res.success) {
  92. _self.$emit("addxinRenYinSuccess");
  93. _self.$message.success("提交成功");
  94. } else {
  95. _self.$emit('cancelHandler');
  96. }
  97. });
  98. }).catch(() => {
  99. });
  100. },(err) =>{
  101. });
  102. },
  103. closeHandler(){
  104. this.dialogShow = false
  105. this.$emit("addxinRenYinSuccess");
  106. },
  107. appearDialog(type){
  108. this.dialogShow = true
  109. // this.problemSmallType = type
  110. },
  111. closePDialog(){
  112. this.dialogShow = false
  113. },
  114. showDialog(){
  115. this.dialogFormVisible = true;
  116. },
  117. cancelHandler(){
  118. this.$emit('cancelHandler');
  119. },
  120. addxinRenYinSuccess(){
  121. this.$emit('addxinRenYinSuccess');
  122. },
  123. closeDialog(){
  124. this.$confirm('确认退出吗?', '提示', {
  125. confirmButtonText: '确定',
  126. cancelButtonText: '取消',
  127. type: 'warning'
  128. }).then(() => {
  129. this.$emit('cancelHandler');
  130. }).catch(() => {
  131. });
  132. },
  133. tabIndexChange(item){
  134. if(item.label == '问题清单'){
  135. this.activeLabel = item.label
  136. }else{
  137. this.activeLabel = ''
  138. }
  139. },
  140. addxinRenYinSuccess(){
  141. this.$emit('addxinRenYinSuccess');
  142. }
  143. }
  144. };
  145. </script>
  146. <style>
  147. #shuikutianbaoId .el-dialog{
  148. margin-top: 10vh;
  149. }
  150. </style>