| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <template>
-
- <el-container style="height:100%;">
- <el-header style="display:flex;align-items:center;" v-if="vShow">
- <p>人员名称</p>
- <el-input v-model="persName" clearable style="width: 150px;margin-left:10px;margin-right:15px"></el-input>
- <p>机构名称</p>
- <el-input v-model="orgName" clearable style="width: 150px;margin-left:10px;margin-right:15px"></el-input>
- <el-button type="primary" icon="el-icon-search" style="margin-left:5px;" plain @click="searchExecl">查询</el-button>
- <span style="margin-left:15px;" v-show="!show">(<b style="color:red;">注意:Excel文件导入操作会覆盖本页所有数据,请谨慎操作。</b>)</span>
- </el-header>
- <el-main id="dcjhMain">
- <div :style="{'height':dxdcMainHeight + 'px','padding':'0','width':'100%','overflow':'hidden'}" v-loading="false">
- <iframe ref="myIframe" id="frameMainDcry" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
- </div>
- </el-main>
-
-
- </el-container>
- </template>
- <script>
- import request from '../../../utils/gw_ajax_request.js';
- import {dateFormat} from '../../../utils/gw_date.js'
- export default {
- props: ['show','persNameStr','orgNmStr','pageStr','heightStr','widthStr','dxdcMainHeightStr'],
- components: {
-
- },
- data() {
- return {
- loading:true,
- reportSrc:'/demo/reportJsp/showInput.jsp?sht=renyuan_baseInfo_line.sht',
- excelName:'督查人员基础信息表',
- dxdcMainHeight: window.innerHeight - 130,
- windowHeight:window.innerHeight - 130,
- windowWidth:window.innerWidth - 10,
- vShow:true,
- persName: '',
- orgName: '',
- page: 1,
- }
-
- },
- computed:{
- userId:function(){
- return localStorage.getItem("userid")? localStorage.getItem("userid"): '1098101939614724096'
- },
- },
- watch:{
- },
- mounted(){
- if(this.show != undefined){
- this.vShow = this.show;
- }
- if(this.persNameStr != undefined){
- this.persName = this.persNameStr;
- }
- if(this.orgNmStr != undefined){
- this.orgName = this.orgNmStr;
- }
- if(this.pageStr != undefined){
- this.page = this.pageStr;
- }
- if(this.heightStr != undefined){
- this.windowHeight = this.heightStr;
- }
- if(this.widthStr != undefined){
- this.windowWidth = this.widthStr;
- }
- if(this.dxdcMainHeightStr != undefined){
- this.dxdcMainHeight = this.dxdcMainHeightStr;
- }
- this.searchExecl();
- },
- methods:{
- // 获取Excel数据
- searchExecl(){
- this.loading = true;
- let _this = this;
- let iframe = document.getElementById("frameMainDcry");
- let src = this.reportSrc;
- let _persName = this.persName == '' ? 'all' : this.persName;
- let _orgName = this.orgName == '' ? 'all' : this.orgName;
- let _page = this.page;
- iframe.src= src
- + "&width=" + this.windowWidth
- + "&height=" + this.windowHeight
- + "&excelName=" + this.excelName
- + "&persName=" + _persName
- + "&orgName=" + _orgName
- + "&page=" + _page
-
- if (iframe.attachEvent){
- iframe.attachEvent("onload", function(){
- _this.loading = false;
- });
- } else {
- iframe.onload = function(){
- _this.loading = false;
- };
- }
- },
- // 导出Excel数据
- exportExecl(){
- v = window.frames["frameMainDcry"];
- v.contentWindow.report1_saveAsExcel();
- },
- },
- activated() {
- }
- }
- </script>
- <style>
- #dcjhMain {
- overflow: hidden;
- padding:0;
- }
- </style>
|