internationalDeparture.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  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. const weightNums = ref<number | string>(0)
  416. const today = parseTime(Date.now(), '{y}-{m}-{d}')
  417. const sevenDaysAgo = parseTime(
  418. Date.now() - 24 * 60 * 60 * 1000 * 7,
  419. '{y}-{m}-{d}'
  420. )
  421. const form = reactive({
  422. startDate: sevenDaysAgo,
  423. endDate: today,
  424. })
  425. const listData = ref<any>([])
  426. const disabledStartDate = (time: Date) => {
  427. const timer: any = form.endDate
  428. const data = new Date(timer)
  429. return time.getTime() > data.getTime()
  430. }
  431. const disabledEndDate = (time: Date) => {
  432. const timer: any = form.startDate
  433. let data = new Date(timer)
  434. return data.getTime() > time.getTime()
  435. }
  436. const resetForm = () => {
  437. flag.value = false
  438. }
  439. const submitForm = () => {
  440. flag.value = false
  441. let dates: any = {}
  442. switch (timePickerName.value) {
  443. case showTimeMsg.HourlyPeak:
  444. dates = hourlyDates
  445. loading1.value = true
  446. break
  447. case showTimeMsg.WaybillTrend:
  448. dates = waybillDates
  449. loading2.value = true
  450. break
  451. case showTimeMsg.NodePeak:
  452. dates = nodeDates
  453. loading3.value = true
  454. break
  455. case showTimeMsg.AirlineTraffic:
  456. dates = airlineTrafficDates
  457. loading6.value = true
  458. break
  459. case showTimeMsg.SpecialClassification:
  460. dates = airlineDates
  461. loading7.value = true
  462. break
  463. case showTimeMsg.PickingStatistics:
  464. dates = pickingDates
  465. loading8.value = true
  466. break
  467. default:
  468. break
  469. }
  470. dates.startDate = form.startDate
  471. dates.endDate = form.endDate
  472. }
  473. const showDatePicker = (id?) => {
  474. flag.value = true
  475. timePickerName.value = id
  476. let dates: any = {}
  477. switch (id) {
  478. case showTimeMsg.HourlyPeak:
  479. dates = hourlyDates
  480. break
  481. case showTimeMsg.WaybillTrend:
  482. dates = waybillDates
  483. break
  484. case showTimeMsg.NodePeak:
  485. dates = nodeDates
  486. break
  487. case showTimeMsg.AirlineTraffic:
  488. dates = airlineTrafficDates
  489. break
  490. case showTimeMsg.SpecialClassification:
  491. dates = airlineDates
  492. break
  493. case showTimeMsg.PickingStatistics:
  494. dates = pickingDates
  495. break
  496. default:
  497. break
  498. }
  499. form.startDate = dates.startDate || null
  500. form.endDate = dates.endDate || null
  501. }
  502. const sortClass = sortData => {
  503. const groupBy = (array, f) => {
  504. let groups = {}
  505. array.forEach(o => {
  506. let group = JSON.stringify(f(o))
  507. groups[group] = groups[group] || []
  508. groups[group].push(o)
  509. })
  510. return Object.keys(groups).map(group => {
  511. return groups[group]
  512. })
  513. }
  514. const sorted = groupBy(sortData, item => {
  515. return item.jobName
  516. })
  517. return sorted
  518. }
  519. const pubFunc = (listValues, target, type?) => {
  520. const newObj = _.cloneDeep(target)
  521. const [jobTimes, stockNums, weights] = [<any>[], <any>[], <any>[]]
  522. listValues.forEach(item => {
  523. jobTimes.push(item.jobTime)
  524. stockNums.push(item.stockNum)
  525. weights.push(item.weight)
  526. })
  527. newObj.xAxis.data = jobTimes
  528. if (type) {
  529. newObj.series[1].data = stockNums
  530. newObj.series[0].data = weights
  531. } else {
  532. newObj.series[0].data = stockNums
  533. newObj.series[1].data = weights
  534. }
  535. return newObj
  536. }
  537. // 特货分类统计-选取下拉数据
  538. const handleCommand = (command: string) => {
  539. specialGoods.value = command
  540. }
  541. //获取小时峰值分布
  542. const hourlyDates = reactive({ startDate: today, endDate: today })
  543. const hourlyPeakFunc = async () => {
  544. const listValues = (await getPublicData(DATACONTENT_ID.jscGjHourlyPeakId, [
  545. { flightDate1: hourlyDates.startDate, flightDate2: hourlyDates.endDate },
  546. ])) as any
  547. if (listValues && isValue(listValues)) {
  548. hourlyPeakObj.value = pubFunc(listValues, optionLeft, true)
  549. }
  550. loading1.value = false
  551. }
  552. //运单趋势分析
  553. const waybillDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  554. const waybillTrendFunc = async () => {
  555. const listValues = (await getPublicData(DATACONTENT_ID.jscGjWaybillTrendId, [
  556. { flightDate1: waybillDates.startDate, flightDate2: waybillDates.endDate },
  557. ])) as any
  558. if (listValues && isValue(listValues)) {
  559. const dealedList = listValues.reduce((preList, currentValue) => {
  560. if (typeof currentValue.jobTime === 'string') {
  561. return [
  562. ...preList,
  563. {
  564. ...currentValue,
  565. jobTime: parseDate(currentValue.jobTime),
  566. },
  567. ]
  568. }
  569. return preList
  570. }, [])
  571. waybillTrendObj.value = pubFunc(dealedList, optionLeft, true)
  572. }
  573. loading2.value = false
  574. }
  575. //始发站/目的站统计分析
  576. const nodeDates = reactive({ startDate: today, endDate: today })
  577. const nodePeakFunc = async () => {
  578. const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineAbnormalId, [
  579. {
  580. fd1: nodeDates.startDate,
  581. fd2: nodeDates.endDate,
  582. fttp: '国际离港',
  583. },
  584. ])) as any
  585. if (listValues && isValue(listValues)) {
  586. const newObj = _.cloneDeep(airCompaneBaggage.option.baseOption)
  587. listValues.forEach(item => {
  588. item.jobTime = item['airport']
  589. })
  590. nodePeakObj.value = pubFunc(listValues, newObj, true)
  591. }
  592. loading3.value = false
  593. }
  594. //航班数&运单数
  595. const numbersFunc = async () => {
  596. const listValues = (await getPublicData(DATACONTENT_ID.jscGjNumbersId, [
  597. {
  598. fd1: today,
  599. fd2: today,
  600. },
  601. ])) as any
  602. if (listValues && isValue(listValues)) {
  603. const { flightNum, finishFlightNum, weight } = listValues[0]
  604. flightNums.value = flightNum ?? 0
  605. stockNums.value = finishFlightNum ?? 0
  606. weightNums.value = weight ?? 0
  607. }
  608. loading4.value = false
  609. }
  610. //航司运量
  611. const airlineTrafficDates = reactive({
  612. startDate: sevenDaysAgo,
  613. endDate: today,
  614. })
  615. const airlineTrafficFunc = async () => {
  616. const listValues = await getPublicData(DATACONTENT_ID.jscGjAirlineTrafficId, [
  617. {
  618. flightDate1: airlineTrafficDates.startDate,
  619. flightDate2: airlineTrafficDates.endDate,
  620. },
  621. ])
  622. if (listValues && isValue(listValues)) {
  623. const newObj: any = _.cloneDeep(airCompaneBaggage.option.baseOption)
  624. newObj.dataZoom = [
  625. {
  626. id: 'dataZoomX',
  627. type: 'slider',
  628. xAxisIndex: [0],
  629. filterMode: 'filter',
  630. start: 0,
  631. end: 20,
  632. },
  633. ]
  634. listValues.forEach(item => {
  635. item.jobTime = item['IACACode']
  636. })
  637. airlineTrafficObj.value = pubFunc(listValues, newObj, true)
  638. }
  639. loading6.value = false
  640. }
  641. //航班表格
  642. const airlineAbnormalFunc = async () => {
  643. const listValues = (await getPublicData(DATACONTENT_ID.jscFlightDynamicsId, [
  644. {
  645. fd1: today,
  646. fd2: today,
  647. fttp: '国际离港',
  648. },
  649. ])) as any
  650. const domHeight = scrollContent.value?.clientHeight
  651. if (domHeight && typeof domHeight == 'number') {
  652. const cell = Math.ceil(domHeight / 40)
  653. limitScrollNum.value = cell
  654. }
  655. if (listValues && isValue(listValues)) {
  656. listData.value = listValues
  657. }
  658. loading5.value = false
  659. }
  660. //航班动态统计
  661. const airlineDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  662. const airlineFunc = async () => {
  663. const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
  664. {
  665. fd1: airlineDates.startDate,
  666. fd2: airlineDates.endDate,
  667. fttp: '国际离港',
  668. spe: specialGoods.value,
  669. },
  670. ])) as any
  671. if (listValues && isValue(listValues)) {
  672. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  673. const newDatas = _.cloneDeep(listValues)
  674. const result = formatGoods(specialGoods.value, newDatas)
  675. airlineObj.value = pubFunc(result, newObj)
  676. }
  677. loading7.value = false
  678. }
  679. //拉货统计
  680. const pickingDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  681. const pickingFuncs = async () => {
  682. const listValues = (await getPublicData(DATACONTENT_ID.jscGjPullId, [
  683. {
  684. fd1: pickingDates.startDate,
  685. fd2: pickingDates.endDate,
  686. },
  687. ])) as any
  688. if (listValues && isValue(listValues)) {
  689. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  690. const dealedList = listValues.reduce((preList, currentValue) => {
  691. if (typeof currentValue.flightDate === 'string') {
  692. return [
  693. ...preList,
  694. {
  695. ...currentValue,
  696. jobTime: parseDate(currentValue.flightDate),
  697. weight: currentValue.flightNum,
  698. },
  699. ]
  700. }
  701. return preList
  702. }, [])
  703. pickingObj.value = pubFunc(dealedList, newObj)
  704. }
  705. loading8.value = false
  706. }
  707. useLoop([hourlyPeakFunc], 'dashboard', [hourlyDates])
  708. useLoop([waybillTrendFunc], 'dashboard', [waybillDates])
  709. useLoop([nodePeakFunc], 'dashboard', [nodeDates])
  710. useLoop([numbersFunc], 'dashboard')
  711. useLoop([airlineTrafficFunc], 'dashboard', [airlineTrafficDates])
  712. useLoop([airlineAbnormalFunc], 'dashboard')
  713. useLoop([airlineFunc], 'dashboard', [airlineDates, specialGoods])
  714. useLoop([pickingFuncs], 'dashboard', [pickingDates])
  715. </script>
  716. <style lang="scss" scoped>
  717. @import './css/index.scss';
  718. </style>