internationalDeparture.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  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">
  203. {{ item.preTime || '--' }}
  204. </div> -->
  205. <div
  206. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  207. >
  208. {{ item.acTime || '--' }}
  209. </div>
  210. <div
  211. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  212. >
  213. {{ item.planeType }}
  214. </div>
  215. <div
  216. class="dashboard-content-top-center-bottom-content-bottom-list-txt"
  217. >
  218. {{ item.KHT }}
  219. </div>
  220. </div>
  221. </vue3-seamless-scroll>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <div class="dashboard-content-top-right">
  227. <div class="dashboard-content-top-right-item">
  228. <div class="dashboard-content-top-right-item-top">
  229. <div class="dashboard-content-top-right-item-top-title">
  230. 航司统计分析
  231. </div>
  232. <div
  233. class="dashboard-content-top-right-item-top-time"
  234. @click="showDatePicker(showTimeMsg.AirlineTraffic)"
  235. >
  236. <el-icon color="#ffffff" size="18">
  237. <Calendar />
  238. </el-icon>
  239. <el-icon color="#ffffff">
  240. <CaretBottom />
  241. </el-icon>
  242. </div>
  243. </div>
  244. <div
  245. v-loading="loading6"
  246. element-loading-text="数据加载中..."
  247. element-loading-background="rgba(0,0,0, 0.3)"
  248. class="dashboard-content-top-right-item-bottom"
  249. >
  250. <Echarts id="a1" :option="airlineTrafficObj" />
  251. </div>
  252. </div>
  253. <div class="dashboard-content-top-right-item">
  254. <div class="dashboard-content-top-right-item-top">
  255. <div class="dashboard-content-top-right-item-top-title">
  256. 特货分类统计
  257. </div>
  258. <div
  259. class="dashboard-content-top-right-item-top-time"
  260. @click="showDatePicker(showTimeMsg.SpecialClassification)"
  261. >
  262. <el-icon color="#ffffff" size="18">
  263. <Calendar />
  264. </el-icon>
  265. <el-icon color="#ffffff">
  266. <CaretBottom />
  267. </el-icon>
  268. </div>
  269. <div class="dashboard-content-top-right-item-top-time">
  270. <el-dropdown
  271. :disabled="!specialGoodsDatas.length"
  272. trigger="click"
  273. @command="handleCommand"
  274. >
  275. <span class="icons">
  276. <span class="icons-txt">{{ specialGoods }}</span>
  277. <el-icon color="#ffffff">
  278. <CaretBottom />
  279. </el-icon>
  280. </span>
  281. <template #dropdown>
  282. <el-dropdown-menu>
  283. <el-dropdown-item
  284. v-for="specialTypeName in specialGoodsDatas"
  285. :key="specialTypeName"
  286. :command="specialTypeName"
  287. >{{ specialTypeName }}</el-dropdown-item
  288. >
  289. </el-dropdown-menu>
  290. </template>
  291. </el-dropdown>
  292. </div>
  293. </div>
  294. <div
  295. v-loading="loading7"
  296. element-loading-text="数据加载中..."
  297. element-loading-background="rgba(0,0,0, 0.3)"
  298. class="dashboard-content-top-left-item-bottom"
  299. >
  300. <Echarts id="ww44" :option="airlineObj" />
  301. </div>
  302. </div>
  303. <div class="dashboard-content-top-right-item">
  304. <div class="dashboard-content-top-right-item-top">
  305. <div class="dashboard-content-top-right-item-top-title">
  306. 拉货统计分析
  307. </div>
  308. <div
  309. class="dashboard-content-top-right-item-top-time"
  310. @click="showDatePicker(showTimeMsg.PickingStatistics)"
  311. >
  312. <el-icon color="#ffffff" size="18">
  313. <Calendar />
  314. </el-icon>
  315. <el-icon color="#ffffff">
  316. <CaretBottom />
  317. </el-icon>
  318. </div>
  319. </div>
  320. <div
  321. v-loading="loading8"
  322. element-loading-text="数据加载中..."
  323. element-loading-background="rgba(0,0,0, 0.3)"
  324. class="dashboard-content-top-left-item-bottom"
  325. >
  326. <Echarts id="ww45" :option="pickingObj" />
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. <Dialog
  333. :flag="flag"
  334. msg-title="日期选择"
  335. @resetForm="resetForm"
  336. @submitForm="submitForm"
  337. >
  338. <el-form :model="form" label-width="120px">
  339. <el-form-item label="开始日期">
  340. <el-date-picker
  341. :disabled-date="disabledStartDate"
  342. v-model="form.startDate"
  343. type="date"
  344. placeholder="请选择开始日期"
  345. size="default"
  346. format="YYYY-MM-DD"
  347. value-format="YYYY-MM-DD"
  348. />
  349. </el-form-item>
  350. <el-form-item label="结束日期">
  351. <el-date-picker
  352. :disabled-date="disabledEndDate"
  353. v-model="form.endDate"
  354. type="date"
  355. placeholder="请选择结束日期"
  356. size="default"
  357. format="YYYY-MM-DD"
  358. value-format="YYYY-MM-DD"
  359. />
  360. </el-form-item>
  361. </el-form>
  362. </Dialog>
  363. </div>
  364. </template>
  365. <script setup lang="ts">
  366. import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
  367. import Echarts from '@/components/Echarts/commonChartsBar.vue'
  368. import ComHead from './components/comHead.vue'
  369. import { Calendar, CaretBottom } from '@element-plus/icons-vue'
  370. import Dialog from '@/components/dialog/index.vue'
  371. import { usePublic, showTimeMsg, parseDate } from './hooks/usePublic'
  372. // import nodeCode from './hooks/nodeCode'
  373. import { parseTime, isValue } from '@/utils/validate'
  374. import * as _ from 'lodash'
  375. import { useLoop } from '@/hooks/useLoop'
  376. const {
  377. optionLeft,
  378. airCompaneBaggage,
  379. airlineAbnormalBaggage,
  380. getPublicData,
  381. formatGoods,
  382. formatWeight,
  383. } = usePublic()
  384. const timePickerName = ref(0)
  385. const limitScrollNum = ref(13)
  386. const scrollContent = ref<HTMLElement>()
  387. const flag = ref(false)
  388. const loading1 = ref(true)
  389. const loading2 = ref(true)
  390. const loading3 = ref(true)
  391. const loading4 = ref(true)
  392. const loading5 = ref(true)
  393. const loading6 = ref(true)
  394. const loading7 = ref(true)
  395. const loading8 = ref(true)
  396. const hourlyPeakObj = ref<any>({})
  397. const waybillTrendObj = ref<any>({})
  398. const nodePeakObj = ref<any>({})
  399. const airlineTrafficObj = ref<any>({})
  400. const airlineObj = ref<any>({})
  401. const pickingObj = ref<any>({})
  402. const flightNums = ref(0)
  403. const stockNums = ref(0)
  404. const specialGoods = ref('全部')
  405. const specialGoodsDatas = ref([
  406. '活',
  407. '鲜',
  408. '药',
  409. '危',
  410. '冷',
  411. '锂',
  412. '快',
  413. '动',
  414. '贵',
  415. '邮',
  416. '全部',
  417. ])
  418. const weightNums = ref<number | string>(0)
  419. const today = parseTime(Date.now(), '{y}-{m}-{d}')
  420. const sevenDaysAgo = parseTime(
  421. Date.now() - 24 * 60 * 60 * 1000 * 7,
  422. '{y}-{m}-{d}'
  423. )
  424. const form = reactive({
  425. startDate: sevenDaysAgo,
  426. endDate: today,
  427. })
  428. const listData = ref<any>([])
  429. const disabledStartDate = (time: Date) => {
  430. const timer: any = form.endDate
  431. const data = new Date(timer)
  432. return time.getTime() > data.getTime()
  433. }
  434. const disabledEndDate = (time: Date) => {
  435. const timer: any = form.startDate
  436. let data = new Date(timer)
  437. return data.getTime() > time.getTime()
  438. }
  439. const resetForm = () => {
  440. flag.value = false
  441. }
  442. const submitForm = () => {
  443. flag.value = false
  444. let dates: any = {}
  445. switch (timePickerName.value) {
  446. case showTimeMsg.HourlyPeak:
  447. dates = hourlyDates
  448. loading1.value = true
  449. break
  450. case showTimeMsg.WaybillTrend:
  451. dates = waybillDates
  452. loading2.value = true
  453. break
  454. case showTimeMsg.NodePeak:
  455. dates = nodeDates
  456. loading3.value = true
  457. break
  458. case showTimeMsg.AirlineTraffic:
  459. dates = airlineTrafficDates
  460. loading6.value = true
  461. break
  462. case showTimeMsg.SpecialClassification:
  463. dates = airlineDates
  464. loading7.value = true
  465. break
  466. case showTimeMsg.PickingStatistics:
  467. dates = pickingDates
  468. loading8.value = true
  469. break
  470. default:
  471. break
  472. }
  473. dates.startDate = form.startDate
  474. dates.endDate = form.endDate
  475. }
  476. const showDatePicker = (id?) => {
  477. flag.value = true
  478. timePickerName.value = id
  479. let dates: any = {}
  480. switch (id) {
  481. case showTimeMsg.HourlyPeak:
  482. dates = hourlyDates
  483. break
  484. case showTimeMsg.WaybillTrend:
  485. dates = waybillDates
  486. break
  487. case showTimeMsg.NodePeak:
  488. dates = nodeDates
  489. break
  490. case showTimeMsg.AirlineTraffic:
  491. dates = airlineTrafficDates
  492. break
  493. case showTimeMsg.SpecialClassification:
  494. dates = airlineDates
  495. break
  496. case showTimeMsg.PickingStatistics:
  497. dates = pickingDates
  498. break
  499. default:
  500. break
  501. }
  502. form.startDate = dates.startDate || null
  503. form.endDate = dates.endDate || null
  504. }
  505. const sortClass = sortData => {
  506. const groupBy = (array, f) => {
  507. let groups = {}
  508. array.forEach(o => {
  509. let group = JSON.stringify(f(o))
  510. groups[group] = groups[group] || []
  511. groups[group].push(o)
  512. })
  513. return Object.keys(groups).map(group => {
  514. return groups[group]
  515. })
  516. }
  517. const sorted = groupBy(sortData, item => {
  518. return item.jobName
  519. })
  520. return sorted
  521. }
  522. const pubFunc = (listValues, target, type?) => {
  523. const newObj = _.cloneDeep(target)
  524. const [jobTimes, stockNums, weights] = [<any>[], <any>[], <any>[]]
  525. listValues.forEach(item => {
  526. jobTimes.push(item.jobTime)
  527. stockNums.push(item.stockNum)
  528. weights.push(item.weight)
  529. })
  530. newObj.xAxis.data = jobTimes
  531. if (type) {
  532. newObj.series[1].data = stockNums
  533. newObj.series[0].data = weights
  534. } else {
  535. newObj.series[0].data = stockNums
  536. newObj.series[1].data = weights
  537. }
  538. return newObj
  539. }
  540. // 特货分类统计-选取下拉数据
  541. const handleCommand = (command: string) => {
  542. specialGoods.value = command
  543. }
  544. //获取小时峰值分布
  545. const hourlyDates = reactive({ startDate: today, endDate: today })
  546. const hourlyPeakFunc = async () => {
  547. const listValues = (await getPublicData(DATACONTENT_ID.jscGjHourlyPeakId, [
  548. { flightDate1: hourlyDates.startDate, flightDate2: hourlyDates.endDate },
  549. ])) as any
  550. if (listValues && isValue(listValues)) {
  551. hourlyPeakObj.value = pubFunc(listValues, optionLeft, true)
  552. }
  553. loading1.value = false
  554. }
  555. //运单趋势分析
  556. const waybillDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  557. const waybillTrendFunc = async () => {
  558. const listValues = (await getPublicData(DATACONTENT_ID.jscGjWaybillTrendId, [
  559. { flightDate1: waybillDates.startDate, flightDate2: waybillDates.endDate },
  560. ])) as any
  561. if (listValues && isValue(listValues)) {
  562. const dealedList = listValues.reduce((preList, currentValue) => {
  563. if (typeof currentValue.jobTime === 'string') {
  564. return [
  565. ...preList,
  566. {
  567. ...currentValue,
  568. jobTime: parseDate(currentValue.jobTime),
  569. },
  570. ]
  571. }
  572. return preList
  573. }, [])
  574. waybillTrendObj.value = pubFunc(dealedList, optionLeft, true)
  575. }
  576. loading2.value = false
  577. }
  578. //始发站/目的站统计分析
  579. const nodeDates = reactive({ startDate: today, endDate: today })
  580. const nodePeakFunc = async () => {
  581. const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineAbnormalId, [
  582. {
  583. fd1: nodeDates.startDate,
  584. fd2: nodeDates.endDate,
  585. fttp: '国际离港',
  586. },
  587. ])) as any
  588. if (listValues && isValue(listValues)) {
  589. const newObj = _.cloneDeep(airCompaneBaggage.option.baseOption)
  590. listValues.forEach(item => {
  591. item.jobTime = item['airport']
  592. })
  593. nodePeakObj.value = pubFunc(listValues, newObj, true)
  594. }
  595. loading3.value = false
  596. }
  597. //航班数&运单数
  598. const numbersFunc = async () => {
  599. const listValues = (await getPublicData(DATACONTENT_ID.jscGjNumbersId, [
  600. {
  601. fd1: today,
  602. fd2: today,
  603. },
  604. ])) as any
  605. if (listValues && isValue(listValues)) {
  606. const { flightNum, finishFlightNum, weight } = listValues[0]
  607. flightNums.value = flightNum ?? 0
  608. stockNums.value = finishFlightNum ?? 0
  609. weightNums.value = weight ?? 0
  610. }
  611. loading4.value = false
  612. }
  613. //航司运量
  614. const airlineTrafficDates = reactive({
  615. startDate: sevenDaysAgo,
  616. endDate: today,
  617. })
  618. const airlineTrafficFunc = async () => {
  619. const listValues = await getPublicData(DATACONTENT_ID.jscGjAirlineTrafficId, [
  620. {
  621. flightDate1: airlineTrafficDates.startDate,
  622. flightDate2: airlineTrafficDates.endDate,
  623. },
  624. ])
  625. if (listValues && isValue(listValues)) {
  626. const newObj: any = _.cloneDeep(airCompaneBaggage.option.baseOption)
  627. newObj.dataZoom = [
  628. {
  629. id: 'dataZoomX',
  630. type: 'slider',
  631. xAxisIndex: [0],
  632. filterMode: 'filter',
  633. start: 0,
  634. end: 20,
  635. },
  636. ]
  637. listValues.forEach(item => {
  638. item.jobTime = item['IACACode']
  639. })
  640. airlineTrafficObj.value = pubFunc(listValues, newObj, true)
  641. }
  642. loading6.value = false
  643. }
  644. //航班表格
  645. const airlineAbnormalFunc = async () => {
  646. const listValues = (await getPublicData(DATACONTENT_ID.jscFlightDynamicsId, [
  647. {
  648. fd1: today,
  649. fd2: today,
  650. fttp: '国际离港',
  651. },
  652. ])) as any
  653. const domHeight = scrollContent.value?.clientHeight
  654. if (domHeight && typeof domHeight == 'number') {
  655. const cell = Math.ceil(domHeight / 40)
  656. limitScrollNum.value = cell
  657. }
  658. if (listValues && isValue(listValues)) {
  659. listData.value = listValues
  660. }
  661. loading5.value = false
  662. }
  663. //航班动态统计
  664. const airlineDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  665. const airlineFunc = async () => {
  666. const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
  667. {
  668. fd1: airlineDates.startDate,
  669. fd2: airlineDates.endDate,
  670. fttp: '国际离港',
  671. spe: specialGoods.value,
  672. },
  673. ])) as any
  674. if (listValues && isValue(listValues)) {
  675. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  676. const newDatas = _.cloneDeep(listValues)
  677. const result = formatGoods(specialGoods.value, newDatas)
  678. airlineObj.value = pubFunc(result, newObj)
  679. }
  680. loading7.value = false
  681. }
  682. //拉货统计
  683. const pickingDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  684. const pickingFuncs = async () => {
  685. const listValues = (await getPublicData(DATACONTENT_ID.jscGjPullId, [
  686. {
  687. fd1: pickingDates.startDate,
  688. fd2: pickingDates.endDate,
  689. },
  690. ])) as any
  691. if (listValues && isValue(listValues)) {
  692. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  693. const dealedList = listValues.reduce((preList, currentValue) => {
  694. if (typeof currentValue.flightDate === 'string') {
  695. return [
  696. ...preList,
  697. {
  698. ...currentValue,
  699. jobTime: parseDate(currentValue.flightDate),
  700. weight: currentValue.flightNum,
  701. },
  702. ]
  703. }
  704. return preList
  705. }, [])
  706. pickingObj.value = pubFunc(dealedList, newObj)
  707. }
  708. loading8.value = false
  709. }
  710. useLoop([hourlyPeakFunc], 'dashboard', [hourlyDates])
  711. useLoop([waybillTrendFunc], 'dashboard', [waybillDates])
  712. useLoop([nodePeakFunc], 'dashboard', [nodeDates])
  713. useLoop([numbersFunc], 'dashboard')
  714. useLoop([airlineTrafficFunc], 'dashboard', [airlineTrafficDates])
  715. useLoop([airlineAbnormalFunc], 'dashboard')
  716. useLoop([airlineFunc], 'dashboard', [airlineDates, specialGoods])
  717. useLoop([pickingFuncs], 'dashboard', [pickingDates])
  718. </script>
  719. <style lang="scss" scoped>
  720. @import './css/index.scss';
  721. </style>