| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <template>
- <el-row>
- <el-col :span="24">
- <el-card :body-style="{'padding-top':'10px'}">
- <div class="block">
- <el-button type="primary" icon="el-icon-download"
- style="float: right;margin:0 5px"
- @click="exportExecl">导出</el-button>
- <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询</el-button>
- </div>
- </el-card>
- <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}">
- <form ref="formMain" id="formMain" target="frameMain" :action="reportSrc" method="post">
- <input type="hidden" name="width" v-model="windowWidth">
- <input type="hidden" name="height" v-model="windowHeight">
- <input type="hidden" name="ids" v-model="ids">
- <input type="hidden" name="excelName" v-model="excelName">
- <input type="hidden" name="year" v-model="newYear">
- </form>
- <div style="width: 100%;height: 100%;" v-loading="loading">
- <iframe ref="frameMain" id="frameMain" name="frameMain" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </template>
- <script>
- export default {
- props: ['ids','newYear'],
- data() {
- return {
- pid:'000',
- pidNodes:[],
- type:'006',
- dxdcMainHeight: window.innerHeight-200,
- dxdcAsideHeight: window.innerHeight-180,
- windowHeight:window.innerHeight - 200,
- windowWidth:window.innerWidth - 350,
- reportSrc:'/JsReport/reportFiles/reportjsp/showReport_pages.jsp?raq=sz01_pers1.raq',
- radioTable:1,
- loading:true,
- leftCol:4,
- rightCol:20,
- excelName:'附表1-督查人员情况表',
- treeWidth: 250,
- }
- },
- computed: {
- userId: function () {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- methods: {
- // 获取Excel数据
- searchExecl(){
- this.loading = true;
- // 使用form表单post提交,彻底解决参数值过长的问题
- this.$refs.formMain.submit();
- // 使用_this
- let _this = this;
- this.$refs.frameMain.onload = function(){
- _this.loading = false;
- };
- },
- // 导出Excel数据
- exportExecl(){
- v = window.frames["frameMain"];
- // v.contentWindow.report1_saveAsExcel();
- v.report1_saveAsExcel();
- },
- },
- activated() {
- this.searchExecl();
- }
- }
- </script>
- <style scoped>
- </style>
|