From 3af254f1b36e7722673fcebe110da524b276105c Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期一, 30 十二月 2024 17:56:04 +0800 Subject: [PATCH] 最新版本541200007 --- screen/src/views/LogisticsCenter.vue | 702 ++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 441 insertions(+), 261 deletions(-) diff --git a/screen/src/views/LogisticsCenter.vue b/screen/src/views/LogisticsCenter.vue index 4635785..67df9d5 100644 --- a/screen/src/views/LogisticsCenter.vue +++ b/screen/src/views/LogisticsCenter.vue @@ -3,8 +3,8 @@ <div class="main_app"> <img src="@/assets/images/LogisticsCenter/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> + <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> @@ -21,6 +21,7 @@ <img src="@/assets/images/title@2x.png" class="bg" alt="" /> </div> <div class="left_box_one"> + <Loading v-if="loading1" /> <div class="second_title"> <div class="title"> <img src="@/assets/images/LogisticsCenter/ic_title@2x.png" class="icon" alt="" /> @@ -36,7 +37,7 @@ </div> <div class="content_wrap"> <div class="num_wrap"> - <div class="num_list" v-if="StockOutData.currentNum"> + <div class="num_list" v-if="StockOutData.currentNum || StockOutData.currentNum == 0"> <div class="num" v-for="i in StockOutData.currentNum + ''"> {{ i }} <img class="bg" src="@/assets/images/LogisticsCenter/bg_number@2x.png" alt=""> @@ -89,7 +90,7 @@ <div class="second_title"> <div class="title"> <img src="@/assets/images/LogisticsCenter/ic_title@2x.png" class="icon" alt="" /> - <div>褰撳墠杩愯緭浠诲姟</div> + <div>褰撳墠璁㈠崟浠诲姟</div> </div> <div class="search_wrap"> <img src="@/assets/images/LogisticsCenter/ic_search@2x.png" alt=""> @@ -100,9 +101,9 @@ </div> <div class="list_wrap"> <div class="header line"> - <span class="item">杩愯緭杞﹁締</span> - <span class="item status">鐘舵��</span> - <span class="item">浣嶇疆</span> + <span class="item">鍚堝悓鍙�</span> + <span class="item status">璁㈠崟鐘舵��</span> + <span class="item">鐩殑鍦�</span> <span class="item">浠诲姟涓嬭揪鏃堕棿</span> </div> <div class="one-swiper list"> @@ -117,7 +118,12 @@ </div> </div> </div> - + <template v-if="isLoadingTask || transportTask.length == 0"> + <Loading v-if="isLoadingTask" /> + <div class="empty" v-else> + <img src="@/assets/images/default_nodata.png" alt=""> + </div> + </template> </div> </div> </div> @@ -172,7 +178,7 @@ </div> <div class="footer"> <div class="wrap"> - <div class="content"> + <div class="content" :style='{ width: cneterData.level1 }'> <div class="scale">0</div> <!-- <div class="node"> <div>8h</div> @@ -181,40 +187,57 @@ <div class="icon icon2"></div> </div> </div> --> - <div class="box"> - <div class="tag"> + <div :style="{ width: cneterData.level3 }" + :class="{ box23: cneterData.crrentOutNum >= cneterData.hoursAbility }" class="box"> + <div v-if="cneterData.crrentOutNum < cneterData.hoursAbility" class="tag"> <div class="icon"></div> <span>浠婃棩鍑哄簱</span> </div> </div> - <div class="box box1"> - <div class="tag tag1"> + <div :style="{ width: cneterData.level2 }" class="box box1"> + <div v-if="cneterData.hoursAbility >= cneterData.currentPlanNum" class="tag tag1"> <div class="icon"></div> <span>褰撴棩璁″垝</span> </div> </div> </div> - <!-- <div class="side"> - <div class="box"></div> + <div class="side"> + <div v-if="cneterData.crrentOutNum >= cneterData.hoursAbility" :style="{ width: cneterData.level33 }" + class="box box22"> + <div class="tag"> + <div class="icon"></div> + <span>浠婃棩鍑哄簱</span> + </div> + </div> + <div v-if="cneterData.hoursAbility <= cneterData.currentPlanNum" + :style="{ width: cneterData.level22 }" class="box box1 box11"> + <div class="tag tag1"> + <div class="icon"></div> + <span>褰撴棩璁″垝</span> + </div> + </div> + <!-- <div class="box"></div> --> <div class="scale" style="left: -12px;">8h</div> <div class="scale scale1">鏈�澶�</div> - </div> --> + </div> </div> </div> </div> <div class="center_box_two"> <div class="echart_map" ref="mapEchart" id="echart_map"></div> - <div v-if="showModal1" @click="showModal1 = false" class="modal1"> - <div class="list"> + <div v-if="showModal1" class="modal1"> + <div class="content"> <div class="head line"> <div class="item">杞︾墝鍙�</div> - <div class="item contract">鍚堝悓鍙�</div> - <div class="item">鐩殑鍦�</div> + <div class="item">鍚堝悓鍙�</div> + <div class="item addr">鐩殑鍦�</div> </div> - <div class="line" v-for="item in active1List"> - <div class="item">{{ item.platNumber }}</div> - <div class="item contract">{{ item.contractNumber }}</div> - <div class="item">{{ item.repertotyName }}</div> + <div class="list"> + <div class="line" v-for="item in active1List"> + <div class="item">{{ item.platNumber }}</div> + <div class="item">{{ item.contractNumber }}</div> + <div class="item addr">{{ item.repertotyName }}</div> + </div> </div> </div> </div> @@ -254,7 +277,7 @@ </div> <div class="side"> 鍏ㄧ渷锛� - <span>{{ data5.totalNum }}</span> + <span>{{ data5.currentNum }}</span> <span class="unit">涓囨敮 | </span> <span v-if="data5.totalNum">{{ ((data5.currentNum / data5.totalNum) * 100).toFixed(1) }}%</span> </div> @@ -269,7 +292,12 @@ <img src="@/assets/images/LogisticsCenter/ic_title@2x.png" class="icon" alt="" /> <div>鍑哄簱鑳藉姏鍒╃敤鐜�</div> </div> - <div class="side">鍏ㄧ渷锛�<span>100<span class="unit">涓囨敮 |</span> 40.6%</span></div> + <div class="side"> + 鍏ㄧ渷锛� + <span>{{ data6.currentNum }}</span> + <span class="unit">涓囨敮 | </span> + <span v-if="data6.totalNum">{{ ((data6.currentNum / data6.totalNum) * 100).toFixed(1) }}%</span> + </div> </div> <div class="echart5_wrap"> <div class="echart5" id="echart6"></div> @@ -279,9 +307,14 @@ <div class="second_title"> <div class="title"> <img src="@/assets/images/LogisticsCenter/ic_title@2x.png" class="icon" alt="" /> - <div>杩愮敤璧勬簮鍒╃敤鐜�</div> + <div>杩愬姏璧勬簮鍒╃敤鐜�</div> </div> - <div class="side">鍏ㄧ渷锛�<span>100<span class="unit">涓囨敮 |</span> 40.6%</span></div> + <div class="side"> + 鍏ㄧ渷锛� + <span>{{ data7.currentNum }}</span> + <span class="unit">杈� | </span> + <span v-if="data7.totalNum">{{ ((data7.currentNum / data7.totalNum) * 100).toFixed(1) }}%</span> + </div> </div> <div class="echart5_wrap"> <div class="echart5" id="echart7"></div> @@ -292,8 +325,11 @@ <!-- --> <div class="modal_wrap" v-if="showModal"> <div class="title_head"> - <img src="@/assets/images/energy_ef/chuku_ic_car@2x.png" alt=""> - <span>鍚堝悓鍙凤細{{ modalInfo.contractNumber }}</span> + <div class="left"> + <img src="@/assets/images/energy_ef/chuku_ic_car@2x.png" alt=""> + <span>鍚堝悓鍙凤細{{ modalInfo.contractNumber }}</span> + </div> + <div class="tit_status">{{ modalInfo.orderStatusDesc }}</div> </div> <div class="info"> <div class="item"> @@ -334,7 +370,8 @@ </div> <div id="map-container" ref="mapContainer"></div> <div class="fu_list"> - <div class="fu_item" v-for="item, i in modalInfo.cicleStatusList"> + <div class="fu_item" v-for="item, k in modalInfo.cicleStatusList"> + <view v-if="k != modalInfo.cicleStatusList.length - 1" class="separate"></view> <div class="item_title"> <div class="icon"> <img v-if="item.key == 0 && k != 0" src="@/assets/images/LogisticsCenter/ic_dingdan@2x.png" @@ -369,7 +406,7 @@ <div v-else class="icon_wrap"></div> <div class="text" :class="{ placeholder3: k == 0 && i == 0 }"> {{ ite.orderStatusDes }} - <text v-if="ite.tel">锛屽彂璐т粨搴撶數璇濓細</text> + <text v-if="ite.tel">,鍙戣揣浠撳簱鐢佃瘽锛�</text> <text v-if="ite.tel" class="primaryColor">{{ ite.tel }}</text> </div> </div> @@ -378,8 +415,9 @@ </div> </div> </div> + <Loading v-if="modalLoading" /> </div> - <div class="modal_mask" v-if="showModal" @click="showModal = false"></div> + <div class="modal_mask" v-if="showModal || showModal1" @click="closeModal"></div> </div> </v-scale-screen> </template> @@ -396,9 +434,12 @@ import chinaJSON from '@/assets/china.json' import fahuoImg from '@/assets/images/LogisticsCenter/ic_fahuodi@2x.png' import shouImg from '@/assets/images/LogisticsCenter/ic_huowu@2x.png' +// import Loading from 'vue-loading-overlay' +// import 'vue-loading-overlay/dist/css/index.css' +import Loading from '@/components/Loading.vue' + import { getStoreOperationList, - getStorearriveGoodsList, getStorecenterData, getStoreenergyDataList, getStorelastMonthOil, @@ -424,68 +465,7 @@ time.value = dayjs().format('HH:mm:ss') }, 1000) - -const initEchart2 = () => { - const myChart = echarts.init(document.getElementById('echart1')) - const option = { - series: [ - { - type: 'pie', - radius: ['86%', '100%'], - label: { - show: false, - position: 'center' - }, - padAngle: 5, - itemStyle: { - borderRadius: 10 - }, - color: colors, - labelLine: { - show: false - }, - data: [ - { value: 1048, name: 'Search Engine' }, - { value: 735, name: 'Direct' }, - { value: 580, name: 'Email' } - ] - } - ] - } - myChart.setOption(option) - window.addEventListener('resize', function () { // 鎵ц - myChart.resize() - }) -} -const initEchart3 = () => { - const myChart = echarts.init(document.getElementById('echart3')) - const option = { - tooltip: { - trigger: 'item' - }, - series: [ - { - type: 'pie', - radius: ['80%', '96%'], - label: { - show: false, - position: 'center' - }, - color: ['#72ecc5', '#19373a'], - labelLine: { - show: false - }, - data: [3, 7] - } - ] - } - myChart.setOption(option) - window.addEventListener('resize', function () { // 鎵ц - myChart.resize() - }) -} - -// +// const mapList = ref([]) const mapEchart = ref() const initMap = () => { @@ -501,48 +481,49 @@ { value: [103.9526, 30.7617, 1901], itemStyle: { color: '#fff' }, name: '鍥涘窛', total: 18, bj: 0, yj: 0, yx: 18, tj: 0, dw: 0 } ] const mapData = [ - { name: '鍖椾含甯�', value: 0 }, - { name: '澶╂触甯�', value: 0 }, - { name: '涓婃捣甯�', value: 0 }, - { name: '閲嶅簡甯�', value: 0 }, - { name: '娌冲寳鐪�', value: 0 }, - { name: '娌冲崡鐪�', value: 0 }, - { name: '浜戝崡鐪�', value: 0 }, - { name: '杈藉畞鐪�', value: 0 }, - { name: '榛戦緳姹熺渷', value: 0 }, - { name: '婀栧崡鐪�', value: 0 }, - { name: '瀹夊窘鐪�', value: 0 }, - { name: '灞变笢鐪�', value: 0 }, - { name: '鏂扮枂缁村惥灏旇嚜娌诲尯', value: 0 }, - { name: '姹熻嫃鐪�', value: 0 }, - { name: '娴欐睙鐪�', value: 0 }, - { name: '姹熻タ鐪�', value: 0 }, - { name: '婀栧寳鐪�', value: 0 }, - { name: '骞胯タ澹棌鑷不鍖�', value: 0 }, - { name: '鐢樿們鐪�', value: 0 }, - { name: '灞辫タ鐪�', value: 0 }, - { name: '鍐呰挋鍙よ嚜娌诲尯', value: 0 }, - { name: '闄曡タ鐪�', value: 0 }, - { name: '鍚夋灄鐪�', value: 0 }, - { name: '绂忓缓鐪�', value: 0 }, - { name: '璐靛窞鐪�', value: 0 }, - { name: '骞夸笢鐪�', value: 0 }, - { name: '闈掓捣鐪�', value: 0 }, - { name: '瑗胯棌鑷不鍖�', value: 0 }, - { name: '瀹佸鍥炴棌鑷不鍖�', value: 0 }, - { name: '鍥涘窛鐪�', value: 0 }, - { name: '瀹佸鐪�', value: 0 }, - { name: '娴峰崡鐪�', value: 0 }, - { name: '鍙版咕鐪�', value: 0 }, - { name: '棣欐腐鐗瑰埆琛屾斂鍖�', value: 0 }, - { name: '婢抽棬鐗瑰埆琛屾斂鍖�', value: 0 }, + { name: '鍖椾含甯�',code:'110000', value: 0 }, + { name: '澶╂触甯�',code:'120000', value: 0 }, + { name: '涓婃捣甯�', code:'310000',value: 0 }, + { name: '閲嶅簡甯�', code:'500000',value: 0 }, + { name: '娌冲寳鐪�',code:'130000', value: 0 }, + { name: '娌冲崡鐪�',code:'410000', value: 0 }, + { name: '浜戝崡鐪�',code:'530000', value: 0 }, + { name: '杈藉畞鐪�',code:'210000', value: 0 }, + { name: '榛戦緳姹熺渷', code:'230000',value: 0 }, + { name: '婀栧崡鐪�',code:'430000', value: 0 }, + { name: '瀹夊窘鐪�', code:'340000',value: 0 }, + { name: '灞变笢鐪�',code:'370000', value: 0 }, + { name: '鏂扮枂缁村惥灏旇嚜娌诲尯', code:'650000',value: 0 }, + { name: '姹熻嫃鐪�',code:'320000', value: 0 }, + { name: '娴欐睙鐪�', code:'330000', value: 0 }, + { name: '姹熻タ鐪�', code:'360000', value: 0 }, + { name: '婀栧寳鐪�', code:'420000', value: 0 }, + { name: '骞胯タ澹棌鑷不鍖�',code:'450000', value: 0 }, + { name: '鐢樿們鐪�', code:'620000', value: 0 }, + { name: '灞辫タ鐪�', code:'140000', value: 0 }, + { name: '鍐呰挋鍙よ嚜娌诲尯', code:'150000', value: 0 }, + { name: '闄曡タ鐪�', code:'610000', value: 0 }, + { name: '鍚夋灄鐪�',code:'220000', value: 0 }, + { name: '绂忓缓鐪�', code:'350000', value: 0 }, + { name: '璐靛窞鐪�', code:'520000', value: 0 }, + { name: '骞夸笢鐪�', code:'440000', value: 0 }, + { name: '闈掓捣鐪�', code:'630000', value: 0 }, + { name: '瑗胯棌鑷不鍖�',code:'540000', value: 0 }, + { name: '瀹佸鍥炴棌鑷不鍖�',code:'640000', value: 0 }, + { name: '鍥涘窛鐪�',code:'510000', value: 0 }, + { name: '瀹佸鐪�', code:'640000',value: 0 }, + { name: '娴峰崡鐪�', code:'460000',value: 0 }, + { name: '鍙版咕鐪�', code:'710000',value: 0 }, + { name: '棣欐腐鐗瑰埆琛屾斂鍖�', code:'810000',value: 0 }, + { name: '婢抽棬鐗瑰埆琛屾斂鍖�', code:'820003',value: 0 }, + { name: '鍗楁捣璇稿矝', code:'',value: 0 }, ] mapData.forEach(item => { item.monthNum = 0 item.yearNum = 0 mapList.value.forEach(ite => { - if (item.name == ite.name) { - item.value = ite.value + if (item.code == ite.code) { + item.value = ite.yearNum item.monthNum = ite.monthNum item.yearNum = ite.yearNum } @@ -557,7 +538,7 @@ { min: 100000, max: 99999999999, label: '鍑哄簱閲�10w浠ヤ笂', color: '#be6f2b' }, { min: 50000, max: 100000, label: '鍑哄簱閲�5-10w', color: '#c39332' }, { min: 20000, max: 50000, label: '鍑哄簱閲�2-5w', color: '#5ecbaf' }, - { min: -1, max: 20000, label: '鍑哄簱閲�2w浠ヤ笅', color: '#325a9b' }, + { min: -1, max: 20000, label: '鍑哄簱閲�2w浠ヤ笅', color: '#3561a4' }, ], itemWidth: 22, itemHeight: 22, @@ -595,8 +576,8 @@ center: [105.194115019531, 36.582111640625], // 鍦板浘涓績浣嶇疆锛� 姝ゅ鐨勭含搴︿笌涓嬮潰鐨刢enter鐩稿樊1搴︽槸褰㈡垚闃村奖鐨勮窛绂伙紝鍙嚜宸遍殢鎰忚皟鏁� itemStyle: { areaColor: '#152e4a', //鍦板浘闃村奖鐨勯鑹� - borderColor: '#f7f7f7', // 鐪佷唤杈规棰滆壊 - borderWidth: 0.1, // 鐪佷唤杈规瀹藉害 + borderColor: '#779dc8', // 鐪佷唤杈规棰滆壊 + borderWidth: 0.5, // 鐪佷唤杈规瀹藉害 // shadowBlur: 5, // 鐪佷唤杈规鑱氱劍 }, emphasis: { @@ -637,11 +618,12 @@ }, itemStyle: { show: true, - color: '#00114F', // 楂樹寒鏂囧瓧棰滆壊 + color: '#fff', // 楂樹寒鏂囧瓧棰滆壊 borderColor: '#a4d0ec', // 楂樹寒杈规棰滆壊 - areaColor: '#63d5c1', //楂樹寒鍖哄煙棰滆壊 + areaColor: '#0056FF', //楂樹寒鍖哄煙棰滆壊 }, }, + selectedMode: false, label: { // 鍦板浘鏍囨敞 show: false, @@ -657,7 +639,7 @@ return `<div class="map-tip-box"> <div class="item-state-con title"> <div class="icon"></div> - <span>${params.data.name}</span> + <span>${params.data.name}</span> </div> <div class="item-state-con"> <span class="dot bj"></span> @@ -700,6 +682,7 @@ mapList.value = temp.map(item => { item.value = item.monthNum item.name = item.provinceName + item.code=item.provinceCode return item }) initMap() @@ -737,6 +720,9 @@ }, xAxis: { type: 'value', + axisLabel: { + color: '#D2E0FF' + }, splitLine: { show: true, lineStyle: { @@ -749,6 +735,9 @@ yAxis: { axisTick: { show: false, + }, + axisLabel: { + color: '#D2E0FF' }, type: 'category', axisLine: { @@ -766,7 +755,7 @@ show: true, textStyle: { color: '#000000', - fontSize: 10 + fontSize: 12 } }, emphasis: { @@ -802,7 +791,11 @@ stack: 'total', barWidth: 14, label: { - show: true + show: true, + textStyle: { + color: '#000000', + fontSize: 12 + } }, emphasis: { focus: 'series' @@ -837,7 +830,11 @@ barWidth: 14, stack: 'total', label: { - show: true + show: true, + textStyle: { + color: '#000000', + fontSize: 12 + } }, textStyle: { color: '#000000', @@ -853,13 +850,13 @@ y2: 0, colorStops: [{ offset: 0, - color: '#71f3ce' + color: '#73f7d1' }, { offset: 1, - color: '#4da999' + color: '#58beaa' }] } - } + }, }, emphasis: { focus: 'series' @@ -885,7 +882,7 @@ const dataList1 = ref([]) const getData1 = () => { - getStorearriveGoodsList({ + arriveGoodsList({ factoryCode: activeCity.value.code }).then(res => { dataList1.value = res.data || [] @@ -896,24 +893,31 @@ const transportTask = ref([]) const taskCode = ref('') const showModal = ref(false) +const modalLoading = ref(false) const modalInfo = ref({}) const modalTab = ref(0) const pager = ref({ page: 0, - rows: 10 + rows: 50 }) -const modalTabClick = (val) => { - modalTab.value = val -} const taskClick = (item) => { + modalLoading.value = true + showModal.value = true kzorderInfo({ contractNumber: item.contractNumber }).then(res => { modalInfo.value = res.data - showModal.value = true - console.log('modalInfo.value', modalInfo.value) + + modalLoading.value = false nextTick(() => { initGdMap() }) + }, () => { + modalLoading.value = false }) +} +const closeModal = () => { + showModal.value = false + showModal1.value = false + modalInfo.value = {} } @@ -996,8 +1000,9 @@ }) map.add(polyline) } +const isLoadingTask = ref(false) const getData2 = () => { - + isLoadingTask.value = true getStoreTaskList({ pager: pager.value, parameters: { @@ -1005,6 +1010,7 @@ facrotyCodeList: activeCity.value.code ? [activeCity.value.code] : [] } }).then(res => { + isLoadingTask.value = false let temp = res.data.rows || [] transportTask.value = temp.map(item => { if (item.transportDate) { @@ -1012,6 +1018,10 @@ } return item }) + console.log('isLoadingTask', isLoadingTask.value) + + }, () => { + isLoadingTask.value = false }) } @@ -1020,7 +1030,7 @@ const cityList = ref() const getCity = () => { kzfactoryList().then(res => { - cityList.value = res.data + cityList.value = [{ name: '鍏ㄧ渷', code: '' }, ...res.data] }) } const activeCity = ref({ name: '鍏ㄧ渷', code: '' }) @@ -1060,9 +1070,12 @@ } const activeTab1 = ref(0) +const loading1 = ref(false) const StockOutData = ref({}) const getStockOut = () => { + loading1.value = true kztotalOutQtyNum({ type: activeTab1.value, factoryCode: activeCity.value.code }).then(res => { + loading1.value = false if (res.code == 200) { let obj = res.data obj.currentNum = (obj.currentOutNum + obj.currentInNum).toFixed(0) * 1 @@ -1077,15 +1090,54 @@ initEchart1() } + }, () => { + loading1.value = false }) } const tab1Click = (val) => { activeTab1.value = val getStockOut() } +// footer const getData3 = () => { - getStorecenterData().then(res => { - cneterData.value = res.data || {} + getStorecenterData({ + factoryCode: activeCity.value.code + }).then(res => { + const obj = res.data || {} + console.log('obj', obj) + + // 8灏忔椂 璁″垝 浠婃棩 + // obj.hoursAbility = 6000 + // obj.maxAbility = 8000 + // obj.currentPlanNum = 5000 + // obj.crrentOutNum = 7000 + + obj.level1 = ((obj.hoursAbility / obj.maxAbility) * 100).toFixed(2) + '%' + if (obj.currentPlanNum >= obj.hoursAbility) { + obj.level2 = '100%' + obj.level22 = (((obj.currentPlanNum - obj.hoursAbility) / (obj.maxAbility - obj.hoursAbility)) * 100).toFixed(2) + obj.level22 = obj.level22 > 100 ? '100%' : obj.level22 + '%' + } else { + obj.level2 = ((obj.currentPlanNum / obj.hoursAbility) * 100).toFixed(2) + '%' + obj.level22 = 0 + } + if (obj.crrentOutNum >= obj.hoursAbility) { + obj.level3 = '100%' + obj.level33 = (((obj.crrentOutNum - obj.hoursAbility) / (obj.maxAbility - obj.hoursAbility)) * 100).toFixed(2) + obj.level33 = obj.level33 > 100 ? '100%' : obj.level33 + '%' + } else { + obj.level3 = ((obj.crrentOutNum / obj.hoursAbility) * 100).toFixed(2) + '%' + obj.level33 = 0 + } + + // console.log('obj1', obj.level1); + // console.log('obj2', obj.level2); + // console.log('obj22', obj.level22); + // console.log('obj3', obj.level3); + // console.log('obj33', obj.level33); + + cneterData.value = obj + }) } @@ -1100,7 +1152,7 @@ legend: { itemGap: 12, // icon: 'circle', - right: '16%', + right: '12%', top: '0%', data: ['鎬诲簱瀛�', '褰撳墠搴撳瓨', '搴撳瓨鍒╃敤鐜�'], itemWidth: 20, @@ -1118,7 +1170,33 @@ containLabel: true }, tooltip: { - trigger: 'axis' + trigger: 'axis', + formatter: function (params) { + // 閬嶅巻鎮诞鏃剁殑鎵�鏈夌偣锛屽畾鍒跺寲鏄剧ず鍐呭 + let result = `<div style="width: 160px">${params[0].name}</div>` + params.forEach((item) => { + if (item.seriesName === '鎬诲簱瀛�') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #5e9bca;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}</strong></div> + </div>` + } else if (item.seriesName === '褰撳墠搴撳瓨') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #e2a44f;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}</strong></div> + </div>` + } else if (item.seriesName === '搴撳瓨鍒╃敤鐜�') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #5a6fc0;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}%</strong></div> + </div>` + } + }) + return result + } }, xAxis: [{ nameGap: 5, @@ -1131,7 +1209,6 @@ }, axisLabel: { color: '#869CC9' - // fontSize: 24, }, axisTick: { show: false, @@ -1147,7 +1224,6 @@ nameGap: 16, type: 'value', axisLabel: { - show: true, color: "#869CC9", }, axisLine: { @@ -1167,10 +1243,13 @@ name: '%', nameGap: 16, min: 0, - max: 100, - interval: 25, + // max: 100, axisLabel: { - formatter: '{value}' + color: "#869CC9", + }, + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, 12] }, splitLine: false } @@ -1249,11 +1328,14 @@ color: "#9eabc2" }, yAxisIndex: 1, + tooltip: { + show: true, + formatter: '{c}' + '%', + }, label: { show: false, position: 'top', color: '#fff', - // formatter: '{c}' + '%', }, data: data5.value.detailList.map(i => i.useRate) } @@ -1274,7 +1356,7 @@ // icon: 'circle', right: '10%', top: '0', - data: ['鍑哄簱鑳藉姏', '褰撴棩鍑哄簱閲�', '搴撳瓨鍒╃敤鐜�'], + data: ['鍑哄簱鑳藉姏', '褰撴棩鍑哄簱閲�', '鍑哄簱鍒╃敤鐜�'], itemWidth: 20, itemHeight: 10, textStyle: { @@ -1282,15 +1364,41 @@ borderColor: '#fff' }, }, + tooltip: { + trigger: 'axis', + formatter: function (params) { + // 閬嶅巻鎮诞鏃剁殑鎵�鏈夌偣锛屽畾鍒跺寲鏄剧ず鍐呭 + let result = `<div style="width: 160px">${params[0].name}</div>` + params.forEach((item) => { + if (item.seriesName === '鍑哄簱鑳藉姏') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #487af3;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}</strong></div> + </div>` + } else if (item.seriesName === '褰撴棩鍑哄簱閲�') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #e2a44f;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}</strong></div> + </div>` + } else if (item.seriesName === '鍑哄簱鍒╃敤鐜�') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #b0bcd3;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}%</strong></div> + </div>` + } + }) + return result + } + }, grid: { left: '3%', right: '0%', bottom: '3%', top: '18%', containLabel: true - }, - tooltip: { - trigger: 'axis' }, xAxis: [{ nameGap: 5, @@ -1302,8 +1410,10 @@ }, }, axisLabel: { - color: '#869CC9' - // fontSize: 24, + color: "#869CC9", + }, + nameTextStyle: { + color: '#869CC9', }, axisTick: { show: false, @@ -1312,15 +1422,15 @@ }], yAxis: [ { - nameTextStyle: { - color: '#869CC9', - }, name: '涓囨敮', nameGap: 16, type: 'value', axisLabel: { - show: true, color: "#869CC9", + }, + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, 12] }, axisLine: { show: true, @@ -1339,10 +1449,12 @@ name: '%', nameGap: 16, min: 0, - max: 100, - interval: 25, axisLabel: { - formatter: '{value}' + color: "#869CC9", + }, + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, 12] }, splitLine: false } @@ -1415,7 +1527,7 @@ barGap: '-100%' // 璁剧疆鏌卞瓙瀹屽叏閲嶅彔 }, { - name: '搴撳瓨鍒╃敤鐜�', + name: '鍑哄簱鍒╃敤鐜�', type: 'line', smooth: false, showAllSymbol: true, @@ -1428,7 +1540,6 @@ show: false, position: 'top', color: '#fff', - // formatter: '{c}' + '%', }, data: data6.value.detailList.map(i => i.useRate) } @@ -1447,9 +1558,9 @@ legend: { itemGap: 12, // icon: 'circle', - right: '16%', + right: '10%', top: '0%', - data: ['鎬诲簱瀛�', '褰撳墠搴撳瓨', '搴撳瓨鍒╃敤鐜�'], + data: ['鎬昏繍鍔涜祫婧�', '褰撴棩鎻愭姤杩愬姏', '杞﹁締鍒╃敤鐜�'], itemWidth: 20, itemHeight: 10, textStyle: { @@ -1457,15 +1568,41 @@ borderColor: '#fff' }, }, + tooltip: { + trigger: 'axis', + formatter: function (params) { + // 閬嶅巻鎮诞鏃剁殑鎵�鏈夌偣锛屽畾鍒跺寲鏄剧ず鍐呭 + let result = `<div style="width: 160px">${params[0].name}</div>` + params.forEach((item) => { + if (item.seriesName === '鎬昏繍鍔涜祫婧�') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #88d9cc;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}</strong></div> + </div>` + } else if (item.seriesName === '褰撴棩鎻愭姤杩愬姏') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #e2a44f;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}</strong></div> + </div>` + } else if (item.seriesName === '杞﹁締鍒╃敤鐜�') { + result += ` + <div style="display: flex;align-items: center;justify-content: space-between;margin-top: 2px;"> + <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #b0bcd3;margin-right: 4px;"></div><div>${item.seriesName}</div></div> + <div><strong>${item.value}%</strong></div> + </div>` + } + }) + return result + } + }, grid: { left: '3%', right: '0%', bottom: '3%', top: '18%', containLabel: true - }, - tooltip: { - trigger: 'axis' }, xAxis: [{ nameGap: 5, @@ -1477,8 +1614,11 @@ }, }, axisLabel: { - color: '#869CC9' - // fontSize: 24, + color: "#869CC9", + }, + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, 12] }, axisTick: { show: false, @@ -1490,7 +1630,7 @@ nameTextStyle: { color: '#869CC9', }, - name: '涓囨敮', + name: '杈�', nameGap: 16, type: 'value', axisLabel: { @@ -1514,17 +1654,19 @@ name: '%', nameGap: 16, min: 0, - max: 100, - interval: 25, axisLabel: { - formatter: '{value}' + color: "#869CC9", + }, + nameTextStyle: { + color: '#869CC9', + padding: [0, 0, 0, 12] }, splitLine: false } ], series: [ { - name: '鎬诲簱瀛�', + name: '鎬昏繍鍔涜祫婧�', type: 'bar', barWidth: 10, barGap: '60%', @@ -1538,11 +1680,11 @@ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, - color: '#2e6bf3' + color: '#73f0c6' }, { offset: 1, - color: '#5fcbab' + color: '#3f8ca6' } ], false), lineStyle: { @@ -1554,7 +1696,7 @@ data: data7.value.detailList.map(i => i.totalNum) }, { - name: '褰撳墠搴撳瓨', + name: '褰撴棩鎻愭姤杩愬姏', type: 'bar', barWidth: 10, label: { @@ -1567,15 +1709,15 @@ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, - color: '#eda13a' + color: '#ed7e32' }, { offset: 0.6, - color: '#dfb44e' + color: '#e99b5c' }, { offset: 1, - color: '#ccc16c' + color: '#e7a774' } ], false), lineStyle: { @@ -1587,7 +1729,7 @@ data: data7.value.detailList.map(i => i.currentNum) }, { - name: '搴撳瓨鍒╃敤鐜�', + name: '杞﹁締鍒╃敤鐜�', type: 'line', smooth: false, showAllSymbol: true, @@ -1600,7 +1742,6 @@ show: false, position: 'top', color: '#fff', - // formatter: '{c}' + '%', }, data: data7.value.detailList.map(i => i.useRate) } @@ -1615,21 +1756,29 @@ kzinventoryUseRate().then(res => { data5.value = res.data data5.value.detailList.forEach(item => { - item.useRate = item.useRate * 100 + if (item.useRate) { + item.useRate = (item.useRate * 100).toFixed(1) + } + }) initEchart5() }) outAbilityUseRate().then(res => { data6.value = res.data data6.value.detailList.forEach(item => { - item.useRate = item.useRate * 100 + if (item.useRate) { + item.useRate = (item.useRate * 100).toFixed(1) + } }) initEchart6() }) tranportAbilityUseRate().then(res => { data7.value = res.data data7.value.detailList.forEach(item => { - item.useRate = item.useRate * 100 + // item.useRate = item.useRate * 100 + if (item.useRate) { + item.useRate = (item.useRate * 100).toFixed(1) + } }) initEchart7() }) @@ -1669,6 +1818,11 @@ getCity() changeCity() getData5() + setInterval(() => { + getCity() + changeCity() + getData5() + }, 1000 * 60 * 10) setTimeout(() => { loopFn1() }, 12000) @@ -1729,6 +1883,7 @@ .left_box_one { margin-top: 20px; padding: 0px 10px 30px 20px; + position: relative; .content_wrap { display: flex; @@ -1848,9 +2003,22 @@ } .list_wrap { + position: relative; + .list { height: 200px; overflow: hidden; + } + + .empty { + display: flex; + justify-content: center; + align-items: center; + height: 200px; + + img { + width: 144px; + } } .line { @@ -1873,7 +2041,7 @@ } .status { - flex: 5; + flex: 3.2; } } @@ -2041,47 +2209,18 @@ height: 76px; .content { - flex: 5; + width: 80%; height: 16px; background: rgba(255, 255, 255, 0.13); border-radius: 8px; - margin-right: 4px; + margin-right: 6px; display: flex; position: relative; - .node { - position: absolute; - left: 69%; - top: -20px; - width: 22px; - height: 70px; - z-index: 999; - overflow: hidden; - - .node_icon { - background-color: #051623; - height: 16px; - - .icon { - background-color: #25333f; - height: 16px; - width: 16px; - position: absolute; - top: 20px; - right: -8px; - border-radius: 50%; - overflow: hidden; - } - - .icon2 { - right: 12px; - } - } - } } .box { - width: 40%; + width: 80%; height: 16px; background: linear-gradient(270deg, #FF9F02 0%, #FFEA70 100%); border-radius: 8px; @@ -2102,6 +2241,9 @@ border-radius: 12px; display: flex; align-items: center; + justify-content: center; + min-width: 76px; + border: 1px solid #fff; .icon { position: absolute; @@ -2126,9 +2268,21 @@ } .box1 { - width: 70%; + width: 10%; z-index: 9; - background: linear-gradient(270deg, #15FDC8 0%, #006BFF 100%); + background: linear-gradient(270deg, #68dfd3 0%, #006BFF 100%); + } + + .box11 { + background: linear-gradient(270deg, #75f8cc 0%, #68dfd3 100%); + } + + .box22 { + background: linear-gradient(270deg, #f2a43b 0%, #ecbb61 100%); + } + + .box23 { + background: linear-gradient(270deg, #f4b34a 0%, #FFEA70 100%); } .scale { @@ -2141,10 +2295,11 @@ .scale1 { left: 84%; + min-width: 36px; } .side { - flex: 2; + flex: 1; height: 16px; background: rgba(255, 255, 255, 0.13); border-radius: 8px; @@ -2167,7 +2322,7 @@ .modal1 { width: 500px; - height: 224px; + height: 192px; background: rgba(0, 86, 255, 0.1); backdrop-filter: blur(5px); padding: 12px 30px; @@ -2175,10 +2330,13 @@ top: 36px; left: 12px; border: 1px solid #4ba7f7; + z-index: 999999; - .list { - height: 192px; - overflow: auto; + .content { + .list { + height: 128px; + overflow: auto; + } .line { display: flex; @@ -2192,7 +2350,14 @@ } .item { - flex: 2; + flex: 3; + } + + .addr { + flex: 5; + display: flex; + flex-wrap: nowrap; + overflow: hidden; } } @@ -2333,7 +2498,7 @@ width: 600px; height: 556px; background: rgba(0, 30, 63, 0.5); - border: 1px solid #c6eef7; + /* border: 1px solid #c6eef7; */ backdrop-filter: blur(5px); position: fixed; top: 20%; @@ -2343,13 +2508,15 @@ padding: 24px; #map-container { - width: 300px; - height: 180px; + width: 260px; + height: 320px; position: absolute; - top: 220px; - right: 10px; + top: 190px; + right: 20px; z-index: 999999; - :deep(.amap-markers){ + border-radius: 2px; + + :deep(.amap-markers) { left: -12px !important; top: -32px !important; } @@ -2358,9 +2525,19 @@ .title_head { display: flex; align-items: center; - font-weight: bold; - font-size: 17px; + justify-content: space-between; margin-bottom: 20px; + + .left { + display: flex; + align-items: center; + font-weight: bold; + font-size: 17px; + } + + .tit_status { + color: #af8832; + } img { width: 20px; @@ -2417,11 +2594,13 @@ .fu_list { height: 310px; + width: 290px; margin-top: 20px; overflow: auto; - .fu_item { + position: relative; + .item_title { margin-bottom: 6px; @@ -2438,12 +2617,13 @@ } .separate { - height: calc(100% - 125px); - width: 1px; - border: 1px dashed #CCCCCC; + height: calc(100% - 8px); + /* width: 1px; */ + border: 1px dashed #576783; + /* border: 1px dashed red; */ position: absolute; - left: 26px; - top: 51px; + left: 10px; + top: 20px; z-index: -1; } @@ -2498,6 +2678,8 @@ .text { color: #b1bfdc; + margin-bottom: 6px; + width: 100%; } .icon { @@ -2510,7 +2692,6 @@ .h2 { display: flex; align-items: center; - height: 24px; } .h1 {} @@ -2518,7 +2699,6 @@ .time { padding-left: 39px; font-size: 12px; - margin-top: 3px; } } } @@ -2534,7 +2714,7 @@ top: 0; left: 0; z-index: 9999; - background-color: rgba(0, 0, 0, 0.1); + /* background-color: rgba(0, 0, 0, 0.0); */ /* background-color: red; */ } @@ -2675,4 +2855,4 @@ object-fit: cover; z-index: -1; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3