2d4a86e41fb3bf01c70a008d834cf098969f8688.svn-base 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <el-container>
  3. <el-main>
  4. <!--<el-form :inline="true" size="mini" class="demo-form-inline">-->
  5. <!--<el-form-item label="选择阶段">-->
  6. <!--<el-select v-model="bgType" clearable placeholder="请选择">-->
  7. <!--<el-option label="专家(交换意见稿)" value="0"></el-option>-->
  8. <!--<el-option label="交换意见阶段" value="4"></el-option>-->
  9. <!--<el-option label="成果讨论阶段" value="5"></el-option>-->
  10. <!--<el-option label="中心修改阶段" value="6"></el-option>-->
  11. <!--<el-option label="司局修改阶段" value="7"></el-option>-->
  12. <!--</el-select>-->
  13. <!--</el-form-item>-->
  14. <!--<el-form-item label="选择年度">-->
  15. <!--<el-select v-model="addForm.year" @change="changeYear" clearable>-->
  16. <!--<el-option :lable="item.year" :value="item.year" :key="item.id" v-for="item in yearList"></el-option>-->
  17. <!--</el-select>-->
  18. <!--</el-form-item>-->
  19. <!--<el-form-item label="选择批次">-->
  20. <!--<el-select v-model="addForm.batch" clearable>-->
  21. <!--<el-option :lable="item.batch" :value="item.batch" :key="item.id" v-for="item in pcList"></el-option>-->
  22. <!--</el-select>-->
  23. <!--</el-form-item>-->
  24. <!--<el-form-item label="">-->
  25. <!--<el-button type="primary" @click="search">确定</el-button>-->
  26. <!--</el-form-item>-->
  27. <!--</el-form>-->
  28. <el-tabs v-model="activeName" @tab-click="handleClick">
  29. <el-tab-pane v-for="(item,index) in tabList" :key="index" :label="item.label" :lazy="true" :name="item.value">
  30. <div v-if="showReport" style="width:100%;padding:0;" :style="{'height' : tableHeight + 'px'}" >
  31. <iframe id="iframeEle" :src="tableSrc + '&pcid=' + addForm.batch + '&year=' + addForm.year + '&bgType='+bgType+'&width=1920&height=592&scroll=yes'" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  32. </div>
  33. <!-- <component :is="'summary'" :tableSrc="tableSrc" :pcid="pcid" :year="year"></component> -->
  34. </el-tab-pane>
  35. </el-tabs>
  36. </el-main>
  37. </el-container>
  38. </template>
  39. <script>
  40. import rsvrCorrectionSummary from './correctionSummary'
  41. import wagaCorrectionSummary from './correctionSummary'
  42. import cwsCorrectionSummary from './correctionSummary'
  43. import swhsCorrectionSummary from './correctionSummary'
  44. import sdCorrectionSummary from './correctionSummary'
  45. import request from "@util/gw_ajax_request"
  46. export default {
  47. data(){
  48. return{
  49. tableHeight: window.innerHeight - 220,
  50. activeName: 'rsvrCorrectionSummary',
  51. showReport: false,
  52. tabList:[
  53. {label: '水库纠错汇总',value: 'rsvrCorrectionSummary'},
  54. {label: '水闸纠错汇总',value: 'wagaCorrectionSummary'},
  55. {label: '饮水工程纠错汇总',value: 'cwsCorrectionSummary'},
  56. {label: '水源地纠错汇总',value: 'swhsCorrectionSummary'},
  57. {label: '淤地坝纠错汇总',value: 'sdCorrectionSummary'}
  58. ],
  59. addForm:{
  60. year: '',
  61. batch: '',
  62. persId: localStorage.getItem("userid")
  63. },
  64. yearList:[],
  65. pcList: [],
  66. tableSrc: '/demo/reportJsp/showReport.jsp?rpx=rsvr.rpx',
  67. pcid: '',
  68. year: '',
  69. bgType:'0',
  70. }
  71. },
  72. components:{
  73. rsvrCorrectionSummary,
  74. wagaCorrectionSummary,
  75. cwsCorrectionSummary,
  76. swhsCorrectionSummary,
  77. sdCorrectionSummary
  78. },
  79. mounted(){
  80. this.$nextTick(()=>{
  81. this.getYearPc();
  82. this.search()
  83. })
  84. },
  85. methods:{
  86. async getYearPc(){
  87. await request.post(`/tac/insp/year/list`,{}).then(res =>{
  88. if(res.success){
  89. this.$nextTick(() =>{
  90. this.yearList = res.data;
  91. // this.addForm.year = this.yearList[0].year
  92. this.showReport = true
  93. })
  94. }
  95. })
  96. request.post(`/tac/insp/batch/list`,{}).then(res =>{
  97. if(res.success){
  98. this.pcList = res.data;
  99. // this.addForm.batch = this.pcList[0].batch
  100. }
  101. })
  102. },
  103. search(){
  104. let iframe = document.getElementById('iframeEle')
  105. let src = this.tableSrc
  106. iframe.src = src
  107. + '&width=1920&height=592'
  108. + '&pcid=' + this.addForm.batch
  109. + '&year=' + this.addForm.year
  110. },
  111. changeYear(){},
  112. handleClick(){}
  113. },
  114. watch:{
  115. activeName(val){
  116. if(val == 'rsvrCorrectionSummary'){
  117. this.tableSrc = '/demo/reportJsp/showReport.jsp?rpx=rsvr.rpx'
  118. }else if(val == 'wagaCorrectionSummary'){
  119. this.tableSrc = '/demo/reportJsp/showReport.jsp?rpx=waga.rpx'
  120. }else if(val == 'cwsCorrectionSummary'){
  121. this.tableSrc = '/demo/reportJsp/showReport.jsp?rpx=cws.rpx'
  122. }else if(val == 'swhsCorrectionSummary'){
  123. this.tableSrc = '/demo/reportJsp/showReport.jsp?rpx=swhs.rpx'
  124. }else if(val == 'sdCorrectionSummary'){
  125. this.tableSrc = '/demo/reportJsp/showReport.jsp?rpx=sd.rpx'
  126. }
  127. }
  128. }
  129. }
  130. </script>
  131. <style lang="scss" scope>
  132. </style>