<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item prop="brandName">
        <el-input v-model="queryParams.brandName" placeholder="请输入品牌名称" clearable maxlenth="20" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
      </el-form-item>
    </el-form>
    <div v-loading="loading" :style="'height:'+ height">
      <iframe :src="src" frameborder="no" style="width: 100%;height: 100%;" scrolling="auto" />
    </div>
  </div>

</template>
  <script>

import {
  getToken
} from '@/utils/auth';

export default {
  name: "view",
  data() {
    return {
      // 显示搜索条件
      showSearch: true,
      // 查询参数
      queryParams: {
        brandName: null
      },
      src: "",
      height: document.documentElement.clientHeight - 94.5 + "px;",
      loading: false
    }
  },
  created() {
    this.src = `http://139.224.65.227:9078/drag/view?pageId=965205492447150080&token=N4SMNGzEzk2P2vwmDcvsJhzSASALpTDH`;
  },
  methods: {
    /** 搜索按钮操作 */
    handleQuery() {
      this.src = `http://139.224.65.227:9078/jmreport/view/590812531803901952?token=N4SMNGzEzk2P2vwmDcvsJhzSASALpTDH`;
    }
  }
}
  </script>