<template>
  <div class="home-main" id="my-home-main" :style="`transform: scale(${toScale}) !important;`">
    <div class="top">
      <div class="top-name">江西昌柘伟业航空装备技术有限公司</div>
    </div>
    <div v-if="show" class="full-screen" @click="fullScreen">
      <svg t="1732355752742" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4253" width="200" height="200"><path d="M368.896 192H224a32 32 0 0 0-32 32v137.888a32 32 0 0 0 64 0V256h112.896a32 32 0 0 0 0-64zM784.864 192H640a32 32 0 1 0 0 64h112.864v105.888a32 32 0 1 0 64 0V224a32 32 0 0 0-32-32zM368.896 777.92H256V672a32 32 0 1 0-64 0v137.92a32 32 0 0 0 32 32h144.896a32 32 0 1 0 0-64zM784.864 640a32 32 0 0 0-32 32v105.92H640a32 32 0 1 0 0 64h144.864a32 32 0 0 0 32-32V672a32 32 0 0 0-32-32z" fill="#273CFF" p-id="4254"></path><path d="M912 48h-800c-35.296 0-64 28.704-64 64v800c0 35.296 28.704 64 64 64h800c35.296 0 64-28.704 64-64v-800c0-35.296-28.704-64-64-64z m-800 864v-800h800l0.064 800H112z" fill="#273CFF" p-id="4255"></path></svg>
    </div>
    <div class="main-center">
      <div class="center-1">
        <div class="item-title">
          <div class="item-title-name">设备报维修记录</div>
        </div>
        <div class="msg-1">
          <div class="table-head">
            <div class="head1">设备名称</div>
            <div class="head2">设备刷新时间</div>
            <div class="head3">运行状态</div>
          </div>
          <div class="list">
            <seamless-scroll :data="equipmentRepairList" class="seamless-scroll" :class-option="{ step: 0.5 }">
              <div v-for="item in equipmentRepairList" class="msg-item">
                <div class="item-1">{{item.equipmentName}}</div>
                <div class="item-2">{{item.createTime}}</div>
                <div class="item-3">
                  <span :class="{'t-r': item.state == 1, 't-g':item.state == 2}">{{equipmentState[item.state]}}</span>
                  <!-- <span v-if="i==1" class="t-r">故障中</span>
                  <span v-if="i==2" class="t-g">已处理</span>
                  <span v-if="i!=1&& i!=2" class="t-b">正常</span> -->
                </div>
              </div>
            </seamless-scroll>
          </div>
        </div>
      </div>
      <div class="center-2">
        <div class="main-nav">
          <div class="nav-item" @click="onChange(1)">企业首页</div>
          <div class="nav-item" @click="onChange(2)">业务看板</div>
          <div class="nav-item acitve" @click="onChange(3)">生产看板</div>
          <div class="nav-item" @click="onChange(4)">质量看板</div>
        </div>
        <div class="msg-2">
          <div :class="['line-itme', index < 3 ? 'px-' + (index + 1) : 'px-' + (5-index)]" v-for="(item, index) in equipmentList">
            <div :class="{'items':true, 'i-l':true, 'c-b':item[0].online == 0, 'c-g':item[0].online != 0}" >
              <div class="icon"/>
              <div class="numbers">
                <div class="number">转速：{{item[0].spindleActualSpeed ? item[0].spindleActualSpeed : '0'}}</div>
                <div class="des"><span>{{item[0].name}}</span> {{item[0].codeNumber}}</div>
                <div class="des">使用人:{{item[0].userOfName}}</div>
              </div>
            </div>
            <div v-if="item.length == 2" :class="{'items':true, 'i-r':true, 'c-b':item[1].online == 0, 'c-g':item[1].online != 0}">
              <div class="numbers">
                <div class="number">转速：{{item[1].spindleActualSpeed ? item[1].spindleActualSpeed : '0'}}</div>
                <div class="des">{{item[1].codeNumber}}<span>{{item[1].name}}</span></div>
                <div class="des">使用人:{{item[1].userOfName}}</div>
              </div>
              <div class="icon"/>
            </div>
          </div>
          <!-- <div class="line-itme px-2">
            <div class="items i-l c-y">
              <div class="icon"/>
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des"><span>设备一</span>使用人:张三</div>
              </div>
            </div>
            <div class="items i-r c-r">
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des">使用人:张三<span>设备一</span></div>
              </div>
              <div class="icon"/>
            </div>
          </div>
          <div class="line-itme px-3">
            <div class="items i-l c-b">
              <div class="icon"/>
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des"><span>设备一</span>使用人:张三</div>
              </div>
            </div>
            <div class="items i-r c-g">
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des">使用人:张三<span>设备一</span></div>
              </div>
              <div class="icon"/>
            </div>
          </div>
          <div class="line-itme px-2">
            <div class="items i-l c-g">
              <div class="icon"/>
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des"><span>设备一</span>使用人:张三</div>
              </div>
            </div>
            <div class="items i-r c-g">
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des">使用人:张三<span>设备一</span></div>
              </div>
              <div class="icon"/>
            </div>
          </div>
          <div class="line-itme px-1">
            <div class="items i-l c-g">
              <div class="icon"/>
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des"><span>设备一</span>使用人:张三</div>
              </div>
            </div>
            <div class="items i-r c-r">
              <div class="numbers">
                <div class="number">300W转</div>
                <div class="des">使用人:张三<span>设备一</span></div>
              </div>
              <div class="icon"/>
            </div>
          </div> -->
        </div>
      </div>
      <div class="center-3">
        <div class="item-title">
          <div class="item-title-name">报工统计</div>
        </div>
        <div class="msg-3">
          <div class="table-h">
            <div class="table-h-1">序号</div>
            <div class="table-h-1">姓名</div>
            <div class="table-h-1">报工件数</div>
            <div class="table-h-1">报工工时</div>
            <div class="table-h-1">部门</div>
          </div>
          <div class="list">
            <seamless-scroll :data="taskCountList" class="seamless-scroll" :class-option="{ step: 0.5 }">
              <div v-for="(item, i) in taskCountList" :class="{'table-c-item': true, 'active': i ==3}">
                <div class="c-item">{{ i }}</div>
                <div class="c-item">{{item.userName}}</div>
                <div class="c-item">{{item.taskNum}}</div>
                <div class="c-item">{{item.taskTime}}h</div>
                <div class="c-item">{{item.orgName}}</div>
              </div>
            </seamless-scroll>
          </div>
        </div>
      </div>
      <div class="center-4">
        <div class="item-title titel-1">
          <div class="item-title-name">设备运行效率统计</div>
        </div>
        <div class="msg-4">
          <div class="item-list">
            <div class="tops">
              <div class="top-icon" />
              <div class="tops-title">设备稼动率统计(OEE)<span>{{utilizationRateCount}}</span></div>
            </div>
            <div class="list">
              <seamless-scroll :data="utilizationRateList" class="seamless-scroll" :class-option="{ step: 0.5 }">
                <div v-for="(item, i) in utilizationRateList" class="list-1">
                  <div class="list-msg">
                    <div class="msg-name">{{item.name}}</div>
                    <div class="msg-value"><span>{{item.utilizationRate}}%</span> / 100%</div>
                  </div>
                  <div class="list-line">
                    <div :class="{'line-color': true, 'c-b': item.utilizationRate >= 65, 'c-g': item.utilizationRate < 65}" :style="`width:${item.utilizationRate}%`">
                      <div class="line-icon"/>
                    </div>
                  </div>
                </div>
              </seamless-scroll>
            </div>
          </div>
          <div class="item-list">
            <div class="tops">
              <div class="top-icon" />
              <div class="tops-title">设备报警记录<span>{{equipmentAlarmCount}}</span></div>
            </div>
            <div class="list">
              <seamless-scroll :data="equipmentAlarmList" class="seamless-scroll" :class-option="{ step: 0.5 }">
                <div v-for="(item, i) in equipmentAlarmList" class="list-1">
                  <div class="list-msg">
                    <div class="msg-name">{{item.equipmentName}}</div>
                    <!-- <div class="msg-value"><span :class="{'t-o': item.percent < 70, 't-r': item.percent >= 70}">{{item.percent}}%</span> / 100%</div> -->
                  </div>
                  <div class="list-line-2">
                    <div :class="{'line-color': true, 'c-o': item.percent < 70, 'c-r': item.percent >= 70}">
                      <!-- <div class="line-icon"/> -->
                      <div class="msg">{{item.alarmMsg}}</div>
                    </div>
                  </div>
                </div>
              </seamless-scroll>
            </div>
          </div>
        </div>
      </div>
      <div class="center-5">
        <div class="item-title titel-1">
          <div class="item-title-name">实时报工列表</div>
        </div>
        <div class="msg-5">
          <div class="table-h">
            <div class="h-1">序号</div>
            <div class="h-1">工序</div>
            <div class="h-1">物料名字</div>
            <div class="h-1">完成时间</div>
            <div class="h-1">操作人</div>
          </div>
          <div class="list">
            <seamless-scroll :data="submittedRecordList" class="seamless-scroll" :class-option="{ step: 0.5 }">
              <div v-for="(item,i) in submittedRecordList" :class="{'table-line': true, 'acitve': i == 300}">
                <div class="h-1">NO.{{ (i + 1).toString().padStart(2,'0') }}</div>
                <div class="h-1">{{item.nodeName}}</div>
                <div class="h-1">{{item.taskName}}</div>
                <div class="h-1">{{item.endTime}}</div>
                <div class="h-1">{{item.operatorName}}</div>
              </div>
            </seamless-scroll>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {getOrgName} from '@/api/org'
import {getEquipmentRepair, getTaskCount, getEquipmentUtilizationRate, getSubmittedRecord, getEquipmentAlarm} from '@/api/home1'
import {getEquipmentList} from '@/api/production'
import SeamlessScroll from 'vue-seamless-scroll' // 引入组件
export default {
  components: { SeamlessScroll }, // 注册组件
  data () {
    return {
      orgName: '',
      toScale: 1.0,
      show: true,
      equipmentState: {
        '1': '待维修',
        '2': '已维修'
      },
      percent: 50,
      equipmentRepairList: [], // 设备报维修记录
      taskCountList: [], // 报工统计
      utilizationRateCount: 0, // 设备运行效率统计总数量
      utilizationRateList: [], // 设备运行效率统计
      submittedRecordList: [], // 实时报工列表
      equipmentAlarmCount: 0, // 设备报警记录总数量
      equipmentAlarmList: [], // 设备报警记录
      equipmentList: [], // 设备列表
      equipmentListPageIndex: 0
    }
  },
  created () {
    this.init()
  },
  mounted () {
    this.$nextTick(() => {
      let screen = document.getElementById('my-home-main')
      if (screen.requestFullscreen) {
        document.addEventListener('fullscreenchange', () => {
          if (this.getFullscreenElement() == null) {
            this.setScale()
            this.show = true
          }
        })
      }
      setTimeout(() => {
        this.setScale()
      }, 500)
    })

    this.startScroll()
  },
  methods: {
    async init () {
      await getOrgName().then(({data}) => {
        this.orgName = data.data
      })

      // 设备报维修记录
      this.getEquipmentRepair()
      // 报工统计
      this.getTaskCount()
      // 设备运行效率统计
      this.getEquipmentUtilizationRate()
      // 实时报工列表
      this.getSubmittedRecord()
      // 设备报警记录
      this.getEquipmentAlarm()
      // 设备列表
      setInterval(() => {
        this.getEquipmentList()
      }, 10000)
      this.getEquipmentList()
    },
    getFullscreenElement () {
      return (
          document['fullscreenElement'] ||
          document['mozFullScreenElement'] ||
          document['msFullScreenElement'] ||
          document['webkitFullscreenElement'] || null
      )
    },
    setScale () {
      const elements = document.getElementsByClassName('my-home')
      const toWidth = elements[0].offsetWidth
      this.toScale = toWidth / 1920
      elements[0].style.height = (1080 * this.toScale) + 'px'
    },
    fullScreen () {
      const element = document.getElementsByClassName('my-home')
      element[0].requestFullscreen()
      const toWidth = window.innerWidth
      this.toScale = toWidth / 1920
      this.show = false
    },
    onChange (num) {
      this.$emit('change-nav', num)
    },
    // 设备报维修记录
    getEquipmentRepair () {
      let param = {current: 1, size: 50}
      getEquipmentRepair(param).then(({data}) => {
        if (data && data.code === '200') {
          if (data.data != null && data.data.records != null) {
            this.equipmentRepairList = data.data.records.map(item => {
              return {
                equipmentName: item.equipmentName == null ? '未知设备' : item.equipmentName,
                state: item.state,
                createTime: item.createTime
              }
            })
          }
        }
      })
    },
    // 报工统计
    getTaskCount () {
      let param = {current: 1, size: 50, queryType: 2}
      getTaskCount(param).then(({data}) => {
        if (data && data.code === '200') {
          if (data.data != null && data.data.records != null) {
            this.taskCountList = data.data.records.map(item => {
              return {
                userName: item.userName,
                taskNum: item.taskNum,
                taskTime: item.taskTime,
                orgName: item.orgName
              }
            })
          }
        }
      })
    },
    // 设备运行效率统计
    getEquipmentUtilizationRate () {
      let param = {current: 1, size: 50}
      getEquipmentUtilizationRate(param).then(({data}) => {
        if (data && data.code === '200') {
          if (data.data != null && data.data.records != null) {
            this.utilizationRateCount = data.data.total
            this.utilizationRateList = data.data.records.map(item => {
              return {
                id: item.id,
                name: item.name,
                utilizationRate: item.utilizationRate
              }
            })
          }
        }
      })
    },
    // 实时报工列表
    getSubmittedRecord () {
      let param = {current: 1, size: 50}
      getSubmittedRecord(param).then(({data}) => {
        if (data && data.code === '200') {
          if (data.data != null && data.data.records != null) {
            this.submittedRecordList = data.data.records.map(item => {
              return {
                taskName: item.taskName,
                operatorName: item.operatorName,
                operationRecords: item.operationRecords,
                nodeName: item.nodeName,
                endTime: item.endTime
              }
            })
          }
        }
      })
    },
    // 设备报警记录
    getEquipmentAlarm () {
      let param = {current: 1, size: 50}
      getEquipmentAlarm(param).then(({data}) => {
        if (data && data.code === '200') {
          if (data.data != null && data.data.records != null) {
            this.equipmentAlarmCount = data.data.total
            this.equipmentAlarmList = data.data.records.map(item => {
              return {...item}
            })
          }
        }
      })
    },
    // 设备列表
    getEquipmentList () {
      this.equipmentListPageIndex++
      let param = {current: this.equipmentListPageIndex, size: 10}
      getEquipmentList(param).then(({data}) => {
        if (data && data.code === '200') {
          if (data.data != null && data.data.records != null) {
            let list = data.data.records
            this.equipmentList = []
            for (let i = 0; i < list.length; i += 2) {
              this.equipmentList.push(list.slice(i, i + 2))
            }
            if (parseInt(data.data.pages) <= this.equipmentListPageIndex) {
              this.equipmentListPageIndex = 0
            }
          }
        }
      })
    },
    startScroll () {
      const scrollContainer = this.$el.querySelector('.seamless-scroll')
      let top = 0 // 初始位置
      const interval = setInterval(() => {
        top -= 1 // 每次减少1px，可以根据需要调整速度和方向
        scrollContainer.scrollTop = top
      }, 200) // 调整这个值来改变速度，数值越小速度越快
    }
  }
}
</script>

<style scoped lang="scss">
  @font-face {
    font-family: 'YouSheBiaoTiHei';
    src: url('../../assets/home/YouSheBiaoTiHei-2.ttf') format('truetype'); /* 最后优先级 */
  }
  .home-main{
    background: url(../../assets/home/bg.png) no-repeat;
    background-size: 100% 100%;
    height: 1080px !important;
    width: 1920px !important;
    overflow: auto;
    font-family: YouSheBiaoTiHei;
    position: relative;
    transform-origin: left top;
    .top{
      height: 104px;
      width: 1920px;
      background: url(../../assets/home/top.png) no-repeat;
      background-size: 100% 100%;
      display: flex;
      padding-top:12px;
      justify-content: center;
      position: absolute;
      top: 0;
      .top-name{
        font-size: 39px;
        color: #FFFFFF;
        line-height: 51px;
        letter-spacing: 11px;
        text-shadow: 0px 2px 9px #001E8D;
        font-style: normal;
        text-transform: none;
      }
    }
    .main-center{
      display: flex;
      width: 1920px;
      flex-flow: wrap;
      .center-1{
        width: 541px;
        min-width: 541px;
        padding-left: 16px;
        padding-right: 8px;
        padding-top: 63px;
      }
      .center-2{
        flex: 1;
        overflow: hidden;
        padding-top: 88px;
      }
      .center-3{
        width: 541px;
        min-width: 541px;
        padding-left: 16px;
        padding-right: 8px;
        padding-top: 63px;
      }
      .center-4{
        width: 50%;
        padding-left: 16px;
        padding-right: 8px;
      }
      .center-5{
        width: 50%;
        padding-left: 16px;
        padding-right: 8px;
      }
      .flex-1{
        flex: 1;
      }
      .item-title{
        height: 48px;
        width: 100%;
        display: flex;
        background: url(../../assets/home/title.png) no-repeat;
        background-size: 100% 100%;
        align-items: center;
        .item-title-name{
          font-size: 24px;
          color: #FFFFFF;
          line-height: 31px;
          letter-spacing: 2px;
          text-shadow: 0px 1px 5px rgba(0,15,108,0.66);
          font-style: normal;
          text-transform: none;
          padding-left: 32px;
        }
      }
      .titel-1{
        width: 100%;
        background: url(../../assets/home/title2.png) no-repeat;
        background-size: 100% 100%;
      }
      .msg-1{
        width: 500px;
        height: 471px;
        background: url(../../assets/home/bg_1.png) no-repeat;
        background-size: 100% 100%;
        margin-left: 5px;
        padding-top:16px;
        padding-left: 21px;
        padding-right: 17px;
        margin-bottom: 12px;
        .list{
          height: 400px;
          overflow: hidden;
        }
        .table-head{
          display: flex;
          font-family: PingFangSC, PingFang SC;
          font-weight: 500;
          font-size: 18px;
          color: #FFFFFF;
          line-height: 25px;
          letter-spacing: 1px;
          font-style: normal;
          background: url(../../assets/home/table_h.png) no-repeat;
          background-size: 100% 100%;
          height: 41px;
          width: 462px;
          align-items: center;
          .head1{
            flex:1;
            padding-left: 11px;
          }
          .head3{
            flex:1;
            text-align: center;
          }
          .head2{
            width: 220px;
            min-width:200px;
            text-align: center;
          }
        }
        .msg-item{
          display: flex;
          background: url(../../assets/home/line_1.png) no-repeat;
          background-size: 100% 100%;
          height: 43px;
          width: 462px;
          margin-top: 7px;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 18px;
          color: #FFFFFF;
          line-height: 25px;
          letter-spacing: 1px;
          font-style: normal;
          align-items: center;
          .item-1{
            flex:1;
            padding-left: 33px;
          }
          .item-3{
            flex:1;
            text-align: center;
          }
          .item-2{
            width: 220px;
            min-width:200px;
            text-align: center;
          }
          .t-r{
            color: #FF5050;
          }
          .t-b{
            color: #4D8CFF;
          }
          .t-g{
            color: #18CB68;
          }
        }
        .active{
          background: url(../../assets/home/active_line.png) no-repeat;
          background-size: 100% 100%;
        }

      }
      .msg-3{
        width: 500px;
        height: 471px;
        background: url(../../assets/home/bg_1.png) no-repeat;
        background-size: 100% 100%;
        padding-top: 21px;
        padding-left: 21px;
        padding-right: 18px;
        margin-left: 5px;
        .list{
          height: 400px;
          overflow: hidden;
        }
        .table-h{
          width: 459px;
          height: 38px;
          background: url(../../assets/home/table.png) no-repeat;
          background-size: 100% 100%;
          display: flex;
          align-items: center;
          font-family: PingFangSC, PingFang SC;
          font-weight: 500;
          font-size: 16px;
          color: #FFFFFF;
          line-height: 26px;
          font-style: normal;
          text-transform: none;
          .table-h-1{
            flex: 1;
            text-align: center;
          }
        }
        .table-c-item{
          width: 459px;
          height: 40px;
          display: flex;
          align-items: center;
          font-family: PingFangSC, PingFang SC;
          font-weight: 500;
          font-size: 14px;
          color: #FFFFFF;
          line-height: 20px;
          font-style: normal;
          .c-item{
            flex: 1;
            text-align: center;
          }
          &:nth-child(odd) {
            background-color: rgba(52, 114, 255, 0.1);
          }
        }
        .active{
          background: url(../../assets/home/active2.png) no-repeat;
          background-size: 100% 100%;
        }
      }
      .main-nav{
        display: flex;
        justify-content: space-between;
        padding: 0 11px;
        margin-bottom: 13px;
        .nav-item{
          width: 182px;
          height: 57px;
          background: url(../../assets/home/menu.png) no-repeat;
          background-size: 100% 100%;
          display: flex;
          justify-content:center;
          align-items: center;
          font-size: 18px;
          color: #FFFFFF;
          line-height: 23px;
          text-shadow: 0px 0px 7px rgba(255,177,30,0.8);
          font-style: normal;
          text-transform: none;
          cursor: pointer;
        }
        .acitve{
          background: url(../../assets/home/active.png) no-repeat;
          background-size: 100% 100%;
        }
      }
      .msg-2{
        width: 100%;
        .line-itme{
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 5px;
          margin-top: 0px;
          .items{
            width: 274px;
            height: 80px;
            display: flex;
            align-items: center;
            .icon{
              width: 60px;
              height: 48px;
              min-width: 60px;
            }
            .numbers{
              flex: 1;
              .number{
                font-family: YouSheBiaoTiHei;
                font-size: 24px;
                line-height: 31px;
                font-style: normal;
              }
              .des{
                font-family: PingFangSC, PingFang SC;
                font-weight: 400;
                font-size: 12px;
                color: #FFFFFF;
                line-height: 17px;
                font-style: normal;
              }
            }
          }
          .i-l{
            .icon{
              margin-left: 17px;
              margin-right: 6px;
            }
            .des{
              span{
                padding-right: 16px;
              }
            }
          }
          .i-r{
            .icon{
              margin-right: 17px;
              margin-left: 6px;
            }
            .numbers{
              text-align: right;
              .des{
                span{
                  padding-left: 16px;
                }
              }
            }
          }
          .c-g{
            background: url(../../assets/home/lin_g.png) no-repeat;
            background-size: 100% 33px;
            background-position-y: bottom;
            .icon{
              background: url(../../assets/home/icon_g.png) no-repeat;
              background-size: 100% 100%;
            }
            .number{
              // background: linear-gradient(0deg, #60FFE0 0%, #FFFFFF 100%);
              background-clip: text;
              color: #60FFE0; 
            }
          }
          .c-r{
            background: url(../../assets/home/lin_r.png) no-repeat;
            background-size: 100% 33px;
            background-position-y: bottom;
            .icon{
              background: url(../../assets/home/icon_r.png) no-repeat;
              background-size: 100% 100%;
            }
            .number{
              // background: linear-gradient(0deg, #FF4141 0%, #FFFFFF 100%);
              background-clip: text;
              color: #FFFFFF; 
            }
          }
          .c-b{
            background: url(../../assets/home/lin_b.png) no-repeat;
            background-size: 100% 33px;
            background-position-y: bottom;
            .icon{
              background: url(../../assets/home/icon_b.png) no-repeat;
              background-size: 100% 100%;
            }
            .number{
              // background: linear-gradient(0deg, #5A5A5A 0%, #FFFFFF 100%);
              background-clip: text;
              color: #FFFFFF; 
            }
          }
          .c-y{
            background: url(../../assets/home/lin_y.png) no-repeat;
            background-size: 100% 33px;
            background-position-y: bottom;
            .icon{
              background: url(../../assets/home/icon_y.png) no-repeat;
              background-size: 100% 100%;
            }
            .number{
              // background: linear-gradient(0deg, #FDC73D 0%, #FFFFFF 100%);
              background-clip: text;
              color: #FFFFFF; 
            }
          }
        }
        .px-1{
          padding: 0 46px;
        }
        .px-2{
          padding: 0 24px;
        }
        .px-3{
          padding: 0 10px;
        }
      }
      .msg-4{
        width: 923px;
        height: 425px;
        background: url(../../assets/home/bg_2.png) no-repeat;
        background-size: 100% 100%;
        padding-top: 18px;
        padding-left: 21px;
        padding-right: 13px;
        margin-left: 5px;
        display: flex;
        justify-content: space-between;
        .item-list{
          width: 439px;
          .tops{
            display: flex;
            justify-content: space-between;
            align-items: center;
            .top-icon{
              width: 34px;
              height: 34px;
              background: url(../../assets/home/title_icon.png) no-repeat;
              background-size: 100% 100%;
            }
            .tops-title{
              width:398px;
              height: 35px;
              background: url(../../assets/home/table_1.png) no-repeat;
              background-size: 100% 100%;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              font-size: 18px;
              color: #FFFFFF;
              line-height: 25px;
              text-shadow: 0px 0px 3px rgba(30,198,255,0.8);
              font-style: normal;
              text-transform: none;
              display: flex;
              align-items: center;
              span{
                flex: 1;
                text-align: right;
                font-weight: 600;
                font-size: 20px;
                color: #D8D8D8;
                line-height: 23px;
                font-style: normal;
                text-transform: none;
                // background: linear-gradient(0deg, #0DCAF5 0%, #9BE5FF 67%, #FFFFFF 100%);
                background-clip: text;
                color: transparent;
                padding-right: 20px;
              }
            }
          }
          .list{
            margin-top: 9px;
            height: 345px;
            width: 439px;
            background: url(../../assets/home/table_1_bg.png) no-repeat;
            background-size: 100% 100%;
            overflow: auto;
            
            .list-1{
              padding: 12px 14px;
              padding-bottom: 2px;
              .list-msg{
                display: flex;
                align-items: center;
                font-family: PingFangSC, PingFang SC;
                font-weight: 400;
                font-size: 16px;
                color: #FFFFFF;
                line-height: 21px;
                font-style: normal;
                text-transform: none;
                .msg-name{
                  flex: 1;
                }
                .msg-value{
                  font-size: 18px;
                  span{
                    color: #2D9BF5;
                  }
                  .t-r{
                    color: #FF0022;
                  }
                  .t-o{
                    color: #D48021;
                  }
                }
              }
              .list-line{
                position: relative;
                background: #FFFFFF;
                height: 6px;
                margin: 13px 0;
                border-radius: 3px;
                .line-color{
                  position: absolute;
                  left: 0;
                  height: 6px;
                  width: 80%;
                  display: flex;
                  justify-content: end;
                  align-items: center;
                  border-radius: 3px;
                  .line-icon{
                    background: url(../../assets/home/r_w.png) no-repeat;
                    background-size: 100% 100%;
                    width: 28px;
                    height: 28px;
                    margin-right: -14px;
                  }
                }
                .c-b{
                  background: linear-gradient( -90deg, #2C52FF 0%, rgba(56,139,252,0) 100%);
                }
                .c-g{
                  background: linear-gradient( -90deg, #00C6FF 0%, rgba(56,139,252,0) 100%);
                }
                .c-o{
                  background: linear-gradient( -90deg, #FF952C 0%, rgba(56,139,252,0) 100%);
                }
                .c-r{
                  background: linear-gradient( -90deg, #FF0000 0%, rgba(56,139,252,0) 100%);
                }
              }
              .list-line-2{
                position: relative;
                background: #FFFFFF;
                height: 22px;
                margin: 6px 0;
                border-radius: 3px;
                .line-color{
                  position: absolute;
                  left: 0;
                  height: 22px;
                  width: 100%;
                  display: flex;
                  // justify-content: end;
                  align-items: center;
                  border-radius: 3px;
                  .line-icon{
                    background: url(../../assets/home/r_w.png) no-repeat;
                    background-size: 100% 100%;
                    width: 28px;
                    height: 28px;
                    margin-right: -14px;
                  }
                  .msg{
                    font-size: 14px;
                    font-family: PingFangSC, PingFang SC;
                    font-weight: 500;
                    font-style: normal;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                  }
                }
              }
            } 
          }
        }
      }
      .msg-5{
        width: 923px;
        height: 425px;
        background: url(../../assets/home/bg_2.png) no-repeat;
        background-size: 100% 100%;
        padding: 17px;
        padding-bottom: 0px;
        margin-left: 5px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 16px;
        color: #D8F0FF;
        line-height: 16px;
        font-style: normal;
        text-transform: none;
        .table-h{
          display: flex;
          background: rgba(21,77,160,0.87);
          align-items: center;
          height: 35px;
          .h-1{
            flex: 1;
            text-align: center;
          }
        }
        .table-line{
          display: flex;
          align-items: center;
          height: 35px;
          .h-1{
            flex: 1;
            text-align: center;
            font-size: 14px;
          }
          &:nth-child(even){
            background: url(../../assets/home/table_2.png) no-repeat;
            background-size: 100% 100%;
          }
        }
        .acitve{
          background: url(../../assets/home/table_2_active.png) no-repeat;
          background-size: 100% 100%;
        }
        .list{
           height: 345px;
           overflow: auto;
        }
      }
    }
  }
  .full-screen{
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    svg{
      width: 20px;
      height: 20px;
    }
  }

  /* 定义滚动条整体宽度和背景 */
  .home-main .main-center .msg-4 .item-list .list::-webkit-scrollbar {
    width: 0px;  /* 垂直滚动条宽度 */
    height: 10px; /* 水平滚动条高度 */
    background: rgba(255, 255, 255, 0.3); /* 轨道半透明背景 */
  }

  /* 滚动条滑块（可拖动部分） */
  .home-main .main-center .msg-4 .item-list .list::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.5); /* 半透明灰色滑块 */
    border-radius: 6px; /* 圆角 */
    border: 2px solid rgba(255, 255, 255, 0.2); /* 透明边框增强立体感 */
  }

  /* 鼠标悬停时滑块颜色加深 */
  .home-main .main-center .msg-4 .item-list .list::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 96, 96, 0.7); 
  }

    /* 定义滚动条整体宽度和背景 */
  .home-main .main-center .msg-5 .list::-webkit-scrollbar {
    width: 0px;  /* 垂直滚动条宽度 */
    height: 10px; /* 水平滚动条高度 */
    background: rgba(255, 255, 255, 0.3); /* 轨道半透明背景 */
  }

  /* 滚动条滑块（可拖动部分） */
  .home-main .main-center .msg-5 .list::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.5); /* 半透明灰色滑块 */
    border-radius: 6px; /* 圆角 */
    border: 2px solid rgba(255, 255, 255, 0.2); /* 透明边框增强立体感 */
  }

  /* 鼠标悬停时滑块颜色加深 */
  .home-main .main-center .msg-5 .list::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 96, 96, 0.7); 
  }

</style>

