| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <template>
- <el-row>
- <el-col :span="leftCol" ref="elw">
- </el-col>
- <el-col :span="rightCol">
- <el-card :body-style="{'padding-top':'10px'}">
- <div class="block">
- <span class="demonstration" style="margin-right: 5px;margin-left: 7px">选择年度</span>
- <el-select v-model="year" clearable placeholder="请选择">
- <el-option
- v-for="item in yearList"
- :label="item.year"
- :value="item.year"
- :key="item.id"
- ></el-option>
- </el-select>
- <el-button type="primary" icon="el-icon-search" style="margin-right: 5px;margin-left: 7px" @click="searchExecl">确定</el-button>
- </div>
- </el-card>
- <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}">
- <form ref="formMain8" id="formMain8" target="frameMain8" :action="reportSrc" method="post">
- <input type="hidden" name="width" v-model="windowWidth">
- <input type="hidden" name="height" v-model="windowHeight">
- <input id="userId" type="hidden" name="userId" v-model="userId">
- <input id="year" type="hidden" name="year" v-model="year">
- <input id="excelName" type="hidden" name="excelName" v-model="excelName">
- </form>
- <div v-loading="loading" style="width: 100%;height: 100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <iframe ref="frameMain8" id="frameMain8" name="frameMain8" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </template>
- <script>
- import request from '@util/gw_ajax_request.js';
- import {dateFormat} from '@util/gw_date.js'
- export default {
- components: {
- },
- data() {
- return {
- year:'',
- dxdcMainHeight: window.innerHeight-150,
- dxdcAsideHeight: window.innerHeight-100,
- windowHeight:window.innerHeight - 200,
- windowWidth:window.innerWidth - 350,
- reportSrc:'/demo/reportJsp//showInput.jsp?sht=jc_mark_year_tpy.sht',
- loading:false,
- leftCol:0,
- rightCol:24,
- excelName:'稽察组长年度测评',
- yearList: [],
- }
- },
- mounted() {
- this.getYearList(); // 获取稽查年度列表
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {
- },
- computed: {
- userId: function () {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- methods: {
- // 获取Excel数据
- searchExecl(){
- var _this = this;
- _this.loading = true;
- // 使用form表单post提交,彻底解决参数值过长的问题
- _this.$refs.formMain8.submit();
- // 使用_this
- _this.$refs.frameMain8.onload = function(){
- _this.loading = false;
- };
- },
- getYearList() {
- request.post(`/tac/insp/year/list`,{}).then(res => {
- this.yearList = res.data;
- });
- },
- },
- watch:{
- year(n,o){
- if(n == null){
- this.year = "";
- }
- }
- },
- activated() {
- this.searchExecl();
- }
- }
- </script>
- <style >
- </style>
|