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. const newItem = _.cloneDeep(item);
  457. if (p.flightNO && p.flightNO == item.flightNO) {
  458. if (capTime - p.warningDuration < 0 && capTime - p.alarmDuration > 0) {
  459. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  460. item["warningState"] = 1;
  461. const returnedTarget = Object.assign(newItem, p);
  462. this.sendLog(returnedTarget);
  463. }
  464. if (capTime - p.alarmDuration < 0) {
  465. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  466. item["warningState"] = 2;
  467. const returnedTarget = Object.assign(newItem, p);
  468. this.sendLog(returnedTarget);
  469. }
  470. } else if (!p.flightNO && p.IATACode) {
  471. if (newItem.flightNO.substring(0, 2) == p.IATACode) {
  472. if (capTime - p.warningDuration < 0 && capTime - p.alarmDuration > 0) {
  473. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  474. item["warningState"] = 1;
  475. const returnedTarget = Object.assign(newItem, p);
  476. this.sendLog(returnedTarget);
  477. }
  478. if (capTime - p.alarmDuration < 0) {
  479. item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
  480. item["warningState"] = 2;
  481. const returnedTarget = Object.assign(newItem, p);
  482. this.sendLog(returnedTarget);
  483. console.log('ddd2')
  484. }
  485. }
  486. }
  487. }
  488. });
  489. }
  490. this.baggageCount = this.baggageCount + item.preLoad;
  491. });
  492. this.tableData = this._.orderBy(tableData, ["hasTakeOff", "planDepartureTime"], ["desc", "asc"]);
  493. setTableFilters(this.tableData, this.tableDataFilters);
  494. this.toOrderNum(this.baggageCount);
  495. this.$nextTick(() => {
  496. this.setTableScroll();
  497. });
  498. },
  499. formatTime (date, type = 1) {
  500. let time = null;
  501. if (type == 1) {
  502. time = parseTime(date, "{y}-{m}-{d} {h}:{i}:{s}");
  503. } else {
  504. time = date;
  505. }
  506. const newTimt = new Date(time);
  507. return newTimt.getTime();
  508. },
  509. async sendLog (obj) {
  510. try {
  511. const newObj = {
  512. logTime: parseTime(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
  513. logInfo: JSON.stringify(obj),
  514. flightNO: obj.flightNO,
  515. flightDate: obj.flightDate,
  516. luggageSN: "",
  517. strategyUseID: obj.alarmStrategyID,
  518. event: 1,
  519. };
  520. await GeneralDataReception({
  521. serviceId: SERVICE_ID.departureScId,
  522. dataContent: JSON.stringify(newObj),
  523. });
  524. } catch (error) {
  525. this.$message.error("失败");
  526. }
  527. },
  528. setTableScroll () {
  529. if (!this.singleDay || this.hasSetTableScroll || this.leaveCount === 0) {
  530. return;
  531. }
  532. const table = this.$refs["table"].$el;
  533. const scrollParent = table.querySelector(".el-table__body-wrapper");
  534. if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
  535. return;
  536. }
  537. const lastRow = table.querySelectorAll(".el-table__body tr")[this.leaveCount - 1];
  538. setTimeout(() => {
  539. const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2;
  540. const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight;
  541. if (scrollMid > 0) {
  542. const scrollHeight = Math.min(scrollMid, scrollMax);
  543. scrollParent.scrollTo(0, scrollHeight);
  544. }
  545. }, 0);
  546. this.hasSetTableScroll = true;
  547. },
  548. setNumberTransform () {
  549. const numberItems = this.$refs.numberItem; // 拿到数字的ref,计算元素数量
  550. const numberArr = this.orderNum.filter((item) => !isNaN(item));
  551. // 结合CSS 对数字字符进行滚动,显示订单数量
  552. for (let index = 0; index < numberItems.length; index++) {
  553. const elem = numberItems[index];
  554. elem.style.transform = `translate(-50%, -${numberArr[index] * 10}%)`;
  555. }
  556. },
  557. toOrderNum (num) {
  558. num = num.toString();
  559. if (num.length < 6) {
  560. num = "0" + num; // 如未满八位数,添加"0"补位
  561. this.toOrderNum(num); // 递归添加"0"补位
  562. } else if (num.length >= 6) {
  563. this.orderNum = num.split(""); // 将其便变成数据,渲染至滚动数组
  564. } else {
  565. // 订单总量数字超过八位显示异常
  566. this.$message.warning("总量数字过大");
  567. }
  568. this.setNumberTransform();
  569. },
  570. exportHandler (refName, tableName) {
  571. if (this.loading) {
  572. return;
  573. }
  574. const table = this.$refs[refName].$el.cloneNode(true);
  575. const fileName = `${tableName}-${this.currentAirport}-${this.startDate}-${this.endDate}.xlsx`;
  576. throttledExportToExcel(table, tableName, fileName);
  577. },
  578. },
  579. };
  580. </script>
  581. <style lang="scss" scoped>
  582. .terminal-form-wrap {
  583. padding-top: 11px;
  584. padding-left: 5px;
  585. ::v-deep .form {
  586. display: flex;
  587. justify-content: space-between;
  588. .form-left {
  589. flex: 1;
  590. }
  591. .form-right {
  592. flex: 0 1 auto;
  593. }
  594. .el-form-item {
  595. margin-bottom: 0px;
  596. margin-right: 8px;
  597. button,
  598. input,
  599. optgroup,
  600. select,
  601. textarea {
  602. font-family: Helvetica, "Microsoft YaHei";
  603. font-size: 14px;
  604. }
  605. .el-switch__label {
  606. color: #303133;
  607. }
  608. .el-form-item__error {
  609. z-index: 10;
  610. }
  611. }
  612. .btn-img {
  613. position: relative;
  614. top: 6px;
  615. }
  616. }
  617. .box-item {
  618. position: relative;
  619. height: 50px;
  620. font-size: 18px;
  621. line-height: 32px;
  622. text-align: center;
  623. list-style: none;
  624. color: #2d7cff;
  625. writing-mode: vertical-lr;
  626. text-orientation: upright;
  627. /*文字禁止编辑*/
  628. -moz-user-select: none; /*火狐*/
  629. -webkit-user-select: none; /*webkit浏览器*/
  630. -ms-user-select: none; /*IE10*/
  631. -khtml-user-select: none; /*早期浏览器*/
  632. user-select: none;
  633. /* overflow: hidden; */
  634. p {
  635. line-height: 32px;
  636. writing-mode: horizontal-tb !important;
  637. text-orientation: none !important;
  638. /*文字禁止编辑*/
  639. -moz-user-select: none; /*火狐*/
  640. -webkit-user-select: none; /*webkit浏览器*/
  641. -ms-user-select: none; /*IE10*/
  642. -khtml-user-select: none; /*早期浏览器*/
  643. user-select: none;
  644. margin-top: 5px;
  645. }
  646. }
  647. /* 默认逗号设置 */
  648. .mark-item {
  649. width: 10px;
  650. height: 32px;
  651. margin-right: 5px;
  652. line-height: 10px;
  653. font-size: 18px;
  654. position: relative;
  655. & > span {
  656. position: absolute;
  657. width: 100%;
  658. bottom: 0;
  659. writing-mode: vertical-rl;
  660. text-orientation: upright;
  661. }
  662. }
  663. /*滚动数字设置*/
  664. .number-item {
  665. width: 41px;
  666. height: 42px;
  667. /* 背景图片 */
  668. // background: url(/images/text-bg-blue.png) no-repeat center center;
  669. // background-size: 100% 100%;
  670. // background: #ccc;
  671. list-style: none;
  672. margin-right: 5px;
  673. // background:rgba(250,250,250,1);
  674. border-radius: 4px;
  675. border: 3px solid rgb(221, 221, 221);
  676. & > span {
  677. position: relative;
  678. display: inline-block;
  679. margin-right: 10px;
  680. width: 100%;
  681. height: 100%;
  682. writing-mode: vertical-rl;
  683. text-orientation: upright;
  684. overflow: hidden;
  685. & > i {
  686. font-style: normal;
  687. position: absolute;
  688. top: 11px;
  689. left: 50%;
  690. transform: translate(-50%, -1%);
  691. transition: transform 1s ease-in-out;
  692. letter-spacing: 10px;
  693. }
  694. }
  695. }
  696. .number-item:last-child {
  697. margin-right: 0;
  698. }
  699. }
  700. .terminal-table {
  701. width: 100%;
  702. ::v-deep .table {
  703. width: 100%;
  704. .cell {
  705. padding: 0;
  706. text-align: center;
  707. font-size: 14px;
  708. font-family: Helvetica, "Microsoft YaHei";
  709. letter-spacing: 0;
  710. }
  711. .cell-click {
  712. cursor: pointer;
  713. color: #2d7cff;
  714. &.cell-clicked {
  715. color: purple;
  716. }
  717. }
  718. .el-table__header-wrapper,
  719. .el-table__fixed-header-wrapper {
  720. .cell {
  721. font-weight: bold;
  722. color: #101116;
  723. }
  724. .has-gutter {
  725. tr {
  726. .bgl-huang {
  727. background: #fcf0b1;
  728. }
  729. }
  730. }
  731. }
  732. .el-table__body-wrapper,
  733. .el-table__fixed-body-wrapper {
  734. tr.bgl-hui {
  735. td {
  736. background: #d2d6df;
  737. }
  738. &.redBorder {
  739. position: relative;
  740. &::after {
  741. content: "";
  742. position: absolute;
  743. left: 0;
  744. bottom: 0;
  745. width: 100%;
  746. height: 2px;
  747. background: #e83f82;
  748. }
  749. }
  750. }
  751. tr.bgl-delayed td {
  752. background: #fcf0b1;
  753. }
  754. tr.bgl-canceled td {
  755. background: #f7babe;
  756. }
  757. td.cell-tounLoad {
  758. background: lightcoral !important;
  759. position: relative;
  760. &::after {
  761. content: "";
  762. display: block;
  763. width: 100%;
  764. height: 100%;
  765. position: absolute;
  766. top: 0;
  767. left: 0;
  768. border: 2px dashed red;
  769. }
  770. }
  771. td.cell-tounLoadNew {
  772. background: #fcf0b1 !important;
  773. position: relative;
  774. &::after {
  775. content: "";
  776. display: block;
  777. width: 100%;
  778. height: 100%;
  779. position: absolute;
  780. top: 0;
  781. left: 0;
  782. border: 2px dashed #e28913;
  783. }
  784. }
  785. .el-table__cell.is-hidden > * {
  786. visibility: visible;
  787. }
  788. }
  789. }
  790. }
  791. </style>