61724fcc0db6950dee659afc14bb533451fb8cb6.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <el-row>
  3. <el-col :span="leftCol" ref="elw">
  4. </el-col>
  5. <el-col :span="rightCol">
  6. <!-- <el-card :body-style="{'padding-top':'10px'}">
  7. <div class="block">
  8. <span class="demonstration" style="margin-right: 5px;margin-left: 7px">选择年度</span>
  9. <el-select v-model="year" clearable placeholder="请选择">
  10. <el-option
  11. v-for="item in yearList"
  12. :label="item.year"
  13. :value="item.year"
  14. :key="item.id"
  15. ></el-option>
  16. </el-select>
  17. <el-button type="primary" icon="el-icon-search" style="margin-right: 5px;margin-left: 7px" @click="searchExecl">查询</el-button>
  18. </div>
  19. </el-card> -->
  20. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}">
  21. <form ref="formMain8" id="formMain8" target="frameMain8" :action="reportSrc" method="post">
  22. <input type="hidden" name="width" v-model="windowWidth">
  23. <input type="hidden" name="height" v-model="windowHeight">
  24. <input id="userId" type="hidden" name="userId" v-model="userId">
  25. <input id="groupId" type="hidden" name="groupId" v-model="groupId">
  26. <input id="excelName" type="hidden" name="excelName" v-model="excelName">
  27. </form>
  28. <div v-loading="loading" style="width: 100%;height: 100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
  29. <iframe ref="frameMain8" id="frameMain8" name="frameMain8" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  30. </div>
  31. </el-card>
  32. </el-col>
  33. </el-row>
  34. </template>
  35. <script>
  36. import request from '@util/gw_ajax_request.js';
  37. import {dateFormat} from '@util/gw_date.js'
  38. export default {
  39. components: {
  40. },
  41. props:['groupId'],
  42. data() {
  43. return {
  44. year:'',
  45. dxdcMainHeight: window.innerHeight-250,
  46. dxdcAsideHeight: window.innerHeight-100,
  47. windowHeight:window.innerHeight - 200,
  48. windowWidth:window.innerWidth - 350,
  49. reportSrc:'/demo/reportJsp//showInput.jsp?sht=jc_mark_year_tpy.sht',
  50. loading:false,
  51. leftCol:0,
  52. rightCol:24,
  53. excelName:'稽察组长年度测评',
  54. yearList: [],
  55. }
  56. },
  57. mounted() {
  58. // this.getYearList(); // 获取稽查年度列表
  59. this.searchExecl();
  60. },
  61. //生命周期 - 创建完成(可以访问当前this实例)
  62. created() {
  63. },
  64. computed: {
  65. userId: function () {
  66. return localStorage.getItem("userid")
  67. ? localStorage.getItem("userid")
  68. : "1098101939614724096";
  69. }
  70. },
  71. methods: {
  72. // 获取Excel数据
  73. searchExecl(){
  74. var _this = this;
  75. _this.loading = true;
  76. // 使用form表单post提交,彻底解决参数值过长的问题
  77. _this.$refs.formMain8.submit();
  78. _this.$refs.frameMain8.onload = function(){
  79. _this.loading = false;
  80. };
  81. },
  82. getYearList() {
  83. request.post(`/tac/insp/year/list`,{}).then(res => {
  84. this.yearList = res.data;
  85. });
  86. },
  87. },
  88. watch:{
  89. year(n,o){
  90. if(n == null){
  91. this.year = "";
  92. }
  93. }
  94. },
  95. activated() {
  96. // this.searchExecl();
  97. }
  98. }
  99. </script>
  100. <style >
  101. </style>