departure.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. <template>
  2. <div class="dashboard">
  3. <ComHead />
  4. <div class="dashboard-content">
  5. <div class="dashboard-content-top flex">
  6. <div class="dashboard-content-top-left">
  7. <div class="dashboard-content-top-left-item">
  8. <div class="dashboard-content-top-left-item-top">
  9. <div class="dashboard-content-top-left-item-top-title">
  10. 小时峰值分析
  11. </div>
  12. <div
  13. class="dashboard-content-top-left-item-top-time"
  14. @click="showDatePicker(showTimeMsg.HourlyPeak)"
  15. >
  16. <el-icon color="#ffffff" size="18">
  17. <Calendar />
  18. </el-icon>
  19. <el-icon color="#ffffff">
  20. <CaretBottom />
  21. </el-icon>
  22. </div>
  23. </div>
  24. <div
  25. v-loading="loading1"
  26. element-loading-text="数据加载中..."
  27. element-loading-background="rgba(0,0,0, 0.3)"
  28. class="dashboard-content-top-left-item-bottom"
  29. >
  30. <Echarts id="ww1" :option="hourlyPeakObj" />
  31. </div>
  32. </div>
  33. <div class="dashboard-content-top-left-item">
  34. <div class="dashboard-content-top-left-item-top">
  35. <div class="dashboard-content-top-left-item-top-title">
  36. 日趋势分析
  37. </div>
  38. <div
  39. class="dashboard-content-top-left-item-top-time"
  40. @click="showDatePicker(showTimeMsg.WaybillTrend)"
  41. >
  42. <el-icon color="#ffffff" size="18">
  43. <Calendar />
  44. </el-icon>
  45. <el-icon color="#ffffff">
  46. <CaretBottom />
  47. </el-icon>
  48. </div>
  49. </div>
  50. <div
  51. v-loading="loading2"
  52. element-loading-text="数据加载中..."
  53. element-loading-background="rgba(0,0,0, 0.3)"
  54. class="dashboard-content-top-left-item-bottom"
  55. >
  56. <Echarts id="ww12" :option="waybillTrendObj" />
  57. </div>
  58. </div>
  59. <div class="dashboard-content-top-left-item">
  60. <div class="dashboard-content-top-left-item-top">
  61. <div class="dashboard-content-top-left-item-top-title">
  62. 目的站统计分析
  63. </div>
  64. <div
  65. class="dashboard-content-bottom-left-top-time"
  66. @click="showDatePicker(showTimeMsg.NodePeak)"
  67. >
  68. <el-icon color="#ffffff" size="18">
  69. <Calendar />
  70. </el-icon>
  71. <el-icon color="#ffffff">
  72. <CaretBottom />
  73. </el-icon>
  74. </div>
  75. </div>
  76. <div
  77. v-loading="loading3"
  78. element-loading-text="数据加载中..."
  79. element-loading-background="rgba(0,0,0, 0.3)"
  80. class="dashboard-content-top-left-item-bottom"
  81. >
  82. <Echarts id="ww4" :option="nodePeakObj" />
  83. </div>
  84. </div>
  85. </div>
  86. <!-- 地图 -->
  87. <div class="dashboard-content-top-center">
  88. <div
  89. v-loading="loading4"
  90. element-loading-text="数据加载中..."
  91. element-loading-background="rgba(0,0,0, 0.3)"
  92. class="dashboard-content-top-center-top"
  93. >
  94. <div class="dashboard-content-top-center-top-list">
  95. <div class="dashboard-content-top-center-top-list-txt">
  96. 今日计划航班数(班)
  97. </div>
  98. <div class="dashboard-content-top-center-top-list-num">
  99. {{ flightNums }}
  100. </div>
  101. </div>
  102. <div class="dashboard-content-top-center-top-list">
  103. <div class="dashboard-content-top-center-top-list-txt">
  104. 已完成航班数(班)
  105. </div>
  106. <div class="dashboard-content-top-center-top-list-num">
  107. {{ stockNums }}
  108. </div>
  109. </div>
  110. <div class="dashboard-content-top-center-top-list">
  111. <div class="dashboard-content-top-center-top-list-txt">
  112. 已装载总量(吨)
  113. </div>
  114. <div class="dashboard-content-top-center-top-list-num">
  115. {{ formatWeight(weightNums) }}
  116. </div>
  117. </div>
  118. </div>
  119. <div
  120. v-loading="loading5"
  121. element-loading-text="数据加载中..."
  122. element-loading-background="rgba(0,0,0, 0.3)"
  123. class="dashboard-content-top-center-bottom"
  124. >
  125. <div class="dashboard-content-top-center-bottom-title">
  126. 航班动态跟踪
  127. </div>
  128. <div class="dashboard-content-top-center-bottom-content">
  129. <div class="dashboard-content-top-center-bottom-content-head">
  130. <div
  131. class="dashboard-content-top-center-bottom-content-head-list"
  132. >
  133. 公司/航班号
  134. </div>
  135. <div
  136. class="dashboard-content-top-center-bottom-content-head-list"
  137. >
  138. 航班状态
  139. </div>
  140. <div
  141. class="dashboard-content-top-center-bottom-content-head-list"
  142. >
  143. 经停/到达站
  144. </div>
  145. <div
  146. class="dashboard-content-top-center-bottom-content-head-list"
  147. >
  148. 计划起飞
  149. </div>
  150. <div
  151. class="dashboard-content-top-center-bottom-content-head-list"
  152. >
  153. 实际起飞
  154. </div>
  155. <div
  156. class="dashboard-content-top-center-bottom-content-head-list"
  157. >
  158. 机型
  159. </div>
  160. <div
  161. class="dashboard-content-top-center-bottom-content-head-list"
  162. >
  163. 类型
  164. </div>
  165. </div>
  166. <div
  167. ref="scrollContent"
  168. class="dashboard-content-top-center-bottom-content-bottom"
  169. >
  170. <vue3-seamless-scroll
  171. :list="listData"
  172. :limitScrollNum="limitScrollNum"
  173. :hover-stop="true"
  174. :hover="true"
  175. :step="0.3"
  176. >
  177. <div
  178. v-for="(item, index) in listData"
  179. :key="index"
  180. class="dashboard-content-top-center-bottom-content-bottom-list"
  181. >
  182. <div
  183. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  184. >
  185. {{ item.flightNo }}
  186. </div>
  187. <div
  188. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  189. >
  190. {{ item.flightState }}
  191. </div>
  192. <div
  193. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  194. >
  195. {{ item.airport }}
  196. </div>
  197. <div
  198. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  199. >
  200. {{ item.planTime }}
  201. </div>
  202. <!-- <div class="dashboard-content-top-center-bottom-content-bottom-list-txt">{{ item.preTime || '--' }}</div> -->
  203. <div
  204. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  205. >
  206. {{ item.acTime || '--' }}
  207. </div>
  208. <div
  209. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  210. >
  211. {{ item.planeType }}
  212. </div>
  213. <div
  214. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  215. >
  216. {{ item.KHT }}
  217. </div>
  218. </div>
  219. </vue3-seamless-scroll>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <div class="dashboard-content-top-right">
  225. <div class="dashboard-content-top-right-item">
  226. <div class="dashboard-content-top-right-item-top">
  227. <div class="dashboard-content-top-right-item-top-title">
  228. 航司统计分析
  229. </div>
  230. <div
  231. class="dashboard-content-top-right-item-top-time"
  232. @click="showDatePicker(showTimeMsg.AirlineTraffic)"
  233. >
  234. <el-icon color="#ffffff" size="18">
  235. <Calendar />
  236. </el-icon>
  237. <el-icon color="#ffffff">
  238. <CaretBottom />
  239. </el-icon>
  240. </div>
  241. </div>
  242. <div
  243. v-loading="loading6"
  244. element-loading-text="数据加载中..."
  245. element-loading-background="rgba(0,0,0, 0.3)"
  246. class="dashboard-content-top-right-item-bottom"
  247. >
  248. <Echarts id="a1" :option="airlineTrafficObj" />
  249. </div>
  250. </div>
  251. <div class="dashboard-content-top-right-item">
  252. <div class="dashboard-content-top-right-item-top">
  253. <div class="dashboard-content-top-right-item-top-title">
  254. 特货分类统计
  255. </div>
  256. <div
  257. class="dashboard-content-top-right-item-top-time"
  258. @click="showDatePicker(showTimeMsg.SpecialClassification)"
  259. >
  260. <el-icon color="#ffffff" size="18">
  261. <Calendar />
  262. </el-icon>
  263. <el-icon color="#ffffff">
  264. <CaretBottom />
  265. </el-icon>
  266. </div>
  267. <div class="dashboard-content-top-right-item-top-time">
  268. <el-dropdown
  269. :disabled="!specialGoodsDatas.length"
  270. trigger="click"
  271. @command="handleCommand"
  272. >
  273. <span class="icons">
  274. <span class="icons-txt">{{ specialGoods }}</span>
  275. <el-icon color="#ffffff">
  276. <CaretBottom />
  277. </el-icon>
  278. </span>
  279. <template #dropdown>
  280. <el-dropdown-menu>
  281. <el-dropdown-item
  282. v-for="specialTypeName in specialGoodsDatas"
  283. :key="specialTypeName"
  284. :command="specialTypeName"
  285. >{{ specialTypeName }}</el-dropdown-item
  286. >
  287. </el-dropdown-menu>
  288. </template>
  289. </el-dropdown>
  290. </div>
  291. </div>
  292. <div
  293. v-loading="loading7"
  294. element-loading-text="数据加载中..."
  295. element-loading-background="rgba(0,0,0, 0.3)"
  296. class="dashboard-content-top-left-item-bottom"
  297. >
  298. <Echarts id="ww44" :option="airlineObj" />
  299. </div>
  300. </div>
  301. <div class="dashboard-content-top-right-item">
  302. <div class="dashboard-content-top-right-item-top">
  303. <div class="dashboard-content-top-right-item-top-title">
  304. 拉货统计分析
  305. </div>
  306. <div
  307. class="dashboard-content-top-right-item-top-time"
  308. @click="showDatePicker(showTimeMsg.PickingStatistics)"
  309. >
  310. <el-icon color="#ffffff" size="18">
  311. <Calendar />
  312. </el-icon>
  313. <el-icon color="#ffffff">
  314. <CaretBottom />
  315. </el-icon>
  316. </div>
  317. </div>
  318. <div
  319. v-loading="loading8"
  320. element-loading-text="数据加载中..."
  321. element-loading-background="rgba(0,0,0, 0.3)"
  322. class="dashboard-content-top-left-item-bottom"
  323. >
  324. <Echarts id="ww45" :option="pickingObj" />
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. <Dialog
  331. :flag="flag"
  332. msg-title="日期选择"
  333. @resetForm="resetForm"
  334. @submitForm="submitForm"
  335. >
  336. <el-form :model="form" label-width="120px">
  337. <el-form-item label="开始日期">
  338. <el-date-picker
  339. :disabled-date="disabledStartDate"
  340. v-model="form.startDate"
  341. type="date"
  342. placeholder="请选择开始日期"
  343. size="default"
  344. format="YYYY-MM-DD"
  345. value-format="YYYY-MM-DD"
  346. />
  347. </el-form-item>
  348. <el-form-item label="结束日期">
  349. <el-date-picker
  350. :disabled-date="disabledEndDate"
  351. v-model="form.endDate"
  352. type="date"
  353. placeholder="请选择结束日期"
  354. size="default"
  355. format="YYYY-MM-DD"
  356. value-format="YYYY-MM-DD"
  357. />
  358. </el-form-item>
  359. </el-form>
  360. </Dialog>
  361. </div>
  362. </template>
  363. <script setup lang="ts">
  364. import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
  365. import Echarts from '@/components/Echarts/commonChartsBar.vue'
  366. import ComHead from './components/comHead.vue'
  367. import { Calendar, CaretBottom } from '@element-plus/icons-vue'
  368. import Dialog from '@/components/dialog/index.vue'
  369. import { usePublic, showTimeMsg, parseDate } from './hooks/usePublic'
  370. // import nodeCode from './hooks/nodeCode'
  371. import { parseTime, isValue } from '@/utils/validate'
  372. import * as _ from 'lodash'
  373. import { useLoop } from '@/hooks/useLoop'
  374. const {
  375. optionLeft,
  376. airCompaneBaggage,
  377. airlineAbnormalBaggage,
  378. getPublicData,
  379. formatGoods,
  380. formatWeight,
  381. } = usePublic()
  382. const timePickerName = ref(0)
  383. const limitScrollNum = ref(13)
  384. const scrollContent = ref<HTMLElement>()
  385. const flag = ref(false)
  386. const loading1 = ref(true)
  387. const loading2 = ref(true)
  388. const loading3 = ref(true)
  389. const loading4 = ref(true)
  390. const loading5 = ref(true)
  391. const loading6 = ref(true)
  392. const loading7 = ref(true)
  393. const loading8 = ref(true)
  394. const hourlyPeakObj = ref<any>({})
  395. const waybillTrendObj = ref<any>({})
  396. const nodePeakObj = ref<any>({})
  397. const airlineTrafficObj = ref<any>({})
  398. const airlineObj = ref<any>({})
  399. const pickingObj = ref<any>({})
  400. const flightNums = ref(0)
  401. const stockNums = ref(0)
  402. const specialGoods = ref('全部')
  403. const specialGoodsDatas = ref(['动', '贵', '邮', '鲜', '锂', '全部'])
  404. const weightNums = ref<number | string>(0)
  405. const today = parseTime(Date.now(), '{y}-{m}-{d}')
  406. const sevenDaysAgo = parseTime(
  407. Date.now() - 24 * 60 * 60 * 1000 * 7,
  408. '{y}-{m}-{d}'
  409. )
  410. const form = reactive({
  411. startDate: sevenDaysAgo,
  412. endDate: today,
  413. })
  414. const listData = ref<any>([])
  415. const disabledStartDate = (time: Date) => {
  416. const timer: any = form.endDate
  417. const data = new Date(timer)
  418. return time.getTime() > data.getTime()
  419. }
  420. const disabledEndDate = (time: Date) => {
  421. const timer: any = form.startDate
  422. let data = new Date(timer)
  423. return data.getTime() > time.getTime()
  424. }
  425. const resetForm = () => {
  426. flag.value = false
  427. }
  428. const submitForm = () => {
  429. flag.value = false
  430. let dates: any = {}
  431. switch (timePickerName.value) {
  432. case showTimeMsg.HourlyPeak:
  433. dates = hourlyDates
  434. loading1.value = true
  435. break
  436. case showTimeMsg.WaybillTrend:
  437. dates = waybillDates
  438. loading2.value = true
  439. break
  440. case showTimeMsg.NodePeak:
  441. dates = nodeDates
  442. loading3.value = true
  443. break
  444. case showTimeMsg.AirlineTraffic:
  445. dates = airlineTrafficDates
  446. loading6.value = true
  447. break
  448. case showTimeMsg.SpecialClassification:
  449. dates = airlineDates
  450. loading7.value = true
  451. break
  452. case showTimeMsg.PickingStatistics:
  453. dates = pickingDates
  454. loading8.value = true
  455. break
  456. default:
  457. break
  458. }
  459. dates.startDate = form.startDate
  460. dates.endDate = form.endDate
  461. }
  462. const showDatePicker = (id?) => {
  463. flag.value = true
  464. timePickerName.value = id
  465. let dates: any = {}
  466. switch (id) {
  467. case showTimeMsg.HourlyPeak:
  468. dates = hourlyDates
  469. break
  470. case showTimeMsg.WaybillTrend:
  471. dates = waybillDates
  472. break
  473. case showTimeMsg.NodePeak:
  474. dates = nodeDates
  475. break
  476. case showTimeMsg.AirlineTraffic:
  477. dates = airlineTrafficDates
  478. break
  479. case showTimeMsg.SpecialClassification:
  480. dates = airlineDates
  481. break
  482. case showTimeMsg.PickingStatistics:
  483. dates = pickingDates
  484. break
  485. default:
  486. break
  487. }
  488. form.startDate = dates.startDate || null
  489. form.endDate = dates.endDate || null
  490. }
  491. const sortClass = sortData => {
  492. const groupBy = (array, f) => {
  493. let groups = {}
  494. array.forEach(o => {
  495. let group = JSON.stringify(f(o))
  496. groups[group] = groups[group] || []
  497. groups[group].push(o)
  498. })
  499. return Object.keys(groups).map(group => {
  500. return groups[group]
  501. })
  502. }
  503. const sorted = groupBy(sortData, item => {
  504. return item.jobName
  505. })
  506. return sorted
  507. }
  508. const pubFunc = (listValues, target, type?) => {
  509. const newObj = _.cloneDeep(target)
  510. const [jobTimes, stockNums, weights] = [<any>[], <any>[], <any>[]]
  511. listValues.forEach(item => {
  512. jobTimes.push(item.jobTime)
  513. stockNums.push(item.stockNum)
  514. weights.push(item.weight)
  515. })
  516. newObj.xAxis.data = jobTimes
  517. if (type) {
  518. newObj.series[1].data = stockNums
  519. newObj.series[0].data = weights
  520. } else {
  521. newObj.series[0].data = stockNums
  522. newObj.series[1].data = weights
  523. }
  524. return newObj
  525. }
  526. // 特货分类统计-选取下拉数据
  527. const handleCommand = (command: string) => {
  528. specialGoods.value = command
  529. }
  530. //获取小时峰值分布
  531. const hourlyDates = reactive({ startDate: today, endDate: today })
  532. const hourlyPeakFunc = async () => {
  533. const listValues = (await getPublicData(DATACONTENT_ID.jscHourlyPeakId, [
  534. { flightDate1: hourlyDates.startDate, flightDate2: hourlyDates.endDate },
  535. ])) as any
  536. if (listValues && isValue(listValues)) {
  537. hourlyPeakObj.value = pubFunc(listValues, optionLeft, true)
  538. }
  539. loading1.value = false
  540. }
  541. //运单趋势分析
  542. const waybillDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  543. const waybillTrendFunc = async () => {
  544. const listValues = (await getPublicData(DATACONTENT_ID.jscWaybillTrendId, [
  545. { flightDate1: waybillDates.startDate, flightDate2: waybillDates.endDate },
  546. ])) as any
  547. if (listValues && isValue(listValues)) {
  548. const dealedList = listValues.reduce((preList, currentValue) => {
  549. if (typeof currentValue.jobTime === 'string') {
  550. return [
  551. ...preList,
  552. {
  553. ...currentValue,
  554. jobTime: parseDate(currentValue.jobTime),
  555. },
  556. ]
  557. }
  558. return preList
  559. }, [])
  560. waybillTrendObj.value = pubFunc(dealedList, optionLeft, true)
  561. }
  562. loading2.value = false
  563. }
  564. //始发站/目的站统计分析
  565. const nodeDates = reactive({ startDate: today, endDate: today })
  566. const nodePeakFunc = async () => {
  567. const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineAbnormalId, [
  568. {
  569. fd1: nodeDates.startDate,
  570. fd2: nodeDates.endDate,
  571. fttp: '国内离港',
  572. },
  573. ])) as any
  574. if (listValues && isValue(listValues)) {
  575. const newObj = _.cloneDeep(airCompaneBaggage.option.baseOption)
  576. listValues.forEach(item => {
  577. item.jobTime = item['airport']
  578. })
  579. nodePeakObj.value = pubFunc(listValues, newObj, true)
  580. }
  581. loading3.value = false
  582. }
  583. //航班数&运单数
  584. const numbersFunc = async () => {
  585. const listValues = (await getPublicData(DATACONTENT_ID.jscNumbersId, [
  586. {
  587. fd1: today,
  588. fd2: today,
  589. },
  590. ])) as any
  591. if (listValues && isValue(listValues)) {
  592. const { flightNum, finishFlightNum, weight } = listValues[0]
  593. flightNums.value = flightNum ?? 0
  594. stockNums.value = finishFlightNum ?? 0
  595. weightNums.value = weight ?? 0
  596. }
  597. loading4.value = false
  598. }
  599. //航司运量
  600. const airlineTrafficDates = reactive({
  601. startDate: sevenDaysAgo,
  602. endDate: today,
  603. })
  604. const airlineTrafficFunc = async () => {
  605. const listValues = await getPublicData(DATACONTENT_ID.jscAirlineTrafficId, [
  606. {
  607. flightDate1: airlineTrafficDates.startDate,
  608. flightDate2: airlineTrafficDates.endDate,
  609. },
  610. ])
  611. if (listValues && isValue(listValues)) {
  612. const newObj: any = _.cloneDeep(airCompaneBaggage.option.baseOption)
  613. newObj.dataZoom = [
  614. {
  615. id: 'dataZoomX',
  616. type: 'slider',
  617. xAxisIndex: [0],
  618. filterMode: 'filter',
  619. start: 0,
  620. end: 20,
  621. },
  622. ]
  623. listValues.forEach(item => {
  624. item.jobTime = item['IACACode']
  625. })
  626. airlineTrafficObj.value = pubFunc(listValues, newObj, true)
  627. }
  628. loading6.value = false
  629. }
  630. //航班表格
  631. const airlineAbnormalFunc = async () => {
  632. const listValues = (await getPublicData(DATACONTENT_ID.jscFlightDynamicsId, [
  633. {
  634. fd1: today,
  635. fd2: today,
  636. fttp: '国内离港',
  637. },
  638. ])) as any
  639. const domHeight = scrollContent.value?.clientHeight
  640. if (domHeight && typeof domHeight == 'number') {
  641. const cell = Math.ceil(domHeight / 40)
  642. limitScrollNum.value = cell
  643. }
  644. if (listValues && isValue(listValues)) {
  645. listData.value = listValues
  646. }
  647. loading5.value = false
  648. }
  649. //航班动态统计
  650. // const airlineFunc = async () => {
  651. // loading7.value = true;
  652. // const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineId, [
  653. // {
  654. // fd1: form.value.startDate,
  655. // fd2: form.value.endDate,
  656. // },
  657. // ])) as any;
  658. // if (listValues && isValue(listValues)) {
  659. // const res = findData(
  660. // nodeCode.departure,
  661. // listValues,
  662. // "nodeCode",
  663. // "flightNum"
  664. // );
  665. // const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
  666. // (newObj.dataZoom = [
  667. // {
  668. // id: "dataZoomX",
  669. // type: "slider",
  670. // xAxisIndex: [0],
  671. // filterMode: "filter",
  672. // start: 0,
  673. // end: 40,
  674. // },
  675. // ]),
  676. // res.forEach((item) => {
  677. // item.jobTime = item["name"] ?? item["nodeCode"];
  678. // item.weight = item["flightNum"];
  679. // });
  680. // airlineObj.value = pubFunc(res, newObj);
  681. // }
  682. // loading7.value = false;
  683. // };
  684. //特货分类统计
  685. const airlineDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  686. const airlineFunc = async () => {
  687. const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
  688. {
  689. fd1: airlineDates.startDate,
  690. fd2: airlineDates.endDate,
  691. fttp: '国内离港',
  692. spe: specialGoods.value,
  693. },
  694. ])) as any
  695. if (listValues && isValue(listValues)) {
  696. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  697. const newDatas = _.cloneDeep(listValues)
  698. const result = formatGoods(specialGoods.value, newDatas)
  699. airlineObj.value = pubFunc(result, newObj)
  700. }
  701. loading7.value = false
  702. }
  703. //拉货统计
  704. const pickingDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  705. const pickingFuncs = async () => {
  706. const listValues = (await getPublicData(DATACONTENT_ID.jscGgPullId, [
  707. {
  708. fd1: pickingDates.startDate,
  709. fd2: pickingDates.endDate,
  710. },
  711. ])) as any
  712. if (listValues && isValue(listValues)) {
  713. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  714. const dealedList = listValues.reduce((preList, currentValue) => {
  715. if (typeof currentValue.flightDate === 'string') {
  716. return [
  717. ...preList,
  718. {
  719. ...currentValue,
  720. jobTime: parseDate(currentValue.flightDate),
  721. weight: currentValue.flightNum,
  722. },
  723. ]
  724. }
  725. return preList
  726. }, [])
  727. pickingObj.value = pubFunc(dealedList, newObj)
  728. }
  729. loading8.value = false
  730. }
  731. useLoop([hourlyPeakFunc], 'dashboard', [hourlyDates])
  732. useLoop([waybillTrendFunc], 'dashboard', [waybillDates])
  733. useLoop([nodePeakFunc], 'dashboard', [nodeDates])
  734. useLoop([numbersFunc], 'dashboard')
  735. useLoop([airlineTrafficFunc], 'dashboard', [airlineTrafficDates])
  736. useLoop([airlineAbnormalFunc], 'dashboard')
  737. useLoop([airlineFunc], 'dashboard', [airlineDates, specialGoods])
  738. useLoop([pickingFuncs], 'dashboard', [pickingDates])
  739. </script>
  740. <style lang="scss" scoped>
  741. @import './css/index.scss';
  742. </style>