<template>
  <div class="app-container">
    <el-form style="background-color: #fff; padding: 15px 5px; border-radius:10px;" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <p class="bgtan" style="margin-top: 0;">搜索条件</p>
	  <el-form-item label="考试名称" prop="scoreTitle">
        <el-input
          v-model="queryParams.scoreTitle"
          placeholder="请输入考试名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="考试时间" prop="scoreTime">
        <el-date-picker clearable
          v-model="queryParams.scoreTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择考试时间">
        </el-date-picker>
      </el-form-item>
      <!-- <el-form-item label="接收班级id" prop="scoreClassId">
        <el-input
          v-model="queryParams.scoreClassId"
          placeholder="请输入接收班级id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="接收班级名称" prop="scoreClassName">
        <el-input
          v-model="queryParams.scoreClassName"
          placeholder="请输入接收班级名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <!-- <el-form-item label="隐私设置 1:仅自己 2:仅本班 3:全部" prop="privacyType">
        <el-select v-model="queryParams.privacyType" placeholder="请选择隐私设置 1:仅自己 2:仅本班 3:全部" clearable>
          <el-option
            v-for="dict in dict.type.typeone"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item> -->
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8" style=" border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff;margin: 0;margin-top: 20px;padding: 10px 5px; ">
      <p class="bgtan" style="margin-top: 0;">学生成绩信息</p>
	  <!-- <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['score:data:add']"
        >新增</el-button>
      </el-col> -->
      <!-- <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['score:data:edit']"
        >修改</el-button>
      </el-col> -->
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['score:data:remove']"
        >删除</el-button>
      </el-col>
      <!-- <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['score:data:export']"
        >导出</el-button>
      </el-col> -->
	  <!-- <el-col :span="1.5">
	    <el-button
	      type="info"
	      plain
	      icon="el-icon-upload2"
	      size="mini"
	      @click="handleImport"
	      v-hasPermi="['system:user:import']"
	    >导入</el-button>
	  </el-col> -->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
	
	<div style="background-color: #fff; padding: 0 10px;  padding-bottom: 40px; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;">
	<el-table border :max-height="tableMaxHeight" v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
	  <el-table-column type="selection" width="55" align="center"  />
	   <el-table-column label="班级名称" align="center" prop="scoreClassName" />
	  <el-table-column label="考试名称" align="center" prop="scoreTitle" />
	  <el-table-column label="考试时间" align="center" prop="scoreTime" width="180">
	    <template slot-scope="scope">
	      <span>{{ scope.row.scoreTime }}</span>
	    </template>
	  </el-table-column>
	  <el-table-column label="考试类型" align="center" prop="scoreType">
	    <template slot-scope="scope">
	      <dict-tag :options="dict.type.kaoshi" :value="scope.row.scoreType"/>
	    </template>
	  </el-table-column>
	  <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
	    <template slot-scope="scope">
	      <el-button
	        size="mini"
	        type="text"
	        icon="el-icon-edit"
	        @click="handleUpdate(scope.row)"
	        v-hasPermi="['score:data:edit']"
	      >查看统计</el-button>
	      <!-- <el-button
	        size="mini"
	        type="text"
	        icon="el-icon-delete"
	        @click="handleDelete(scope.row)"
	        v-hasPermi="['score:data:remove']"
	      >删除</el-button> -->
	    </template>
	  </el-table-column>
	</el-table>
	
	<pagination
	  v-show="total>0"
	  :total="total"
	  :page.sync="queryParams.pageNum"
	  :limit.sync="queryParams.pageSize"
	  @pagination="getList"
	/>	
	</div>

    

    <!-- 添加或修改成绩对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
		  <el-row>
			  <el-col :span="6">
				<el-form-item label="班级名称" prop="scoreClassId">
					<el-select v-model="form.scoreClassId" placeholder="请选择班级名称">
					  <el-option
					    v-for="dict in kiuesegh"
					    :key="dict.deptId"
					    :label="dict.deptName"
					    :value="dict.deptId"
						@click.native="mjyhesst(dict)"
					  ></el-option>
					</el-select>
				  <!-- <el-input v-model="form.scoreClassName" placeholder="请输入接收班级名称" /> -->
				</el-form-item>  
			  </el-col>
			  <el-col :span="6">
			  	<el-form-item label="考试名称" prop="scoreTitle">
			  	  <el-input v-model="form.scoreTitle" placeholder="请输入考试名称" />
			  	</el-form-item>			  
			  </el-col>
			  <el-col :span="6">
			  	<el-form-item label="考试时间" prop="scoreTime">
			  	  <el-date-picker clearable
			  	    v-model="form.scoreTime"
			  	    type="date"
			  	    value-format="yyyy-MM-dd"
			  	    placeholder="请选择考试时间">
			  	  </el-date-picker>
			  	</el-form-item>			  
			  </el-col>
			  <el-col :span="6">
			  	<el-form-item label="隐私设置" prop="privacyType">
			  	  <el-select v-model="form.privacyType" placeholder="请选择隐私设置 1:仅自己 2:仅本班 3:全部">
			  	    <el-option
			  	      v-for="dict in dict.type.typeone"
			  	      :key="dict.value"
			  	      :label="dict.label"
			  	      :value="dict.value"
			  	    ></el-option>
			  	  </el-select>
			  	</el-form-item>			  
			  </el-col>
			  <el-col :span="24">
			  	<el-form-item label="备注" prop="remark">
			  	  <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
			  	</el-form-item>			  
			  </el-col>
			  		  
			  
		  </el-row>
        <el-divider content-position="center">学生成绩信息</el-divider>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddScoreDataDetails">添加</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteScoreDataDetails">删除</el-button>
          </el-col>
		  <el-col :span="4">
			 <el-input
			   v-model="fornh.scoreDataName"
			   placeholder="请输入学生名称"
			   clearable
			   @keyup.enter.native="handleQuery"
			 /> 
		  </el-col>
        </el-row>
		
        <el-table :data="scoreDataDetailsList" :row-class-name="rowScoreDataDetailsIndex" @selection-change="handleScoreDataDetailsSelectionChange" ref="scoreDataDetails" max-width="100%">
          <el-table-column type="selection" width="50" align="center" />
          <el-table-column label="姓名" prop="scoreDataName" width="150">
            <template slot-scope="scope">
				<el-select  style="width: 100%;" v-model="scope.row.scoreDataName" placeholder="请选择姓名">
				            <el-option
				              v-for="dict in infoListstu"
				              :key="dict.id"
				              :label="dict.studentName"
				              :value="dict.studentName"
							  @change="nbstyu(dict)"
				            ></el-option>
				</el-select>
              <!-- <el-input v-model="scope.row.scoreDataName" placeholder="请输入姓名" /> -->
            </template>
          </el-table-column>
		  <el-table-column
		                  v-for="(col, index) in typeOptionsname" 
		                  :key="index"
						  :label="col.dictLabel"
		              >
		                  <!-- 通过插槽为表头绑定mousedown和dragover方法 -->
		                  <template  slot-scope="scope">
		                 <!-- <span
		                      @mousedown="handleMounseDown($event, column, $index)"
		                      @dragover="handleDragover($event, column, $index)"
		                  >
		                      {{ col.label }} -->
							  <div v-if="col.dictValue == 'yuwen'">
								<el-input v-model="scope.row.yuwen" placeholder="语文" />  
							  </div>
							  
							  
		                  <!-- </span> -->
		                  </template>
		              </el-table-column>
         
		  <el-table-column label="总分" prop="zongfen" width="80">
		    <template slot-scope="scope">
		      <el-input v-model="scope.row.zongfen" placeholder="请输入总分" />
		    </template>
		  </el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
	
	<el-dialog :title="upload.title" :visible.sync="upload.open" width="700px" append-to-body>
		 <el-form ref="upload" :model="upload" :rules="rulesf" label-width="80px">
		<el-row>
			<el-col :span="12">
							<el-form-item label="班级名称" prop="scoreClassId">
							  <el-select v-model="upload.selectIndex.scoreClassId" placeholder="请选择班级名称">
							    <el-option
							      v-for="dict in kiuesegh"
							      :key="dict.deptId"
							      :label="dict.deptName"
							      :value="dict.deptId"
							  	  @click.native="mjyhess(dict)"
							    ></el-option>
							  </el-select>
							  <!-- <el-input v-model="upload.scoreClassName" placeholder="请输入接收班级名称" /> -->
							</el-form-item>  
			</el-col>
			<el-col :span="12">
				<el-form-item label="考试名称" prop="scoreTitle">
				  <el-input v-model="upload.selectIndex.scoreTitle" placeholder="请输入考试名称" />
				</el-form-item>			  
			</el-col>
			<el-col :span="12">
				<el-form-item label="考试时间" prop="scoreTime">
				  <el-date-picker clearable
				    v-model="upload.selectIndex.scoreTime"
				    type="date"
				    value-format="yyyy-MM-dd"
				    placeholder="请选择考试时间">
				  </el-date-picker>
				</el-form-item>			  
			</el-col>
			<el-col :span="12">
				<el-form-item label="隐私设置" prop="privacyType">
				  <el-select style="width:250px;" v-model="upload.selectIndex.privacyType" placeholder="请选择隐私设置 1:仅自己 2:仅本班 3:全部">
				    <el-option
				      v-for="dict in dict.type.typeone"
				      :key="dict.value"
				      :label="dict.label"
				      :value="dict.value"
				    ></el-option>
				  </el-select>
				</el-form-item>			  
			</el-col>
		</el-row>
		</el-form>
		
	  <el-upload
	    ref="upload"
	    :limit="1"
	    accept=".xlsx, .xls"
	    :headers="upload.headers"
	    :action="upload.url + '?updateSupport=' + upload.updateSupport"
	    :disabled="upload.isUploading"
	    :on-progress="handleFileUploadProgress"
	    :on-success="handleFileSuccess"
	    :auto-upload="false"
		:data="upload.selectIndex"
	    drag
		style="width: 100%;"
	  >
	    <i class="el-icon-upload"></i>
	    <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
	    <div class="el-upload__tip text-center" slot="tip">
			
	      <!-- <div class="el-upload__tip" slot="tip">
	        <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
	      </div> -->
	      <span>仅允许导入xls、xlsx格式文件。</span>
		  <!-- <p style="margin: 0;">一个文件只包含一个sheet页，请删除其他sheet (也不可隐藏)</p>
		  <p style="margin: 0;">表中不支持多列姓名，只支持一列姓名</p>
		  <p style="margin: 0;">姓名在第一列</p>
		  <p style="margin: 0;">一种信息占一列</p>
		  <p style="margin: 0;">不支持合并单元格</p>
		  <p style="margin: 0;">不得使用筛选、冻结、公式、宏等功能</p> -->
		  
	      <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
	    </div>
	  </el-upload>
	  <div slot="footer" class="dialog-footer">
	    <el-button type="primary" @click="submitFileForm">确 定</el-button>
	    <el-button @click="upload.open = false">取 消</el-button>
	  </div>
	</el-dialog>
  </div>
</template>

<script>
import { listData, getData, delData, addData, updateData } from "@/api/zhihuixy/data";
import { listInfo,listInfostu} from "@/api/zhihuixy/info";
import axios from 'axios'
import { getToken } from "@/utils/auth";
import { listDept ,listDeptode} from "@/api/system/dept";
export default {
  name: "Data",
  dicts: ['typeone','sys_subject','kaoshi'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 子表选中数据
      checkedScoreDataDetails: [],
	  tableMaxHeight:400,
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 成绩表格数据
      dataList: [],
      // 成绩_子表格数据
      scoreDataDetailsList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        scoreTitle: null,
        scoreTime: null,
        scoreClassId: null,
        scoreClassName: null,
        privacyType: null,
		params:{}
      },
	  kiuesegh:[],
      // 表单参数
      form: {},
      // 表单校验
      rules: {
		scoreClassId: [
		  { required: true, message: "班级不能为空", trigger: "blur" }
		],  
		scoreTitle: [
		  { required: true, message: "不能为空", trigger: "blur" }
		], 
		scoreTime: [
		  { required: true, message: "不能为空", trigger: "blur" }
		], 
      },
	  rulesf:{
		  
	  },
	  // 用户导入参数
	  upload: {
	    // 是否显示弹出层（用户导入）
	    open: false,
	    // 弹出层标题（用户导入）
	    title: "",
	    // 是否禁用上传
	    isUploading: false,
	    // 是否更新已经存在的用户数据
	    updateSupport: 0,
		selectIndex:{},
	    // 设置上传的请求头部
	    headers: { Authorization: "Bearer " + getToken(), },
	    // 上传的地址
	    url: process.env.VUE_APP_BASE_API + "/score/data"
	  },
	  fornh:{},
	  typeOptionsname:[],
	  queryParamstud:{},
	  // listInfostucs:[],
	  listInfostucs:{
		  params:{},
		  },
	  
    };
  },
  created() {
	  window.onresize = () => {
	            this.changeTableMaxHeight()
	          }
	          this.changeTableMaxHeight()
    this.getList();
	this.getdept(0)
	this.getDicts('chjbxk').then(response => {
				this.typeOptionsname = response.data;
			})
  },
  mounted() {
  	window.onresize = () => {
  	          this.changeTableMaxHeight()
  	        }
  	        this.changeTableMaxHeight()
  },
  methods: {
	  /** 查询学生档案信息列表 */
	  getListuye(val) {
	    this.loading = true;
		this.listInfostucs.params.role=this.roleqh()
	  	this.listInfostucs.classId = val
		
	    listInfostu(this.listInfostucs).then(response => {
	      this.infoListstu = response.rows;
	      this.loading = false;
	    });
	  },
	  getdept(val){
	  		  let kuesf={'parentId':val}
	  		  // this.kiuesegh = []
	  		listDeptode(kuesf).then(response => {
	  		  this.deptOptions = this.handleTree(response.data, "deptId");
	  		  this.deptOptions.filter(rou =>{
	  			  if(rou.children != undefined){
	  			  	rou.children.filter(rour =>{
	  			  		this.kiuesegh.push(rour)
	  			  	})
	  				this.queryParams.scoreClassId = this.kiuesegh[0].scoreClassId
	  			  }else{
	  				this.queryParams.scoreClassId = null 
	  			  }
	  			  // this.kiuesegh = rou.children
	  			  // this.kiuesegh.push(rou.children)
	  			  console.log(rou.children,6)
	  		  })
	  		  this.queryParams.scoreClassId = this.kiuesegh[0].scoreClassId
	  		  this.kiueseghs = this.kiuesegh
	  		  // this.deptOptions = response.data
	  		  console.log(this.kiuesegh)
	  		});  
	  },
    /** 查询成绩列表 */
    getList() {
      this.loading = true;
	  if(this.roleqh() == 'school'){
	  		 this.queryParams.params = {} 
	  }else{
	  		 this.queryParams.params.role=this.roleqh()  
	  }
	  this.queryParams.scoreType = 5
      listData(this.queryParams).then(response => {
        this.dataList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        scoreId: null,
        scoreTitle: null,
        scoreTime: null,
        scoreClassId: null,
        scoreClassName: null,
        privacyType: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null
      };
      this.scoreDataDetailsList = [];
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.scoreId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加成绩";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
		console.log(row.scoreType)
		this.$router.push({
		  path: '/chji/tjxq',
		  query:{
			  'type':row.scoreType,
			   'id':row.scoreId
			  }
		})
   //    this.reset();
   //    const scoreId = row.scoreId || this.ids
	  // let dee={}
	  // dee.scoreId = scoreId
   //    getData(dee).then(response => {
   //      this.form = response.data;
   //      this.scoreDataDetailsList = response.data.scoreDataDetailsList;
   //      this.open = true;
   //      this.title = "修改成绩";
   //    });
   
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.form.scoreDataDetailsList = this.scoreDataDetailsList;
          if (this.form.scoreId != null) {
            updateData(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
		// 	  let formData = new FormData()
		// 	      for (let key in this.form) {
		// 	        formData.append(key, this.form[key])
		// 	      }
		// 		  console.log(formData,67)
		// 	    axios.post(process.env.VUE_APP_BASE_API + "/score/data", formData,{
	 //     headers:{
		// 'Authorization':'Bearer ' + getToken()}
	 //    })
		// 	        .then((res) => {
		// 	          console.log('数据：', res);
		// 	        })
            addData(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
			
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const scoreIds = row.scoreId || this.ids;
      this.$modal.confirm('是否确认删除成绩编号为"' + scoreIds + '"的数据项？').then(function() {
        return delData(scoreIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
	/** 成绩_子序号 */
    rowScoreDataDetailsIndex({ row, rowIndex }) {
      row.index = rowIndex + 1;
    },
    /** 成绩_子添加按钮操作 */
    handleAddScoreDataDetails() {
		if(this.form.scoreClassId == null){
			this.$message.error("请先选择班级");
			return
		}
		let bgde = {}
		let nhdw = ''
		for(var i = 0 ; i < this.typeOptionsname.length; i++){
			nhdw = this.typeOptionsname[i].dictValue
         console.log(nhdw,345)
			// bgde.nhdw = ''
		this.$set(bgde,nhdw,"")
		}
		console.log(bgde,34)
		// for()
      let obj = {};
      obj.scoreSort = "";
      obj.scoreDataName = "";
      obj.yuwen = "";
      obj.shuxue = "";
      obj.yingyu = "";
      obj.wuli = "";
      obj.huaxue = "";
      obj.shengwu = "";
      obj.zhengzhi = "";
      obj.lishi = "";
      obj.dili = "";
      obj.tiyu = "";
      obj.wenzong = "";
      obj.lizong = "";
      obj.zhengcefen = "";
      obj.remark = "";
	  obj.zongfen = ""
      this.scoreDataDetailsList.push(bgde);
	  console.log(this.scoreDataDetailsList)
    },
    /** 成绩_子删除按钮操作 */
    handleDeleteScoreDataDetails() {
      if (this.checkedScoreDataDetails.length == 0) {
        this.$modal.msgError("请先选择要删除的数据");
      } else {
        const scoreDataDetailsList = this.scoreDataDetailsList;
        const checkedScoreDataDetails = this.checkedScoreDataDetails;
        this.scoreDataDetailsList = scoreDataDetailsList.filter(function(item) {
          return checkedScoreDataDetails.indexOf(item.index) == -1
        });
      }
    },
    /** 复选框选中数据 */
    handleScoreDataDetailsSelectionChange(selection) {
      this.checkedScoreDataDetails = selection.map(item => item.index)
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('score/data/export', {
        ...this.queryParams
      }, '学生成绩信息.xlsx')
    },
	ngtew(val){
		console.log(val)
	},
	
	/** 导入按钮操作 */
	handleImport() {
	  this.upload.title = "学生成绩信息";
	  this.upload.open = true;
	},
	
	/** 下载模板操作 */
	importTemplate() {
	  this.download('system/user/importTemplate', {
	  }, `user_template_${new Date().getTime()}.xlsx`)
	},
	// 文件上传中处理
	handleFileUploadProgress(event, file, fileList) {
	  this.upload.isUploading = true;
	},
	// 文件上传成功处理
	handleFileSuccess(response, file, fileList) {
	  this.upload.open = false;
	  this.upload.isUploading = false;
	  this.$refs.upload.clearFiles();
	  this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
	  this.getList();
	},
	// 提交上传文件
	submitFileForm() {
	  this.$refs.upload.submit();
	},
	mjyhess(val){
		this.upload.selectIndex.scoreClassName = val.deptName
	},
	mjyhesst(val){
		this.form.scoreClassName = val.deptName
		this.getListuye(val.deptId)
	},
	nbstyu(val){
		
	},
	// 获取屏幕高度
	showFilterForm () {
	      this.filterActive = !this.filterActive
	      this.changeTableMaxHeight()
	    },
	
	    changeTableMaxHeight () {
	      let height = document.body.offsetHeight // 网页可视区域高度
	      // if (this.filterActive) {
	      //   this.tableMaxHeight = height - 320
	      // } else {
	        this.tableMaxHeight = height - 250
	      // }
	      console.log(height)
	    }
  }
};
</script>

<style scoped lang="scss">
	.bgtan{
		border-left: 3px solid #4775EA;
		padding-left: 10px;
	}
	
	.app-container{
		background-color: #f6f6f6;
		// height: 100vh;
	}
</style>