71d3a9e1630d463dce355d5f58fb2d9710b78fab.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. :currentResCode="currentResCode"
  17. :currentObjectId="currentObjectId"
  18. :activeLabel="activeLabel"
  19. @cancelHandler="cancelHandler"
  20. @addQiTaSuccess="addQiTaSuccess"
  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 "../../../utils/gw_ajax_request.js";
  31. import jichuxinxi from "./qiTajichuxinxi.vue"
  32. import problemList from './qiTaProblemList.vue'
  33. import {getrgstrIdObject} from "../../../api/duChaTianBao.js";
  34. export default {
  35. components: {
  36. jichuxinxi:jichuxinxi,
  37. // problemDialog:problemDialog,
  38. problemList:problemList
  39. },
  40. props: ['rowData','currentObjectRgstrId','currentResCode','currentObjectId','currentObjectName'],
  41. data() {
  42. return {
  43. options: [
  44. {
  45. value: "jichuxinxi",
  46. label: "基础信息"
  47. },
  48. {
  49. value: "problemList",
  50. label: '问题清单'
  51. }
  52. ],
  53. value: "",
  54. dialogShow:false,
  55. currentViewId: "基础信息",
  56. dialogFormVisible:true,
  57. activeLabel: ''
  58. };
  59. },
  60. computed: {
  61. persId() {
  62. return localStorage.getItem("userid")
  63. ? localStorage.getItem("userid")
  64. : "1098101939614724096";
  65. }
  66. },
  67. mounted() {},
  68. watch: {},
  69. methods: {
  70. submitHandler(){
  71. var _self = this;
  72. getrgstrIdObject(this.rowData.code,this.rowData.objId).then(
  73. (res) =>{
  74. this.$confirm('请确认所有信息填报完毕?', '提示', {
  75. confirmButtonText: '确定',
  76. cancelButtonText: '取消',
  77. type: 'warning'
  78. }).then(() => {
  79. let formObj = {
  80. "rgstrId":this.currentObjectRgstrId,
  81. "state":"2"
  82. }
  83. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  84. if (res.success) {
  85. _self.$emit("addQiTaSuccess");
  86. _self.$message.success("提交成功");
  87. } else {
  88. _self.$emit('cancelHandler');
  89. }
  90. });
  91. }).catch(() => {
  92. });
  93. },(err) =>{
  94. });
  95. },
  96. closeHandler(){
  97. this.dialogShow = false
  98. this.$emit("addQiTaSuccess");
  99. },
  100. appearDialog(type){
  101. this.dialogShow = true
  102. // this.problemSmallType = type
  103. },
  104. closePDialog(){
  105. this.dialogShow = false
  106. },
  107. showDialog(){
  108. this.dialogFormVisible = true;
  109. },
  110. cancelHandler(){
  111. this.$emit('cancelHandler');
  112. },
  113. addQiTaSuccess(){
  114. this.$emit('addQiTaSuccess');
  115. },
  116. closeDialog(){
  117. // this.$confirm('确认退出吗?', '提示', {
  118. // confirmButtonText: '确定',
  119. // cancelButtonText: '取消',
  120. // type: 'warning'
  121. // }).then(() => {
  122. this.$emit('cancelHandler');
  123. // }).catch(() => {
  124. // });
  125. },
  126. tabIndexChange(item){
  127. if(item.label == '问题清单'){
  128. this.activeLabel = item.label
  129. }else{
  130. this.activeLabel = ''
  131. }
  132. }
  133. }
  134. };
  135. </script>
  136. <style>
  137. #shuikutianbaoId .el-dialog{
  138. margin-top: 10vh;
  139. }
  140. </style>