<template>
|
<v-scale-screen width="1920" height="960">
|
<div class="main_app">
|
<img src="@/assets/images/task/bg@2x.png" class="main_bg" alt="" />
|
<div class="main_header">
|
<img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" />
|
<div class="title">安泰智慧物流园区-作业效能统筹</div>
|
<div class="time_wrap">
|
<span class="date">{{ date }}</span>
|
<span class="week">{{ week }}</span>
|
<span class="time">{{ time }}</span>
|
</div>
|
</div>
|
<div class="main_content">
|
<div class="left_box">
|
<div class="left_box_one">
|
<div class="com_header">
|
<div class="title">
|
<img src="@/assets/images/ic_title@2x.png" class="icon" alt="" />
|
<div>今日月台完成订单统计</div>
|
</div>
|
<img src="@/assets/images/task/title@2x.png" class="bg" alt="" />
|
</div>
|
<div class="car_static">
|
<div class="echart_wrap">
|
<div class="pie_text">
|
<div class="fs30"><strong>{{ data1 }}</strong></div>
|
<div>完成量</div>
|
</div>
|
<div class="echart1" id="echart1"></div>
|
</div>
|
<div class="list">
|
<div class="item" v-for="item, i in dataList1" :key="i">
|
<div class="line">
|
<div :style="{ background: colors[i] }" class="icon"></div>
|
<div class="text">{{ item.name }}</div>
|
</div>
|
<div :style="{ color: colors[i] }" class="num">{{ item.value }}万支</div>
|
</div>
|
<!-- <div class="item">
|
<div class="line">
|
<div :style="{ background: colors[1] }" class="icon"></div>
|
<div class="text">安泰物流卸货月台组</div>
|
</div>
|
<div :style="{ color: colors[1] }" class="num">100万支</div>
|
</div>
|
<div class="item">
|
<div class="line">
|
<div :style="{ background: colors[2] }" class="icon"></div>
|
<div class="text">市公司卸货月台组</div>
|
</div>
|
<div :style="{ color: colors[2] }" class="num">100万支</div>
|
</div> -->
|
</div>
|
</div>
|
</div>
|
<div class="left_box_two">
|
<div class="com_header">
|
<div class="title">
|
<img src="@/assets/images/ic_title@2x.png" class="icon" alt="" />
|
<div>今日月台工作时长趋势</div>
|
</div>
|
<img src="@/assets/images/task/title@2x.png" class="bg" alt="" />
|
</div>
|
<div class="list one-swiper">
|
<div class="swiper-wrapper">
|
<div class="line one-swiper-slide swiper-slide" v-for="item, i in dataList2" :key="i">
|
<div class="top" :class="{ top3: i < 3 }"><span v-if="i < 3">top</span>{{ i + 1 }}</div>
|
<div class="id_card">{{ item.platformName }}</div>
|
<div class="wrap">
|
<ChargeRate :rate="item.rate" />
|
</div>
|
<div class="num">{{ item.workTotalTimeT }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="left_box_three">
|
<div class="com_header">
|
<div class="title">
|
<img src="@/assets/images/ic_title@2x.png" class="icon" alt="" />
|
<div>实时作业效率</div>
|
</div>
|
<div class="tabs">
|
<div class="tab" :class="{ active: activeTab3 == 1 }" @click="tabClick3(1)">出库</div>
|
<div class="separate"></div>
|
<div class="tab" :class="{ active: activeTab3 == 0 }" @click="tabClick3(0)">入库</div>
|
</div>
|
<img src="@/assets/images/task/title@2x.png" class="bg" alt="" />
|
</div>
|
<div class="echart_wrap">
|
<div class="echart2" id="echart2"></div>
|
</div>
|
</div>
|
</div>
|
<div class="center_box">
|
<div class="center_box_one">
|
<div class="static_wrap">
|
<div class="item">
|
<div class="name">月台数量</div>
|
<div v-if="data4.platformTotal || data4.platformTotal == 0" class="nums">
|
<div class="num" v-for="n, i in formatNum3(data4.platformTotal)" :key="i">{{ n }}</div>
|
</div>
|
</div>
|
<div class="item">
|
<div class="name">空闲月台</div>
|
<div v-if="data4.freePlatform || data4.freePlatform == 0" class="nums">
|
<div class="num" v-for="n, i in formatNum3(data4.freePlatform)" :key="i">{{ n }}</div>
|
</div>
|
</div>
|
<div class="item">
|
<div class="name">预约车辆</div>
|
<div v-if="data4.reservationCar || data4.reservationCar == 0" class="nums">
|
<div class="num" v-for="n, i in formatNum3(data4.reservationCar)" :key="i">{{ n }}</div>
|
</div>
|
</div>
|
<div class="item">
|
<div class="name">作业车辆</div>
|
<div v-if="data4.workingCar || data4.workingCar == 0" class="nums">
|
<div class="num" v-for="n, i in formatNum3(data4.workingCar)" :key="i">{{ n }}</div>
|
</div>
|
</div>
|
<div class="item">
|
<div class="name">排队车辆</div>
|
<div class="nums" v-if="data4.lineUpCar || data4.lineUpCar == 0">
|
<div class="num" v-for="n, i in formatNum3(data4.lineUpCar)" :key="i">{{ n }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="center_box_bg">
|
<img v-if="showWorkModal" class="point_icon"
|
:style="{ left: workModalParam.left + 'px', top: workModalParam.top + 'px' }"
|
src="@/assets/ani/apngb-animated.png" alt="">
|
<div class="work_modal" :style="{ left: workModalParam.left2 + 'px', top: workModalParam.top + 'px' }"
|
@click="showWorkModal = false" v-if="showWorkModal">
|
<img class="bg" src="@/assets/images/LogisticsCenter/bg_yuetai@2x.png" alt="">
|
<div class="head">
|
<div class="left">
|
<img src="@/assets/images/LogisticsCenter/ic_yuetai@2x.png" alt="">
|
<span>{{ workModalParam.platformName }}</span>
|
</div>
|
<div class="right">{{ workModalParam.statusTemp }}</div>
|
</div>
|
<div class="line">
|
<div class="dian"></div>
|
<div class="la">作业车辆:</div>
|
<div class="val">{{ workModalParam.carNo }}</div>
|
</div>
|
<div class="line">
|
<div class="dian"></div>
|
<div class="la">作业类型:</div>
|
<div class="val">{{ workModalParam.workType == 0 ? '卸货' : workModalParam.workType == 1 ? '装货' : ''}}</div>
|
</div>
|
<div class="line">
|
<div class="dian"></div>
|
<div class="la">作业时长:</div>
|
<div class="val">{{ workModalParam.workTime }}</div>
|
</div>
|
<div class="line">
|
<div class="dian"></div>
|
<div class="la">预计完成:</div>
|
<div class="val">{{ workModalParam.finishTimeStr }}</div>
|
</div>
|
<div class="priview" @click="videoPri">查看实时画面</div>
|
</div>
|
<div class="modal_bg" v-if="showWorkModal" @click="closeModal"></div>
|
<div v-show="showJk" class="camera_wrap">
|
<img class="bg" src="@/assets/images/task/jiankong_bg2@2x.png" alt="">
|
<div class="head">
|
<div class="left">
|
<img class="icon" src="@/assets/images/task/ic_yuetai@2x.png" alt="">
|
<div class="name">{{ workModalParam.platformName }}</div>
|
<span v-if="workModalParam.carNo">{{ workModalParam.carNo }} | {{ workModalParam.workType == 0 ? '卸货'
|
: workModalParam.workType == 1 ? '装货' : '' }}</span>
|
</div>
|
<div class="right">
|
<span>{{ workModalParam.statusTemp }} <span v-if="workModalParam.status == 0"> | 预计完成时间:{{
|
workModalParam.finishTimeStr }}</span></span>
|
<img @click="closeVideo" class="icon" src="@/assets/images/task/ic_close@2x.png" alt="">
|
</div>
|
</div>
|
<div class="content">
|
<Video v-if="showJk && videoParam && videoParam.deviceId" :href="videoParam.videoPluginUrl"
|
:indexCode="videoParam.deviceId" />
|
</div>
|
</div>
|
</div>
|
<div class="center_box_two">
|
<!-- <div v-if="data4.videoIndexCodes && data4.videoIndexCodes.length > 0" class="videos">
|
<Videos :href="data4.videoPluginUrl" :indexCodes="data4.videoIndexCodes" />
|
</div> -->
|
<div class="list">
|
<div class="line header">
|
<div>月台名称</div>
|
<div>作业车辆</div>
|
<div>作业量</div>
|
<div>作业时长</div>
|
<div>预计完成时间</div>
|
<div>月台状态</div>
|
</div>
|
<div class="two-swiper">
|
<div class="swiper-wrapper">
|
<div @click="platformClick(item)" :class="{ lined: workModalParam.platformId == item.platformId }"
|
class="line one-swiper-slide swiper-slide" v-for="item, i in dataList5" :key="i">
|
<img v-if="workModalParam.platformId == item.platformId" class="icon" src="@/assets/ani/2.png"
|
alt="">
|
<div>{{ item.platformName }}</div>
|
<div>{{ item.carNo || '-' }}</div>
|
<div>{{ item.workNum ? item.workNum + '万支' : '-' }}</div>
|
<div>{{ item.workTime || '-' }}</div>
|
<div>{{ item.finishTimeStr || '-' }}</div>
|
<div :style="{
|
color: item.status == 1 ? '#869CC9' : item.status == 2 ? '#FE5501' : '#D2E0FF'
|
}">{{ item.statusTemp }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="right_box">
|
<div class="right_box_one">
|
<div class="com_header">
|
<div class="title">
|
<img src="@/assets/images/ic_title@2x.png" class="icon" alt="" />
|
<div>今日车辆作业情况</div>
|
</div>
|
<img src="@/assets/images/task/title@2x.png" class="bg" alt="" />
|
</div>
|
<div class="static_wrap">
|
<div class="item">
|
<div class="name">签到数</div>
|
<div class="num">{{ data4?.signedNum || 0 }}</div>
|
</div>
|
<div class="item">
|
<div class="name">已叫号</div>
|
<div class="num">{{ data4?.calledNum || 0 }}</div>
|
</div>
|
<div class="item">
|
<div class="name">已作业</div>
|
<div class="num">{{ data4?.workedNum || 0 }}</div>
|
</div>
|
<div class="item">
|
<div class="name">已完成</div>
|
<div class="num">{{ data4?.doneNum || 0 }}</div>
|
</div>
|
</div>
|
<div class="echart_wrap">
|
<div class="echart3" id="echart3"></div>
|
</div>
|
<div class="list four-swiper">
|
<div class="swiper-wrapper">
|
<div class="line four-swiper-slide swiper-slide" v-for="item, i in data6?.platformLogList">
|
<div class="time_wrap">
|
<div class="time" :style="{
|
backgroundColor: item.objType == 5 ? '#4ca8f7' : item.objType == 6 ? '#f2b23e' : item.objType == 10 ? '#4673f6' : '#4aa38f'
|
}" v-if="item.createDate">{{ item.createDate.slice(11, 16) }}</div>
|
<div class="sp" :style="{
|
backgroundColor: item.objType == 5 ? '#4ca8f7' : item.objType == 6 ? '#f2b23e' : item.objType == 10 ? '#4673f6' : '#4aa38f'
|
}"></div>
|
<div class="dian" :style="{
|
backgroundColor: item.objType == 5 ? '#4ca8f7' : item.objType == 6 ? '#f2b23e' : item.objType == 10 ? '#4673f6' : '#4aa38f'
|
}"></div>
|
</div>
|
<div class="id_card">{{ item.carCodeFront || item.param4 }}</div>
|
<div class="status">{{ statusMap[item.objType] }}</div>
|
<div class="desc">{{ item.content }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="right_box_two">
|
<div class="com_header">
|
<div class="title">
|
<img src="@/assets/images/ic_title@2x.png" class="icon" alt="" />
|
<div>实时告警</div>
|
</div>
|
<img src="@/assets/images/task/title@2x.png" class="bg" alt="" />
|
</div>
|
<div class="list three-swiper">
|
<div class="swiper-wrapper">
|
<div class="item three-swiper-slide swiper-slide" v-for="item, i in data7">
|
<div class="icon">
|
<div class="circle"></div>
|
<div class="line"></div>
|
</div>
|
<div class="content">
|
<div class="header">
|
<div class="time">{{ item.createDate }}</div>
|
<!-- <span class="status">低</span> -->
|
</div>
|
<div class="main">
|
<div class="left">
|
<div class="title">
|
<img class="xf" src="@/assets/images/FireFighting/ic_gaojing_red@2x.png" alt="">
|
<span>告警:{{ item.eventContent }}</span>
|
</div>
|
<div class="wrap">
|
<span style="margin-right: 50px;">{{ item.platformName }}</span>
|
<span>已发生:{{ item.haveTime }}</span>
|
</div>
|
</div>
|
<!-- <div class="status">处理中</div> -->
|
</div>
|
</div>
|
</div>
|
<div v-if="data7.length == 0" class="empty_wrap" style="margin-top: 50px;">
|
<img src="@/assets/images/default_empty.png" alt="">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</v-scale-screen>
|
</template>
|
|
<script setup>
|
import { ref, onMounted, nextTick } from 'vue'
|
import VScaleScreen from 'v-scale-screen'
|
import Percent from '@/components/percent.vue'
|
import dayjs from 'dayjs'
|
import ChargeRate from '@/components/ChargeRate.vue'
|
import { statusMap } from '@/utils/config'
|
import * as echarts from 'echarts'
|
import duration from 'dayjs/plugin/duration'
|
dayjs.extend(duration)
|
import 'swiper/css/swiper.min.css'
|
import Swiper from 'swiper'
|
import Videos from './videoUrl/Videos.vue'
|
import Video from './videoUrl/Video.vue'
|
import {
|
cnplatformGroupFinish,
|
cnplatformDuration,
|
cnplatformWorkData,
|
cncenterData,
|
cncarWorkSituation,
|
cnworkEfficiency,
|
cnwarningList
|
} from '@/api'
|
|
|
const weekMap = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六',]
|
const date = ref(dayjs().format('YYYY.MM.DD'))
|
const week = ref(weekMap[new Date().getDay()])
|
const time = ref(dayjs().format('HH:mm:ss'))
|
setInterval(() => {
|
date.value = dayjs().format('YYYY-MM-DD')
|
week.value = weekMap[new Date().getDay()]
|
time.value = dayjs().format('HH:mm:ss')
|
|
}, 1000)
|
|
const colors = ['#FEAF01', '#01ABFE', '#51F9E4']
|
const initEchart1 = () => {
|
const myChart = echarts.init(document.getElementById('echart1'))
|
const option = {
|
series: [
|
{
|
type: 'pie',
|
radius: ['86%', '100%'],
|
label: {
|
show: false,
|
position: 'center'
|
},
|
tooltip: {
|
trigger: 'none'
|
},
|
emphasis: {
|
// 设置悬浮时样式为空
|
scale: false, // 关闭放大效果
|
itemStyle: {
|
shadowBlur: 0, // 阴影模糊度为 0
|
shadowOffsetX: 0,
|
shadowColor: 'rgba(0, 0, 0, 0)',
|
},
|
},
|
padAngle: 2,
|
itemStyle: {
|
borderRadius: 10
|
},
|
color: colors,
|
labelLine: {
|
show: false
|
},
|
data: dataList1.value
|
}
|
]
|
}
|
myChart.setOption(option)
|
window.addEventListener('resize', function () { // 执行
|
myChart.resize()
|
})
|
}
|
const initEchart2 = () => {
|
const myChart = echarts.init(document.getElementById('echart2'))
|
const option = {
|
grid: {
|
top: '32%',
|
left: '6%',
|
right: '7%',
|
bottom: '10%',
|
containLabel: true,
|
},
|
legend: {
|
itemGap: 24,
|
data: ['分时作业量', '累计作业量'],
|
icon: 'circle',
|
itemWidth: 10,
|
itemHeight: 10,
|
top: '6%',
|
textStyle: {
|
color: '#fff',
|
borderColor: '#fff'
|
},
|
},
|
tooltip: {
|
trigger: "axis",
|
axisPointer: {
|
type: "line",
|
},
|
backgroundColor: "rgba(9, 24, 48, 0.5)",
|
borderColor: "rgba(75, 253, 238, 0.4)",
|
textStyle: {
|
color: "#FFF",
|
},
|
},
|
xAxis: [{
|
nameGap: 5,
|
type: 'category',
|
axisLine: {
|
show: true,
|
lineStyle: {
|
color: '#999'
|
},
|
},
|
axisLabel: {
|
color: '#9eaaba',
|
},
|
axisTick: {
|
show: false,
|
},
|
data: dataList3.value.map(i => i.workTime),
|
}],
|
yAxis: [
|
{
|
nameTextStyle: {
|
color: '#9eaaba',
|
},
|
offset: 0,
|
name: '万支',
|
type: 'value',
|
axisLabel: {
|
color: '#869CC9'
|
},
|
nameTextStyle: {
|
color: '#869CC9',
|
padding: [0, 0, 0, 12] // 四个数字分别为上右下左与原位置距离
|
},
|
axisLine: {
|
show: true,
|
},
|
splitLine: {
|
show: true,
|
lineStyle: {
|
width: 1,
|
color: "rgba(49,105,129,0.4)",
|
type: 'dashed'
|
}
|
},
|
},
|
// {
|
// nameTextStyle: {
|
// color: '#9eaaba',
|
// },
|
// offset: 0,
|
// name: '万支',
|
// type: 'value',
|
// axisLabel: {
|
// show: true,
|
// color: "#9eaaba",
|
// },
|
// axisLine: {
|
// show: true,
|
// },
|
// splitLine: {
|
// show: true,
|
// lineStyle: {
|
// width: 1,
|
// color: "rgba(49,105,129,0.4)",
|
// type: 'dashed'
|
// }
|
// },
|
// }
|
],
|
series: [
|
{
|
name: '分时作业量',
|
type: 'bar',
|
barWidth: 10,
|
label: {
|
show: false,
|
position: 'top',
|
color: '#fff',
|
},
|
itemStyle: {
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
{
|
offset: 0,
|
color: 'rgba(0, 208, 221, 1)'
|
},
|
{
|
offset: 1,
|
color: 'rgba(0, 194, 255, 0.20)'
|
}
|
], false),
|
lineStyle: {
|
width: 1,
|
type: 'solid'
|
},
|
barBorderRadius: [30, 30, 0, 0],
|
},
|
data: dataList3.value.map(i => i.workNum || 0)
|
},
|
{
|
name: '累计作业量',
|
type: 'bar',
|
barWidth: 10,
|
label: {
|
show: false,
|
position: 'top',
|
color: '#fff',
|
},
|
itemStyle: {
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
{
|
offset: 0,
|
color: 'rgba(0, 86, 255, 1)'
|
},
|
{
|
offset: 1,
|
color: 'rgba(0, 86, 255, 0.20)'
|
}
|
], false),
|
lineStyle: {
|
width: 1,
|
type: 'solid'
|
},
|
barBorderRadius: [30, 30, 0, 0],
|
},
|
data: dataList3.value.map(i => i.totalWorkNum)
|
},
|
]
|
}
|
myChart.setOption(option)
|
window.addEventListener('resize', function () { // 执行
|
myChart.resize()
|
})
|
}
|
const initEchart3 = () => {
|
const myChart = echarts.init(document.getElementById('echart3'))
|
var colors = [
|
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
offset: 0,
|
color: '#7fe3fc'
|
},
|
{
|
offset: 1,
|
color: '#9ce9fc'
|
}]),
|
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
offset: 0,
|
color: '#64d7fa'
|
}, {
|
offset: 1,
|
color: '#7de3fc'
|
}]),
|
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
offset: 0,
|
color: '#4370f2'
|
}, {
|
offset: 1,
|
color: '#61d3f9'
|
}]),
|
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
offset: 0,
|
color: '#4679f6'
|
}, {
|
offset: 1,
|
color: '#4674f6'
|
}]),
|
]
|
const temp = []
|
temp.push({ name: '签到数', value: data4.value?.signedNum || 0, rate: data4.value?.signedNum ? '100' : 0 })
|
temp.push({ name: '已叫号', value: data4.value?.calledNum || 0, rate: data4.value?.signedNum ? (data4.value.calledNum / data4.value?.signedNum * 100).toFixed(1) : 0 })
|
temp.push({ name: '已作业', value: data4.value?.workedNum || 0, rate: data4.value?.signedNum ? (data4.value.workedNum / data4.value?.signedNum * 100).toFixed(1) : 0 })
|
temp.push({ name: '已完成', value: data4.value?.doneNum || 0, rate: data4.value?.signedNum ? (data4.value.doneNum / data4.value?.signedNum * 100).toFixed(1) : 0 })
|
|
const option = {
|
color: colors,
|
tooltip: {
|
show: false
|
},
|
legend: {
|
show: false
|
},
|
series: [
|
{
|
type: 'funnel',
|
left: '15%',
|
right: '45%',
|
top: '10%',
|
bottom: '10%',
|
minSize: '20%',
|
maxSize: '80%',
|
gap: 4,
|
label: {
|
show: false,
|
formatter: '',
|
lineHeight: 0,
|
position: 'inside'
|
},
|
|
itemStyle: { //去掉默认白色边框线
|
borderWidth: 0,
|
borderColor: '#fff'
|
},
|
data: temp
|
},
|
{
|
type: 'funnel',
|
left: '15%',
|
right: '45%',
|
top: '10%',
|
bottom: '10%',
|
minSize: '80%',
|
maxSize: '80%',
|
gap: 4,
|
z: 1,
|
label: {
|
show: true,
|
position: 'outside',
|
formatter: (params) => {
|
const index = params.dataIndex
|
return `{color${index}|${params.data.name} ${params.data.rate}%}`
|
// return `<div>${params.data.name}</div>`
|
},
|
rich: {
|
color0: { color: 'orange', fontSize: 14 },
|
color1: { color: '#869CC9', fontSize: 13 },
|
color2: { color: '#869CC9', fontSize: 13 },
|
color3: { color: '#869CC9', fontSize: 13 }
|
}
|
},
|
labelLine: {
|
show: true,
|
normal: {
|
length: 80,
|
position: 'right',
|
lineStyle: {
|
width: 1,
|
type: 'dashed',
|
color: 'rgba(102, 160, 239,.5)'
|
}
|
},
|
},
|
itemStyle: { //去掉默认白色边框线
|
borderWidth: 0,
|
borderColor: '#fff'
|
},
|
itemStyle: {
|
normal: {
|
color: 'transparent',
|
borderWidth: 0,
|
opacity: 1
|
}
|
},
|
data: temp
|
},
|
]
|
}
|
myChart.setOption(option)
|
window.addEventListener('resize', function () { // 执行
|
myChart.resize()
|
})
|
}
|
|
const dataList1 = ref([])
|
const data1 = ref(0)
|
const getData1 = () => {
|
cnplatformGroupFinish().then(res => {
|
const result = res.data || []
|
let count = 0
|
dataList1.value = result.map(i => {
|
count += i.finishData
|
return {
|
value: i.finishData,
|
name: i.platformGroupName
|
}
|
})
|
data1.value = count
|
initEchart1()
|
})
|
}
|
const dataList2 = ref([])
|
const getData2 = () => {
|
cnplatformDuration().then(res => {
|
const result = res.data || []
|
let count = 1
|
if (result.length > 0) {
|
count = result[0].workTotalTime
|
}
|
dataList2.value = result.map(item => {
|
if (item.workTotalTime) {
|
if (item.workTotalTime > 60) {
|
item.workTotalTimeT = Math.floor(item.workTotalTime / 60) + '小时' + item.workTotalTime % 60 + '分钟'
|
} else {
|
item.workTotalTimeT = item.workTotalTime + '分钟'
|
}
|
}
|
item.rate = Math.floor((item.workTotalTime / count) * 30)
|
return item
|
})
|
})
|
}
|
|
const dataList3 = ref([])
|
const activeTab3 = ref(1)
|
const tabClick3 = (val) => {
|
activeTab3.value = val
|
getData3()
|
}
|
const getData3 = () => {
|
cnworkEfficiency({ type: activeTab3.value }).then(res => {
|
const result = res.data
|
dataList3.value = result
|
initEchart2()
|
})
|
}
|
const data4 = ref({})
|
const getData4 = () => {
|
cncenterData().then(res => {
|
const result = res.data || []
|
data4.value = result
|
initEchart3()
|
})
|
}
|
const formatNum3 = (num) => {
|
if (num || num == 0) {
|
num = num + ''
|
if (num.length == 1) {
|
return '00' + num
|
} else if (num.length == 2) {
|
return '0' + num
|
} else {
|
return num
|
}
|
}
|
}
|
|
const dataList5 = ref([])
|
const getData5 = () => {
|
cnplatformWorkData().then(res => {
|
const result = res.data || []
|
dataList5.value = result.map(i => {
|
i.statusTemp = i.status == 0 ? '作业中' : i.status == 1 ? '空闲中' : i.status == 2 ? '作业超时' : '叫号中'
|
if (i.workTime) {
|
// i.workTime = dayjs.duration(i.workTime * 1000).format('HH小时mm分')
|
i.workTime = (i.workTime / 60).toFixed(0)
|
if (i.workTime > 60) {
|
i.workTime = (i.workTime / 60).toFixed(0) + 'h' + i.workTime % 60 + 'm'
|
} else {
|
i.workTime = i.workTime + 'm'
|
}
|
}
|
i.finishTime = dayjs(i.finishTime).format('HH:mm')
|
return i
|
})
|
|
})
|
}
|
|
const data6 = ref({})
|
const getData6 = () => {
|
cncarWorkSituation({ size: 30 }).then(res => {
|
const result = res.data
|
data6.value = result
|
})
|
}
|
|
const data7 = ref([])
|
const getData7 = () => {
|
cnwarningList({ size: 10 }).then(res => {
|
const result = res.data || []
|
data7.value = result.map(item => {
|
item.haveTime = dayjs.duration(new Date().getTime() - new Date(item.createDate).getTime()).format('HH小时mm分钟')
|
return item
|
})
|
})
|
}
|
|
const showWorkModal = ref(false)
|
const showJk = ref(false)
|
const workModalParam = ref({})
|
const videoParam = ref({})
|
// point_icon
|
const pointList = [
|
{ left: 230, top: 190, left2: 290, top2: 190, name: '出库月台3' },
|
{ left: 265, top: 180, left2: 325, top2: 190, name: '出库月台2' },
|
{ left: 300, top: 170, left2: 360, top2: 190, name: '出库月台1' },
|
{ left: 335, top: 160, left2: 390, top2: 190, name: '整托盘出库2' },
|
{ left: 370, top: 150, left2: 430, top2: 190, name: '整托盘出库1' },
|
|
{ left: 530, top: 50, left2: 590, top2: 190, name: '入库月台2' },
|
{ left: 550, top: 65, left2: 610, top2: 190, name: '入库月台1' },
|
{ left: 570, top: 75, left2: 630, top2: 190, name: '入库月台3' },
|
{ left: 590, top: 75, left2: 650, top2: 190, name: '1095整托盘入库' },
|
{ left: 600, top: 80, left2: 660, top2: 190, name: '1099整托盘入库' },
|
{ left: 850, top: 60, left2: 520, top2: 190, name: '市公司月台' },
|
{ left: 540, top: 136, left2: 600, top2: 136, name: '老库入库' },
|
{ left: 560, top: 132, left2: 620, top2: 132, name: '老库出库' },
|
|
]
|
const videoPri = () => {
|
showJk.value = true
|
nextTick(() => {
|
videoParam.value = { ...workModalParam.value }
|
// console.log('workModalParam', videoParam.value)
|
})
|
}
|
const closeVideo = () => {
|
workModalParam.value = {}
|
videoParam.value = {}
|
showJk.value = false
|
}
|
|
const platformClick = (val) => {
|
const index = pointList.findIndex(i => i.name == val.platformName)
|
workModalParam.value = { ...val, ...pointList[index], index: pointList }
|
if (workModalParam.value.workTime) {
|
workModalParam.value.workTime = workModalParam.value.workTime.replaceAll('m', '分钟')
|
workModalParam.value.workTime = workModalParam.value.workTime.replaceAll('h', '小时')
|
}
|
showWorkModal.value = true
|
}
|
const closeModal = () => {
|
showWorkModal.value = false
|
workModalParam.value = {}
|
}
|
const loopFn2 = () => {
|
var newSwiper1 = new Swiper('.one-swiper', {
|
initialSlide: 0,
|
// loop: true, // 循环模式选项
|
direction: 'vertical', //竖直方向
|
slidesPerView: 5,
|
// autoplay: { delay: 500, disableOnInteraction: false },
|
autoplay: autoplayFlag(dataList2.value, 5, 4000),
|
observer: true, //修改swiper自己或子元素时,自动初始化swiper
|
})
|
}
|
const loopFn5 = () => {
|
var newSwiper1 = new Swiper('.two-swiper', {
|
initialSlide: 0,
|
// loop: true, // 循环模式选项
|
direction: 'vertical', //竖直方向
|
slidesPerView: 6,
|
// autoplay: { delay: 500, disableOnInteraction: false },
|
autoplay: autoplayFlag(dataList2.value, 6, 4000),
|
observer: true, //修改swiper自己或子元素时,自动初始化swiper
|
})
|
}
|
const loopFn7 = () => {
|
var newSwiper1 = new Swiper('.three-swiper', {
|
initialSlide: 0,
|
// loop: true, // 循环模式选项
|
direction: 'vertical', //竖直方向
|
slidesPerView: 2,
|
// autoplay: { delay: 500, disableOnInteraction: false },
|
autoplay: autoplayFlag(dataList2.value, 2, 4000),
|
observer: true, //修改swiper自己或子元素时,自动初始化swiper
|
})
|
}
|
const loopFn6 = () => {
|
var newSwiper1 = new Swiper('.four-swiper', {
|
initialSlide: 0,
|
direction: 'vertical', //竖直方向
|
slidesPerView: 7,
|
autoplay: autoplayFlag(data6.value.platformLogList, 7, 4000),
|
observer: true, //修改swiper自己或子元素时,自动初始化swiper
|
})
|
}
|
const autoplayFlag = (list = [], leng = 4, time = 2000) => {
|
if (list.length > leng) {
|
return { delay: time, disableOnInteraction: false }
|
} else {
|
return false
|
}
|
}
|
|
|
onMounted(() => {
|
// initEnergy()
|
getData1()
|
getData2()
|
getData3()
|
getData4()
|
getData5()
|
getData6()
|
getData7()
|
|
setInterval(() => {
|
getData1()
|
getData2()
|
getData3()
|
getData4()
|
getData5()
|
getData6()
|
getData7()
|
}, 1000 * 60)
|
|
setTimeout(() => {
|
loopFn2()
|
loopFn5()
|
loopFn7()
|
loopFn6()
|
}, 12000)
|
})
|
|
|
</script>
|
|
<style lang="scss" scoped>
|
div {
|
box-sizing: border-box;
|
}
|
|
.main_content {
|
display: flex;
|
padding: 20px 25px 0;
|
|
.left_box {
|
width: 450px;
|
flex-shrink: 0;
|
|
.left_box_one {
|
width: 100%;
|
margin-bottom: 20px;
|
|
.car_static {
|
display: flex;
|
justify-content: space-evenly;
|
align-items: center;
|
height: 218px;
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
|
.echart_wrap {
|
position: relative;
|
|
.pie_text {
|
width: 100px;
|
height: 100px;
|
border: 1px dashed rgba(1, 217, 254, 0.7);
|
border-radius: 50%;
|
position: absolute;
|
|
left: 50%;
|
top: 50%;
|
transform: translate(-50%, -50%);
|
z-index: 999;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
font-size: 12px;
|
|
.fs30 {
|
font-weight: bold;
|
font-size: 18px;
|
margin-bottom: 4px;
|
}
|
}
|
}
|
|
.echart1 {
|
width: 130px;
|
height: 130px;
|
}
|
|
.list {
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
|
.item {
|
width: 100%;
|
font-size: 14px;
|
margin-bottom: 14px;
|
|
.line {
|
display: flex;
|
align-items: center;
|
margin-bottom: 2px;
|
|
.icon {
|
width: 12px;
|
height: 12px;
|
border-radius: 50%;
|
margin-right: 10px;
|
background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
|
}
|
}
|
|
.num {
|
margin-left: 20px;
|
}
|
}
|
}
|
}
|
}
|
|
.left_box_two {
|
margin-bottom: 20px;
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
|
.list {
|
padding: 0px 24px 0px;
|
height: 200px;
|
margin-top: 20px;
|
overflow: hidden;
|
|
.line {
|
display: flex;
|
align-items: center;
|
height: 40px;
|
|
.top {
|
font-weight: 500;
|
font-size: 12px;
|
width: 33px;
|
height: 20px;
|
line-height: 20px;
|
text-align: center;
|
color: #DBEAEA;
|
box-shadow: inset 0px 0px 3px 0px #01D9FE;
|
margin-right: 10px;
|
}
|
|
.top3 {
|
box-shadow: inset 0px 0px 3px 0px #FEAF01;
|
}
|
|
.one-swiper-slide {
|
height: 40px !important;
|
}
|
|
.id_card {
|
color: #DBEAEA;
|
font-weight: 500;
|
margin-right: 2px;
|
font-size: 14px;
|
width: 80px;
|
overflow: hidden;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
}
|
|
.num {
|
font-weight: 500;
|
width: 88px;
|
text-align: right;
|
font-size: 13px;
|
color: #DBEAEA;
|
margin-left: 2px;
|
overflow: hidden;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
}
|
|
.wrap {
|
flex: 1;
|
height: 20px;
|
border: 1px solid #686B6B;
|
}
|
}
|
}
|
}
|
|
.left_box_three {
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
|
.echart_wrap {
|
width: 450px;
|
height: 212px;
|
|
.echart2 {
|
width: 450px;
|
height: 212px;
|
}
|
}
|
}
|
}
|
|
.center_box {
|
flex: 1;
|
padding: 20px 25px 0;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
|
.center_box_one {
|
.static_wrap {
|
display: flex;
|
justify-content: space-evenly;
|
align-items: center;
|
margin: 30px 0 10px;
|
|
.item {
|
text-align: center;
|
|
.name {
|
font-weight: 500;
|
margin-bottom: 12px;
|
}
|
|
.nums {
|
display: flex;
|
|
.num {
|
width: 32px;
|
height: 46px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
font-weight: 500;
|
font-size: 34px;
|
background: linear-gradient(180deg, rgba(0, 148, 235, 0.61) 0%, rgba(0, 148, 235, 0) 100%);
|
|
&:nth-of-type(2) {
|
margin: 0 4px;
|
}
|
}
|
}
|
}
|
}
|
}
|
|
.center_box_bg {
|
width: 100%;
|
flex: 1;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
position: relative;
|
|
.camera_wrap {
|
position: absolute;
|
top: 0;
|
left: 50%;
|
transform: translate(-50%, 0);
|
width: 672px;
|
height: 568px;
|
z-index: 999;
|
font-size: 14px;
|
color: #D2E0FF;
|
display: flex;
|
flex-direction: column;
|
|
.content {
|
flex: 1;
|
/* height: calc( 100% - 30px ); */
|
padding: 16px 20px 32px 20px;
|
|
.video {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
|
.head {
|
height: 56px;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
padding: 0 30px;
|
|
.right {
|
display: flex;
|
align-items: center;
|
|
.icon {
|
width: 24px;
|
margin-left: 20px;
|
cursor: pointer;
|
}
|
}
|
|
.left {
|
display: flex;
|
align-items: center;
|
|
.name {
|
font-weight: bold;
|
font-size: 16px;
|
color: #01D9FE;
|
margin-right: 20px;
|
}
|
|
.icon {
|
width: 16px;
|
margin-right: 8px;
|
}
|
}
|
}
|
|
.bg {
|
position: absolute;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
}
|
}
|
|
.point_icon {
|
position: absolute;
|
left: 850px;
|
top: 60px;
|
}
|
|
.no {
|
width: 28px;
|
height: 28px;
|
border-radius: 50%;
|
border: 1px solid #0193FE;
|
box-shadow: 1px 1px 6px #466d89;
|
font-size: 12px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
background: #123062;
|
cursor: pointer;
|
}
|
|
.work_modal {
|
width: 314px;
|
height: 180px;
|
position: absolute;
|
padding: 22px 20px;
|
left: 850px;
|
top: 60px;
|
z-index: 99999999;
|
|
.priview {
|
position: absolute;
|
bottom: 24px;
|
right: 40px;
|
font-size: 12px;
|
color: #01D9FE;
|
cursor: pointer;
|
}
|
|
.head {
|
display: flex;
|
justify-content: space-between;
|
margin-bottom: 12px;
|
|
.left {
|
display: flex;
|
align-items: center;
|
font-weight: bold;
|
font-size: 15px;
|
color: #FFFFFF;
|
|
img {
|
width: 17px;
|
margin-right: 10px;
|
}
|
}
|
|
.right {
|
font-weight: 500;
|
font-size: 13px;
|
color: #01D9FE;
|
}
|
}
|
|
.line {
|
display: flex;
|
align-items: center;
|
font-size: 13px;
|
margin-bottom: 8px;
|
|
&:nth-last-child(1) {
|
margin-bottom: 0;
|
}
|
|
.dian {
|
width: 4px;
|
height: 4px;
|
border-radius: 50%;
|
background-color: #fff;
|
margin-right: 7px;
|
}
|
|
.la {
|
color: #D2E0FF;
|
}
|
}
|
|
.bg {
|
position: absolute;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 100%;
|
}
|
|
}
|
|
.modal_bg {
|
position: fixed;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
/* background-color: rgba(0,0,0,.1); */
|
}
|
}
|
|
.center_box_two {
|
width: 100%;
|
|
.videos {
|
width: 100%;
|
height: 150px;
|
display: flex;
|
margin-bottom: 15px;
|
|
.video {
|
width: 222px;
|
height: 126px;
|
border: 1px solid;
|
margin-right: 10px;
|
|
&:nth-last-child(1) {
|
margin: 0;
|
}
|
}
|
}
|
|
.list {
|
width: 100%;
|
height: 210px;
|
overflow-y: auto;
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
|
.two-swiper {
|
height: 180px;
|
overflow: hidden;
|
}
|
|
.line {
|
display: flex;
|
height: 30px;
|
position: relative;
|
cursor: pointer;
|
|
.icon {
|
position: absolute;
|
left: 0px;
|
top: 0px;
|
}
|
|
|
div {
|
flex: 1;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
font-size: 14px;
|
color: #D2E0FF;
|
}
|
}
|
|
.lined {
|
background: rgba(0, 160, 255, 0.6) !important;
|
font-weight: 600 !important;
|
}
|
|
.header {
|
font-weight: 500;
|
font-size: 14px;
|
color: #01ABFE;
|
background: rgba(1, 15, 35, 0.61) !important;
|
box-shadow: inset 0px 0px 40px 0px rgba(23, 51, 108, 0.66) !important;
|
}
|
}
|
}
|
}
|
|
.right_box {
|
width: 450px;
|
|
.right_box_one {
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
|
.static_wrap {
|
display: flex;
|
padding: 20px 0 15px;
|
|
.item {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
|
.name {
|
font-size: 14px;
|
color: #D2E0FF;
|
}
|
|
.num {
|
font-size: 22px;
|
font-weight: 500;
|
|
}
|
}
|
}
|
|
.echart_wrap {
|
width: 100%;
|
|
.echart3 {
|
width: 100%;
|
height: 160px;
|
}
|
}
|
|
.list {
|
margin: 0 20px 0;
|
width: 430px;
|
height: 231px;
|
overflow: hidden;
|
scrollbar-width: none;
|
|
.line {
|
display: flex;
|
align-items: center;
|
font-size: 12px;
|
height: 33px !important;
|
color: #D2E0FF;
|
width: 100%;
|
|
.time_wrap {
|
display: flex;
|
align-items: center;
|
width: 52px;
|
color: #FFFFFF;
|
|
.time {
|
width: 40px;
|
height: 18px;
|
line-height: 18px;
|
text-align: center;
|
background: #00A68E;
|
border-radius: 2px;
|
}
|
|
.sp {
|
width: 10px;
|
height: 1px;
|
background: #00A68E;
|
}
|
|
.dian {
|
width: 4px;
|
height: 4px;
|
border-radius: 50%;
|
background: #00A68E;
|
}
|
}
|
|
.id_card {
|
flex: 6;
|
margin-left: 12px;
|
}
|
|
.status {
|
flex: 5;
|
}
|
|
.desc {
|
flex: 9;
|
}
|
}
|
}
|
|
}
|
|
.right_box_two {
|
padding: 20px 20px 0;
|
margin-top: 20px;
|
|
.list {
|
height: 220px;
|
overflow: hidden;
|
scrollbar-width: none;
|
background: rgba(0, 86, 255, 0.05);
|
backdrop-filter: blur(5px);
|
padding-top: 15px;
|
|
.item {
|
display: flex;
|
font-size: 13px;
|
color: #D2E0FF;
|
height: 110px;
|
|
.icon {
|
width: 40px;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
padding-top: 10px;
|
|
.circle {
|
width: 7px;
|
height: 7px;
|
border-radius: 50%;
|
background: #01D9FE;
|
box-shadow: 0px 0px 1px 4px #34788f;
|
/* opacity: 0.52; */
|
}
|
|
.line {
|
margin-top: 3px;
|
width: 1px;
|
flex: 1;
|
background-color: #153947;
|
}
|
}
|
|
.content {
|
flex: 1;
|
|
.header {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
|
.status {
|
width: 22px;
|
height: 18px;
|
line-height: 18px;
|
text-align: center;
|
border-radius: 2px;
|
border: 1px solid #01D9FE;
|
font-size: 12px;
|
color: #01D9FE;
|
}
|
|
.time {
|
font-size: 13px;
|
color: #D2E0FF;
|
}
|
}
|
|
.main {
|
height: 64px;
|
background: linear-gradient(270deg, rgba(254, 85, 1, 0) 0%, rgba(254, 85, 1, 0.19) 100%);
|
border-radius: 2px 0px 0px 2px;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
|
border: 1px solid;
|
margin-bottom: 20px;
|
margin-top: 8px;
|
padding: 0 10px;
|
border-image: linear-gradient(270deg, rgba(254, 85, 1, 0), rgba(254, 85, 1, 0.6)) 1 1;
|
|
.left {
|
|
.title {
|
font-size: 13px;
|
margin-bottom: 4px;
|
display: flex;
|
align-items: center;
|
|
.xf {
|
width: 14px;
|
height: 14px;
|
margin-right: 6px;
|
}
|
}
|
|
.wrap {
|
font-size: 12px;
|
color: rgba(255, 255, 255, 0.6);
|
padding-left: 20px;
|
}
|
}
|
|
|
|
.status {
|
padding: 0 8px;
|
font-size: 13px;
|
color: #D2E0FF;
|
height: 24px;
|
line-height: 24px;
|
text-align: center;
|
background: #132c56;
|
border-radius: 2px;
|
border: 1px solid rgba(1, 147, 254, 0.6);
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
|
.swiper-wrapper {
|
display: block !important;
|
}
|
}
|
|
.main_header {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
height: 90px;
|
position: relative;
|
padding: 0px 40px 16px;
|
font-weight: 600;
|
font-size: 36px;
|
|
.title {
|
background-image: -webkit-linear-gradient(top,
|
#ffffff 0%,
|
#c8ddff 70%,
|
#85b4ff 80%,
|
#74a9ff 100%);
|
-webkit-background-clip: text;
|
-webkit-text-fill-color: transparent;
|
}
|
|
.time_wrap {
|
font-size: 26px;
|
font-weight: 600;
|
background-image: -webkit-linear-gradient(top,
|
#ffffff 0%,
|
#c8ddff 50%,
|
#85b4ff 80%,
|
#74a9ff 100%);
|
-webkit-background-clip: text;
|
-webkit-text-fill-color: transparent;
|
display: flex;
|
align-items: center;
|
|
.time {
|
width: 130px;
|
display: flex;
|
justify-content: flex-end;
|
font-size: 30px;
|
}
|
|
.week {
|
margin-left: 20px;
|
}
|
}
|
|
.main_header_bg {
|
position: absolute;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
object-fit: cover;
|
z-index: -1;
|
}
|
}
|
|
.com_header {
|
height: 40px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
padding: 0 15px 0 13px;
|
position: relative;
|
|
.title {
|
display: flex;
|
align-items: center;
|
font-weight: bold;
|
font-size: 16px;
|
background-image: -webkit-linear-gradient(top,
|
#ffffff 0%,
|
#c8ddff 66%,
|
#85b4ff 72%,
|
#74a9ff 100%);
|
-webkit-background-clip: text;
|
-webkit-text-fill-color: transparent;
|
|
.icon {
|
width: 16px;
|
height: 16px;
|
margin-right: 14px;
|
}
|
}
|
|
.tabs {
|
display: flex;
|
align-items: center;
|
font-size: 14px;
|
color: #d2e0ff;
|
|
.separate {
|
width: 1px;
|
height: 14px;
|
background-color: #d2e0ff;
|
margin: 0 6px;
|
}
|
|
.tab {
|
cursor: pointer;
|
}
|
|
.active {
|
color: #0094eb;
|
}
|
}
|
}
|
|
.main_app {
|
width: 1920px;
|
height: 960px;
|
/* width: 100%;
|
height: 100vh; */
|
background: #0b2539;
|
color: #FFFFFF;
|
position: relative;
|
z-index: -2;
|
font-size: 14px;
|
|
.main_bg {
|
position: absolute;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
object-fit: cover;
|
z-index: -1;
|
}
|
}
|
|
.bg {
|
position: absolute;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
object-fit: cover;
|
z-index: -1;
|
}
|
</style>
|