internationalArrival.vue 24 KB

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