From 06b2f5be922e87d086d1d4e6cdcc2119e7d3a1a4 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期三, 09 七月 2025 14:36:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- screen/src/views/LogisticsEfficiency.vue | 1136 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 953 insertions(+), 183 deletions(-) diff --git a/screen/src/views/LogisticsEfficiency.vue b/screen/src/views/LogisticsEfficiency.vue index 6441406..93dd089 100644 --- a/screen/src/views/LogisticsEfficiency.vue +++ b/screen/src/views/LogisticsEfficiency.vue @@ -3,7 +3,7 @@ <div class="main_app"> <img src="@/assets/images/energy_ef/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> @@ -17,22 +17,38 @@ <div class="com_header"> <div class="title"> <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> - <div>绱鍑哄簱閲忕粺璁�</div> + <div>绱鍑哄簱閲忕粺璁★紙涓囨敮锛�</div> </div> <div class="tabs"> - <div class="tab active">鏈湀</div> + <div class="tab" :class="{ active: activeTab1 == 0 }" @click="tabClick1(0)">鏈湀</div> <div class="separate"></div> - <div class="tab">鏈勾</div> + <div class="tab" :class="{ active: activeTab1 == 1 }" @click="tabClick1(1)">鏈勾</div> </div> <img src="@/assets/images/title@2x.png" class="bg" alt="" /> </div> <div class="content_wrap"> <div class="content"> - <div class="num">1000000</div> + <div class="num" v-if="data1.monthOutTotal || data1.yearOutTotal">{{ activeTab1 == 0 ? + data1.monthOutTotal.toLocaleString() : data1.yearOutTotal.toLocaleString() }}</div> <div class="unit_wrap"> - <span style="color: #869CC9;">鍚屾瘮</span> - <img src="@/assets/images/ic_up.png" class="icon" alt=""> - <span>10.2%</span> + <!-- <span style="color: #869CC9;">{{ activeTab1 == 0 ? '鍚屾瘮' : '鐜瘮' }}</span> --> + <span style="color: #869CC9;">鐜瘮</span> + <template v-if="activeTab1 == 0 && data1.monthLastOutTotal"> + <img v-if="data1.monthOutTotal > data1.monthLastOutTotal" src="@/assets/images/ic_up.png" + class="icon" alt=""> + <img v-else src="@/assets/images/ic_down.png" class="icon" alt=""> + </template> + <template v-if="activeTab1 == 1 && data1.yearLastOutTotal"> + <img v-if="data1.yearOutTotal > data1.yearLastOutTotal" src="@/assets/images/ic_up.png" class="icon" + alt=""> + <img v-else src="@/assets/images/ic_down.png" class="icon" alt=""> + </template> + + <span v-if="activeTab1 == 0 && data1.monthLastOutTotal">{{ Math.abs((((data1.monthOutTotal - + data1.monthLastOutTotal) / data1.monthLastOutTotal) * 100).toFixed(1)) }}%</span> + <span v-else-if="activeTab1 == 1 && data1.yearLastOutTotal">{{ Math.abs((((data1.yearOutTotal - + data1.yearLastOutTotal) / data1.yearLastOutTotal) * 100).toFixed(1)) }}%</span> + <span v-else style="margin-left: 10px;">-</span> </div> </div> <div class="train_wrap"> @@ -41,7 +57,8 @@ </div> <div class="total"> <span>绱鍑哄簱杞︽</span> - <span><strong>3900</strong><span class="unit">娆�</span></span> + <span><strong>{{ activeTab1 == 0 ? data1.monthOutTimes : data1.yearOutTimes }}</strong><span + class="unit">娆�</span></span> </div> </div> </div> @@ -50,14 +67,14 @@ <div class="com_header"> <div class="title"> <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> - <div>鏈堣兘鑰楀垎鏋�</div> + <div>杩愯緭浠诲姟鍒嗘瀽</div> </div> <div class="tabs"> - <div class="tab active">杩�7鏃�</div> + <div class="tab" :class="{ active: activeTab2 == 0 }" @click="tabClick2(0)">杩�7鏃�</div> <div class="separate"></div> - <div class="tab">鏈湀</div> + <div class="tab" :class="{ active: activeTab2 == 1 }" @click="tabClick2(1)">鏈湀</div> <div class="separate"></div> - <div class="tab">鏈勾</div> + <div class="tab" :class="{ active: activeTab2 == 2 }" @click="tabClick2(2)">鏈勾</div> </div> <img src="@/assets/images/title@2x.png" class="bg" alt="" /> </div> @@ -83,13 +100,20 @@ <span class="item addr">鏀惰揣鍗曚綅</span> <span class="item time">浠诲姟寮�濮嬫椂闂�</span> </div> - <div class="line" v-for="i in 7"> - <span class="item flag"><span class="flag_bg">鍑�</span></span> - <span class="item order">11</span> - <span class="item id_card">11</span> - <span class="item status">11</span> - <span class="item addr">11</span> - <span class="item time">11</span> + <div class="one-swiper list_temp"> + <div class="swiper-wrapper"> + <div @click="taskClick(item)" class="line swiper-slide one-swiper-slide" v-for="item in dataList3"> + <span class="item flag"><span :class="{ flag_bg: item.type == 1 || item.type == 3 }">{{ item.type + == 1 + || item.type == 3 ? '鍑�' : '鍏�' }}</span></span> + <span class="item order">{{ item.billCode || item.contractNum }}</span> + <span class="item id_card">{{ item.carCodeFront }}</span> + <span class="item status">{{ statusMap[item.status].label }}</span> + <span class="item addr">{{ item.repertotyAddress }}</span> + <span class="item time">{{ item.confirmTaskDate ? item.confirmTaskDate.slice(5, 16) : '-' + }}</span> + </div> + </div> </div> </div> </div> @@ -98,12 +122,14 @@ <div class="center_box"> <div class="center_box_one"> <div class="tabs"> - <div class="tab active"> - <img src="@/assets/images/energy_ef/chuku_task_ac.png" alt=""> + <div class="tab" :class="{ active: activeTab4 == 0 }" @click="tabClick4(0)"> + <img v-if="activeTab4 == 0" src="@/assets/images/energy_ef/chuku_task_ac.png" alt=""> + <img v-else src="@/assets/images/energy_ef/chuku_task.png" alt=""> <span>鍑哄簱浠诲姟</span> </div> - <div class="tab"> - <img src="@/assets/images/energy_ef/ruku_task.png" alt=""> + <div class="tab" :style="{ color: activeTab4 == 1 ? '#387df0' : '#d8e4f8' }" @click="tabClick4(1)"> + <img v-if="activeTab4 == 1" src="@/assets/images/energy_ef/ruku_task_ac.png" alt=""> + <img v-if="activeTab4 == 0" src="@/assets/images/energy_ef/ruku_task.png" alt=""> <span>鍏ュ簱浠诲姟</span> </div> </div> @@ -112,27 +138,76 @@ <img src="@/assets/images/energy_ef/ic_renwuzongliang@2x.png" alt=""> <div class="content"> <div class="name">褰撳墠浠诲姟閲�</div> - <div class="num"><span>1000</span>涓囨敮</div> + <div class="num"><span>{{ activeTab4 == 0 ? data1.currentOutNum : data1.currentInNum }}</span>涓囨敮</div> </div> </div> <div class="item"> <img src="@/assets/images/energy_ef/ic_wanchengrenwu@2x.png" alt=""> <div class="content"> <div class="name">褰撴棩瀹屾垚浠诲姟鎬婚噺</div> - <div class="num"><span class="today">1000</span>涓囨敮</div> + <div class="num"> + <span v-if="data1.currentOutDoneNum || data1.currentInDoneNum" class="today">{{ + activeTab4 == + 0 ? data1.currentOutDoneNum : + data1.currentInDoneNum + }}</span> + <span v-else>0</span> + 涓囨敮 + </div> </div> </div> <div class="item"> <img src="@/assets/images/energy_ef/ic_bili@2x.png" alt=""> <div class="content"> <div class="name">宸插畬鎴愭瘮渚�</div> - <div class="num"><span class="finish">1000</span>涓囨敮</div> + <div class="num"> + <span v-if="activeTab4 == 0 && data1.currentOutNum" class="finish">{{ ((data1.currentOutDoneNum / + data1.currentOutNum) * 100).toFixed(1) }}</span> + <span v-if="activeTab4 == 1 && data1.currentInNum" class="finish">{{ ((data1.currentInDoneNum / + data1.currentInNum) * 100).toFixed(1) }}</span> + % + </div> </div> </div> </div> </div> <div class="center_box_two"> - <div ref="echartMap" class="echart_map" id="echartMap"></div> + <div class="list" style="z-index: 10000"> + <div class="item"> + <img src="@/assets/images/LogisticsCenter/car_zaitu@2x.png" alt=""> + <span>鍦ㄩ�旓細{{ data7.busyNum }}</span> + </div> + <div class="item"> + <img src="@/assets/images/LogisticsCenter/car_kongxian@2x.png" alt=""> + <span>绌洪棽锛歿{ data7.idleNum }}</span> + </div> + <div class="item"> + <img src="@/assets/images/LogisticsCenter/car_lixian@2x.png" alt=""> + <span>绂荤嚎锛歿{ data7.offlineNum }}</span> + </div> + </div> + <div class="echart_wrap" style="width: 100%;height: 100%"> + <div ref="echartMap" class="echart_map" id="echartMap"></div> + </div> + <div class="warnning_info" style="z-index: 10000"> + <div class="head" @click="isShowCarW = !isShowCarW"> + <img src="../assets/images/FireFighting/fire_right.png" alt=""> + <span>杞﹁締鎶ヨ</span> + </div> + <div v-if="isShowCarW" class="war_list"> + <div class="line" v-for="item in eventList"> + <div class="id_card">{{ item.carCode }}</div> + <div class="title">{{ item.title }}</div> + <div v-if="item.time">{{ item.time.slice(11) }}</div> + </div> + </div> + </div> + <div @click="openCloudAddr" class="monitoring" style="z-index: 10000"> + <img src="@/assets/images/ic_jiankong@2x.png" class="icon" alt=""> + <div>杞﹁締鐩戞帶骞冲彴</div> + <img class="top" src="@/assets/images/SecurityControl/ar_open@2x.png" alt=""> + </div> + </div> </div> <div class="right_box"> @@ -143,9 +218,9 @@ <div>鍑哄叆搴撴晥鐜�</div> </div> <div class="tabs"> - <div class="tab active">浠婃棩</div> + <div class="tab" :class="{ active: activeTab12 == 0 }" @click="tabClick12(0)">浠婃棩</div> <div class="separate"></div> - <div class="tab">鏈湀</div> + <div class="tab" :class="{ active: activeTab12 == 1 }" @click="tabClick12(1)">鏈湀</div> </div> <img src="@/assets/images/title@2x.png" class="bg" alt="" /> </div> @@ -154,14 +229,18 @@ <img src="@/assets/images/energy_ef/ic_chukuxiaolv@2x.png" alt=""> <div class="content"> <div class="name">鍑哄簱鏁堢巼</div> - <div class="num"><span>1000</span>涓囨敮/灏忔椂</div> + <div class="num"><span>{{ activeTab12 == 0 ? data1.todayOutRate || 0 : data1.monthOutRate || 0 + }}</span>涓囨敮/灏忔椂 + </div> </div> </div> <div class="item"> <img src="@/assets/images/energy_ef/ic_rukuxiaolv@2x.png" alt=""> <div class="content"> <div class="name">鍏ュ簱鏁堢巼</div> - <div class="num"><span class="today">1000</span>涓囨敮/灏忔椂</div> + <div class="num"><span class="today">{{ activeTab12 == 0 ? data1.todayInRate || 0 : data1.monthInRate + || 0 + }}</span>涓囨敮/灏忔椂</div> </div> </div> </div> @@ -177,32 +256,18 @@ <div class="content"> <div class="echart_wrap"> <div class="pie_text"> - <div class="fs30"><strong>300</strong></div> + <div class="fs30"><strong>{{ data5 }}</strong></div> <div>鍏ュ簱鏁伴噺</div> </div> <div class="echart" id="echart1"></div> </div> <div class="list"> - <div class="item"> + <div class="item" v-for="item, i in dataList5"> <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涓囨敮 | 55%</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涓囨敮 | 55%</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涓囨敮 | 55%</div> + <div :style="{ color: colors[i] }" class="num">{{ item.value }}涓囨敮 | {{ item.rate }}%</div> </div> </div> </div> @@ -218,25 +283,92 @@ <div class="repertory"> <div class="use_ratio"> <div class="header"> - <div>搴撳瓨閲� <span class="num">80/100</span></div> - <div>鍒╃敤鐜� 88%</div> + <div>搴撳瓨閲� <span class="num">{{ data6.num }}/{{ data6.totalNum }}</span></div> + <div v-if="data6.num && data6.totalNum">鍒╃敤鐜噞{ (data6.useRate * 100).toFixed(0) }}%</div> </div> - <Percent :rate="80" /> + <Percent v-if="data6.num && data6.totalNum" :rate="((data6.num / data6.totalNum) * 100).toFixed(0)" /> </div> - <div class="list"> - <div class="item"> - <div class="la">榛勫北(鏂板埗鐨栫儫)</div> - <div class="val">400涓囨敮</div> - </div> - <div class="item"> - <div class="la">榛勫北(鏂板埗鐨栫儫)</div> - <div class="val">400涓囨敮</div> + <div class="list two-swiper"> + <div class="swiper-wrapper"> + <div :class="{ orange: item.num < 200 }" class="item two-swiper-slide swiper-slide" + v-for="item in data6.stockList"> + <div class="la">{{ item.name }}</div> + <div class="val">{{ item.num }}{{item.name.indexOf('鎵樼洏') === -1 ? '涓囨敮' : '涓�'}}</div> + </div> </div> </div> </div> </div> </div> </div> + <!-- --> + <div class="modal" v-if="showModal"> + <div class="title_head"> + <img src="@/assets/images/energy_ef/chuku_ic_car@2x.png" alt=""> + <span>{{ activeCar.carCode }}</span> + </div> + <div class="info"> + <div class="item"> + <div class="dian"></div> + <div class="la">杩愯緭鍗曞彿锛�</div> + <div class="val">{{ activeCar.billCode }}</div> + </div> + <div class="item"> + <div class="dian"></div> + <div class="la">鍙告満淇℃伅锛�</div> + <div class="val">{{ activeCar.name }} {{ activeCar.phone }}</div> + </div> + <div class="item"> + <div class="dian"></div> + <div class="la">鎬昏繍杈撻噺锛�</div> + <div class="val" v-if="activeCar.totalNum">{{ activeCar.totalNum }}涓囨敮</div> + </div> + </div> + <div class="tabs"> + <div :class="{ active: modalTab == 0 }" @click="modalTabClick(0)" class="tab">浣滀笟淇℃伅</div> + <div :class="{ active: modalTab == 1 }" @click="modalTabClick(1)" class="tab">鍚堝悓鍒楄〃</div> + </div> + <div class="tab1" v-if="modalTab == 0"> + <template v-for="item, i in activeCar.logList"> + <div class="item" v-if="i < 4 || showMore"> + <div class="icon_wrap"> + <img v-if="i != 0" class="dian" src="@/assets/images/ic_dangqian@2x.png" alt=""> + <img v-else src="@/assets/images/ic_jindu@2x.png" class="dian_ac" alt=""> + <div v-if="i != activeCar.logList.length - 1" class="line"></div> + </div> + <div class="content"> + <div class="status" :class="{ ac: i == 0 }">{{ statusMapD[item.objType] }}</div> + <div class="text">{{ item.content }}</div> + <div class="time">{{ item.createDate }}</div> + </div> + </div> + </template> + <div class="more_btn" v-if="!showMore && activeCar.logList && activeCar.logList.length > 4" + @click="showMore = true">鏌ョ湅鏇村浣滀笟淇℃伅</div> + <div class="empty" v-if="!activeCar.contractList || activeCar.logList.contractList == 0"> + <img src="@/assets/images/default_nodata.png" alt=""> + </div> + </div> + <div class="tab2" v-if="modalTab == 1"> + <div class="list"> + <div class="item" v-for="item in activeCar.contractList"> + <div class="head"> + <div class="code">鍚堝悓鍙凤細<span v-if="item.detailList && item.detailList.length > 0">{{ + item.detailList[0].contractNum }}</span></div> + <div class="addr">鏀惰揣鍦帮細{{ item.address }}</div> + </div> + <div class="line" v-for="i in item.detailList"> + <div class="name">鐗╂枡鍚嶇О锛�<span class="val">{{ i.materialName }}</span></div> + <div class="num">鏁伴噺锛�<span class="val">{{ i.ioQty }}涓囨敮</span></div> + </div> + </div> + <div class="empty" v-if="!activeCar.contractList || activeCar.logList.contractList == 0"> + <img src="@/assets/images/default_nodata.png" alt=""> + </div> + </div> + </div> + </div> + <div class="modal_mask" v-if="showModal" @click="closeModal"></div> </div> </v-scale-screen> </template> @@ -248,7 +380,25 @@ import dayjs from 'dayjs' import * as echarts from 'echarts' import ahJSON from '@/assets/anhui.json' +import icKongxian from '@/assets/images/LogisticsCenter/map_car_kongxian@2x.png' +import icLixian from '@/assets/images/LogisticsCenter/map_car_lixian@2x.png' +import icZaitu from '@/assets/images/LogisticsCenter/map_car_zaitu@2x.png' +import { + wlcenterData, + wljobData, + wlplatformJobList, + wlstockList, + wltotalInList, + wltransportMeasure, + carsListPost, + getCarsJobDetails, + getJobDetailsById, + carsEventListP +} from '@/api' +import 'swiper/css/swiper.min.css' +import Swiper from 'swiper' +const statusMapD = ['浠诲姟鐢熸垚', '纭浠诲姟', '宸茬鍒�', '鍏ュ洯绛夊緟', '鏈堝彴鍙彿', '浣滀笟涓�', '浣滀笟瀹屾垚', '鏈堝彴杞Щ', '寮傚父鎸傝捣', '涓嬪彂鎺堟潈绂诲洯', '绂诲洯', '宸茶繃鍙�'] const colors = ['#FEAF01', '#01ABFE', '#51F9E4'] const weekMap = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�',] const date = ref(dayjs().format('YYYY.MM.DD')) @@ -261,7 +411,7 @@ }, 1000) -const arr = ['#68e2e3', '#50afd3', '#377cdb', '#d5ae3a'] + const initEnergy = () => { var myChart = echarts.init(document.querySelector('.energyRef')) // 缁樺埗鍥捐〃 @@ -270,10 +420,10 @@ itemGap: 12, // icon: 'circle', right: '12px', - top: '0', - data: ['鎬诲簱瀛�', '褰撳墠搴撳瓨', '搴撳瓨鍒╃敤鐜�'], - itemWidth: 20, - itemHeight: 10, + top: '10px', + data: ['璁″垝浠诲姟閲�', '浠诲姟瀹屾垚閲�', '璁″垝浠诲姟鏁�'], + itemWidth: 12, + itemHeight: 4, textStyle: { color: '#fff', borderColor: '#fff' @@ -283,42 +433,39 @@ left: '3%', right: '4%', bottom: '3%', - top: '16%', + top: '26%', containLabel: true }, tooltip: { trigger: 'axis' }, - xAxis: [{ - nameGap: 5, - type: 'category', - axisLine: { - show: true, - lineStyle: { - color: '#999' + xAxis: [ + { + nameGap: 5, + type: 'category', + axisLine: { + show: true, + lineStyle: { + color: '#999' + }, }, - }, - axisLabel: { - color: '#869CC9' - // fontSize: 24, - }, - axisTick: { - show: false, - }, - data: ['7.1', '7.1', '7.1', '7.1', '7.1'], - }], + axisLabel: { + color: '#869CC9' + }, + nameTextStyle: { + color: '#869CC9' // 鍥涗釜鏁板瓧鍒嗗埆涓轰笂鍙充笅宸︿笌鍘熶綅缃窛绂� + }, + axisTick: { + show: false, + }, + data: dataList2.value.map(i => i.planDateStrT), + } + ], yAxis: [ { - nameTextStyle: { - color: '#869CC9', - }, - offset: 0, name: '涓囨敮', + offset: 0, type: 'value', - axisLabel: { - show: true, - color: "#869CC9", - }, axisLine: { show: true, }, @@ -330,22 +477,38 @@ type: 'dashed' } }, + axisLabel: { + color: '#869CC9' + }, + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, 12] // 鍥涗釜鏁板瓧鍒嗗埆涓轰笂鍙充笅宸︿笌鍘熶綅缃窛绂� + }, }, { type: 'value', - name: '%', + name: '涓�', min: 0, - max: 100, - // interval: 5, axisLabel: { - formatter: '{value}%' + color: '#869CC9' }, - splitLine: false - } + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, -18] // 鍥涗釜鏁板瓧鍒嗗埆涓轰笂鍙充笅宸︿笌鍘熶綅缃窛绂� + }, + splitLine: { + show: false, + lineStyle: { + width: 1, + color: "rgba(49,105,129,0.4)", + type: 'dashed' + } + }, + }, ], series: [ { - name: '璁″垝瀹屾垚鏁伴噺', + name: '璁″垝浠诲姟閲�', type: 'bar', barWidth: 10, barGap: '60%', @@ -354,6 +517,7 @@ position: 'top', color: '#fff', }, + yAxisIndex: 0, itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { @@ -371,12 +535,13 @@ }, barBorderRadius: [3, 3, 0, 0], }, - data: [900, 438, 485, 631, 689] + data: dataList2.value.map(i => i.planTaskNum) }, { name: '浠诲姟瀹屾垚閲�', type: 'bar', barWidth: 10, + yAxisIndex: 0, label: { show: false, position: 'top', @@ -399,13 +564,14 @@ }, barBorderRadius: [3, 3, 0, 0], }, - data: [438, 485, 631, 689, 900] + data: dataList2.value.map(i => i.finishTaskNum) }, { name: '璁″垝浠诲姟鏁�', type: 'line', smooth: false, showAllSymbol: true, + yAxisIndex: 1, symbol: 'none', lineStyle: { color: "#1a43bc" @@ -415,7 +581,7 @@ position: 'top', color: '#fff', }, - data: [485, 631, 389, 224, 287] + data: dataList2.value.map(i => i.planTimes) } ] }) @@ -435,7 +601,19 @@ show: false, position: 'center' }, - padAngle: 5, + tooltip: { + trigger: 'none' + }, + emphasis: { + // 璁剧疆鎮诞鏃舵牱寮忎负绌� + scale: false, // 鍏抽棴鏀惧ぇ鏁堟灉 + itemStyle: { + shadowBlur: 0, // 闃村奖妯$硦搴︿负 0 + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0)', + }, + }, + padAngle: 3, itemStyle: { borderRadius: 10 }, @@ -443,11 +621,7 @@ labelLine: { show: false }, - data: [ - { value: 1048, name: 'Search Engine' }, - { value: 735, name: 'Direct' }, - { value: 580, name: 'Email' } - ] + data: dataList5.value } ] } @@ -459,37 +633,78 @@ const echartMap = ref() const initMap = () => { + console.log('----') + var myChart = echarts.init(echartMap.value) echarts.registerMap('js', ahJSON) - var center = { - '鍚堣偉甯�': [117.25, 31.83], - '婊佸窞甯�': [118.32, 32.3], - '鑺滄箹甯�': [118.43, 31.35], - '闃滈槼甯�': [115.38, 32.89], - '铓屽煚甯�': [117.39, 32.92], - '娣崡甯�': [116.99, 32.63], - '椹瀺灞卞競': [118.5, 31.71], - '瀹夊簡甯�': [117.05, 30.52], - '榛勫北甯�': [118.33, 29.71], - '閾滈櫟甯�': [117.81, 30.94], - '瀹垮窞甯�': [116.98, 33.64], - '娣寳甯�': [116.8, 33.9], - '鍏畨甯�': [116.51, 31.75], - '姹犲窞甯�': [117.49, 30.66], - '瀹e煄甯�': [118.76, 30.94], - '浜冲窞甯�': [115.78, 33.84], + const scatterData = data7.value.carsList.map(item => { + return { + name: item.terminalId, + img: item.jobStatus == 2 ? icLixian : item.jobStatus == 1 ? icZaitu : icKongxian, + data: [{ code: item.plateNum, value: [item.longitude, item.latitude] }] + } + }) + // var scatterData = [ + // { + // name: '骞煎効鍥�', + // num: 15, + // // color: ['#1984ff', '#184b8d'], + // img: icKongxian, + // data: [ + // { name: 'asdasdas ', value: [117.25, 31.49] }, + // ], + // }, + // ] + let serData = [] + scatterData.forEach((item) => { + serData.push({ + name: `${item.name}`, + type: 'effectScatter', + coordinateSystem: 'geo', + effectType: 'ripple', + showEffectOn: 'render', + // 鏁g偣鏍峰紡 + rippleEffect: { + period: 1, + scale: 1, + brushType: 'fill' + }, + // 鏁g偣澶у皬 鑷畾涔夋暎鐐瑰浘鐗� + // symbol: `image://${item.img}`, + symbol: `image://${item.img}`, + label: { + show: true, + formatter: '{b|{b}}', + position: 'top', + distance: -1, + rich: { + b: { + color: "#fff", + fontSize: 14, + height: 30, + // width: 200, + padding: 5, + }, + } + }, + symbolSize: [32, 40], + hoverAnimation: true, + zlevel: 99, + data: item.data, + }) } + ) var data = [ { name: "鍚堣偉甯�", value: 3 }, { name: "婊佸窞甯�", value: 0 }, { name: "鑺滄箹甯�", value: 1 }, { name: "闃滈槼甯�", value: 0 }, - { name: "铓屽煚甯�", value: 0 }, + { name: "铓屽煚甯�", value: 4 }, { name: "娣崡甯�", value: 0 }, - { name: "椹瀺灞卞競", value: 0 }, - { name: "瀹夊簡甯�", value: 0 }, + { name: "椹瀺灞卞競", value: 6 }, + { name: "瀹夊簡甯�", value: 2 }, { name: "榛勫北甯�", value: 0 }, - { name: "閾滈櫟甯�", value: 0 }, + { name: "閾滈櫟甯�", value: 40 }, { name: "瀹垮窞甯�", value: 0 }, { name: "娣寳甯�", value: 0 }, { name: "鍏畨甯�", value: 0 }, @@ -507,17 +722,6 @@ color: '#ffffff' } }, - - tooltip: { - trigger: 'item', - formatter: function (params) { - if (typeof (params.value)[2] == "undefined") { - return params.name + ' : ' + params.value - } else { - return params.name + ' : ' + params.value[2] - } - } - }, visualMap: { show: false, max: 100, @@ -528,22 +732,26 @@ }, geo: [{ map: 'js', - roam: false, //鏄惁鍏佽缂╂斁 - zoom: 1.1, //榛樿鏄剧ず绾у埆 + roam: true, //鏄惁鍏佽缂╂斁 + zoom: 1.2, //榛樿鏄剧ず绾у埆 scaleLimit: { min: 0, - max: 3 + max: 50 }, //缂╂斁绾у埆 + label: { + show: true, // 濮嬬粓鏄剧ず鏂囧瓧 + color: '#fff' // 璁剧疆鏂囧瓧棰滆壊 + }, itemStyle: { normal: { - areaColor: 'transparent', - borderColor: '#3fdaff', - borderWidth: 2, - shadowColor: 'rgba(63, 218, 255, 0.5)', - shadowBlur: 30 + areaColor: '#1d3b60', + borderColor: '#428598', + borderWidth: 1, + // shadowColor: 'rgba(63, 218, 255, 0.5)', + // shadowBlur: 30 }, emphasis: { - areaColor: '#2B91B7', + areaColor: '#5bc7d5', } }, tooltip: { @@ -559,7 +767,7 @@ symbolSize: 14, label: { normal: { - show: true, + show: false, formatter: function (params) { return '{fline|鍦扮偣锛�' + params.data.city + '}\n{tline|' + (params.data.info || '鍙戠敓xx闆嗕欢') + '}' }, @@ -589,47 +797,232 @@ } }, - //鍦板浘 + /* //鍦板浘 { type: 'map', mapType: 'js', geoIndex: -1, - zoom: 1.1, //榛樿鏄剧ず绾у埆 + zoom: 1.2, //榛樿鏄剧ず绾у埆 + // roam: true, // 寮�鍚缉鏀惧拰骞崇Щ label: { show: true, color: '#ffffff', - emphasis: { - color: 'white', - show: false - } + }, itemStyle: { normal: { - borderColor: '#2980b9', + borderColor: '#428598', borderWidth: 1, areaColor: '#1d3b60' }, emphasis: { - areaColor: '#FA8C16', - borderWidth: 0, - color: 'green' + disabled: true, + // areaColor: '#FA8C16', + // borderWidth: 1, + // color: '#428598', + label: { + show: true, // 濮嬬粓鏄剧ず鏂囧瓧 + color: '#fff' // 璁剧疆鏂囧瓧棰滆壊 + }, + areaColor: null } }, data: data - } + },*/ + ...serData, ] } myChart.setOption(option) + myChart.on('click', function (params) { + const item = params.data + getCarsJobDetails({ carCode: item.code }).then(res => { + // getCarsJobDetails({ id: item.id }).then(res => { + // getCarsJobDetails({ carCode: '鐨朅E5277' }).then(res => { + showModal.value = true + activeCar.value = { ...res.data, carCode: item.code } + }) + }) window.addEventListener('resize', function () {//鎵ц myChart.resize() }) } +const activeCar = ref({}) +const showModal = ref(false) +const modalTab = ref(0) +const showMore = ref(false) +const modalTabClick = (val) => { + modalTab.value = val +} +const closeModal = () => { + showModal.value = false + activeCar.value = {} +} +const taskClick = (item) => { + // getCarsJobDetails({ carCode: item.carCodeFront }).then(res => { + getJobDetailsById({ id: item.id }).then(res => { + // getCarsJobDetails({ carCode: '鐨朅E5277' }).then(res => { + showModal.value = true + activeCar.value = { ...res.data, carCode: item.carCodeFront } + }) +} +const openCloudAddr = () => { + window.open('https://vms.hikvisionauto.com:8040/', '_blank') +} + + +const data1 = ref({}) +const activeTab1 = ref(0) +const activeTab12 = ref(0) +const tabClick1 = (val) => { + activeTab1.value = val +} +const tabClick12 = (val) => { + activeTab12.value = val +} +const getData1 = () => { + wlcenterData().then(res => { + const result = res.data + data1.value = result + }) +} + +const dataList2 = ref([]) +const activeTab2 = ref(0) +const tabClick2 = (val) => { + activeTab2.value = val + getData2() +} +const getData2 = () => { + wltransportMeasure({ queryType: activeTab2.value }).then(res => { + const result = res.data || [] + dataList2.value = result + dataList2.value.forEach(item => { + item.planDateStrT = activeTab2.value == 2 ? dayjs(item.planDate).format('M') : dayjs(item.planDate).format('M.D') + }) + initEnergy() + }) +} + +const dataList3 = ref([]) +const statusMap = [ + { value: 0, label: '寰呯‘璁�' }, + { value: 1, label: '寰呯鍒�' }, + { value: 2, label: '绛夊緟鍙彿' }, + { value: 3, label: '鍏ュ洯绛夊緟' }, + { value: 4, label: '鏈堝彴绛夊緟' }, + { value: 5, label: '浣滀笟涓�' }, + { value: 6, label: '浣滀笟瀹屾垚' }, + { value: 7, label: '杞Щ涓�' }, + { value: 8, label: '寮傚父鎸傝捣' }, + { value: 9, label: '宸叉巿鏉冪鍥�' }, + { value: 10, label: '宸茬鍥�' }, + { value: 11, label: '宸茶繃鍙�' }, + { value: 12, label: '宸插彇娑�' }, +] +const getData3 = () => { + wlplatformJobList().then(res => { + const result = res.data + dataList3.value = result + }) +} +const activeTab4 = ref(0) +const tabClick4 = (val) => { + activeTab4.value = val +} +const dataList5 = ref([]) +const data5 = ref(0) +const getData5 = () => { + wltotalInList().then(res => { + const result = res.data || [] + let count = 0 + dataList5.value = result.map(i => { + i.value = i.num + count += i.num + return i + }) + dataList5.value.forEach(i => { + i.rate = count == 0 ? 0 : ((i.num / count) * 100).toFixed(0) + }) + data5.value = count + console.log(data5.value) + initEchart1() + }) +} +const data6 = ref({}) +const getData6 = () => { + wlstockList().then(res => { + const result = res.data || [] + data6.value = result + }) +} + +const isShowCarW = ref(false) +const data7 = ref({}) +const eventList = ref([]) +const getData7 = () => { + carsListPost().then(res => { + const result = res.data || {} + data7.value = result + initMap() + }, () => { + data7.value = { + carsList: [] + } + initMap() + }) + carsEventListP().then(res => { + eventList.value = res.data || [] + }) +} + +const autoplayFlag = (list = [], leng = 4, time = 2000) => { + if (list.length > leng) { + return { delay: time, disableOnInteraction: false } + } else { + return false + } +} +const loopFn1 = () => { + var newSwiper1 = new Swiper('.one-swiper', { + initialSlide: 0, + direction: 'vertical', //绔栫洿鏂瑰悜 + slidesPerView: 7, + autoplay: autoplayFlag(dataList3.value, 7, 2000), + observer: true, //淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiperiper + }) +} +const loopFn2 = () => { + var newSwiper1 = new Swiper('.two-swiper', { + initialSlide: 0, + direction: 'vertical', //绔栫洿鏂瑰悜 + slidesPerView: 6, + autoplay: autoplayFlag(data6.value.stockList, 6, 2000), + observer: true, //淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiperiper + }) +} onMounted(() => { - initEnergy() - initEchart1() - initMap() + getData1() + getData2() + getData3() + getData5() + getData6() + getData7() + + setInterval(() => { + getData1() + getData2() + getData3() + getData5() + getData6() + getData7() + }, 1000 * 60 * 10) + + setTimeout(() => { + loopFn1() + loopFn2() + }, 12000) }) @@ -638,6 +1031,10 @@ <style lang="scss" scoped> div { box-sizing: border-box; +} + +.swiper-wrapper { + display: block !important; } .main_content { @@ -664,15 +1061,15 @@ .num { margin-right: 10px; font-weight: bold; - font-size: 46px; - height: 44px; - line-height: 52px; + font-size: 44px; + height: 48px; + line-height: 50px; font-weight: bold; color: #00F2F3; letter-spacing: 3px; background-image: -webkit-linear-gradient(top, - #01D9FE 0%, - #0177FE 60%, + #1cdafb 0%, + #0177FE 70%, #0177FE 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -750,20 +1147,22 @@ .list_wrap { padding: 10px 0; + .list_temp { + height: 210px !important; + overflow: hidden; + } + .list { .line { display: flex; - height: 30px; + height: 30px !important; align-items: center; padding: 0 10px; font-size: 12px; + cursor: pointer; &:nth-of-type(2n) { background: rgba(27, 64, 97, 0.52); - - .flag_bg { - background: #01ABFE !important; - } } .item { @@ -777,7 +1176,7 @@ flex: 3; display: flex; - .flag_bg { + span { width: 22px; height: 22px; display: flex; @@ -787,6 +1186,10 @@ background: #00F2F3; font-weight: 500; color: #001B3C; + } + + .flag_bg { + background: #4eacf6; } } @@ -800,7 +1203,8 @@ } .time { - flex: 8; + flex: 6; + margin-left: 6px; } } } @@ -825,6 +1229,7 @@ display: flex; align-items: center; margin-right: 30px; + cursor: pointer; img { width: 20px; @@ -849,12 +1254,13 @@ .static_wrap { display: flex; - justify-content: space-between; align-items: center; margin: 30px 0 54px; .item { display: flex; + justify-content: center; + flex: 1; img { width: 68px; @@ -900,15 +1306,126 @@ } } } + .center_box_three{ + } .center_box_two { flex: 1; width: 100%; + position: relative; - .echart_map { - width: 100%; + .list { + position: absolute; + top: 10px; + left: 20px; + + .item { + display: flex; + align-items: center; + font-weight: 500; + font-size: 20px; + margin-bottom: 18px; + + img { + width: 36px; + height: 36px; + margin-right: 15px; + } + } + } + + .echart_wrap { + width: 86%; height: 100%; + + .echart_map { + width: 100%; + height: 100%; + /* transform: rotate(60deg); */ + } + } + + .warnning_info { + position: absolute; + right: 0; + bottom: 0; + border-top: 1px solid #5ecbce; + border-bottom: 1px solid #5ecbce; + background: rgba(0, 30, 63, 0.4); + /* backdrop-filter: blur(5px); */ + + .head { + display: flex; + width: 280px; + height: 57px; + display: flex; + align-items: center; + padding-left: 10px; + font-weight: bold; + font-size: 16px; + cursor: pointer; + + img { + width: 14px; + margin-right: 10px; + } + } + + .war_list { + max-height: 300px; + overflow: auto; + padding-left: 10px; + padding-bottom: 12px; + + .line { + font-size: 13px; + color: #D2E0FF; + display: flex; + align-items: center; + height: 30px; + + div { + flex: 3; + } + + .id_card { + color: #00F2F3; + } + + .title { + flex: 4; + } + } + } + } + + .monitoring { + position: absolute; + cursor: pointer; + bottom: 10px; + left: 0; + display: flex; + align-items: center; + justify-content: center; + font-weight: 500; + font-size: 15px; + width: 156px; + height: 40px; + background: linear-gradient(180deg, rgba(0, 148, 235, 0.68) 0%, rgba(0, 148, 235, 0) 100%); + border-radius: 2px; border: 1px solid; + border-image: linear-gradient(180deg, rgba(177, 210, 255, 0.64), rgba(0, 171, 255, 0.7)) 1 1; + + .icon { + width: 16px; + height: 16px; + margin-right: 10px; + } + + .top { + width: 7px; + margin-left: 6px; + } } } } @@ -981,7 +1498,6 @@ justify-content: center; align-items: center; height: 200px; - border: 1px solid; .echart_wrap { position: relative; @@ -1067,12 +1583,16 @@ .list { margin-top: 22px; + height: 216px; + overflow: hidden; + scrollbar-width: none; .item { width: 100%; - height: 36px; + height: 36px !important; display: flex; align-items: center; + font-size: 14px; &:nth-of-type(2n+1) { background: rgba(0, 152, 255, 0.13); @@ -1086,6 +1606,10 @@ .val { flex: 2; } + } + + .orange { + color: #FF5728; } } } @@ -1190,6 +1714,10 @@ margin: 0 6px; } + .tab { + cursor: pointer; + } + .active { color: #0094eb; } @@ -1218,6 +1746,248 @@ } } +.modal { + width: 600px; + height: 556px; + background: rgba(0, 30, 63, 0.5); + backdrop-filter: blur(5px); + position: fixed; + top: 20%; + left: 50%; + transform: translate(-50%, 0); + z-index: 999; + padding: 24px; + + .title_head { + display: flex; + align-items: center; + font-weight: bold; + font-size: 17px; + margin-bottom: 20px; + + img { + width: 20px; + margin-right: 4px; + } + } + + .info { + display: flex; + flex-wrap: wrap; + + .item { + display: flex; + align-items: center; + font-size: 13px; + width: 55%; + margin-bottom: 8px; + + &:nth-of-type(2n+1) { + width: 45%; + } + + .dian { + width: 4px; + height: 4px; + background-color: #fff; + border-radius: 50%; + margin-right: 4px; + } + + .la { + color: #01D9FE; + } + } + } + + .tabs { + display: flex; + border-bottom: 1px solid rgba(255, 255, 255, 0.16); + margin: 0 -24px; + margin-bottom: 20px; + padding-left: 12px; + + .tab { + color: #869CC9; + font-size: 14px; + margin-right: 12px; + width: 80px; + height: 42px; + display: flex; + align-items: center; + justify-content: center; + border-bottom: 2px solid #06182e; + cursor: pointer; + } + + .active { + font-weight: 500; + font-size: 15px; + color: #00F2F3; + border-bottom: 2px solid #00F2F3; + } + } + + .tab1 { + height: 360px; + overflow: auto; + + .more_btn { + width: 116px; + height: 25px; + border-radius: 2px; + border: 1px solid #D2E0FF; + font-size: 12px; + display: flex; + align-items: center; + justify-content: center; + color: D2E0FF; + margin-left: 30px; + margin-top: 12px; + cursor: pointer; + } + + + .item { + display: flex; + + &:nth-last-child(1) { + .content { + .time { + padding-bottom: 0; + } + } + } + + .icon_wrap { + width: 24px; + margin-right: 10px; + display: flex; + flex-direction: column; + align-items: center; + + .dian { + width: 12px; + height: 12px; + } + + .dian_ac { + width: 24px; + height: 24px; + } + + .line { + width: 1px; + height: 100%; + border: 1px dashed #8a9bc5; + } + } + + .content { + font-size: 13px; + color: #D2E0FF; + + .status { + font-weight: 500; + font-size: 14px; + margin-bottom: 5px; + color: #fff; + } + + .ac { + color: #00F2F3; + } + + .text { + margin-bottom: 4px; + } + + .time { + font-size: 12px; + padding-bottom: 12px; + } + } + } + } + + .tab2 { + height: 360px; + overflow: auto; + + .list { + .item { + width: 560px; + background: rgba(1, 171, 254, 0.1); + font-size: 12px; + color: #D2E0FF; + padding: 10px; + margin-bottom: 10px; + + .head { + display: flex; + justify-content: space-between; + align-items: center; + height: 36px; + line-height: 36px; + border-bottom: 1px solid rgba(255, 255, 255, 0.16); + margin-bottom: 10px; + padding-right: 10px; + + .code { + font-weight: 500; + font-size: 14px; + color: #00F2F3; + } + } + + .line { + display: flex; + align-items: center; + margin-bottom: 8px; + + &:nth-last-child(1) { + margin-bottom: 0; + } + + .name { + flex: 4; + } + + .num { + flex: 3; + } + + .val { + color: #fff; + } + } + } + } + } + + .empty { + display: flex; + justify-content: center; + align-items: center; + height: 340px; + + img { + width: 144px; + } + } +} + +.modal_mask { + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 99; + background-color: rgba(0, 0, 0, 0.1); + /* background-color: red; */ +} + .bg { position: absolute; left: 0; @@ -1227,4 +1997,4 @@ object-fit: cover; z-index: -1; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3