<template>
  <div class="app-container">
    <div v-show="viewState === 1">
      <button-bar view-title="车辆台账" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
      <div class="main-content">
        <div class="searchcon">
          <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
          <div v-show="isSearchShow" class="search">
            <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
              <el-form-item label="存放地点">
                <el-select v-model="listQuery.params.location" class="addinputw" clearable placeholder="">
                  <el-option v-for="(item,index) in location_list" :key="item.sid" :label="item.warehouseName" :value="item.sid"/>
                </el-select>
              </el-form-item>
              <el-form-item label="车型名称">
                <el-input v-model="listQuery.params.modelName" placeholder="请输入车型名称" clearable class="filter-item"/>
              </el-form-item>
              <el-form-item label="库存状态">
                <el-select v-model="listQuery.params.vehicleState" class="addinputw" clearable placeholder="">
                  <el-option v-for="item in vehicleState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
                </el-select>
              </el-form-item>
              <el-form-item label="车架号">
                <el-input v-model="listQuery.params.vinNo" placeholder="请输入车架号" clearable class="filter-item"/>
              </el-form-item>
              <el-form-item label="合格证状态">
                <el-select v-model="listQuery.params.certificateStateValue" class="addinputw" clearable placeholder="">
                  <el-option v-for="item in certificateState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
                </el-select>
              </el-form-item>
            </el-form>
            <div class="btn" style="text-align: center;">
              <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
              <el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
            </div>
          </div>
        </div>
        <div class="listtop">
          <div class="tit">车辆台账信息列表</div>
          <pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
        </div>
        <div>
          <el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
            <el-table-column width="50px" fixed type="selection" align="center"/>
            <el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/>
            <!--            <el-table-column label="操作" align="center" width="180px" class-name="small-padding fixed-width">-->
            <!--              <template slot-scope="{row}">-->
            <!--                <el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button>-->
            <!--                <el-button size="mini" type="primary" @click="cheLiangXiangXiPeiZhi(row)">车型配置</el-button>-->
            <!--              </template>-->
            <!--            </el-table-column>-->
            <el-table-column label="车型" fixed width="200" align="left" header-align="center">
              <template slot-scope="scope">
                <span class="bluezi" @click="cheLiangXiangXiPeiZhi(scope.row)">{{ scope.row.modelName }}</span>
              </template>
            </el-table-column>
            <el-table-column label="车架号" fixed width="200" align="center">
              <template slot-scope="scope">
                <span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.vinNo }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="certificateStateValue" width="130" label="合格证状态" align="center"/>
            <!--            <el-table-column width="190px" label="发动机号/许可证" align="center">-->
            <!--              <template slot-scope="scope">-->
            <!--                <span>{{ scope.row.engineNo }}</span>-->
            <!--              </template>-->
            <!--            </el-table-column>-->
            <el-table-column width="140" label="存放地点" align="center">
              <template slot-scope="scope">
                <span class="bluezi" @click="handleLook(scope.row)">{{ scope.row.locationName }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="vehicleStateValue" width="100" label="库存状态" align="center"/>
            <el-table-column prop="priceDate" width="130" label="厂家入库日期" align="center"/>
            <el-table-column prop="libraryAge" width="80" label="库龄(天)" align="center"/>
            <el-table-column prop="arrivalDate" width="130" label="到货日期" align="center"/>
            <el-table-column prop="configName" width="460" label="常用配置名称" align="left" header-align="center"/>
            <el-table-column prop="contractPrice" width="130" label="厂家合同价" align="center"/>
            <el-table-column prop="costPrice" width="130" label="厂家结算价" align="center"/>
            <el-table-column prop="createOrgName" width="130" label="创建组织名称" align="center"/>
            <el-table-column prop="departureDate" width="130" label="发车日期" align="center"/>
            <el-table-column prop="freight" width="130" label="运费" align="center"/>
            <el-table-column prop="guidedPrice" width="130" label="销售指导价" align="center"/>
            <el-table-column prop="insideCode" width="160" label="内部编码" align="center"/>
            <el-table-column prop="lockedStateValue" width="130" label="锁定状态" align="center"/>
            <el-table-column prop="manPurOrderTypeValue" width="160" label="厂家采购订单类型" align="center"/>
            <el-table-column prop="orderingNo" width="160" label="厂家订单编号" align="center"/>
            <!--            <el-table-column prop="rebate1" width="130" label="返利1"  align="center" />-->
            <!--            <el-table-column prop="rebate2" width="130" label="返利2" align="center" />-->
            <!--            <el-table-column prop="rebate3" width="130" label="返利3" align="center" />-->
            <el-table-column prop="returnDate" width="130" label="退库日期" align="center"/>
            <el-table-column prop="salePrice" width="130" label="成交价" align="center"/>
            <el-table-column prop="salesDate" width="130" label="销售日期" align="center"/>
            <el-table-column prop="settlementStatus" width="110" label="买断状态" align="center">
              <template slot-scope="scope">
                <span class="bluezi" @click="handleCheckMai(scope.row)">{{ scope.row.settlementStatus }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="solidDate" width="130" label="买断日期" align="center"/>
            <!--            <el-table-column prop="specialInstructions" width="150" label="特殊或差异说明" align="left" header-align="center" />-->
            <!--            <el-table-column prop="useOrgName" width="130" label="使用组织名称" align="center" />-->
<!--            <el-table-column prop="witPinStateValue" width="100" label="调车状态" align="center"/>-->
            <el-table-column prop="warrantyCardNo" width="130" label="保修卡号" align="center"/>
          </el-table>
        </div>
        <div class="pages">
          <!-- 翻页 -->
          <pagination v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
        </div>
      </div>
    </div>
    <cheliangtaizhang-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getList"/>
    <cheliangtaizhang-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/>
    <!-- 车型配置标准页面 -->
    <vehicleconfiguration v-show="viewState == 5" ref="divPeizhi" @doback="resetState"/>
    <!--    <changyongpeizhi-info v-show="viewState == 5" ref="divPeizhi" @doback="resetState"></changyongpeizhi-info>-->
    <!-- 出库 -->
    <cheliangtaizhang-chu v-show="viewState == 6" ref="divChu" @doback="resetState"/>
    <!-- 买断 -->
    <cheliangtaizhang-mai v-show="viewState == 7" ref="divMai" @doback="resetState" @reloadlist="getList"/>
    <!-- 买断详情 -->
    <cheliangtaizhang-mai-info v-show="viewState == 8" ref="divMaiInfo" @doback="resetState"/>
    <!-- 车辆配件更换记录列表 -->
    <cheliangpeijian v-show="viewState == 9" ref="divPeiJian" @doback="resetState"/>
    <el-dialog :visible.sync="dialogVisible" width="80%">
      <el-form class="formadd">
        <el-table :key="cfddKey" :data="cfdd_list" :index="index" border style="width: 100%">
          <el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
          <el-table-column width="220px" prop="applyId" label="申请编号" align="center"/>
          <el-table-column width="140px" prop="applyDate" label="申请日期" align="center"/>
          <el-table-column width="130px" prop="applyName" label="申请人" align="center"/>
          <el-table-column width="180px" prop="vin" label="车架号" align="center"/>
          <el-table-column width="160px" prop="location" label="现存放地点" align="center"/>
          <el-table-column width="160px" prop="targetLocation" label="目标存放地点" align="center"/>
          <el-table-column width="130px" prop="operator" label="经办人" align="center"/>
          <el-table-column width="160px" prop="applyPrice" label="申请费用" align="center"/>
          <el-table-column width="180px" label="现场照片" align="center">
            <template slot-scope="{row}">
              <el-button size="mini" type="primary" v-show="row.images.length > 0" @click="handleCheckImg(row)">查看</el-button>
            </template>
          </el-table-column>
          <el-table-column width="180px" label="保单" align="center">
            <template slot-scope="{row}">
              <el-button size="mini" type="primary" v-show="row.policyImage.length > 0" @click="handleCheckBao(row)">查看</el-button>
            </template>
          </el-table-column>
          <el-table-column width="160px" prop="temporaryCard" label="临牌牌照号" align="center"/>
          <el-table-column width="120px" label="临时出门证" align="center">
            <template slot-scope="{row}">
<!--              <el-button v-show="row.state == '已办结'" size="mini" type="primary" @click="handleExitPermit(row)">打印出门证-->
<!--              </el-button>-->
            </template>
          </el-table-column>
        </el-table>
        <div class="pages">
          <!-- 翻页 -->
          <pagination v-show="cfdd_list.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="handleLook"/>
        </div>
      </el-form>
    </el-dialog>
    <!-- 照片弹窗 -->
    <el-dialog :visible.sync="dialogImgVisible" width="1000px" :close-on-click-modal="false">
      <div class="result-cont">
        <el-carousel indicator-position="outside" style="height: 500px;">
          <el-carousel-item v-for="item in srcList" :key="item" style="height: 500px;">
            <img style="width: 100%; height: 500px;" :src="item">
          </el-carousel-item>
        </el-carousel>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  basefinbankExportExcel,
  deleteBySids,
  fetchByUseOrgSid,
  getUseOrgByUserSid,
  pagerList,
  selectCarTransferListAll
} from '@/api/cheliang/basevehicle'
import { typeValues } from '@/api/cheliang/dictcommons'
import cheliangtaizhangAdd from './cheliangtaizhangAdd'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import CheliangtaizhangInfo from './cheliangtaizhangInfo'
import ChangyongpeizhiInfo from '@/views/cheliang/chexingpeizhi/changyongpeizhiInfo'
import vehicleconfiguration from '@/views/cheliang/cheliangtaizhang/relation/vehicleconfiguration'
import ButtonBar from '@/components/ButtonBar'
import Vehicle from '@/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/vehicle'
import { getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
import cheliangtaizhangChu from '@/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangChu'
import cheliangtaizhangMai from '@/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangMai'
import cheliangtaizhangMaiInfo from '@/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangMaiInfo'
import cheliangpeijian from './cheliangpeijianchange/cheliangpeijian'

export default {
  name: 'cheliangtaizhang',
  components: {
    Vehicle,
    ChangyongpeizhiInfo,
    Pagination,
    pageye,
    ButtonBar,
    cheliangtaizhangAdd,
    CheliangtaizhangInfo,
    vehicleconfiguration,
    cheliangtaizhangChu,
    cheliangtaizhangMai,
    cheliangtaizhangMaiInfo,
    cheliangpeijian
  },
  data() {
    return {
      viewState: 1,
      isSearchShow: false,
      dialogVisible: false,
      index: 0,
      searchxianshitit: '显示查询条件',
      btndisabled: false,
      // --按钮菜单-------
      btnList: [
        {
          type: 'primary',
          size: 'small',
          icon: 'plus',
          btnKey: 'toAdd',
          btnLabel: '新增'
        },
        {
          type: 'primary',
          size: 'small',
          icon: 'edit',
          btnKey: 'toEdit',
          btnLabel: '编辑'
        },
        {
          type: 'danger',
          size: 'small',
          icon: 'del',
          btnKey: 'doDel',
          btnLabel: '删除'
        },
        {
          type: 'primary',
          size: 'small',
          icon: 'exwarehouse',
          btnKey: 'doChuku',
          btnLabel: '出库'
        },
        {
          type: 'primary',
          size: 'small',
          icon: 'RMB',
          btnKey: 'doMaiduan',
          btnLabel: '买断'
        },
        {
          type: 'primary',
          size: 'small',
          icon: '',
          btnKey: 'doChange',
          btnLabel: '车辆配件更换记录'
        },
        {
          type: 'success',
          size: 'small',
          icon: 'export',
          btnKey: 'build',
          btnLabel: '导出'
        },
        {
          type: 'info',
          size: 'small',
          icon: 'cross',
          btnKey: 'doClose',
          btnLabel: '关闭'
        }
      ],
      // 查询 -----------
      tableKey: 0,
      cfddKey: 1,
      // list: null,
      list: [],
      cfdd_list: [],
      imgList: [],
      srcList: [],
      dialogImgVisible: false,
      total: 1,
      FormLoading: false,
      listLoading: false,
      listQuery: {
        params: {
          location: '',
          modelName: '',
          vehicleState: '',
          certificateStateValue: '',
          vinNo: '',
          createOrgSid: ''
        },
        current: 1,
        size: 5
      },
      queryParams: {
        current: 1,
        size: 5,
        total: 0,
        params: {
          vin: '',
          useOrgSid: ''
        }
      },
      sids: [],
      selectDate: undefined,
      temp: {}, // 添加和修改
      templook: {}, // 查看实体
      textMap: {
        update: '编辑',
        create: '创建'
      },
      multipleSelection: [],
      dialogFormVisible: false, // 添加修改对话框状态
      dialogFormShowVisible: false, // 查看对话框默认关闭状态
      dialogStatus: '', // 对话框状态
      typeOptions: [],
      location_list: [],
      vehicleState_list: [],
      certificateState_list: []
    }
  },
  created() {
    // 初始化变量
    this.init()
    // 加载列表
    this.getPathSid()
    this.getUseOrg()
  },
  mounted() {
    this.$refs['btnbar'].setButtonList(this.btnList)
  },
  methods: {
    // 搜索条件效果
    clicksearchShow() {
      this.isSearchShow = !this.isSearchShow
      if (this.isSearchShow) {
        this.searchxianshitit = '隐藏查询条件'
      } else {
        this.searchxianshitit = '显示查询条件'
      }
    },
    init() {
      // 根据当前用户. 加载当前页面的按钮权限
      // findButtonByUserId(this.$route.path).then(response => {
      //   if (
      //     response.code === 20000 &&
      //   response.data &&
      //   response.data.length > 0
      //   ) {
      //     this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态
      //   }
      // })
      this.setDater()
    },
    // 序号
    indexMethod(index) {
      var pagestart = (this.listQuery.current - 1) * this.listQuery.size
      var pageindex = index + 1 + pagestart
      return pageindex
    },
    resetState() {
      this.viewState = 1
    },
    btnHandle(btnKey) {
      console.log('XXXXXXXXXXXXXXX    ' + btnKey)
      switch (btnKey) {
        case 'toAdd':
          this.toAdd()
          break
        case 'toEdit':
          this.toEdit()
          break
        case 'doDel':
          this.doDel()
          break
        case 'doChuku':
          this.doChuku()
          break
        case 'doMaiduan':
          this.doMaiduan()
          break
        case 'doChange':
          this.doChange()
          break
        case 'doExport':
          this.doExport()
          break
        case 'doClose':
          this.doClose()
          break
        default:
          break
      }
    },
    setDater() {
      typeValues({ type: 'vehicleState' }).then((res) => {
        if (res.code === '200') {
          this.vehicleState_list = res.data
        }
      })
      typeValues({ type: 'certificateState' }).then((res) => {
        if (res.code === '200') {
          this.certificateState_list = res.data
        }
      })
    },
    getUseOrg() {
      const userSid = window.sessionStorage.getItem('userSid')
      getUseOrgByUserSid({ userSid: userSid }).then((res) => {
        if (res.success) {
          this.useOrgName = res.data.name
          this.useOrg = res.data.sid
          this.getLocation(res.data.sid)
        }
      })
    },
    // 根据组织获得存放地点
    getLocation(useOrg) {
      // 存放地点
      fetchByUseOrgSid({
        sid: useOrg
      }).then((res) => {
        if (res.code === '200') {
          this.location_list = res.data
          console.log('存放地点', this.location_list)
        }
      })
    },
    getPathSid() {
      const userSid = window.sessionStorage.getItem('userSid')
      getPathSidByUserSid({userSid: userSid}).then((res) => {
        if (res.code === '200') {
          this.listQuery.params.createOrgSid = res.data
          this.queryParams.params.useOrgSid = res.data
          this.getList()
        }
      })
    },
    // 查询列表信息
    getList() {
      this.listLoading = true
      pagerList(this.listQuery).then((response) => {
        // console.log('列表查询结果：' + JSON.stringify(response))
        this.listLoading = false
        if (
          response.code === '200' &&
          response.data &&
          response.data.total > 0
        ) {
          this.list = response.data.records
          this.total = response.data.total // 0：未买断，1预买断，2买断
          for (var i = 0; i < this.list.length; i++) {
            if (this.list[i].settlementStatus == '0') {
              this.list[i].settlementStatus = '未买断'
            }
            if (this.list[i].settlementStatus == '1') {
              this.list[i].settlementStatus = '预买断'
            }
            if (this.list[i].settlementStatus == '2') {
              this.list[i].settlementStatus = '已买断'
            }
          }
        } else {
          this.list = []
          this.total = 0
        }
      })
    },
    // 查询按钮
    handleFilter() {
      this.listQuery.current = 1
      this.getList()
    },
    // 重置
    handleReset() {
      this.listQuery = {
        params: {
          location: '',
          modelName: '',
          vehicleState: '',
          certificateStateValue: '',
          vinNo: '',
          createOrgSid: ''
        },
        current: 1,
        size: 5
      }
      this.getPathSid()
    },
    // ----------------------------------方法--------------------
    // 添加前数据初始化
    resetTemp() {
      this.temp = {
        jc: '', //			false	string
        organizationId: '', //			false	string
        qc: '', //			false	string
        remark: '', //			false
        string: '', //
        state: '' //	状态
      }
    },
    handleSelectionChange(row) {
      this.multipleSelection = row
      const aa = []
      row.forEach((element) => {
        aa.push(element.sid)
      })
      this.sids = aa
    },
    // 打开添加
    toAdd() {
      this.viewState = 2
      this.$refs['divadd'].showAdd()
    },
    // 打开配置
    cheLiangXiangXiPeiZhi(row) {
      this.viewState = 5
      this.$refs['divPeizhi'].showInfo(row)
    },
    // 出库
    doChuku() {
      if (this.sids.length === 1) {
        this.viewState = 6
        const sid = this.sids[0]
        this.$refs['divChu'].showChu(sid)
      } else if (this.sids.length > 1) {
        this.$message({
          showClose: true,
          message: '请选择一台车辆进行出库！',
          type: 'error'
        })
      } else {
        this.$message({
          showClose: true,
          message: '仅可选择一台车辆进行出库！',
          type: 'error'
        })
        return
      }
    },
    // 买断
    doMaiduan() { // salesDate settlementStatus
      if (this.sids.length > 0) {
        for (var i = 0; i < this.multipleSelection.length; i++) {
          if (this.multipleSelection[i].settlementStatus == '已买断') {
            this.$message({
              showClose: true,
              message: '所选车辆存在已买断状态车辆！',
              type: 'error'
            })
            return
          }
          if ((this.multipleSelection[i].salesDate == null || this.multipleSelection[i].salesDate == '') && this.multipleSelection[i].settlementStatus !== '预买断') {
            this.$message({
              showClose: true,
              message: '请选择销售日期不为空或买断状态为预买断的车辆！',
              type: 'error'
            })
            return
          }
          if ((this.multipleSelection[i].salesDate !== null || this.multipleSelection[i].salesDate !== '') || this.multipleSelection[i].settlementStatus == '预买断') {
            this.viewState = 7
            const bb = []
            this.multipleSelection.forEach((element) => {
              bb.push(element.vinNo)
            })
            this.$refs['divMai'].showMai(this.sids, bb)
          }
        }
      } else {
        this.$message({
          showClose: true,
          message: '请选择车辆进行买断！',
          type: 'error'
        })
        return
      }
    },
    // 买断的详情
    handleCheckMai(row) {
      if (row.settlementStatus == '已买断') {
        this.viewState = 8
        this.$refs['divMaiInfo'].showMaiInfo(row)
      } else {
        this.$message({
          showClose: true,
          message: '该车辆非已买断车辆！',
          type: 'error'
        })
      }
    },
    doChange() {
      if (this.multipleSelection.length === 0) {
        this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' })
        return
      }
      if (this.multipleSelection.length > 1) {
        this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' })
        return
      }
      this.viewState = 9
      this.$refs['divPeiJian'].init(this.multipleSelection)
    },
    handleCheckImg(row) {
      this.dialogImgVisible = true
      this.srcList = row.images
    },
    handleCheckBao(row) {
      this.dialogImgVisible = true
      this.srcList = row.policyImage
    },
    // 打开修改
    toEdit() {
      if (this.sids.length === 1) {
        this.dialogStatus = 'update'
        this.viewState = 3
        const sid = this.sids[0]
        this.$refs['divadd'].showEdit(sid)
      } else if (this.sids.length > 1) {
        this.$notify({
          title: '提示',
          message: '不能选中多个车辆台账修改!!',
          type: 'info',
          duration: 2000
        })
      } else {
        this.$notify({
          title: '提示',
          message: '没有选择车辆台账!!',
          type: 'error',
          duration: 2000
        })
        return
      }
    },
    // 打开查看
    handleCheck(row) {
      console.log('88888888888', row)
      this.viewState = 4
      const sid = row.sid
      this.$refs['divinfo'].showInfo(sid)
    },
    handleLook(row) {
      this.queryParams.params.vin = row.vinNo
      selectCarTransferListAll(this.queryParams).then((res) => {
        if (res.success) {
          this.dialogVisible = true
          this.cfdd_list = res.data.records
        }
      })
    },
    // 根据本行ID删除数据
    doDel() {
      if (this.sids.length > 0) {
        const _this = this
        const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
        this.$confirm(tip, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        })
          .then(() => {
            const loading = this.$loading({
              lock: true,
              text: 'Loading',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)'
            })
            deleteBySids(this.sids)
              .then(resp => {
                loading.close()
                _this.$message({type: 'success', message: resp.msg, showClose: true})
                _this.getList()
              })
              .catch(e => {
                loading.close()
              })
          })
          .catch(() => {
          })
      } else {
        this.$notify({
          title: '提示',
          message: '没有选择车辆台账!!',
          type: 'error',
          duration: 2000
        })
        return
      }
    },
    // 导出
    doExport() {
      // this.$confirm('确定要导出数据, 是否继续?', '提示', {
      //   confirmButtonText: '确定',
      //   cancelButtonText: '取消',
      //   type: 'warning'
      // })
      basefinbankExportExcel(this.sids).then((res) => {
        const blob = new Blob([res], {
          type: 'application/vnd.ms-excel'
        })
        const objectUrl = URL.createObjectURL(blob)
        window.location.href = objectUrl
        this.$notify({
          title: '提示',
          message: '导出成功',
          type: 'success',
          duration: 2000
        })
      })
    },
    doClose() {
      this.$store.dispatch('tagsView/delView', this.$route)
      this.$router.go(-1)
    }
  }
}
</script>
<style scoped>
</style>
