59a90632ef2dd307e6c28cfbd82aeb5df1ad62f1.svn-base 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <el-container>
  3. <el-main id="dxdcListMain" style="padding:5px 20px 0px;">
  4. <h3 style="position: relative">
  5. <div class="searchC">
  6. <span>督查状态</span>
  7. <el-select v-model="stateList" multiple placeholder="请选择">
  8. <el-option
  9. v-for="item in options"
  10. :key="item.value"
  11. :label="item.label"
  12. :value="item.value">
  13. </el-option>
  14. </el-select>
  15. &nbsp;&nbsp;
  16. <span>年度</span>
  17. <el-date-picker
  18. v-model="year"
  19. type="year"
  20. format="yyyy"
  21. value-format="yyyy"
  22. placeholder="选择年">
  23. </el-date-picker>
  24. </div>
  25. <span>2021年度水库安全运行专项检查进度表</span>
  26. </h3>
  27. <div :style="{'width': '100%','margin-top':'10px','height': iframeHeight + 'px'}" v-loading="loading">
  28. <iframe ref="frameMain" id="frameMain" name="frameMain" :src="tableSrc" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  29. </div>
  30. </el-main>
  31. </el-container>
  32. </template>
  33. <script>
  34. import request from "@util/gw_ajax_request.js";
  35. import {reportHosturl} from '@util/global_variable.js'
  36. export default {
  37. components: {
  38. },
  39. props: [],
  40. data() {
  41. return {
  42. stateList:['2'],
  43. loading:false,
  44. iframeHeight: window.innerHeight - 160,
  45. year:new Date().getFullYear().toString(),
  46. options:[
  47. {label:'未督查',value:"0"},
  48. {label:'督查中',value:"1"},
  49. {label:'已督查',value:"2"}
  50. ],
  51. };
  52. },
  53. computed: {
  54. persId() {
  55. return localStorage.getItem("userid")
  56. ? localStorage.getItem("userid")
  57. : "1098101939614724096";
  58. },
  59. tableSrc(){
  60. return `${reportHosturl}/demo/reportJsp/showReport.jsp?rpx=2021skaqyxjcjdb&persId=${this.persId}&yearnum=${this.year}&state=${this.stateList.join(",")}&sheng=${this.organCode.substring(0,2)}&scroll=yes`
  61. },
  62. organCode() {
  63. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  64. },
  65. },
  66. mounted() {
  67. var _this = this
  68. this.loading = true;
  69. const iframe = document.querySelector('#frameMain')
  70. // 处理兼容行问题
  71. if (iframe.attachEvent) {
  72. iframe.attachEvent('onload', function () {
  73. _this.loading = false;
  74. })
  75. } else {
  76. iframe.onload = function () {
  77. _this.loading = false;
  78. }
  79. }
  80. },
  81. watch:{
  82. stateList(val){
  83. this.stateList = val;
  84. },
  85. year(val){
  86. this.year = val;
  87. }
  88. },
  89. methods: {
  90. }
  91. };
  92. </script>
  93. <style scoped>
  94. h3{
  95. margin: 5px 0;
  96. text-align: center;
  97. }
  98. .searchC{
  99. position: absolute;
  100. z-index: 100;
  101. top:-3px;
  102. left:20px;
  103. }
  104. .searchC span{
  105. font-size: 14px;
  106. color: #606266;
  107. }
  108. </style>