index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <!--
  2. * @Author: zk
  3. * @Date: 2022-01-17 10:39:22
  4. * @LastEditTime: 2022-06-22 17:39:49
  5. * @LastEditors: your name
  6. * @Description: 离港01
  7. -->
  8. <template>
  9. <div class="departure-one">
  10. <!--功能区-表单-->
  11. <div ref="formWrap" class="terminal-form-wrap">
  12. <el-form ref="form" :inline="true" :model="formData" :rules="rules" class="form">
  13. <div class="form-left">
  14. <el-form-item prop="currentAirport">
  15. <!-- <el-cascader
  16. v-model="formData.currentAirport"
  17. style="width:144px;margin-left:10px"
  18. placeholder="全部机场"
  19. size="small"
  20. :options="currentAirportList"
  21. :props="currentAirportProps"
  22. collapse-tags
  23. clearable
  24. filterable
  25. @change="setCurrentAirport"
  26. /> -->
  27. <el-select v-model="formData.currentAirport" class="input-shadow" size="small" style="width: 150px" filterable default-first-option placeholder="请选择机场" @change="airPortChange">
  28. <el-option v-for="(item, index) in AirportList" :key="index" :label="item.planDepartureApt" :value="item.planDepartureApt" />
  29. </el-select>
  30. </el-form-item>
  31. <!-- <el-form-item prop="startDate">
  32. <el-date-picker
  33. v-model="formData.startDate"
  34. class="input-shadow"
  35. style="width:216px;"
  36. size="small"
  37. type="date"
  38. value-format="yyyy-MM-dd"
  39. placeholder="开始时间"
  40. @change="startDateChangeHandler"
  41. />
  42. </el-form-item>
  43. <el-form-item prop="endDate">
  44. <el-date-picker
  45. v-model="formData.endDate"
  46. class="input-shadow"
  47. style="width:216px;"
  48. size="small"
  49. type="date"
  50. value-format="yyyy-MM-dd"
  51. placeholder="结束时间"
  52. @change="endDateChangeHandler"
  53. />
  54. </el-form-item> -->
  55. <el-form-item prop="flightDate" label="航班日期">
  56. <el-date-picker v-model="formData.flightDate" :clearable="false" size="small" style="width: 300px" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" @change="dateChangeHandler" />
  57. </el-form-item>
  58. <el-form-item>
  59. <div class="box-item">
  60. <p>预计装载总数:</p>
  61. <li v-for="(item, index) in orderNum" :key="index" :class="{ 'number-item': !isNaN(item), 'mark-item': isNaN(item) }">
  62. <span v-if="!isNaN(item)">
  63. <i ref="numberItem">0123456789</i>
  64. </span>
  65. <span v-else class="comma">{{ item }}</span>
  66. </li>
  67. </div>
  68. </el-form-item>
  69. </div>
  70. <div class="form-right" @keyup.enter="onSubmit(0)">
  71. <el-form-item prop="search">
  72. <el-popover :value="popoverVisible" placement="bottom" trigger="manual">
  73. <span>请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)</span>
  74. <el-input slot="reference" v-model="formData.search" class="input-shadow" style="width: 240px; margin-left: 105px" size="small" placeholder="请输入内容" prefix-icon="el-icon-search" clearable @focus="popoverVisible = true" @blur="popoverVisible = false" />
  75. </el-popover>
  76. </el-form-item>
  77. <el-form-item>
  78. <el-button class="btn-shadow" size="mini" type="primary" @click="onSubmit(0)">搜索</el-button>
  79. </el-form-item>
  80. <!-- <el-form-item v-is="['dm_dt_timeIcon']">
  81. <TimeZoneSelector />
  82. </el-form-item> -->
  83. <el-form-item>
  84. <TimeZoneSelector />
  85. </el-form-item>
  86. <!-- <el-form-item v-is="['dm_dt_columnSettings']">
  87. <img class="btn-img btn-shadow" src="@/assets/baggage/ic_setting.png" title="列设置" @click="show" />
  88. </el-form-item> -->
  89. <el-form-item>
  90. <img class="btn-img btn-shadow" src="@/assets/baggage/ic_setting.png" title="列设置" @click="show" />
  91. </el-form-item>
  92. <!-- <el-form-item v-is="['dm_dt_columnSettings']">
  93. <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航站离港列表')" />
  94. </el-form-item> -->
  95. <el-form-item>
  96. <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航站离港列表')" />
  97. </el-form-item>
  98. </div>
  99. </el-form>
  100. </div>
  101. <!--表格-->
  102. <div v-loading="loading" class="terminal-table" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
  103. <el-table ref="table" class="table" :height="computedTableHeight" :data="dealedTableData" :header-cell-class-name="headerCellClass" :row-class-name="tableRowClassName" :cell-class-name="cellClass" show-summary :summary-method="summaryMethod" border stripe fit @cell-click="cellClickHandler">
  104. <el-table-column v-for="col in tableColsCopy" :key="col.prop" :prop="col.prop" :label="col.label" :width="col.width" :fixed="col.fixed" :formatter="tableFormat">
  105. <template #header>
  106. <el-tooltip :content="col.desc || childCol.label" placement="top">
  107. <TableHeaderCell :label="col.label" :filter-options="tableDataFilters[col.prop]" :filter-values.sync="filterValues[col.prop]" :sortable="col.sortable" :sort-rule.sync="tableDataSortRules[col.prop]" />
  108. </el-tooltip>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. </div>
  113. <!--列设置-->
  114. <Dialog :flag="dialogFlag" class="dialog-check-group">
  115. <div class="dialog-wrapper">
  116. <div class="title">列设置</div>
  117. <div class="content">
  118. <el-tree :data="tableCols" :class="colsCheckClass" show-checkbox node-key="index" :default-expand-all="true" :props="{
  119. label: 'label',
  120. children: 'children',
  121. }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" />
  122. </div>
  123. <div class="foot right t30">
  124. <el-button size="medium" class="r24" type="primary" @click="onCheck">确定</el-button>
  125. <el-button size="medium" @click="hide">取消</el-button>
  126. </div>
  127. </div>
  128. </Dialog>
  129. </div>
  130. </template>
  131. <script>
  132. import Dialog from "@/layout/components/Dialog";
  133. import TimeZoneSelector from "@/components/TimeZoneSelector";
  134. import terminalMixin from "../../mixins/terminal";
  135. import formMixin from "../../mixins/form";
  136. import tableColsMixin from "../../mixins/tableCols";
  137. import timeZoneMixin from "../../mixins/timeZone";
  138. import { getQuery } from "@/api/flight";
  139. import { GeneralDataReception } from "@/api/dataIntegration";
  140. import TableHeaderCell from "@/components/TableHeaderCell";
  141. import { setTableFilters, throttledExportToExcel, timeInZone } from "@/utils/table";
  142. import { parseTime } from '@/utils/index';
  143. import { mapGetters } from 'vuex';
  144. export default {
  145. name: "DepartureTerminalView",
  146. components: { Dialog, TimeZoneSelector, TableHeaderCell },
  147. mixins: [terminalMixin, formMixin, tableColsMixin, timeZoneMixin],
  148. data () {
  149. return {
  150. orderNum: ["0", "0", "0", "0", "0", "0"], // 默认总数
  151. popoverVisible: false,
  152. // 初始表头
  153. tableCols: [
  154. {
  155. prop: "flightNO",
  156. label: "航班号",
  157. desc: "指航班编号",
  158. width: 80,
  159. fixed: "left",
  160. filterable: true,
  161. sortable: true,
  162. },
  163. {
  164. prop: "flightDate",
  165. label: "执飞日期",
  166. desc: "指航班计划起飞日期(不变的,机票上),不是预计起飞日期(预计起飞时间可能多个),也不是实际起飞日期(实际起飞等于最后预计)",
  167. width: 105,
  168. fixed: "left",
  169. filterable: true,
  170. sortable: true,
  171. },
  172. {
  173. prop: "planDepartureTime",
  174. label: "起飞时间",
  175. desc: "根据优先级别显示时间。优先级别:1.实际起飞时间,2.预计起飞时间,3.计划起飞时间",
  176. width: 150,
  177. filterable: true,
  178. sortable: true,
  179. },
  180. {
  181. prop: "targetAirport",
  182. label: "目的站",
  183. desc: "指航班执飞航段的目的航站,以航站三字码显示",
  184. filterable: true,
  185. sortable: true,
  186. },
  187. {
  188. prop: "departureBuild",
  189. label: "航站楼",
  190. desc: "指航班执飞航段的目的航站楼",
  191. filterable: true,
  192. sortable: true,
  193. },
  194. {
  195. prop: "bordingGate",
  196. label: "登机口",
  197. desc: "指航班的登机口代码,数据是变化的,仅显示最新信息",
  198. filterable: true,
  199. sortable: true,
  200. },
  201. {
  202. prop: "standForDepartrue",
  203. label: "停机位",
  204. desc: "指航班的停机位代码,数据是变化的,仅显示最新信息",
  205. filterable: true,
  206. sortable: true,
  207. },
  208. {
  209. prop: "checkInTravellerNumber",
  210. label: "托运旅客",
  211. desc: "指航班已办理行李托运业务的旅客人数,含取消托运的旅客人数",
  212. },
  213. {
  214. prop: "checkInNumber",
  215. label: "值机数",
  216. desc: "指已办理值机托运的行李数量,含取消托运的行李数量,含未激活",
  217. },
  218. {
  219. prop: "unActive",
  220. label: "未激活",
  221. desc: "指最后的 BSM 报文“.S”中行李状态为“I”的行李数量,含取消托运的行李数量",
  222. },
  223. {
  224. prop: "preLoad",
  225. label: "预计装载",
  226. desc: "指已办理值机托运的行李数量,不含取消托运的行李数量,不包含未激活",
  227. },
  228. {
  229. prop: "checkNumber",
  230. label: "安检",
  231. desc: "指进行安检的行李数量,含取消托运的行李数量",
  232. },
  233. {
  234. prop: "sortNumber",
  235. label: "分拣",
  236. desc: "指已分拣完成的行李数量,含取消托运的行李数量",
  237. },
  238. {
  239. prop: "loadNumber",
  240. label: "装车",
  241. desc: "指已在分拣口装车完成的行李数量,含取消托运的行李数量",
  242. },
  243. {
  244. prop: "boardID",
  245. label: "装机",
  246. desc: "指装机完成的行李数量,不含取消托运的行李数量",
  247. },
  248. {
  249. prop: "tounLoad",
  250. label: "待翻减",
  251. desc: "指旅客在办理行李托运后,旅客取消该行李的托运并且行李此时已经过装车节点,而没有完成翻减的行李数量(须翻减总数减去已翻减数)",
  252. },
  253. {
  254. prop: "OFFCount",
  255. label: "已翻减",
  256. desc: "指旅客在办理行李托运后,旅客取消该行李的托运并且行李此时已经过装车节点,且已完成翻减的行李数量",
  257. },
  258. {
  259. prop: "noCheckInNumber",
  260. label: "取消托运",
  261. desc: "指旅客在办理行李托运后,又取消托运的行李总数量",
  262. },
  263. {
  264. prop: "noBSM",
  265. label: "无BSM",
  266. desc: "行李有处理信息(BPM)但无值机信息(BSM)的行李数量",
  267. },
  268. {
  269. prop: "warning",
  270. label: "风险预警",
  271. desc: "指依据航班信息中预计起飞时间和当前时间差,与根据分拣到停机位设置的报警阈值对比,超过阈值的为风险行李,本项显示风险预警行李数量",
  272. },
  273. {
  274. prop: "exceptions",
  275. label: "未装机行李",
  276. desc: "指航班关闭货舱门后,应装而未装的行李数量",
  277. },
  278. {
  279. prop: "midIn",
  280. label: "中转进行李",
  281. desc: "指从其他航班中转到当前航班的行李数量",
  282. },
  283. ],
  284. tableDataSortRules: {
  285. flightCanceled: "ascending",
  286. },
  287. loading: false,
  288. AirportList: [],
  289. loopEvent: null,
  290. leaveCount: 0,
  291. baggageCount: 0,
  292. hasSetTableScroll: false,
  293. table: null,
  294. WarningData: []
  295. };
  296. },
  297. computed: {
  298. singleDay () {
  299. return this.startDate === this.endDate;
  300. },
  301. ...mapGetters(['timeZone'])
  302. },
  303. mounted () {
  304. this.getAirPortData();
  305. this.table = this.$refs.table.bodyWrapper;
  306. const that = this;
  307. this.table.addEventListener("scroll", () => {
  308. that.scrollTop = this.table.scrollTop;
  309. });
  310. },
  311. activated () {
  312. this.table.scrollTop = this.scrollTop;
  313. this.getTableData();
  314. this.getWarningData();
  315. this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.departureTable);
  316. },
  317. deactivated () {
  318. if (this.loopEvent) {
  319. clearInterval(this.loopEvent);
  320. this.loopEvent = null;
  321. }
  322. },
  323. beforeDestroy () {
  324. if (this.loopEvent) {
  325. clearInterval(this.loopEvent);
  326. this.loopEvent = null;
  327. }
  328. },
  329. methods: {
  330. resetLoopEvent () {
  331. this.loading = true;
  332. this.hasSetTableScroll = false;
  333. this.loopEvent && clearInterval(this.loopEvent);
  334. this.getTableData();
  335. this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.departureTable);
  336. },
  337. airPortChange () {
  338. this.resetLoopEvent();
  339. },
  340. dateChangeHandler () {
  341. this.resetLoopEvent();
  342. },
  343. async getAirPortData () {
  344. try {
  345. const res = await getQuery({
  346. id: DATACONTENT_ID.departureAirMainId,
  347. dataContent: [],
  348. });
  349. if (Number(res.code) === 0) {
  350. this.AirportList = this._.orderBy(res.returnData.listValues, (o) => o.planDepartureApt);
  351. this.formData.currentAirport = "PEK";
  352. this.resetLoopEvent();
  353. } else {
  354. this.$message.error(res.message);
  355. }
  356. } catch (error) {
  357. this.$message.error("失败");
  358. }
  359. },
  360. async getWarningData () {
  361. try {
  362. const res = await getQuery({
  363. id: DATACONTENT_ID.departureWarningId,
  364. dataContent: [],
  365. });
  366. if (Number(res.code) === 0) {
  367. const { listValues } = res.returnData;
  368. this.WarningData = listValues;
  369. } else {
  370. this.$message.error(res.message);
  371. }
  372. } catch (error) {
  373. this.$message.error("失败");
  374. }
  375. },
  376. tableRowClassName ({ row, rowIndex }) {
  377. const classes = [];
  378. if (row.flightStatus === "DLY") {
  379. classes.push("bgl-delayed");
  380. }
  381. if (row.flightStatus === "CAN") {
  382. classes.push("bgl-canceled");
  383. }
  384. if (row.hasTakeOff === 1) {
  385. classes.push("bgl-hui");
  386. if (rowIndex === this.leaveCount - 1) {
  387. classes.push("redBorder");
  388. }
  389. }
  390. return classes.join(" ");
  391. },
  392. headerCellClass ({ row, column }) {
  393. const classes = [];
  394. if (["warning", "exceptions", "midIn"].includes(column.property)) {
  395. classes.push("bgl-huang");
  396. }
  397. const rule = this.tableDataSortRules[column.property];
  398. if (rule) {
  399. classes.push(rule);
  400. }
  401. return classes.join(" ");
  402. },
  403. // 获取表单下拉框数据
  404. // getFormData(params) {
  405. // this.relatedAirportQuery({
  406. // ...params,
  407. // type: 'OUT'
  408. // })
  409. // this.outgoingAirlineQuery(params)
  410. // this.craftTypeQuery(params)
  411. // this.flightAttrQuery(params)
  412. // },
  413. // 获取表格数据
  414. async getTableData () {
  415. if (!this.formData.currentAirport || !this.startDate || !this.endDate) {
  416. return;
  417. }
  418. const arr = [this.formData.currentAirport, this.startDate, this.endDate];
  419. try {
  420. const res = await getQuery({
  421. id: DATACONTENT_ID.departureTableMainId,
  422. dataContent: [...arr, ...arr, ...arr],
  423. });
  424. if (Number(res.code) === 0) {
  425. this.initTableData(res.returnData.listValues);
  426. } else {
  427. }
  428. this.loading = false;
  429. } catch (error) {
  430. if (this.loopEvent) {
  431. clearInterval(this.loopEvent);
  432. this.loopEvent = null;
  433. }
  434. this.loading = false;
  435. }
  436. },
  437. initTableData (tableData) {
  438. const currentTime = new Date();
  439. const curTime = this.formatTime(currentTime);
  440. this.leaveCount = 0;
  441. this.baggageCount = 0;
  442. tableData.forEach((item) => {
  443. item["flightCanceled"] = item["flightStatus"] === "CAN" ? 1 : 0;
  444. item["tounLoad"] -= item["OFFCount"];
  445. item["exceptions"] = item["preLoad"] - item["boardID"];
  446. if (item["hasTakeOff"] === 1 && !item["flightCanceled"]) {
  447. this.leaveCount++;
  448. }
  449. if (item["hasTakeOff"] !== 1 && !item["flightCanceled"] && item["preLoad"] - Math.max(item.loadNumber, item.boardID) > 0) {
  450. this.WarningData.forEach(p => {
  451. const startTime = this.formatTime(timeInZone((p.startDate ?? '').replace('T', ' '), this.timeZone), 2);
  452. const endTime = this.formatTime(timeInZone((p.endDate ?? '').replace('T', ' '), this.timeZone), 2);
  453. const planTime = this.formatTime(timeInZone((item.planDepartureTime ?? '').replace('T', ' '), this.timeZone), 2);
  454. const capTime = Math.ceil((planTime - curTime) / (1000 * 60));
  455. if (Number(startTime) - Number(curTime) < 0 && Number(endTime) - Number(curTime) > 0) {
  456. if (p.flightNO != '' && p.flightNO == item.flightNO) {
  457. if (capTime - p.warningDuration < 0 && capTime - p.alarmDuration > 0) {
  458. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  459. item["warningState"] = 1;
  460. const returnedTarget = Object.assign(item, p);
  461. this.sendLog(returnedTarget);
  462. }
  463. if (capTime - p.alarmDuration < 0) {
  464. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  465. item["warningState"] = 2;
  466. const returnedTarget = Object.assign(item, p);
  467. this.sendLog(returnedTarget);
  468. }
  469. } else if (p.flightNO == '' && p.IATACode != '') {
  470. if (item.flightNO.substring(0, 2) == p.IATACode) {
  471. if (capTime - p.warningDuration < 0 && capTime - p.alarmDuration > 0) {
  472. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  473. item["warningState"] = 1;
  474. const returnedTarget = Object.assign(item, p);
  475. this.sendLog(returnedTarget);
  476. }
  477. if (capTime - p.alarmDuration < 0) {
  478. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  479. item["warningState"] = 2;
  480. const returnedTarget = Object.assign(item, p);
  481. this.sendLog(returnedTarget);
  482. }
  483. }
  484. }
  485. }
  486. })
  487. }
  488. this.baggageCount = this.baggageCount + item.preLoad;
  489. });
  490. this.tableData = this._.orderBy(tableData, ["hasTakeOff", "planDepartureTime"], ["desc", "asc"]);
  491. setTableFilters(this.tableData, this.tableDataFilters);
  492. this.toOrderNum(this.baggageCount);
  493. this.$nextTick(() => {
  494. this.setTableScroll();
  495. });
  496. },
  497. formatTime (date, type = 1) {
  498. let time = null;
  499. if (type == 1) {
  500. time = parseTime(date, "{y}-{m}-{d} {h}:{i}:{s}");
  501. } else {
  502. time = date;
  503. }
  504. const newTimt = new Date(time);
  505. return newTimt.getTime();
  506. },
  507. async sendLog (obj) {
  508. try {
  509. const newObj = {
  510. logTime: parseTime(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
  511. logInfo: obj,
  512. flightNO: obj.flightNO,
  513. flightDate: obj.flightDate,
  514. luggageSN: '',
  515. strategyUseID: obj.alarmStrategyID,
  516. event: 1
  517. }
  518. await GeneralDataReception({
  519. serviceId: SERVICE_ID.departureScId,
  520. dataContent: JSON.stringify(newObj),
  521. });
  522. } catch (error) {
  523. this.$message.error("失败");
  524. }
  525. },
  526. setTableScroll () {
  527. if (!this.singleDay || this.hasSetTableScroll || this.leaveCount === 0) {
  528. return;
  529. }
  530. const table = this.$refs["table"].$el;
  531. const scrollParent = table.querySelector(".el-table__body-wrapper");
  532. if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
  533. return;
  534. }
  535. const lastRow = table.querySelectorAll(".el-table__body tr")[this.leaveCount - 1];
  536. setTimeout(() => {
  537. const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2;
  538. const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight;
  539. if (scrollMid > 0) {
  540. const scrollHeight = Math.min(scrollMid, scrollMax);
  541. scrollParent.scrollTo(0, scrollHeight);
  542. }
  543. }, 0);
  544. this.hasSetTableScroll = true;
  545. },
  546. setNumberTransform () {
  547. const numberItems = this.$refs.numberItem; // 拿到数字的ref,计算元素数量
  548. const numberArr = this.orderNum.filter((item) => !isNaN(item));
  549. // 结合CSS 对数字字符进行滚动,显示订单数量
  550. for (let index = 0; index < numberItems.length; index++) {
  551. const elem = numberItems[index];
  552. elem.style.transform = `translate(-50%, -${numberArr[index] * 10}%)`;
  553. }
  554. },
  555. toOrderNum (num) {
  556. num = num.toString();
  557. if (num.length < 6) {
  558. num = "0" + num; // 如未满八位数,添加"0"补位
  559. this.toOrderNum(num); // 递归添加"0"补位
  560. } else if (num.length >= 6) {
  561. this.orderNum = num.split(""); // 将其便变成数据,渲染至滚动数组
  562. } else {
  563. // 订单总量数字超过八位显示异常
  564. this.$message.warning("总量数字过大");
  565. }
  566. this.setNumberTransform();
  567. },
  568. exportHandler (refName, tableName) {
  569. if (this.loading) {
  570. return;
  571. }
  572. const table = this.$refs[refName].$el.cloneNode(true);
  573. const fileName = `${tableName}-${this.currentAirport}-${this.startDate}-${this.endDate}.xlsx`;
  574. throttledExportToExcel(table, tableName, fileName);
  575. },
  576. },
  577. };
  578. </script>
  579. <style lang="scss" scoped>
  580. .terminal-form-wrap {
  581. padding-top: 11px;
  582. padding-left: 5px;
  583. ::v-deep .form {
  584. display: flex;
  585. justify-content: space-between;
  586. .form-left {
  587. flex: 1;
  588. }
  589. .form-right {
  590. flex: 0 1 auto;
  591. }
  592. .el-form-item {
  593. margin-bottom: 0px;
  594. margin-right: 8px;
  595. button,
  596. input,
  597. optgroup,
  598. select,
  599. textarea {
  600. font-family: Helvetica, "Microsoft YaHei";
  601. font-size: 14px;
  602. }
  603. .el-switch__label {
  604. color: #303133;
  605. }
  606. .el-form-item__error {
  607. z-index: 10;
  608. }
  609. }
  610. .btn-img {
  611. position: relative;
  612. top: 6px;
  613. }
  614. }
  615. .box-item {
  616. position: relative;
  617. height: 50px;
  618. font-size: 18px;
  619. line-height: 32px;
  620. text-align: center;
  621. list-style: none;
  622. color: #2d7cff;
  623. writing-mode: vertical-lr;
  624. text-orientation: upright;
  625. /*文字禁止编辑*/
  626. -moz-user-select: none; /*火狐*/
  627. -webkit-user-select: none; /*webkit浏览器*/
  628. -ms-user-select: none; /*IE10*/
  629. -khtml-user-select: none; /*早期浏览器*/
  630. user-select: none;
  631. /* overflow: hidden; */
  632. p {
  633. line-height: 32px;
  634. writing-mode: horizontal-tb !important;
  635. text-orientation: none !important;
  636. /*文字禁止编辑*/
  637. -moz-user-select: none; /*火狐*/
  638. -webkit-user-select: none; /*webkit浏览器*/
  639. -ms-user-select: none; /*IE10*/
  640. -khtml-user-select: none; /*早期浏览器*/
  641. user-select: none;
  642. margin-top: 5px;
  643. }
  644. }
  645. /* 默认逗号设置 */
  646. .mark-item {
  647. width: 10px;
  648. height: 32px;
  649. margin-right: 5px;
  650. line-height: 10px;
  651. font-size: 18px;
  652. position: relative;
  653. & > span {
  654. position: absolute;
  655. width: 100%;
  656. bottom: 0;
  657. writing-mode: vertical-rl;
  658. text-orientation: upright;
  659. }
  660. }
  661. /*滚动数字设置*/
  662. .number-item {
  663. width: 41px;
  664. height: 42px;
  665. /* 背景图片 */
  666. // background: url(/images/text-bg-blue.png) no-repeat center center;
  667. // background-size: 100% 100%;
  668. // background: #ccc;
  669. list-style: none;
  670. margin-right: 5px;
  671. // background:rgba(250,250,250,1);
  672. border-radius: 4px;
  673. border: 3px solid rgb(221, 221, 221);
  674. & > span {
  675. position: relative;
  676. display: inline-block;
  677. margin-right: 10px;
  678. width: 100%;
  679. height: 100%;
  680. writing-mode: vertical-rl;
  681. text-orientation: upright;
  682. overflow: hidden;
  683. & > i {
  684. font-style: normal;
  685. position: absolute;
  686. top: 11px;
  687. left: 50%;
  688. transform: translate(-50%, -1%);
  689. transition: transform 1s ease-in-out;
  690. letter-spacing: 10px;
  691. }
  692. }
  693. }
  694. .number-item:last-child {
  695. margin-right: 0;
  696. }
  697. }
  698. .terminal-table {
  699. width: 100%;
  700. ::v-deep .table {
  701. width: 100%;
  702. .cell {
  703. padding: 0;
  704. text-align: center;
  705. font-size: 14px;
  706. font-family: Helvetica, "Microsoft YaHei";
  707. letter-spacing: 0;
  708. }
  709. .cell-click {
  710. cursor: pointer;
  711. color: #2d7cff;
  712. &.cell-clicked {
  713. color: purple;
  714. }
  715. }
  716. .el-table__header-wrapper,
  717. .el-table__fixed-header-wrapper {
  718. .cell {
  719. font-weight: bold;
  720. color: #101116;
  721. }
  722. .has-gutter {
  723. tr {
  724. .bgl-huang {
  725. background: #fcf0b1;
  726. }
  727. }
  728. }
  729. }
  730. .el-table__body-wrapper,
  731. .el-table__fixed-body-wrapper {
  732. tr.bgl-hui {
  733. td {
  734. background: #d2d6df;
  735. }
  736. &.redBorder {
  737. position: relative;
  738. &::after {
  739. content: "";
  740. position: absolute;
  741. left: 0;
  742. bottom: 0;
  743. width: 100%;
  744. height: 2px;
  745. background: #e83f82;
  746. }
  747. }
  748. }
  749. tr.bgl-delayed td {
  750. background: #fcf0b1;
  751. }
  752. tr.bgl-canceled td {
  753. background: #f7babe;
  754. }
  755. td.cell-tounLoad {
  756. background: lightcoral !important;
  757. position: relative;
  758. &::after {
  759. content: "";
  760. display: block;
  761. width: 100%;
  762. height: 100%;
  763. position: absolute;
  764. top: 0;
  765. left: 0;
  766. border: 2px dashed red;
  767. }
  768. }
  769. td.cell-tounLoadNew {
  770. background: #fcf0b1 !important;
  771. position: relative;
  772. &::after {
  773. content: "";
  774. display: block;
  775. width: 100%;
  776. height: 100%;
  777. position: absolute;
  778. top: 0;
  779. left: 0;
  780. border: 2px dashed #e28913;
  781. }
  782. }
  783. .el-table__cell.is-hidden > * {
  784. visibility: visible;
  785. }
  786. }
  787. }
  788. }
  789. </style>