| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525 |
- <!-- 首页 -->
- <template>
- <div class="page_index">
- <div id="bg"></div>
- <div class="content">
- <!-- <div :class="tabsActive == 1 ? 'top top_bg_1' : 'top top_bg_2'">
- <div class="title fontMF">无人地磅数据可视化</div>
- </div> -->
- <div class="weather flex">
- <div class="flex fontMF MR40" style="padding-left: 40px;">
- <span class="text">{{ weatherInfo && weatherInfo.info }}</span>
- </div>
- <div class="text flex fontMF MR40" style="margin-left: 40px;">
- 温度 <span class="num fontFx">{{ weatherInfo && weatherInfo.temperature }}<span
- style="font-size: 18px"> ℃</span></span>
- </div>
- </div>
- <div class="time flex">
- <div class=" fontFx num" style="margin-right: 20px;">{{ timeInfo && timeInfo.ymd }}</div>
- <div class="fontFx num">{{ timeInfo && timeInfo.hms }}</div>
- </div>
- <div class="contain">
- <div class="mid_charts">
- <div class="botChart">
- <div class="left_charts">
- <div class="leftdivitem newLeftdivitem" style="padding: 23px 26px;">
- <div class="btnGroup">
- <div :class="current1 == 1 ? 'btn1' : 'btn2'" @click="current1 = 1">物流</div>
- <div :class="current1 == 2 ? 'btn1' : 'btn2'" style="position:relative;left:-6px"
- @click="current1 = 2">铲车</div>
- </div>
- <div class="title1">物流铲车司机排行榜 </div>
- <div class="scroll_table">
- <div class="thead flex">
- <div class="th" style="width: 20%;padding-left: 10px;">排名</div>
- <div class="th" style="width: 36%">运单号</div>
- <div class="th" style="width: 24%">车牌号</div>
- <div class="th" style="width: 20%">超时状态</div>
- </div>
- <div class="tbody">
- <vue-seamless-scroll v-if="current1 == 1"
- :data="driverRanking.logistics_truck_driver_ranking" class="seamless-warp"
- style="height:800px;" :class-option="{
- step: 2, // 数值越大速度滚动越快
- limitMoveNum: 15, // 开始无缝滚动的数据量 this.dataList.length
- hoverStop: true, // 是否开启鼠标悬停stop
- direction: 1, // 0向下 1向上 2向左 3向右
- openWatch: true, // 开启数据实时监控刷新dom
- singleHeight: 32, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
- singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
- waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
- }">
- <div class="tr flex"
- v-for="(item, i) in driverRanking.logistics_truck_driver_ranking">
- <div class="td" style="width: 20%;padding-left: 10px;">{{ item.ranking
- }}
- </div>
- <div class="td" style="width: 36%">{{ item.task_no }}</div>
- <div class="td" style="width: 24%">{{ item.license_plate }}
- </div>
- <div class="td" style="width: 20%;color:#01FFFF">
- {{ item.timeout_status }}
- </div>
- </div>
- </vue-seamless-scroll>
- <vue-seamless-scroll v-if="current1 == 2" :data="driverRanking.driver_ranking"
- class="seamless-warp" style="height: 800px;" :class-option="{
- step: 2, // 数值越大速度滚动越快
- limitMoveNum: driverRanking.driver_ranking.length, // 开始无缝滚动的数据量 this.dataList.length
- hoverStop: true, // 是否开启鼠标悬停stop
- direction: 1, // 0向下 1向上 2向左 3向右
- openWatch: true, // 开启数据实时监控刷新dom
- singleHeight: 30, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
- singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
- waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
- }">
- <div class="tr flex" v-for="(item, i) in driverRanking.driver_ranking">
- <div class="td" style="width: 20%;padding-left: 10px;">{{ item.ranking
- }}
- </div>
- <div class="td" style="width: 36%">{{ item.task_no }}</div>
- <div class="td" style="width: 24%">{{ item.license_plate }}
- </div>
- <div class="td" style="width: 20%;color:#01FFFF">
- {{ item.timeout_status }}
- </div>
- </div>
- </vue-seamless-scroll>
- </div>
- </div>
- </div>
- </div>
- <div class="left_charts newLeftdivitem" style="margin-left: 20px;">
- <div class="leftdivitem leftdivitem1">
- <div class="leftdivitemchild">
- <div class="title2">场内拥堵率</div>
- <div class="pie pie1">
- <Charts :eOption="pie" v-if="pie" style="height: 207px" />
- </div>
- </div>
- <div class="leftdivitemchild">
- <div class="title2">场内异常率</div>
- <div class="pie pie2">
- <Charts :eOption="pie2" v-if="pie2" style="height: 207px" />
- </div>
- </div>
- </div>
- <div class="leftdivitem leftdivitem1" style="">
- <div class="leftdivitemchild">
- <div class="title2">潜在接单司机</div>
- <Charts :eOption="bing" v-if="bing" style="height:250px" />
- </div>
- <div class="leftdivitemchild">
- <Charts :eOption="bar" v-if="bar" style="height: 250px;margin-top: 30px;" />
- </div>
- </div>
- <div class="leftdivitem " style="padding: 14px 30px;">
- <div class="title2">近30天出货量</div>
- <div>
- <Charts :eOption="line" v-if="line" style="height: 250px"></Charts>
- </div>
- </div>
- </div>
- <div class="mid">
- <div class="topChart flex">
- <div class="toptitle">今日概况</div>
- <div class="num_item" v-for="(item, i) in topChartList" :key="i">
- <div class="num_title"> <img src="../../assets/newimg/s.png" alt=""> {{ item.title
- }}</div>
- <div class="num_value">
- <div v-for="(obj, j) in item.value" :key="j" class="num fontFx">{{ obj }}</div>
- <div class="weight">{{ item.unit }}</div>
- </div>
- </div>
- </div>
- <div class="midMap">
- <div class="toptitle">矿区地图</div>
- <div style="height: 100%;border-radius:20px;overflow: hidden;">
- <amap :zoom="6" :marker="Weighbridge" :center="center" @map-loaded="onMapLoaded">
- </amap>
- </div>
- </div>
- <!-- <div class="middibu"></div> -->
- </div>
- <div class="right">
- <div class="right_content">
- <div class="rightcontent1">
- <div class="title2">地磅数据统计</div>
- <div class="btnGroup2">
- <div :class="current2 == 1 ? 'btn1' : 'btn2'" @click="current2 = 1">按月计算</div>
- <div :class="current2 == 2 ? 'btn1' : 'btn2'" @click="current2 = 2"
- style="position:relative;left:-6px">按年计算</div>
- </div>
- <div class="rightcontentitem1">
- <div>
- <p>{{
- current2 == 1 ?
- statistics.month.vehicle_count : statistics.year.vehicle_count
- }}</p>
- <p>{{ current2 == 1 ? '月' : '年' }}过磅车辆/辆</p>
- </div>
- <div>
- <p>{{ current2 == 1 ? statistics.month.material_ton :
- statistics.year.material_ton
- }}</p>
- <p>{{ current2 == 1 ? '月' : '年' }}出货量/吨</p>
- </div>
- </div>
- <div class="rightcontentitem2">
- <div>
- <p>{{ current2 == 1 ? statistics.month.order_count :
- statistics.year.order_count
- }}</p>
- <p>{{ current2 == 1 ? '月' : '年' }}派单量/单</p>
- </div>
- <div>
- <p>{{
- current2 == 1 ?
- statistics.month.exception_count : statistics.year.exception_count
- }}</p>
- <p>{{ current2 == 1 ? '月' : '年' }}异常处理量/单</p>
- </div>
- </div>
- <div class="detail">
- <div class="btnGroup">
- <div :class="current3 == 1 ? 'btn1' : 'btn2'" @click="current3 = 1">今日</div>
- <div :class="current3 == 2 ? 'btn1' : 'btn2'" @click="current3 = 2">本月</div>
- </div>
- <div class="aa a1">
- <p>{{ current3 == 1 ? "今日" : "本月" }}总量/吨</p>
- <p>{{ current3 == 1 ? overview.today.total : overview.month.total }}</p>
- </div>
- <div class="a3">
- <img src="@/assets/newimg/490f9990ec23ee5671551eca4d18f3aa.png" alt="">
- <!-- <p>订单</p>
- <p>详情</p> -->
- <!-- <p>{{ current3 == 1 ? overview.today.completion_rate :
- overview.month.completion_rate }}<span>%</span>
- </p>
- <p>完成率</p> -->
- </div>
- <div class="aa a2">
- <p>{{ current3 == 1 ? "今日" : "本月" }}车次/次</p>
- <p>{{ current3 == 1 ? overview.today.vehicle_count :
- overview.month.vehicle_count }}
- </p>
- </div>
- </div>
- </div>
- <div class="rightcontent2">
- <div class="title1">异常过磅车辆数据库</div>
- <div class="scroll_table">
- <div class="thead flex">
- <div class="th" style="width: 20%;padding-left: 10px;">地磅名称</div>
- <div class="th" style="width: 24%">车牌号</div>
- <div class="th" style="width: 36%">异常时间</div>
- <div class="th" style="width: 20%">异常原因</div>
- </div>
- <div class="tbody">
- <vue-seamless-scroll :data="abnormal" class="seamless-warp"
- style="height: 370px;" :class-option="{
- step: 2, // 数值越大速度滚动越快
- limitMoveNum: abnormal.length, // 开始无缝滚动的数据量 this.dataList.length
- hoverStop: true, // 是否开启鼠标悬停stop
- direction: 1, // 0向下 1向上 2向左 3向右
- openWatch: true, // 开启数据实时监控刷新dom
- singleHeight: 30, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
- singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
- waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
- }">
- <div class="tr flex" v-for="(item, i) in abnormal">
- <div class="td" style="width: 20%;padding-left: 10px;">{{
- item.wb_name }}
- </div>
- <div class="td" style="width: 24%">{{ item.license_plate }}</div>
- <div class="td" style="width: 36%">{{ item.exception_time }}</div>
- <div class="td" style="width: 20%;color:#01FFFF">
- {{ item.exception_reason }}</div>
- </div>
- </vue-seamless-scroll>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="right">
- <div class="right_content">
- <div class="rightcontent2">
- <div class="title2">过磅记录数据库</div>
- <div class="list" style="overflow: hidden;margin-top: 17px;">
- <vue-seamless-scroll :data="overweightRecord" class="seamless-warp"
- style="height: 820px;" :class-option="{
- step: 2, // 数值越大速度滚动越快
- limitMoveNum: overweightRecord.length, // 开始无缝滚动的数据量 this.dataList.length
- hoverStop: true, // 是否开启鼠标悬停stop
- direction: 1, // 0向下 1向上 2向左 3向右
- openWatch: true, // 开启数据实时监控刷新dom
- singleHeight: 110, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
- singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
- waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
- }">
- <div class="item" v-for="(item, i) in overweightRecord"
- style="margin-bottom: 10px;">
- <p class="tt">地磅编号:{{ item.wb_code }}</p>
- <div>
- <p><span>车牌号:</span>{{ item.license_plate }}</p>
- <p><span>地磅名称:</span>{{ item.wb_name }}</p>
- </div>
- <div>
- <p><span>过磅重量:</span>{{ item.tare_weight }}吨</p>
- <p><span>过磅时间:</span>{{ item.recv_time }}</p>
- </div>
- <!-- <div>
- <p><span>货品净重:</span>{{ item.actual_weight }}</p>
- <p><span>出场时间:</span>{{ item.confirm_out_time }}</p>
- </div> -->
- </div>
- </vue-seamless-scroll>
- </div>
- <!-- <div class="scroll_table">
- <div class="tbody">
- <vue-seamless-scroll :data="orderSituationList" class="seamless-warp"
- style="height: 110px;" :class-option="defaultOption3">
- <div class="tr flex" v-for="(item, i) in orderSituationList">
- <div class="td" style="width: 20%;padding-left: 10px;">{{ item.x1 }}
- </div>
- <div class="td" style="width: 24%">{{ item.x3 }}</div>
- <div class="td" style="width: 36%">2025/05/08 12:22:32</div>
- <div class="td" style="width: 20%;color:#01FFFF">超载</div>
- </div>
- </vue-seamless-scroll>
- </div>
- </div> -->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import moment from 'moment';
- import $ from 'jquery';
- import Charts from '@/components/selfCP/charts.vue';
- import { POST, GET } from '@/server/api/common';
- import { pie, pie2, initBing, barData, initLine } from './data';
- import * as echarts from "echarts";
- import 'echarts-gl'
- import amap from './amap.vue'
- export default {
- name: 'dashboard',
- components: {
- Charts,
- amap
- },
- data() {
- return {
- weatherTimer: null, // 定时器 更新天气信息
- weatherInfo: null, // 天气信息
- timer: null, // 定时器 更新时间
- timeInfo: null, // 时间信息
- SalesProportion: null,
- energy_consumption: null, // 能源消耗
- yield: null, // 实时产量
- sales_volumn: null, // 实时销量
- chartsTimer: null, // 左侧charts定时器
- typeList: [], // 分类列表
- CalciumOxideTimer: null, // 氧化钙轮播定时器
- modal_charts: null, // 弹窗 charts
- messageList: [], // 消息队列
- messageIndex: 0, // 当前消息下标
- client: null, // mqtt
- saveChart: null, // 节能减排
- formInline: {
- type: 1,
- nickName: '',
- startDate: moment().format('YYYY-MM-DD'),
- endDate: moment().format('YYYY-MM-DD')
- },
- modalTitle: '',
- modalTimeIndex: 1,
- time_title: moment().format('YYYY-MM-DD'),
- modalType: 1,
- mineralTypeList: [], // 矿产类别
- oxideTimer: null,
- loadedMap: false,
- topicCate: null,
- apiUrl: null,
- videoList: [], // 视频列表
- topChartList: [
- { title: '总入场车次/辆', value: [0, 6, 9, 2, 3, 6] },
- { title: '总出场车次/辆', value: [0, 6, 9, 2, 3, 6] },
- { title: '当前总出货量/吨', value: [0, 6, 9, 2, 3, 6] },
- { title: '当前场内车辆/辆', value: [0, 9, 2, 3] },
- { title: '异常过磅/辆', value: [0, 9, 2, 3] },
- ],
- wait_entry_num: 0,
- running_num: 0,
- total_running_num: 0,
- salesForShihui: [],
- salesForYanghuagai: [],
- salesForKHxse: [],
- sevenDaysShipmentOption: null,
- sevenDaysSaleOption: null,
- saleNumProportion: null,
- salePriceProportion: null,
- numsStatictis: null,
- tabsActive: 1,
- pie: null,
- pie2: null,
- bar: null,
- line: null,
- bing: null,
- list: ['#001', '#002', '#003', '#004', '#005'],
- center: [103.530507, 29.473931], // 北京坐标
- mapInstance: null,
- AMap: null,
- marker: [[103.53031386349485, 29.473982265482523]],
- data: {
- },
- orderSituationList: [],
- driverRanking: {
- driver_ranking: [],
- logistics_truck_driver_ranking: []
- },
- current1: 1,
- current2: 1,
- current3: 1,
- statistics: {
- "month": {
- "vehicle_count": 0,
- "material_ton": 0,
- "order_count": 0,
- "exception_count": 0
- },
- "year": {
- "vehicle_count": 0,
- "material_ton": 0,
- "order_count": 0,
- "exception_count": 0
- }
- },
- overview: {
- "today": {
- "total": 0,
- "completion_rate": 0,
- "vehicle_count": 0
- },
- "month": {
- "total": 0,
- "completion_rate": 0,
- "vehicle_count": 0
- }
- },
- abnormal: [],
- overweightRecord: [],
- timer: null,
- Weighbridge: []
- };
- },
- mounted() {
- moment.locale('zh-cn');
- this.getWeather()
- this.getTime()
- this.getApi()
- this.getApi2()
- this.cycleGetApi()
- },
- destoryed() {
- clearInterval(this.timer);
- },
- computed: {
- },
- methods: {
- cycleGetApi() {
- clearInterval(this.timer)
- this.timer = setInterval(() => {
- this.getApi2()
- }, 2 * 60 * 1000)
- },
- getApi2() {
- //地磅数据统计
- POST(`${this.$config.api}/large_screen/getTodayCompanyWbStatistics`).then(res => {
- console.log(res);
- this.topChartList = [
- { title: '总入场车次/辆', value: this.numberSplit(res.data.total_arrival_vehicle_count) },
- { title: '总出场车次/辆', value: this.numberSplit(res.data.total_departure_vehicle_count) },
- { title: '当前总出货量/吨', value: this.numberSplit(res.data.total_departure_material_ton) },
- { title: '当前场内车辆/辆', value: this.numberSplit(res.data.current_field_vehicle_count) },
- { title: '异常过磅/辆', value: this.numberSplit(res.data.exception_overweight_vehicle_count) },
- ]
- pie.title[1].text = `${res.data.congestion_rate}%`
- pie.series[0].data = [res.data.congestion_rate]
- this.pie = pie
- pie2.title[1].text = `${res.data.exception_rate}%`
- pie2.series[0].data = [res.data.exception_rate]
- this.pie2 = pie2
- })
- //今日订单概况总量、完成率、车次
- POST(`${this.$config.api}/large_screen/getTodayMonthOrderOverview`).then(res => {
- this.overview = res.data
- })
- //地磅信息
- POST(`${this.$config.api}/large_screen/getWeighbridgeInfo`).then(res => {
- this.Weighbridge = res.data.map(r => {
- return {
- "truckNo": r.name,
- "businessStatus": 1,
- "runStatus": 2,
- "lat": "112.32956",
- "lng": "34.651725",
- "detailAddress": null,
- "speed": 0.0,
- "gpsTime": "2024-04-17 14:31:09",
- lnglat: [r.lng, r.lat]
- }
- })
- })
- //近30天出货量
- POST(`${this.$config.api}/large_screen/getOutboundMaterialTon`).then(res => {
- this.line = initLine(res.data[0].data.map(r => r.time), res.data[0].data.map(r => r.shipment), res.data[1].data.map(r => r.shipment), res.data[2].data.map(r => r.shipment))
- })
- //过磅记录
- POST(`${this.$config.api}/large_screen/getOverweightRecord`).then(res => {
- this.overweightRecord = res.data
- })
- //异常过磅车辆
- POST(`${this.$config.api}/large_screen/getExceptionOverweightVehicle`).then(res => {
- this.abnormal = res.data
- })
- //物流铲车司机排行榜
- POST(`${this.$config.api}/large_screen/getDriverRanking`).then(res => {
- this.driverRanking = res.data
- })
- },
- getApi() {
- //按月、年地磅数据统计
- POST(`${this.$config.api}/large_screen/getCompanyWbStatistics`).then(res => {
- this.statistics = res.data
- })
- //潜在接单司机
- POST(`${this.$config.api}/large_screen/getPotentialDriverCount`).then(res => {
- let colors = ['#3A92FE', '#01FFFF', '#47FD7F']
- let xData = res.data.distance.map(r => r.distance)
- let yData = res.data.distance.map(r => r.count)
- // 传入数据生成 option
- let optionsData = [];
- for (let i = 0; i < xData.length; i++) {
- optionsData.push(
- {
- name: xData[i],
- value: yData[i],
- itemStyle: {
- color: colors[i],
- }
- }
- );
- }
- let bing = initBing(optionsData)
- this.bing = bing
- barData.series[1].data = [res.data.time.current, res.data.time.next_hour]
- barData.series[2].data = this.getSymbolData([res.data.time.current, res.data.time.next_hour])
- this.bar = barData
- })
- },
- numberSplit(num) {
- const targetLength = 6; // 目标数组长度
- const digits = Array.from(String(num.toFixed(0)), Number); // [1, 2, 3]
- const zerosToAdd =(targetLength > digits.length)? targetLength - digits.length : digits.length; // 需要补的 0 的数量
- const result = Array(zerosToAdd).fill(0).concat(digits);
- return result
- },
- onMapLoaded(map, AMap) {
- this.mapInstance = map
- this.AMap = AMap
- console.log('地图加载完成')
- },
- getWeather() {
- const self = this;
- $.ajax({
- url: 'http://www.nmc.cn/rest/weather?stationid=JKQBL&_=' + new Date().getTime(),
- dataType: 'json',
- type: 'GET',
- success: (res) => {
- const data = res.data.real.weather;
- self.weatherInfo = {
- info: data.info,
- temperature: data.temperature,
- rain: data.rain,
- humidity: data.humidity,
- img: `http://image.nmc.cn/assets/img/w/35x35/1/${data.img}.png`
- };
- }
- });
- },
- // 获取时间信息
- getTime() {
- this.timeInfo = {
- week: moment().format('dddd'),
- ymd: moment().format('YYYY-MM-DD'),
- hms: moment().format('HH:mm:ss')
- };
- this.timer = setInterval(() => {
- this.getTime();
- }, 1000);
- },
- getSymbolData(datas) {
- let arr = []
- for (var i = 0; i < datas.length; i++) {
- arr.push({
- value: datas[i],
- symbolPosition: 'end',
- })
- }
- return arr
- },
- b64Decode(str) {
- return decodeURIComponent(atob(str));
- },
- b64Encode(str) {
- return btoa(encodeURIComponent(str));
- },
- formatNumber(num) {
- let reg = /(?=(\B)(\d{3})+$)/g;
- return num.toString().replace(reg, ",");
- },
- // 弹窗时间选择
- handleChangeTime(index) {
- this.modalTimeIndex = index;
- if (index == 1) {
- this.formInline.startDate = moment().format('YYYY-MM-DD');
- this.formInline.endDate = moment().format('YYYY-MM-DD');
- this.time_title = this.formInline.startDate;
- } else if (index == 2) {
- this.formInline.startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
- this.formInline.endDate = moment().format('YYYY-MM-DD');
- this.time_title = this.formInline.startDate + ' 至 ' + this.formInline.endDate;
- } else if (index == 3) {
- this.formInline.startDate = moment().subtract(30, 'days').format('YYYY-MM-DD');
- this.formInline.endDate = moment().format('YYYY-MM-DD');
- this.time_title = this.formInline.startDate + ' 至 ' + this.formInline.endDate;
- }
- this.buildModalCharts(this.modalType);
- },
- // 弹窗搜索
- onSubmit() {
- this.buildModalCharts(this.modalType);
- },
- // 弹窗重置
- onReset() {
- this.formInline = {
- type: 1,
- nickName: '',
- startDate: moment().format('YYYY-MM-DD'),
- endDate: moment().format('YYYY-MM-DD')
- };
- this.modalTimeIndex = 1;
- this.time_title = moment().format('YYYY-MM-DD');
- this.buildModalCharts(this.modalType);
- },
- getRankingItemWIdth(item) {
- const width = 480 * (parseInt(item.value) / parseInt(this.salesForKHxse[0].value));
- return width + 'px';
- },
- formatMoney(str) {
- return parseFloat(str).toLocaleString('en-US');
- },
- getRadioWidth(pct) {
- let width = (76 / 100) * parseFloat(pct);
- return width + 'px';
- }
- }
- };
- </script>
- <style scoped lang="less">
- @font-face {
- font-family: MFLiHei;
- src: url('./font/MFLiHei_Noncommercial-Regular.otf') format('opentype');
- }
- @font-face {
- font-family: FXLed;
- src: url('./font/FX-LED Bold.TTF');
- }
- .fontMF {
- font-family: MFLiHei;
- }
- .fontFx {
- font-family: FXLed;
- }
- .flex {
- display: flex;
- align-items: center;
- }
- .page_index {
- width: 100%;
- height: 100%;
- overflow: hidden;
- position: relative;
- #bg {
- height: 1152px;
- width: 100%;
- background-image: url(../../assets/newimg/bg.png);
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- .content {
- position: absolute;
- top: 0;
- left: 0;
- height: calc(100% - 20px);
- z-index: 1;
- width: calc(100% - 120px);
- background: url(../../assets/newimg/waikuang.png) no-repeat;
- background-size: 100% 100%;
- margin: 0 60px;
- box-sizing: border-box;
- .title1 {
- width: 220px;
- height: 31px;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 16px;
- color: #FFFFFF;
- line-height: 30px;
- padding-left: 20px;
- background: url(../../assets/newimg/title1.png) no-repeat;
- background-size: 100% 100%;
- background-position: 0 8px;
- position: relative;
- }
- .title2 {
- width: 162px;
- height: 31px;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 16px;
- color: #FFFFFF;
- line-height: 30px;
- padding-left: 20px;
- background: url(../../assets/newimg/title2.png) no-repeat;
- background-size: 100% 100%;
- background-position: 0 8px;
- }
- .top {
- display: flex;
- justify-content: center;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- gap: 280px;
- .title {
- text-align: center;
- background: linear-gradient(0deg, #769dd6 0%, #ffffff 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- line-height: 30px;
- font-weight: 400;
- color: #ffffff;
- font-size: 42px;
- padding: 15px 0 50px;
- letter-spacing: 2px;
- }
- .btn {
- font-size: 24px;
- font-weight: bold;
- color: #ffffff;
- line-height: 30px;
- padding-top: 24px;
- }
- }
- .top_bg_1 {
- background-image: url(../../assets/img/title_bg_1.png);
- }
- .top_bg_2 {
- background-image: url(../../assets/img/title_bg_2.png);
- }
- .charts {
- background-image: url(../../assets/img/data_bg.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- overflow: hidden;
- }
- .charts1 {
- background-image: url(../../assets/img/data_bg1.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- overflow: hidden;
- }
- .charts2 {
- background-image: url(../../assets/img/data_bg2.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- overflow: hidden;
- }
- .contain {
- margin-top: 122px;
- padding: 0 34px;
- box-sizing: border-box;
- .content_title {
- font-size: 14px;
- font-weight: 400;
- color: #ffffff;
- background-image: url(https://ore-1302260927.cos.ap-chengdu.myqcloud.com/data_screen/image/17.png);
- background-repeat: no-repeat;
- padding: 0 0 10px 20px;
- }
- .left_charts {
- width: 601px;
- .leftdivitem {
- width: 601px;
- // background: url(../../assets/newimg/left.png) no-repeat;
- background-size: 100% 100%;
- margin-bottom: 4px;
- box-sizing: border-box;
- position: relative;
- }
- .btnGroup {
- position: absolute;
- right: 25px;
- top: 30px;
- display: flex;
- .btn1 {
- width: 58px;
- height: 16px;
- background: url(../../assets/newimg/btn1.png) no-repeat;
- background-size: 100% 100%;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 11px;
- color: #fff;
- line-height: 16px;
- text-align: center;
- cursor: pointer;
- letter-spacing: 1px;
- }
- .btn2 {
- width: 58px;
- height: 16px;
- background: url(../../assets/newimg/btn2.png) no-repeat;
- background-size: 100% 100%;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 11px;
- color: #fff;
- line-height: 16px;
- text-align: center;
- position: relative;
- cursor: pointer;
- letter-spacing: 1px;
- }
- }
- .leftdivitem1 {
- display: flex;
- padding: 23px 26px;
- .leftdivitemchild {
- width: 50%;
- .pie {
- margin: 0 auto;
- width: 207px;
- height: 207px;
- margin-top: 10px;
- }
- .pie1 {
- background: url(../../assets/newimg/pie1.png) no-repeat;
- background-size: 100% 100%;
- }
- .pie2 {
- background: url(../../assets/newimg/pie2.png) no-repeat;
- background-size: 100% 100%;
- }
- }
- }
- .left_content_three {
- width: 580px;
- height: 348px;
- overflow: hidden;
- .hide_box {
- position: relative;
- overflow: hidden;
- height: 300px;
- margin-top: 20px;
- }
- .banner_box {
- position: absolute;
- width: 90%;
- left: 5%;
- top: 0;
- .banner_item {
- padding-bottom: 30px;
- .content_box {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 10px 15px;
- .item {
- justify-content: space-between;
- background-color: rgba(255, 255, 255, 0.1);
- width: 160px;
- height: 24px;
- font-size: 12px;
- font-weight: 500;
- color: #ffffff;
- }
- }
- }
- }
- }
- }
- .mid_charts {
- padding: 0 30px;
- .middibu {
- width: 832px;
- height: 55px;
- background: url(../../assets/newimg/middibu.png) no-repeat;
- background-size: 100% 100%;
- }
- .midMap {
- width: 1546px;
- flex: 1;
- background: url(../../assets/newimg/midbottom.png) no-repeat;
- background-size: 100% 100%;
- position: relative;
- overflow: hidden;
- padding: 20px;
- box-sizing: border-box;
- .toptitle {
- width: 84px;
- position: absolute;
- top: 0;
- left: 50%;
- margin-left: -42px;
- color: #fff;
- font-size: 18px;
- font-weight: bold;
- font-family: MFLiHei;
- letter-spacing: 3px;
- }
- }
- .topChart {
- width: 1546px;
- justify-content: space-between;
- background-image: url(../../assets/newimg/midtopbg.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- height: 120px;
- padding: 0 64px;
- margin-bottom: 4px;
- position: relative;
- box-sizing: border-box;
- .toptitle {
- width: 84px;
- position: absolute;
- top: 0;
- left: 50%;
- margin-left: -42px;
- color: #fff;
- font-size: 18px;
- font-weight: bold;
- font-family: MFLiHei;
- letter-spacing: 3px;
- }
- .num_item {
- flex: 1;
- margin-top: 9px;
- .num_title {
- font-size: 14px;
- font-weight: 500;
- color: #ffffff;
- line-height: 18px;
- text-align: center;
- img {
- position: relative;
- top: 5px;
- }
- }
- .num_value {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 3px;
- .num {
- background-image: url(https://ore-1302260927.cos.ap-chengdu.myqcloud.com/data_screen/image/num_bg.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- font-size: 30px;
- font-weight: normal;
- color: #fffffe;
- padding: 4px;
- }
- .weight {
- font-size: 16px;
- font-weight: bold;
- color: #fffffe;
- align-self: end;
- }
- }
- }
- }
- .botChart {
- height: 925px;
- display: flex;
- justify-content: space-between;
- .left {
- width: 580px;
- height: 848px;
- .left_content {
- padding: 30px 20px 0;
- }
- }
- .mid {
- margin: 0 20px;
- flex: 1;
- display: flex;
- flex-direction: column;
- .charts2 {
- flex: 1;
- }
- .left_content_three {
- height: 100%;
- overflow: hidden;
- padding-top: 20px;
- .hide_box {
- position: relative;
- overflow: hidden;
- height: 300px;
- margin-top: 20px;
- }
- .banner_box {
- position: absolute;
- width: 90%;
- left: 5%;
- top: 0;
- .banner_item {
- padding-bottom: 30px;
- .content_box {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 10px 15px;
- .item {
- justify-content: space-between;
- background-color: rgba(255, 255, 255, 0.1);
- width: 160px;
- height: 24px;
- font-size: 12px;
- font-weight: 500;
- color: #ffffff;
- }
- }
- }
- }
- }
- }
- .right {
- width: 601px;
- height: 925px;
- padding: 28px 45px;
- background: url(../../assets/newimg/right2.png) no-repeat;
- background-size: 100% 100%;
- box-sizing: border-box;
- margin-left: 20px;
- .rightcontent2 {
- box-sizing: border-box;
- box-sizing: border-box;
- .list {
- .item {
- width: 100%;
- background: rgba(255, 255, 255, 0.1);
- padding: 20px;
- padding-bottom: 10px;
- box-sizing: border-box;
- padding-right: 37px;
- div {
- display: flex;
- justify-content: space-between;
- margin-bottom: 10px;
- }
- p {
- font-size: 12px;
- color: #fff;
- line-height: 20px;
- margin: 0;
- text-align: left;
- width: 180px;
- span {
- width: 60px;
- display: inline-block;
- text-align: right;
- }
- }
- p.tt {
- font-weight: bold;
- font-size: 12px;
- color: #01FFFF;
- line-height: 20px;
- margin-bottom: 13px;
- }
- }
- }
- }
- .right_content {
- box-sizing: border-box;
- .detail {
- background: url(../../assets/newimg/detail.png) no-repeat;
- background-size: 100% 100%;
- width: 100%;
- height: 150px;
- box-sizing: border-box;
- position: relative;
- background-position-y: 8px;
- .btnGroup {
- position: absolute;
- right: 25px;
- top: 20px;
- display: flex;
- .btn1 {
- width: 58px;
- height: 16px;
- background: url(../../assets/newimg/btn1.png) no-repeat;
- background-size: 100% 100%;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 11px;
- color: #fff;
- line-height: 16px;
- text-align: center;
- cursor: pointer;
- letter-spacing: 1px;
- }
- .btn2 {
- width: 58px;
- height: 16px;
- background: url(../../assets/newimg/btn2.png) no-repeat;
- background-size: 100% 100%;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 11px;
- color: #fff;
- line-height: 16px;
- text-align: center;
- position: relative;
- cursor: pointer;
- letter-spacing: 1px;
- }
- }
- .a3 {
- text-align: center;
- position: absolute;
- top: 19px;
- left: 50%;
- width: 116px;
- height: 116px;
- margin-left: -61px;
- display: flex;
- align-items: center;
- justify-content: center;
- img {
- width: 50px;
- }
- p {
- font-family: FXLED;
- font-size: 40px;
- color: #01FFFF;
- margin: 0;
- span {
- font-size: 20px;
- }
- }
- p:first-child {
- font-weight: bold;
- font-size: 14px;
- color: #fff;
- margin-bottom: 5px;
- }
- p:last-child {
- font-weight: bold;
- font-size: 14px;
- color: #fff;
- margin-top: 5px;
- }
- }
- .a2 {
- top: 50px;
- right: 50px;
- text-align: center;
- position: absolute;
- p {
- font-family: FXLED;
- font-weight: bold;
- font-size: 30px;
- color: #fff;
- }
- p:first-child {
- font-family: PingFang SC;
- font-weight: bold;
- font-size: 14px;
- color: #01FFFF;
- }
- }
- .a1 {
- top: 50px;
- left: 25px;
- text-align: center;
- position: absolute;
- p {
- font-family: FXLED;
- font-weight: bold;
- font-size: 30px;
- color: #fff;
- }
- p:first-child {
- font-family: PingFang SC;
- font-weight: bold;
- font-size: 14px;
- color: #01FFFF;
- }
- }
- }
- .rightcontentitem2 {
- height: 98px;
- width: 100%;
- background: url(../../assets/newimg/zhibiao2.png) no-repeat;
- background-size: 100%;
- display: flex;
- color: #fff;
- padding-right: 98px;
- box-sizing: border-box;
- div {
- width: 50%;
- text-align: center;
- font-size: 12px;
- padding-top: 26px;
- }
- p:first-child {
- font-family: FXLed;
- font-weight: normal;
- font-size: 24px;
- color: #FFFFFF;
- margin-bottom: 0;
- }
- }
- .rightcontentitem1 {
- margin-top: 10px;
- height: 98px;
- width: 100%;
- background: url(../../assets/newimg/zhibiao1.png) no-repeat;
- background-size: 100%;
- display: flex;
- color: #fff;
- padding-left: 98px;
- box-sizing: border-box;
- div {
- width: 50%;
- text-align: center;
- font-size: 12px;
- padding-top: 26px;
- }
- p:first-child {
- font-family: FXLed;
- font-weight: normal;
- font-size: 24px;
- color: #FFFFFF;
- margin-bottom: 0;
- }
- }
- .rightcontent1 {
- position: relative;
- width: 100%;
- height: 428px;
- box-sizing: border-box;
- background-size: 100% 100%;
- }
- .btnGroup2 {
- position: absolute;
- right: 30px;
- top: 24px;
- display: flex;
- .btn1 {
- width: 78px;
- height: 16px;
- background: url(../../assets/newimg/btn11.png) no-repeat;
- background-size: 100% 100%;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 10px;
- color: #fff;
- line-height: 16px;
- text-align: center;
- cursor: pointer;
- letter-spacing: 1px;
- }
- .btn2 {
- width: 78px;
- height: 16px;
- background: url(../../assets/newimg/btn22.png) no-repeat;
- background-size: 100% 100%;
- font-family: MFLiHei;
- font-weight: 400;
- font-size: 10px;
- color: #fff;
- line-height: 16px;
- text-align: center;
- position: relative;
- cursor: pointer;
- letter-spacing: 1px;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- .weather {
- width: 30%;
- height: 25px;
- position: absolute;
- top: 50px;
- left: 100px;
- .text {
- font-size: 20px;
- font-weight: 400;
- color: #fffffe;
- }
- .num {
- font-size: 24px;
- font-weight: normal;
- color: #fffffe;
- }
- }
- .time {
- position: absolute;
- top: 50px;
- right: 100px;
- width: 30%;
- height: 25px;
- justify-content: flex-end;
- padding-right: 20px;
- .text {
- font-size: 20px;
- font-weight: 400;
- color: #fffffe;
- }
- .num {
- font-size: 24px;
- font-weight: normal;
- color: #fffffe;
- }
- }
- .scroll_table {
- width: 100%;
- .thead {}
- .tbody {
- .seamless-warp {
- overflow: hidden;
- height: 210px;
- width: 100%;
- }
- }
- .th {
- text-align: left;
- font-size: 12px;
- font-weight: 400;
- color: #ffffff;
- line-height: 30px;
- }
- .td {
- font-size: 12px;
- font-weight: 400;
- color: #ffffff;
- line-height: 30px;
- }
- .tr:nth-child(even) {
- background-color: rgba(255, 255, 255, 0.1);
- }
- .radio_td {
- display: flex;
- align-items: center;
- color: #fff;
- .radio {
- position: relative;
- min-width: 6px;
- height: 10px;
- background: linear-gradient(90deg, #29abe3, #01ffff);
- margin-right: 4px;
- .div {
- width: 6px;
- height: 16px;
- background: #ffffff;
- position: absolute;
- top: -3px;
- right: 0;
- }
- }
- }
- }
- .newLeftdivitem {
- width: 601px !important;
- height: 925px !important;
- background: url('../../assets/newimg/newLeftBG.png') no-repeat !important;
- background-size: 100% 100% !important;
- box-sizing: border-box !important;
- }
- </style>
|