<template>
  <div class='innerCheck' ref='innerCheckRef'>
    <!--选择复核台-->
    <workStation v-if='isShow == 1' :screen='screen' :editData='editData'
                 @fullscreenEven='fullscreenEven'
                 @changeStationInfo='changeStationInfo'
                 @changePage='changePage' />
    <!--复核执行-->
    <checkDetail v-if='isShow == 2' :screen='screen' :editData='editData'
                 @fullscreenEven='fullscreenEven'
                 :stationInfo='stationInfo'
                 @changePage='changePage' />
  </div>
</template>
<script>

import workStation from './workStation'
import checkDetail from './checkDetail'
import { eleFullScreen, checkFull } from './components/config'

export default {
  name: 'InnerCheck',
  components: { workStation, checkDetail },
  data() {
    return {
      isShow: 1,
      screen: false,
      editData: {},
      stationInfo: {}
    }
  },
  mounted() {
    window.onresize = () => {
      if (!checkFull()) {
        this.screen = false
      }
    }
  },
  methods: {
    changePage(type = 1) {
      // type 1-选择复核台 2-复核执行
      this.isShow = type
    },
    changeStationInfo(stationInfo) {
      this.stationInfo = stationInfo
    },
    fullscreenEven() {
      const screen = this.screen
      const innerCheckRef = this.$refs.innerCheckRef
      eleFullScreen(innerCheckRef, !screen)
      this.$nextTick(() => {
        this.screen = !this.screen
      })
    },
    exit() {
      this.isShow = 1
    }
  }
}
</script>

<style lang='less' scoped>
.innerCheck {
  .header {
    display: flex;
    justify-content: space-between;
  }

  .Main {
    background: #F0F2F5
  }

  .item {
    display: inline-block;
    margin-left: 10px;
  }

  /deep/ .ant-result-title {
    font-family: PingFangSC-Medium;
    font-size: 30px;
    color: #52c41a;
  }

  /deep/ .ant-card-head-title {
    font-family: PingFangSC-Medium;
    font-size: 16px;
    color: #666666;
  }

  /deep/ .ant-descriptions-title {
    font-size: 20px;
    color: #1890ff;
  }

  .blod-font {
    font-family: PingFangSC-Medium;
    font-size: 28px;
    color: #333333;
    line-height: 32px;
  }

  .thin-font {
    font-family: PingFangSC-Medium;
    font-size: 18px;
    color: #333333;
  }

  .show-title {
    font-family: PingFangSC-Medium;
    font-size: 20px;
    color: #1890ff;
  }

  .info {
    .item {
      display: flex;
      align-items: center;
      margin-bottom: 16px;

      .label {
        font-family: PingFangSC-Medium;
        font-size: 24px;
        color: #666666;
      }

      .thin-label {
        font-family: PingFangSC-Medium;
        font-size: 18px;
        color: #666666;
      }
    }
  }
}
</style>
