departure.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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. v-model="form.startDate"
  340. type="date"
  341. placeholder="请选择开始日期"
  342. size="default"
  343. format="YYYY-MM-DD"
  344. value-format="YYYY-MM-DD"
  345. />
  346. </el-form-item>
  347. <el-form-item label="结束日期">
  348. <el-date-picker
  349. v-model="form.endDate"
  350. :disabled-date="disabledEndDate"
  351. type="date"
  352. placeholder="请选择结束日期"
  353. size="default"
  354. format="YYYY-MM-DD"
  355. value-format="YYYY-MM-DD"
  356. />
  357. </el-form-item>
  358. </el-form>
  359. </Dialog>
  360. </div>
  361. </template>
  362. <script setup lang="ts">
  363. import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
  364. import Echarts from '@/components/Echarts/commonChartsBar.vue'
  365. import ComHead from './components/comHead.vue'
  366. import { Calendar, CaretBottom } from '@element-plus/icons-vue'
  367. import Dialog from '@/components/dialog/index.vue'
  368. import { usePublic, showTimeMsg, parseDate } from './hooks/usePublic'
  369. // import nodeCode from './hooks/nodeCode'
  370. import { parseTime, isValue } from '@/utils/validate'
  371. import * as _ from 'lodash'
  372. import { useLoop } from '@/hooks/useLoop'
  373. import { ElMessage } from 'element-plus'
  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}') as string
  406. const sevenDaysAgo = parseTime(
  407. Date.now() - 24 * 60 * 60 * 1000 * 7,
  408. '{y}-{m}-{d}'
  409. ) as string
  410. const form = reactive({
  411. startDate: sevenDaysAgo,
  412. endDate: today,
  413. })
  414. const listData = ref<any>([])
  415. watchEffect(() => {
  416. const start = new Date(form.startDate).getTime()
  417. const end = new Date(form.endDate).getTime()
  418. if (start > end) {
  419. ElMessage.warning('开始时间不能晚于结束时间')
  420. form.endDate = ''
  421. return
  422. }
  423. })
  424. const disabledEndDate = (time: Date) => {
  425. const start = new Date(form.startDate).setHours(0)
  426. const end = time.setHours(0)
  427. return start > end
  428. }
  429. const resetForm = () => {
  430. flag.value = false
  431. }
  432. const submitForm = () => {
  433. flag.value = false
  434. let dates: any = {}
  435. switch (timePickerName.value) {
  436. case showTimeMsg.HourlyPeak:
  437. dates = hourlyDates
  438. loading1.value = true
  439. break
  440. case showTimeMsg.WaybillTrend:
  441. dates = waybillDates
  442. loading2.value = true
  443. break
  444. case showTimeMsg.NodePeak:
  445. dates = nodeDates
  446. loading3.value = true
  447. break
  448. case showTimeMsg.AirlineTraffic:
  449. dates = airlineTrafficDates
  450. loading6.value = true
  451. break
  452. case showTimeMsg.SpecialClassification:
  453. dates = airlineDates
  454. loading7.value = true
  455. break
  456. case showTimeMsg.PickingStatistics:
  457. dates = pickingDates
  458. loading8.value = true
  459. break
  460. default:
  461. break
  462. }
  463. dates.startDate = form.startDate
  464. dates.endDate = form.endDate
  465. }
  466. const showDatePicker = (id?) => {
  467. flag.value = true
  468. timePickerName.value = id
  469. let dates: any = {}
  470. switch (id) {
  471. case showTimeMsg.HourlyPeak:
  472. dates = hourlyDates
  473. break
  474. case showTimeMsg.WaybillTrend:
  475. dates = waybillDates
  476. break
  477. case showTimeMsg.NodePeak:
  478. dates = nodeDates
  479. break
  480. case showTimeMsg.AirlineTraffic:
  481. dates = airlineTrafficDates
  482. break
  483. case showTimeMsg.SpecialClassification:
  484. dates = airlineDates
  485. break
  486. case showTimeMsg.PickingStatistics:
  487. dates = pickingDates
  488. break
  489. default:
  490. break
  491. }
  492. form.startDate = dates.startDate || null
  493. form.endDate = dates.endDate || null
  494. }
  495. const sortClass = sortData => {
  496. const groupBy = (array, f) => {
  497. let groups = {}
  498. array.forEach(o => {
  499. let group = JSON.stringify(f(o))
  500. groups[group] = groups[group] || []
  501. groups[group].push(o)
  502. })
  503. return Object.keys(groups).map(group => {
  504. return groups[group]
  505. })
  506. }
  507. const sorted = groupBy(sortData, item => {
  508. return item.jobName
  509. })
  510. return sorted
  511. }
  512. const pubFunc = (listValues, target, type?) => {
  513. const newObj = _.cloneDeep(target)
  514. const [jobTimes, stockNums, weights] = [<any>[], <any>[], <any>[]]
  515. listValues.forEach(item => {
  516. jobTimes.push(item.jobTime)
  517. stockNums.push(item.stockNum)
  518. weights.push(item.weight)
  519. })
  520. newObj.xAxis.data = jobTimes
  521. if (type) {
  522. newObj.series[1].data = stockNums
  523. newObj.series[0].data = weights
  524. } else {
  525. newObj.series[0].data = stockNums
  526. newObj.series[1].data = weights
  527. }
  528. return newObj
  529. }
  530. // 特货分类统计-选取下拉数据
  531. const handleCommand = (command: string) => {
  532. specialGoods.value = command
  533. }
  534. //获取小时峰值分布
  535. const hourlyDates = reactive({ startDate: today, endDate: today })
  536. const hourlyPeakFunc = async () => {
  537. const listValues = (await getPublicData(DATACONTENT_ID.jscHourlyPeakId, [
  538. { flightDate1: hourlyDates.startDate, flightDate2: hourlyDates.endDate },
  539. ])) as any
  540. if (listValues && isValue(listValues)) {
  541. hourlyPeakObj.value = pubFunc(listValues, optionLeft, true)
  542. }
  543. loading1.value = false
  544. }
  545. //运单趋势分析
  546. const waybillDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  547. const waybillTrendFunc = async () => {
  548. const listValues = (await getPublicData(DATACONTENT_ID.jscWaybillTrendId, [
  549. { flightDate1: waybillDates.startDate, flightDate2: waybillDates.endDate },
  550. ])) as any
  551. if (listValues && isValue(listValues)) {
  552. const dealedList = listValues.reduce((preList, currentValue) => {
  553. if (typeof currentValue.jobTime === 'string') {
  554. return [
  555. ...preList,
  556. {
  557. ...currentValue,
  558. jobTime: parseDate(currentValue.jobTime),
  559. },
  560. ]
  561. }
  562. return preList
  563. }, [])
  564. waybillTrendObj.value = pubFunc(dealedList, optionLeft, true)
  565. }
  566. loading2.value = false
  567. }
  568. //始发站/目的站统计分析
  569. const nodeDates = reactive({ startDate: today, endDate: today })
  570. const nodePeakFunc = async () => {
  571. const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineAbnormalId, [
  572. {
  573. fd1: nodeDates.startDate,
  574. fd2: nodeDates.endDate,
  575. fttp: '国内离港',
  576. },
  577. ])) as any
  578. if (listValues && isValue(listValues)) {
  579. const newObj = _.cloneDeep(airCompaneBaggage.option.baseOption)
  580. listValues.forEach(item => {
  581. item.jobTime = item['airport']
  582. })
  583. nodePeakObj.value = pubFunc(listValues, newObj, true)
  584. }
  585. loading3.value = false
  586. }
  587. //航班数&运单数
  588. const numbersFunc = async () => {
  589. const listValues = (await getPublicData(DATACONTENT_ID.jscNumbersId, [
  590. {
  591. fd1: today,
  592. fd2: today,
  593. },
  594. ])) as any
  595. if (listValues && isValue(listValues)) {
  596. const { flightNum, finishFlightNum, weight } = listValues[0]
  597. flightNums.value = flightNum ?? 0
  598. stockNums.value = finishFlightNum ?? 0
  599. weightNums.value = weight ?? 0
  600. }
  601. loading4.value = false
  602. }
  603. //航司运量
  604. const airlineTrafficDates = reactive({
  605. startDate: sevenDaysAgo,
  606. endDate: today,
  607. })
  608. const airlineTrafficFunc = async () => {
  609. const listValues = await getPublicData(DATACONTENT_ID.jscAirlineTrafficId, [
  610. {
  611. flightDate1: airlineTrafficDates.startDate,
  612. flightDate2: airlineTrafficDates.endDate,
  613. },
  614. ])
  615. if (listValues && isValue(listValues)) {
  616. const newObj: any = _.cloneDeep(airCompaneBaggage.option.baseOption)
  617. newObj.dataZoom = [
  618. {
  619. id: 'dataZoomX',
  620. type: 'slider',
  621. xAxisIndex: [0],
  622. filterMode: 'filter',
  623. start: 0,
  624. end: 20,
  625. },
  626. ]
  627. listValues.forEach(item => {
  628. item.jobTime = item['IACACode']
  629. })
  630. airlineTrafficObj.value = pubFunc(listValues, newObj, true)
  631. }
  632. loading6.value = false
  633. }
  634. //航班表格
  635. const airlineAbnormalFunc = async () => {
  636. const listValues = (await getPublicData(DATACONTENT_ID.jscFlightDynamicsId, [
  637. {
  638. fd1: today,
  639. fd2: today,
  640. fttp: '国内离港',
  641. },
  642. ])) as any
  643. const domHeight = scrollContent.value?.clientHeight
  644. if (domHeight && typeof domHeight == 'number') {
  645. const cell = Math.ceil(domHeight / 40)
  646. limitScrollNum.value = cell
  647. }
  648. if (listValues && isValue(listValues)) {
  649. listData.value = listValues
  650. }
  651. loading5.value = false
  652. }
  653. //航班动态统计
  654. // const airlineFunc = async () => {
  655. // loading7.value = true;
  656. // const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineId, [
  657. // {
  658. // fd1: form.value.startDate,
  659. // fd2: form.value.endDate,
  660. // },
  661. // ])) as any;
  662. // if (listValues && isValue(listValues)) {
  663. // const res = findData(
  664. // nodeCode.departure,
  665. // listValues,
  666. // "nodeCode",
  667. // "flightNum"
  668. // );
  669. // const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
  670. // (newObj.dataZoom = [
  671. // {
  672. // id: "dataZoomX",
  673. // type: "slider",
  674. // xAxisIndex: [0],
  675. // filterMode: "filter",
  676. // start: 0,
  677. // end: 40,
  678. // },
  679. // ]),
  680. // res.forEach((item) => {
  681. // item.jobTime = item["name"] ?? item["nodeCode"];
  682. // item.weight = item["flightNum"];
  683. // });
  684. // airlineObj.value = pubFunc(res, newObj);
  685. // }
  686. // loading7.value = false;
  687. // };
  688. //特货分类统计
  689. const airlineDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  690. const airlineFunc = async () => {
  691. const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
  692. {
  693. fd1: airlineDates.startDate,
  694. fd2: airlineDates.endDate,
  695. fttp: '国内离港',
  696. spe: specialGoods.value,
  697. },
  698. ])) as any
  699. if (listValues && isValue(listValues)) {
  700. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  701. const newDatas = _.cloneDeep(listValues)
  702. const result = formatGoods(specialGoods.value, newDatas)
  703. airlineObj.value = pubFunc(result, newObj)
  704. }
  705. loading7.value = false
  706. }
  707. //拉货统计
  708. const pickingDates = reactive({ startDate: sevenDaysAgo, endDate: today })
  709. const pickingFuncs = async () => {
  710. const listValues = (await getPublicData(DATACONTENT_ID.jscGgPullId, [
  711. {
  712. fd1: pickingDates.startDate,
  713. fd2: pickingDates.endDate,
  714. },
  715. ])) as any
  716. if (listValues && isValue(listValues)) {
  717. const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
  718. const dealedList = listValues.reduce((preList, currentValue) => {
  719. if (typeof currentValue.flightDate === 'string') {
  720. return [
  721. ...preList,
  722. {
  723. ...currentValue,
  724. jobTime: parseDate(currentValue.flightDate),
  725. weight: currentValue.flightNum,
  726. },
  727. ]
  728. }
  729. return preList
  730. }, [])
  731. pickingObj.value = pubFunc(dealedList, newObj)
  732. }
  733. loading8.value = false
  734. }
  735. useLoop([hourlyPeakFunc], 'dashboard', [hourlyDates])
  736. useLoop([waybillTrendFunc], 'dashboard', [waybillDates])
  737. useLoop([nodePeakFunc], 'dashboard', [nodeDates])
  738. useLoop([numbersFunc], 'dashboard')
  739. useLoop([airlineTrafficFunc], 'dashboard', [airlineTrafficDates])
  740. useLoop([airlineAbnormalFunc], 'dashboard')
  741. useLoop([airlineFunc], 'dashboard', [airlineDates, specialGoods])
  742. useLoop([pickingFuncs], 'dashboard', [pickingDates])
  743. </script>
  744. <style lang="scss" scoped>
  745. @import './css/index.scss';
  746. </style>