e971484af2fab949d48e41b6273ffd6cb4fcf9de.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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="year" type="hidden" name="year" v-model="year">
  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. data() {
  42. return {
  43. year:'',
  44. dxdcMainHeight: window.innerHeight-150,
  45. dxdcAsideHeight: window.innerHeight-100,
  46. windowHeight:window.innerHeight - 200,
  47. windowWidth:window.innerWidth - 350,
  48. reportSrc:'/demo/reportJsp//showInput.jsp?sht=jc_mark_year_tpy.sht',
  49. loading:false,
  50. leftCol:0,
  51. rightCol:24,
  52. excelName:'稽察组长年度测评',
  53. yearList: [],
  54. }
  55. },
  56. mounted() {
  57. this.getYearList(); // 获取稽查年度列表
  58. },
  59. //生命周期 - 创建完成(可以访问当前this实例)
  60. created() {
  61. },
  62. computed: {
  63. userId: function () {
  64. return localStorage.getItem("userid")
  65. ? localStorage.getItem("userid")
  66. : "1098101939614724096";
  67. }
  68. },
  69. methods: {
  70. // 获取Excel数据
  71. searchExecl(){
  72. var _this = this;
  73. _this.loading = true;
  74. // 使用form表单post提交,彻底解决参数值过长的问题
  75. _this.$refs.formMain8.submit();
  76. // 使用_this
  77. _this.$refs.frameMain8.onload = function(){
  78. _this.loading = false;
  79. };
  80. },
  81. getYearList() {
  82. request.post(`/tac/insp/year/list`,{}).then(res => {
  83. this.yearList = res.data;
  84. });
  85. },
  86. },
  87. watch:{
  88. year(n,o){
  89. if(n == null){
  90. this.year = "";
  91. }
  92. }
  93. },
  94. activated() {
  95. this.searchExecl();
  96. }
  97. }
  98. </script>
  99. <style >
  100. </style>