<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
    >
      <el-form-item label="合同名称" >
        <el-input
          v-model="queryParams.contractName"
          placeholder=""
          clearable
        />
      </el-form-item>
      <el-form-item label="合同类型" >
        <el-input
          v-model="queryParams.contractType"
          placeholder=""
          clearable
        />
      </el-form-item>
      <el-form-item label="合同对方" >
        <el-input
          v-model="queryParams.counterparty"
          placeholder=""
          clearable
        />
      </el-form-item>
      <el-form-item label="印花税税目" >
        <el-select v-model="queryParams.stampTaxItemId" clearable  filterable placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.id"
            :label="item.itemName"
            :value="item.id">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="预警情况" >
        <el-select v-model="queryParams.warningType" clearable  filterable placeholder="请选择">
          <el-option
            v-for="item in optionsp"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="合同起止日期" >
        <el-date-picker
          v-model="queryParams.moment"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="单位">
        <el-select
          v-model="selectVal"
          placeholder="请选择..."
          @clear="delValue"
          clearable
          ref="select"
          style="width: 300px"
        >
          <el-option hidden key="id" :value="selectVal" :label="selectName"></el-option>
          <el-tree
            :data="options1"
            :props="defaultProps"
            @node-click="handleNodeClick"
            :expand-on-click-node="false"
            :check-on-click-node="true"
            ref="tree"
            node-key="id"
            :default-expand-all="true"
            :filter-node-method="filterNode"
          >
            <span slot-scope="{ data }">
            <span>{{ data.deptName }}</span>
          <el-tag
            size="mini"
            style="margin: 0 10px"
            v-show="filterorgType(data.tag)"
          >{{ filterorgType(data.tag) }}</el-tag
          >
        </span>
          </el-tree>
        </el-select>
      </el-form-item>
      <el-form-item label="计税标识" >
        <el-select   v-model="queryParams.taxationFlag" clearable  filterable placeholder="请选择">
          <el-option   label="是" value="Y"></el-option>
          <el-option   label="否" value="N"></el-option>
        </el-select>
<!--        <el-input-->
<!--          v-model="queryParams.taxationFlag"-->
<!--          placeholder=""-->
<!--          clearable-->
<!--        />-->
      </el-form-item>
      <el-form-item label="是否预警" >
        <el-select   v-model="queryParams.isWarningSelect" clearable  filterable placeholder="请选择">
          <el-option   label="是" value="1"></el-option>
          <el-option   label="否" value="0"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          @click="handleSech"
        >搜索</el-button>
      </el-form-item>
    </el-form>
    <div style="display: flex">
<!--      <el-button type="text" @click="download">下载模板</el-button>-->
      <el-upload
        class="upload-demo"
        action="#"
        multiple
        :show-file-list="false"
        :on-change="onChange"
        :auto-upload="false"
      >
        <el-button size="small" type="primary">导入数据</el-button>
      </el-upload>
      <el-button   style="margin-left:10px;height: 32px" :disabled="multipleSelection.length===0" type="success" size="mini" @click="hanlsf">批量更新</el-button>
      <el-button   style="margin-left:10px;height: 32px" type="success" size="mini" @click="downloadExport">导出</el-button>
      <el-button   style="margin-left:10px;height: 32px" :disabled="multipleSelection.length===0" type="danger" size="mini" @click="delectp">批量删除</el-button>
    </div>
    <el-row :gutter="10" class="mb8">
    </el-row>
      <el-table
        border
        v-loading="loading"
        :row-class-name="tableRowClassName"
        :data="deptList"
        height="55vh"
        style="width: 100%"
        row-key="deptId"
        @selection-change="handleSelectionChange">
        <el-table-column
          type="selection"
          width="55">
        </el-table-column>
        <el-table-column
          type="index"
          label="序号"
        >
        </el-table-column>
        <el-table-column
          prop="contractName"
          align="center"
          min-width="100px"
          label="合同名称"
        >
        </el-table-column>
        <el-table-column
          prop="contractCode"
          align="center"
          min-width="100px"
          label="合同编码"
        >
        </el-table-column>
        <el-table-column
          prop="contractType"
          align="center"
          min-width="100px"
          label="合同类型"
        >
        </el-table-column>
        <el-table-column
          prop="counterparty"
          align="center"
          min-width="100px"
          label="合同对方"
        >
        </el-table-column>
        <el-table-column
          prop="contractAmount"
          align="center"
          min-width="100px"
          label="合同金额"
        >
        </el-table-column>
        <el-table-column
          prop="taxRate"
          align="center"
          min-width="100px"
          label="税率"
        >
        </el-table-column>
        <el-table-column
          prop="preTaxAmount"
          align="center"
          min-width="100px"
          label="不含税金额"
        >
        </el-table-column>
        <el-table-column
          prop="effectiveDate"
          align="center"
          min-width="100px"
          label="生效日期"
        >
        </el-table-column>
        <el-table-column
          align="center"
          min-width="100px"
          label="印花税税目"
        >
          <template slot-scope="scope">
            <el-select  v-model="scope.row.stampTaxItemId" @clear="clear(scope.row)" @change="upload(scope.row)" filterable placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.id"
                :label="item.itemName"
                :value="item.id">
              </el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column
          prop="stampTaxRate"
          align="center"
          min-width="130px"
          label="印花税税率(‰)"
        >
        </el-table-column>
        <el-table-column
          prop="taxableAmount"
          align="center"
          min-width="80px"
          label="应税金额"
        >
        </el-table-column>
        <el-table-column
          prop="taxationFlag"
          align="center"
          min-width="80px"
          label="计税标识"
        >
          <template slot-scope="{row}">
            <span>{{row.taxationFlag=='Y'?'是':'否'}}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="createUserOrgName"
          align="center"
          min-width="80px"
          label="所属单位"
        >
        </el-table-column>
        <el-table-column
          prop="warningStatusDesc"
          align="center"
          min-width="80px"
          label="风险状态"
        >
        </el-table-column>
<!--        <el-table-column-->
<!--          prop="warningLevel"-->
<!--          align="center"-->
<!--          min-width="80px"-->
<!--          label="风险等级"-->
<!--        >-->
<!--        </el-table-column>-->
        <el-table-column
          align="center"
          min-width="230px"
          label="操作"
        >
          <template slot-scope="scope">
            <div style="display: flex">
              <el-button size="small" type="primary" @click="handM(scope.row)">查看风险</el-button>
              <el-button size="small" type="primary" @click="hand(scope.row)">编辑</el-button>
              <el-button size="small" type="danger" @click="delect(scope.row)">删除</el-button>
            </div>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        style="display: flex;justify-content: flex-end ;margin: 15px 0px 0px 0px"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageNo"
        :page-sizes="[10, 20, 30, 40,100,200,500]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total" />
    <el-dialog
      title="查看"
      :visible.sync="dialog"
      width="70%"
      :before-close="handleClose"
    >
      <el-table
        :data="tableData2"
        height="55vh"
        row-key="deptId"
      >
        <el-table-column
          type="index"
          label="序号"
        >
        </el-table-column>
        <el-table-column
          prop="sourceType"
          align="center"
          min-width="100px"
          label="数据来源"
        >
          <template slot-scope="scope">
<!--            <span>{{scope.row.sourceType==1?'发票信息表':'合同信息表'}}</span>-->
            <span>合同信息表</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="rule"
          align="center"
          min-width="200px"
          label="风险规则"
        >
        </el-table-column>
        <el-table-column
          prop="level"
          align="center"
          min-width="100px"
          label="风险等级"
        >
        </el-table-column>
        <el-table-column
          prop="description"
          align="center"
          min-width="100px"
          label="风险提示"
        >
        </el-table-column>
        <el-table-column
          prop="warningStatusDesc"
          align="center"
          min-width="100px"
          label="处理状态"
        >
<!--          <template slot-scope="scope">-->
<!--            <span>{{scope.row.status===0?'未处理':'已处理'}}</span>-->
<!--          </template>-->
        </el-table-column>
        <el-table-column
          prop="warningTime"
          align="center"
          min-width="100px"
          label="预警时间"
        >
        </el-table-column>
        <el-table-column
          prop="warningRemark"
          align="center"
          min-width="100px"
          label="反馈内容"
        >
        </el-table-column>
        <el-table-column
          align="center"
          min-width="100px"
          label="反馈"
        >
          <template slot-scope="scope">
            <el-button type="primary" :disabled="scope.row.warningStatusDesc==='已处理'" @click="chak(scope.row)">手工反馈</el-button>
          </template>
        </el-table-column>
      </el-table>
<!--      <el-pagination-->
<!--        style="display: flex;justify-content: flex-end ;margin: 15px 0px 0px 0px"-->
<!--        @size-change="handleSizeChange"-->
<!--        @current-change="handleCurrentChange"-->
<!--        :current-page="pages.pageNo"-->
<!--        :page-sizes="[10, 20, 30, 40]"-->
<!--        :page-size="pages.pageSize"-->
<!--        layout="total, sizes, prev, pager, next, jumper"-->
<!--        :total="pages.total" />-->
    </el-dialog>
    <el-dialog
      title="编辑"
      :visible.sync="dialogVisible"
      width="70%"
    >
      <el-form
        :model="ruleForm"
        ref="queryForm"
        label-width="100px"
        size="small"
        :inline="true"
      >
        <el-form-item label="合同名称" >
          <el-input
            v-model="ruleForm.contractName"
            placeholder=""
            disabled
            clearable
          />
        </el-form-item>
        <el-form-item label="合同类型" >
          <el-input
            v-model="ruleForm.contractType"
            placeholder=""
            clearable
          />
        </el-form-item>
        <el-form-item label="合同对方" >
          <el-input
            v-model="ruleForm.counterparty"
            placeholder=""
            clearable
            disabled
          />
        </el-form-item>
        <el-form-item label="合同金额" >
          <el-input
            v-model="ruleForm.contractAmount"
            placeholder=""
            clearable
            disabled
          />
        </el-form-item>
        <el-form-item label="税率" >
          <el-input
            v-model="ruleForm.taxRate"
            placeholder=""
            clearable
            disabled
          />
        </el-form-item>
        <el-form-item label="不含税金额" >
          <el-input
            v-model="ruleForm.preTaxAmount"
            placeholder=""
            clearable
            disabled
          />
        </el-form-item>
        <el-form-item label="合同生效时间" >
          <el-date-picker
            v-model="ruleForm.effectiveDate"
            type="date"
            value-format="yyyy-MM-dd"
            disabled
            placeholder="选择日期">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="sumbit">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="编辑"
      :visible.sync="logVis"
      width="40%"
      >
      <el-form
        :model="ruleFormM"
        ref="ruleFormM"
        label-width="100px"
        size="small"
        :inline="true"
      >
        <el-form-item label="印花税税目" >
          <el-select v-model="ruleFormM.stampTaxItemId"  clearable filterable placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.id"
              :label="item.itemName"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="logVis = false">取 消</el-button>
        <el-button type="primary" @click="sumbitM">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="反馈"
      :visible.sync="dialog1"
      width="70%"
    >
      <el-form ref="form"  label-width="80px">
        <el-form-item label="反馈描述">
          <el-input
            type="textarea"
            style="width: 100%"
            autosize
            placeholder="请输入内容"
            v-model="ruleForm1.remark">
          </el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer" style="display: flex;justify-content: center">
        <el-button @click="dialog1 = false">取 消</el-button>
        <el-button type="primary" @click="sumbit1">保 存</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import {
  adsMatHyxtStampTaxComputeDqueryPage,
  adsMatHyxtStampTaxContractDL,
  adsMatHyxtStampTaxWarningD,
  contractImport,
  deleteadsMatHyxtStampTaxContractD,
  downloadTemplateD,
  invoiceDqueryPagee,
  queryList,
  batchUpdateStampTaxItem,
  stampTaxComputeBillExport,
  dataExportContractD,
  batchDelete,
  adsMatHyxtStampTaxContractDbatchDelete,
  warningType1,
  adsMatHyxtStampTaxContractD,
  adsMatHyxtStampTaxContractDcontractImport, adsMatHyxtStampTaxqueryWarningList, clearStampTaxContractWarning,queryWarningListNew
} from '@/api/utils'
import  moment from 'moment'
import {debounce} from './index'
import {listDept} from "@/api/system/dept";

export default {
  components:{
  },
  data() {
    return {
      selectVal:'',
      selectName:'',
      defaultProps: {
        children: "children",
        label: "name",
      },
      // 标签数组
      tagList: [

      ],
      logVis:false,
      dialog1:false,
      dialog:false,
      dialogVisible:false,
      deptList:[],
      options:[],
      ruleFormM:{
        stampTaxItemId:'',
      },
      option:null,
      queryParams:{
        counterparty:'',
        contractType:'',
        contractName:'',
        stampTaxItemId:'',
        moment:null,
        warningType:'',
        taxationFlag:'',
        isWarningSelect:'',
      },
      // 遮罩层
      loading: false,
      pageNo:1,
      pageSize:10,
      total:0,
      pages:{
        pageNo:1,
        pageSize:10,
        total:0,
      },
      ruleForm:{},
      ruleForm1:{
        remark:'',
      },
      tableData2:[],
      row:{},
      time:null,
      multipleSelection:[],
      options1:[],
      optionsp:[],
    };
  },
  created() {
    this.getList();
    this.getData()
    this.getListM()
    this.getYj()
  },
  computed:{

  },
  watch: {
    // 搜索过滤，监听input搜索框绑定的treeFilter
    treeFilter(val) {
      this.$refs.tree.filter(val);
      // 当搜索框键入值改变时，将该值作为入参执行树形控件的过滤事件filterNode
    },
  },
  methods: {
    handleClose(){
      this.dialog=false
      this.getList();
    },
    getYj(){
      warningType1().then(res=>{
        this.optionsp=res.data || []
      })
    },
    delectp(){
      this.$confirm('是否批量删除? 请谨慎此操作', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let ids=[]
        this.multipleSelection.forEach(item=>{
          ids.push(item.id)
        })
        let data={
          ids:ids
        }
        console.log(ids,'ids')
        adsMatHyxtStampTaxContractDbatchDelete(data).then(res => {
          if (res.code === 200) {
            this.$message({
              type: 'success',
              message: '删除成功!'
            });
            this.getList()
          } else {
            this.$message({
              type: 'error',
              message: '删除失败，请重试!'
            });
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      })
    },
    clear(row){
      adsMatHyxtStampTaxContractDL(val).then(res=>{
        if(res.code===200){
          this.$message.success('修改成功')
          this.getList()
        }else {
          this.$message.error(res.msg || '修改失败')
        }
      })
    },
    downloadExport(){
      let startDate
      let endDate
      if(this.queryParams.moment){
        endDate=this.queryParams.moment[1]
        startDate=this.queryParams.moment[0]
      }else {
        startDate=''
        endDate=''
      }
      this.queryParams.createUserOrgNo=this.selectVal
      let data={
        endDate:endDate,
        startDate:startDate,
        ...this.queryParams
      }
      dataExportContractD(data).then(res=>{
        const blob = new Blob([res]);
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '合同信息.xls';
        link.click();
      })
    },
    getListM() {
      listDept().then((response) => {
        this.options1 = this.handleTree(response.data, "deptId");
      });
    },
    delValue() {
      this.selectVal = ''
      this.selectName = '';
    },
    // 结构树点击事件
    handleNodeClick(data) {
      console.log(data,'----')
      this.selectVal = data.deptId; // select绑定值为点击的选项的value
      this.selectName = data.deptName; // input中显示值为label
      this.treeFilter = ""; // 点击后搜索框清空
      this.$refs.select.blur(); // 点击后关闭下拉框，因为点击树形控件后select不会自动折叠
    },
    // 模糊查询（搜索过滤），实质为筛选出树形控件中符合输入条件的选项，过滤掉其他选项
    filterNode(value, data) {
      if (!value) return true;
      let filterRes = data.label.indexOf(value) !== -1;
      return filterRes;
    },
    // 选项卡标签（可忽略，增值迭代需求）
    filterorgType(val) {
      let arr = this.tagList.filter((item) => {
        return item.value == val;
      });
      return arr.length ? arr[0].label : "";
    },
    sumbitM(){
      let ids=[]
      this.multipleSelection.forEach(item=>{
        ids.push(item.id)
      })
      let data={
        ids:ids,
        ...this.ruleFormM
      }
      batchUpdateStampTaxItem(data).then(res=>{
        if(res.code===200){
          this.$message.success('提交成功')
          this.logVis=false
          this.getList()
        }else {
          this.$message.success(res.msg || '提交失败')
        }
      })
    },
    hanlsf(){
      this.logVis=true
      this.ruleFormM.stampTaxItemId=''
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    handM(row){
      this.row=row
      this.row.type='ht'
      this.row.sourceId=row.id
      this.row.sourceType=0
      this.dialog=true
      this.getListT()
    },
    chak(row){
      this.dialog1=true
      this.ruleForm1.remark=''
      this.option=JSON.parse(JSON.stringify(row))
    },
    sumbit1(){
      this.option.remark=this.ruleForm1.remark
      clearStampTaxContractWarning(this.option).then((res) => {
        if(res.code===200){
          this.$message.success('提交成功')
          this.dialog1=false
          this.getListT()
        }else {
          this.$message.success(res.msg || '提交失败')
          this.getListT()
        }
      });
    },
    getListT() {
      // let data={
      //   pageNo:this.pages.pageNo,
      //   pageSize:this.pages.pageSize,
      // }
      this.row.sourceType=0
      // adsMatHyxtStampTaxqueryWarningList(this.row).then((response) => {
      //   if(response && response.data){
      //     this.tableData2 = response.data;
      //     // this.pages.total = response.data.total;
      //   }else {
      //     this.tableData2 =[]
      //     // this.pages.total =0
      //   }
      // });
      queryWarningListNew({businessId:this.row.id}).then((response) => {
        if(response && response.data){
          this.tableData2 = response.data;
          // this.pages.total = response.data.total;
        }else {
          this.tableData2 =[]
          // this.pages.total =0
        }
      });
    },
    // 鼠标进入表格行的回调函数
    enterSelectionRows(row, column, cell, event){
      // console.log('444444444444444444444444444444444444',)
      // this.row=row
      // this.row.sourceId=row.id
      // this.row.sourceType=0
      // this.debounce(this.getListT(),1000)
    },
// 鼠标离开表格行的回调函数
    leaveSelectionRows: (row) => {
      // clearTimeout(this.time);
    },
    handleClick(row){
      if(row.isWarning===1){
        this.row=row
        this.row.type='ht'
        this.row.sourceId=row.id
        this.row.sourceType=0
        // this.$router.push({
        //   path:'RiskDoubt',
        //   query:row
        // })
      }
    },
    tableRowClassName({row, rowIndex}) {
      if(row.isWarning===1){
        return 'danger-row';
      }
      if (row.isWarning===2) {
        return 'warning-row';
      }
      return '';
    },
    hand(row){
      this.dialogVisible=true
      this.ruleForm=JSON.parse(JSON.stringify(row))
    },
    sumbit(){
      adsMatHyxtStampTaxContractDL(this.ruleForm).then(res=>{
        if(res.code===200){
          this.$message.success('修改成功')
          this.dialogVisible=false
          this.getList()
        }else {
          this.$message.error(res.msg || '修改失败')
        }
      })
    },
    delect(row){
      this.$confirm('此操作将永久删除, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteadsMatHyxtStampTaxContractD(row).then(res => {
          if (res.code === 200) {
            this.$message({
              type: 'success',
              message: '删除成功!'
            });
            this.getList()
          } else {
            this.$message({
              type: 'error',
              message: '删除失败，请重试!'
            });
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      })
    },
    upload(val){
      adsMatHyxtStampTaxContractDL(val).then(res=>{
        if(res.code===200){
          this.$message.success('修改成功')
          this.getList()
        }else {
          this.$message.error(res.msg || '修改失败')
        }
      })
    },
    getData(){
      queryList().then(res=>{
        this.options=res.data || []
      })
    },
    download(){
      downloadTemplateD().then(res=>{
        const blob = new Blob([res]);
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '合同信息.xls';
        link.click();
      })
    },
    onChange(file){
      let formDataN = new FormData();
      formDataN.append("file", file.raw);
      adsMatHyxtStampTaxContractD(formDataN).then(res=>{
        if(res.data.isOk===0){
          this.$confirm(`${res.data.tips}`, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            let formDataImport= new FormData();
            formDataImport.append("file", file.raw);
            adsMatHyxtStampTaxContractDcontractImport(formDataImport).then(res => {
              if (res.code === 200) {
                this.$message({
                  type: 'success',
                  message: '导入成功!'
                });
                this.getList()
              }
            })
          })
        }else {
          let formDataNG = new FormData();
          formDataNG.append("file", file.raw);
          adsMatHyxtStampTaxContractDcontractImport(formDataNG).then(res => {
            if (res.code === 200) {
              this.$message({
                type: 'success',
                message: '导入成功!'
              });
              this.getList()
            }
          })
        }
      })
      // let formData = new FormData();
      // console.log(file)
      // formData.append("file", file.raw);
      // contractImport(formData).then(res=>{
      //    if(res.code===200){
      //      this.$message.success('上传成功')
      //      this.getList()
      //    }else {
      //      this.$message.error(res.msg || '上传失败')
      //    }
      // })
    },
    handleSech(){
      this.pageNo=1
      this.getList()
    },
    moment,
    /** 查询部门列表 */
    getList() {
      this.loading = true;
      let startDate
      let endDate
      if(this.queryParams.moment){
        endDate=this.queryParams.moment[1]
        startDate=this.queryParams.moment[0]
      }else {
        startDate=''
        endDate=''
      }
      this.queryParams.createUserOrgNo=this.selectVal
      let data={
        pageNo:this.pageNo,
        pageSize:this.pageSize,
        endDate:endDate,
        startDate:startDate,
        ...this.queryParams
      }
      invoiceDqueryPagee(data).then((response) => {
        if(response && response.data && response.data.records){
          this.loading = false;
          this.deptList = response.data.records;
          this.total=response.data.total
        }else {
          this.deptList =[]
          this.loading = false;
          this.total=0
        }
      });
    },
    handleSizeChange(val) {
      this.pageSize=val
      this.getList()
    },
    handleCurrentChange(val) {
      this.pageNo=val
      this.getList()
    },
  },
};
</script>
<style lang="scss" scoped>
::v-deep .el-table .danger-row {
  background: #ff6969;
}
::v-deep .el-table .warning-row {
  background: #ffff7e;
}

::v-deep .el-table .success-row {
  //background: #f0f9eb;
}
///* 用来设置当前页面element全局table 选中某行时的背景色*/
//::v-deep .container .el-table__body tr.current-row>td{
//  　　background-color: #F5F7FA !important;
//}
///* 用来设置当前页面element全局table 鼠标移入某行时的背景色*/
//::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
//  　　background-color: #F5F7FA;
//}
</style>
