dbddbc80362745ea1d70c623fa78929558ff11f2.svn-base 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. <div>
  8. <addvSearch
  9. v-model="adCode"
  10. :maxHeight='300'
  11. :maxWidth='200'
  12. :rootAddCode='"000000000000"'
  13. :level='"1"'
  14. :nameOrCode="'name'"
  15. ></addvSearch>
  16. </div>
  17. &nbsp;
  18. <span>督查状态:</span>
  19. <el-select v-model="stateList" multiple collapse-tags placeholder="请选择" style="width: 150px;">
  20. <el-option
  21. v-for="item in options"
  22. :key="item.value"
  23. :label="item.label"
  24. :value="item.value">
  25. </el-option>
  26. </el-select>
  27. &nbsp;&nbsp;
  28. <span>年度:</span>
  29. <el-date-picker
  30. v-model="year"
  31. type="year"
  32. style="width: 150px;"
  33. format="yyyy"
  34. value-format="yyyy"
  35. placeholder="选择年">
  36. </el-date-picker>
  37. </div>
  38. <span>市各县(市、区)小型水库整改情况排名表</span>
  39. </h3>
  40. <div :style="{'width': '100%','margin-top':'10px','height': iframeHeight + 'px'}" v-loading="loading">
  41. <iframe ref="frameMain" id="frameMain" name="frameMain" :src="tableSrc" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  42. </div>
  43. </el-main>
  44. </el-container>
  45. </template>
  46. <script>
  47. import request from "@util/gw_ajax_request.js";
  48. import addvSearch from "@widget/addvSearchCity.vue"
  49. import {reportHosturl} from '@util/global_variable.js'
  50. export default {
  51. components: {
  52. addvSearch
  53. },
  54. props: [],
  55. data() {
  56. return {
  57. stateList:['2'],
  58. loading:false,
  59. adCode:"",
  60. iframeHeight: window.innerHeight - 160,
  61. year:new Date().getFullYear().toString(),
  62. options:[
  63. {label:'未督查',value:"0"},
  64. {label:'督查中',value:"1"},
  65. {label:'已督查',value:"2"}
  66. ],
  67. };
  68. },
  69. computed: {
  70. persId() {
  71. return localStorage.getItem("userid")
  72. ? localStorage.getItem("userid")
  73. : "1098101939614724096";
  74. },
  75. tableSrc(){
  76. return `${reportHosturl}/demo/reportJsp/showReport.jsp?rpx=sk04_fujian&persId=${this.persId}&yearnum=${this.year}&state=${this.stateList.join(",")}&sheng=${this.adCode}&scroll=yes`
  77. },
  78. organCode() {
  79. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  80. },
  81. },
  82. mounted() {
  83. var _this = this
  84. this.loading = true;
  85. const iframe = document.querySelector('#frameMain')
  86. // 处理兼容行问题
  87. if (iframe.attachEvent) {
  88. iframe.attachEvent('onload', function () {
  89. _this.loading = false;
  90. })
  91. } else {
  92. iframe.onload = function () {
  93. _this.loading = false;
  94. }
  95. }
  96. },
  97. watch:{
  98. stateList(val){
  99. this.stateList = val;
  100. },
  101. year(val){
  102. this.year = val;
  103. }
  104. },
  105. methods: {
  106. }
  107. };
  108. </script>
  109. <style scoped>
  110. h3{
  111. margin: 5px 0;
  112. text-align: center;
  113. }
  114. .searchC{
  115. position: absolute;
  116. z-index: 100;
  117. top:-3px;
  118. left:20px;
  119. display: flex;
  120. align-items: center;
  121. }
  122. .searchC span{
  123. font-size: 14px;
  124. color: #606266;
  125. }
  126. </style>