| | |
| | | <template> |
| | | <v-scale-screen width="1920" height="960"> |
| | | <div class="main_app"> |
| | | <img src="@/assets/images/FireFighting/bg@2x.png" class="main_bg" alt="" /> |
| | | <img src="@/assets/images/task/bg@2x.png" class="main_bg" alt="" /> |
| | | <div class="main_header"> |
| | | <img src="@/assets/images/maintitle@2x.png" class="main_header_bg" alt="" /> |
| | | <img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" /> |
| | | <div class="title">安泰智慧物流园区-作业效能统筹</div> |
| | | <div class="time_wrap"> |
| | | <span class="date">{{ date }}</span> |
| | |
| | | <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> |
| | | <div>今日月台完成订单统计</div> |
| | | </div> |
| | | <img src="@/assets/images/title@2x.png" class="bg" alt="" /> |
| | | <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>300</strong></div> |
| | | <div class="fs30"><strong>{{ data1 }}</strong></div> |
| | | <div>完成量</div> |
| | | </div> |
| | | <div class="echart1" id="echart1"></div> |
| | | </div> |
| | | <div class="list"> |
| | | <div class="item"> |
| | | <div class="item" v-for="item, i in dataList1" :key="i"> |
| | | <div class="line"> |
| | | <div :style="{ background: colors[0] }" class="icon"></div> |
| | | <div class="text">安泰物流装货月台组</div> |
| | | <div :style="{ background: colors[i] }" class="icon"></div> |
| | | <div class="text">{{ item.name }}</div> |
| | | </div> |
| | | <div :style="{ color: colors[0] }" class="num">100万支</div> |
| | | <div :style="{ color: colors[i] }" class="num">{{ item.value }}万支</div> |
| | | </div> |
| | | <div class="item"> |
| | | <!-- <div class="item"> |
| | | <div class="line"> |
| | | <div :style="{ background: colors[1] }" class="icon"></div> |
| | | <div class="text">安泰物流卸货月台组</div> |
| | |
| | | <div class="text">市公司卸货月台组</div> |
| | | </div> |
| | | <div :style="{ color: colors[2] }" class="num">100万支</div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> |
| | | <div>今日月台工作时长趋势</div> |
| | | </div> |
| | | <img src="@/assets/images/title@2x.png" class="bg" alt="" /> |
| | | <img src="@/assets/images/task/title@2x.png" class="bg" alt="" /> |
| | | </div> |
| | | <div class="list"> |
| | | <div class="line" v-for="item, i in 5"> |
| | | <div class="top"><span v-if="i < 3">top</span>{{ i }}</div> |
| | | <div class="id_card">皖A12313</div> |
| | | <div class="wrap"> |
| | | <ChargeRate :rate="15" :color /> |
| | | <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"><span v-if="i < 3">top</span>{{ i }}</div> |
| | | <div class="id_card">{{ item.platformName }}</div> |
| | | <div class="wrap"> |
| | | <ChargeRate :rate="item.rate" /> |
| | | </div> |
| | | <div class="num">{{ item.workTotalTimeT }}</div> |
| | | </div> |
| | | <div class="num">6小时34分钟</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div>实时作业效率</div> |
| | | </div> |
| | | <div class="tabs"> |
| | | <div class="tab active">出库</div> |
| | | <div class="tab" :class="{ active: activeTab3 == 1 }" @click="tabClick3(1)">出库</div> |
| | | <div class="separate"></div> |
| | | <div class="tab">入库</div> |
| | | <div class="tab" :class="{ active: activeTab3 == 0 }" @click="tabClick3(0)">入库</div> |
| | | </div> |
| | | <img src="@/assets/images/title@2x.png" class="bg" alt="" /> |
| | | <img src="@/assets/images/task/title@2x.png" class="bg" alt="" /> |
| | | </div> |
| | | <div class="echart_wrap"> |
| | | <div class="echart2" id="echart2"></div> |
| | |
| | | <div class="static_wrap"> |
| | | <div class="item"> |
| | | <div class="name">月台数量</div> |
| | | <div class="nums"> |
| | | <div class="num" v-for="i in '010'">{{ i }}</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 class="nums"> |
| | | <div class="num" v-for="i in '010'">{{ i }}</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 class="nums"> |
| | | <div class="num" v-for="i in '010'">{{ i }}</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 class="nums"> |
| | | <div class="num" v-for="i in '010'">{{ i }}</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"> |
| | | <div class="num" v-for="i in '010'">{{ i }}</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_two"> |
| | | <div class="videos"> |
| | | <div class="video" v-for="i in 4"></div> |
| | | <div class="center_box_bg"> |
| | | <!-- <div class="no no1" @click="workModalClick">1</div> |
| | | <div class="no no2" @click="workModalClick">2</div> |
| | | <div class="no no3" @click="workModalClick">3</div> --> |
| | | <div class="work_modal" @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 ? '卸货' : '装货' }}</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> |
| | | </div> |
| | | <div class="center_box_two"> |
| | | <!-- <div class="videos"> |
| | | <div class="video" v-for="i in 4"></div> |
| | | </div> --> |
| | | <div class="list"> |
| | | <div class="line header"> |
| | | <div>月台名称</div> |
| | |
| | | <div>预计完成时间</div> |
| | | <div>月台状态</div> |
| | | </div> |
| | | <div class="line" v-for="i in 6"> |
| | | <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="line one-swiper-slide swiper-slide" |
| | | v-for="item, i in dataList5" :key="i"> |
| | | <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> |
| | |
| | | <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> |
| | | <div>今日车辆作业情况</div> |
| | | </div> |
| | | <img src="@/assets/images/title@2x.png" class="bg" alt="" /> |
| | | <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">1</div> |
| | | <div class="num">{{ data4?.signedNum || 0 }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="name">已叫号</div> |
| | | <div class="num">1</div> |
| | | <div class="num">{{ data4?.calledNum || 0 }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="name">已作业</div> |
| | | <div class="num">1</div> |
| | | <div class="num">{{ data4?.workedNum || 0 }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="name">已完成</div> |
| | | <div class="num">1</div> |
| | | <div class="num">{{ data4?.doneNum || 0 }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="echart_wrap"> |
| | | <div class="echart3" id="echart3"></div> |
| | | </div> |
| | | <div class="list"> |
| | | <div class="line" v-for=" i in 7"> |
| | | <div class="line" v-for="item, i in data6?.platformLogList"> |
| | | <div class="time_wrap"> |
| | | <div class="time">12.40</div> |
| | | <div class="sp"></div> |
| | | <div class="dian"></div> |
| | | <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">皖A12313</div> |
| | | <div class="status">开始作业</div> |
| | | <div class="desc">排队等待叫号</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> |
| | |
| | | <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> |
| | | <div>实时告警</div> |
| | | </div> |
| | | <img src="@/assets/images/title@2x.png" class="bg" alt="" /> |
| | | <img src="@/assets/images/task/title@2x.png" class="bg" alt="" /> |
| | | </div> |
| | | <div class="list"> |
| | | <div class="item" v-for="i in 5"> |
| | | <div class="icon"> |
| | | <div class="circle"></div> |
| | | <div class="line"></div> |
| | | </div> |
| | | <div class="content"> |
| | | <div class="header"> |
| | | <div class="time">time</div> |
| | | <span class="status">中</span> |
| | | <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="main"> |
| | | <div class="left"> |
| | | <div class="title"> |
| | | <img class="xf" src="@/assets/images/FireFighting/ic_gaojing_red@2x.png" alt=""> |
| | | <span>告警:开车吸烟</span> |
| | | </div> |
| | | <div class="wrap"> |
| | | <span style="margin-right: 30px;">状态:待处理</span> |
| | | <span>已发生:1分钟</span> |
| | | </div> |
| | | <div class="content"> |
| | | <div class="header"> |
| | | <div class="time">{{ item.createDate }}</div> |
| | | <!-- <span class="status">低</span> --> |
| | | </div> |
| | | <div class="status">处理中</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: 30px;">状态:待处理</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> |
| | |
| | | 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 { |
| | | 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()]) |
| | |
| | | show: false, |
| | | position: 'center' |
| | | }, |
| | | padAngle: 5, |
| | | padAngle: 2, |
| | | itemStyle: { |
| | | borderRadius: 10 |
| | | }, |
| | |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | data: [ |
| | | { value: 1048, name: 'Search Engine' }, |
| | | { value: 735, name: 'Direct' }, |
| | | { value: 580, name: 'Email' } |
| | | ] |
| | | data: dataList1.value |
| | | } |
| | | ] |
| | | } |
| | |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | data: ['2017', '2018', '2019', '2020', '2021', '2022', '2023',], |
| | | data: dataList3.value.map(i => i.workTime), |
| | | }], |
| | | yAxis: [ |
| | | { |
| | |
| | | shadowColor: 'rgba(124,248,255, 0)', |
| | | shadowBlur: 20 |
| | | }, |
| | | data: [393, 438, 485, 631, 389, 224, 287] |
| | | data: dataList3.value.map(i => i.workNum || 0) |
| | | }, |
| | | { |
| | | name: '累计作业量', |
| | |
| | | }, |
| | | barBorderRadius: [30, 30, 0, 0], |
| | | }, |
| | | data: [393, 438, 485, 631, 689, 524, 687] |
| | | data: dataList3.value.map(i => i.totalWorkNum) |
| | | }, |
| | | ] |
| | | } |
| | |
| | | }]), |
| | | 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' |
| | | }]), |
| | | new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ |
| | | offset: 0, |
| | | color: '#4370f2' |
| | | }, { |
| | | offset: 1, |
| | | color: '#61d3f9' |
| | | }])] |
| | | ] |
| | | const temp = [] |
| | | temp.push({ name: '签到数', value: data4.value?.signedNum || 0, rate: data4.value?.signedNum ? '100.0' : 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 }) |
| | | console.log('temp', temp) |
| | | |
| | | const option = { |
| | | color: colors, |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: "cross", |
| | | label: { |
| | | backgroundColor: "red" |
| | | }, |
| | | lineStyle: { |
| | | color: "#9eb2cb" |
| | | } |
| | | } |
| | | show: false |
| | | }, |
| | | |
| | | legend: { |
| | | show: false, |
| | | top: "top", |
| | | left: "2%", |
| | | textStyle: { |
| | | color: "#000" |
| | | }, |
| | | itemHeight: 2, |
| | | data: ['预约数', '已进场', '已作业', '已离场'] |
| | | show: false |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | 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: '{a|{b}} {a|{c}%}', |
| | | formatter: (params) => { |
| | | const index = params.dataIndex; |
| | | return `{color${index}|${params.data.name} ${params.data.rate}%}` |
| | | // return `<div>${params.data.name}</div>` |
| | | }, |
| | | rich: { |
| | | a: { |
| | | color: '#869CC9', |
| | | fontSize: 13 |
| | | }, |
| | | color0: { color: 'orange', fontSize: 14 }, |
| | | color1: { color: '#869CC9', fontSize: 13 }, |
| | | color2: { color: '#869CC9', fontSize: 13 }, |
| | | color3: { color: '#869CC9', fontSize: 13 } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | length: 80, |
| | | lineStyle: { |
| | | width: 1, |
| | | type: 'dashed' |
| | | } |
| | | show: true, |
| | | normal: { |
| | | length: 80, |
| | | position: 'right', |
| | | lineStyle: { |
| | | width: 1, |
| | | type: 'dashed', |
| | | color: 'rgba(102, 160, 239,.5)' |
| | | } |
| | | }, |
| | | }, |
| | | itemStyle: { //去掉默认白色边框线 |
| | | borderWidth: 0, |
| | | borderColor: '#fff' |
| | | }, |
| | | data: [ |
| | | { value: 100, name: '预约数', }, |
| | | { value: 50, name: '已进场' }, |
| | | { value: 20, name: '已作业' }, |
| | | { value: 30, name: '已离场' }, |
| | | |
| | | ] |
| | | itemStyle: { |
| | | normal: { |
| | | color: 'transparent', |
| | | borderWidth: 0, |
| | | opacity: 1 |
| | | } |
| | | }, |
| | | data: temp |
| | | }, |
| | | ] |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | 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 = (item.workTotalTime / 60).toFixed(0) + '小时' + item.workTotalTime % 60 + '分钟' |
| | | } else { |
| | | item.workTotalTimeT = item.workTotalTime + '分钟' |
| | | } |
| | | } |
| | | item.rate = ((item.workTotalTime / count) * 30).toFixed(0) |
| | | 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 ? '空闲中' : '作业超时' |
| | | 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: 7 }).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 workModalParam = ref({}) |
| | | const platformClick = (val) => { |
| | | workModalParam.value = val |
| | | showWorkModal.value = !showWorkModal.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 autoplayFlag = (list = [], leng = 4, time = 2000) => { |
| | | if (list.length > leng) { |
| | | return { delay: time, disableOnInteraction: false } |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | |
| | | |
| | | onMounted(() => { |
| | | // initEnergy() |
| | | initEchart1() |
| | | initEchart2() |
| | | initEchart3() |
| | | getData1() |
| | | getData2() |
| | | getData3() |
| | | getData4() |
| | | getData5() |
| | | getData6() |
| | | getData7() |
| | | |
| | | setInterval(() => { |
| | | getData1() |
| | | getData2() |
| | | getData3() |
| | | getData4() |
| | | getData5() |
| | | getData6() |
| | | getData7() |
| | | }, 1000 * 60) |
| | | |
| | | setTimeout(() => { |
| | | loopFn2() |
| | | loopFn5() |
| | | loopFn7() |
| | | }, 12000) |
| | | }) |
| | | |
| | | |
| | |
| | | .left_box_one { |
| | | width: 100%; |
| | | margin-bottom: 20px; |
| | | border: 1px solid; |
| | | |
| | | .car_static { |
| | | display: flex; |
| | |
| | | margin-bottom: 20px; |
| | | |
| | | .list { |
| | | padding: 20px 24px 4px; |
| | | height: 227px; |
| | | border: 1px solid; |
| | | padding: 0px 24px 0px; |
| | | height: 200px; |
| | | margin-top: 20px; |
| | | overflow: hidden; |
| | | |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | height: 20px; |
| | | height: 40px; |
| | | |
| | | .top { |
| | | font-weight: 500; |
| | |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .one-swiper-slide { |
| | | height: 40px !important; |
| | | } |
| | | |
| | | .id_card { |
| | | color: #DBEAEA; |
| | | font-weight: 500; |
| | | margin-right: 14px; |
| | | margin-right: 2px; |
| | | font-size: 14px; |
| | | width: 80px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .num { |
| | | font-weight: 500; |
| | | width: 82px; |
| | | text-align: right; |
| | | font-size: 13px; |
| | | color: #DBEAEA; |
| | | margin-left: 15px; |
| | | margin-left: 2px; |
| | | } |
| | | |
| | | .wrap { |
| | |
| | | } |
| | | } |
| | | |
| | | .center_box_bg { |
| | | width: 100%; |
| | | flex: 1; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .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: relative; |
| | | padding: 22px 20px; |
| | | |
| | | .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%; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .center_box_two { |
| | | width: 100%; |
| | | |
| | |
| | | .list { |
| | | width: 100%; |
| | | height: 210px; |
| | | overflow-y: auto; |
| | | |
| | | .two-swiper { |
| | | height: 180px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .line { |
| | | display: flex; |
| | | height: 30px; |
| | | |
| | | &:nth-of-type(2n) { |
| | | &:nth-of-type(2n + 1) { |
| | | background: rgba(12, 153, 236, 0.2); |
| | | } |
| | | |
| | | &:nth-of-type(2n + 1) { |
| | | &:nth-of-type(2n) { |
| | | background: rgba(1, 15, 35, 0.61); |
| | | box-shadow: inset 0px 0px 40px 0px rgba(23, 51, 108, 0.66); |
| | | } |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 12px; |
| | | font-size: 14px; |
| | | color: #D2E0FF; |
| | | } |
| | | } |
| | | |
| | | .header { |
| | | font-weight: 500; |
| | | font-size: 13px; |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | |
| | | .name { |
| | | font-size: 12px; |
| | | font-size: 14px; |
| | | color: #D2E0FF; |
| | | } |
| | | |
| | |
| | | margin: 0 20px 0; |
| | | width: 100%; |
| | | height: 222px; |
| | | |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | height: 33px; |
| | | color: #D2E0FF; |
| | | width: 100%; |
| | | |
| | | .time_wrap { |
| | | display: flex; |
| | | align-items: center; |
| | | width: 52px; |
| | | color: #FFFFFF; |
| | | |
| | | .time { |
| | | width: 40px; |
| | | height: 18px; |
| | |
| | | padding: 20px 20px 0; |
| | | |
| | | .list { |
| | | height: 248px; |
| | | overflow: auto; |
| | | height: 220px; |
| | | overflow: hidden; |
| | | margin-top: 15px; |
| | | scrollbar-width: none; |
| | | |
| | |
| | | display: flex; |
| | | font-size: 13px; |
| | | color: #D2E0FF; |
| | | height: 110px; |
| | | |
| | | .icon { |
| | | width: 40px; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .swiper-wrapper { |
| | | display: block !important; |
| | | } |
| | | } |
| | | |
| | | .main_header { |
| | |
| | | margin: 0 6px; |
| | | } |
| | | |
| | | .tab { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .active { |
| | | color: #0094eb; |
| | | } |