index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. <!--
  2. * @Author: zk
  3. * @Date: 2022-01-17 10:39:22
  4. * @LastEditTime: 2022-03-15 16:26:13
  5. * @LastEditors: your name
  6. * @Description: 进港01
  7. -->
  8. <template>
  9. <div class="arrival-one">
  10. <!--功能区-表单-->
  11. <div class="arrival-form">
  12. <el-form
  13. ref="form"
  14. :inline="true"
  15. :model="formData"
  16. :rules="rules"
  17. class="form"
  18. >
  19. <el-form-item prop="currentAirport">
  20. <el-cascader
  21. v-model="formData.currentAirport"
  22. style="width:144px;"
  23. placeholder="全部机场"
  24. size="small"
  25. :options="currentAirportOptions"
  26. :props="currentAirportProps"
  27. collapse-tags
  28. clearable
  29. filterable
  30. @change="setCurrentAirport"
  31. />
  32. </el-form-item>
  33. <el-form-item prop="relatedAirport">
  34. <el-cascader
  35. v-model="formData.relatedAirport"
  36. style="width:136px;"
  37. size="small"
  38. :options="relatedAirportOptions"
  39. :props="relatedAirportProps"
  40. placeholder="全部起飞站"
  41. collapse-tags
  42. clearable
  43. filterable
  44. @change="onSubmit"
  45. />
  46. </el-form-item>
  47. <el-form-item prop="inboundCarrier">
  48. <el-cascader
  49. v-model="formData.inboundCarrier"
  50. style="width:164px;"
  51. size="small"
  52. :options="inboundCarrierOptions"
  53. :props="inboundCarrierProps"
  54. placeholder="全部航司"
  55. collapse-tags
  56. clearable
  57. filterable
  58. @change="onSubmit"
  59. />
  60. </el-form-item>
  61. <el-form-item prop="craftType">
  62. <el-cascader
  63. v-model="formData.craftType"
  64. style="width:120px;"
  65. size="small"
  66. :options="craftTypeOptions"
  67. :props="craftTypeProps"
  68. placeholder="全部机型"
  69. collapse-tags
  70. clearable
  71. filterable
  72. @change="onSubmit"
  73. />
  74. </el-form-item>
  75. <el-form-item prop="flightAttr">
  76. <el-cascader
  77. v-model="formData.flightAttr"
  78. style="width:120px;"
  79. size="small"
  80. :options="flightAttrOptions"
  81. :props="flightAttrProps"
  82. placeholder="国际/国内"
  83. collapse-tags
  84. clearable
  85. filterable
  86. @change="onSubmit"
  87. />
  88. </el-form-item>
  89. <el-form-item prop="startDate">
  90. <el-date-picker
  91. v-model="formData.startDate"
  92. style="width:216px;"
  93. size="small"
  94. type="date"
  95. value-format="yyyy-MM-dd"
  96. placeholder="开始时间"
  97. @change="setStartDate"
  98. />
  99. </el-form-item>
  100. <el-form-item prop="endDate">
  101. <el-date-picker
  102. v-model="formData.endDate"
  103. style="width:216px;"
  104. size="small"
  105. type="date"
  106. value-format="yyyy-MM-dd"
  107. placeholder="结束时间"
  108. @change="setEndDate"
  109. />
  110. </el-form-item>
  111. <el-form-item prop="search">
  112. <el-input
  113. v-model="formData.search"
  114. style="width:240px;margin-left:105px;"
  115. size="small"
  116. placeholder="请输入内容"
  117. prefix-icon="el-icon-search"
  118. clearable
  119. @clear="inputClear"
  120. />
  121. </el-form-item>
  122. <el-form-item>
  123. <el-button
  124. size="small"
  125. type="primary"
  126. @click="onSubmit"
  127. >搜索</el-button>
  128. </el-form-item>
  129. <el-form-item v-is="['i_showTransit']">
  130. <el-switch
  131. v-model="formData.switch"
  132. style="margin-left:40px;"
  133. active-text="显示中转"
  134. />
  135. </el-form-item>
  136. <el-form-item v-is="['i_timeIcon']">
  137. <el-dropdown>
  138. <img
  139. class="checkTime msgImg"
  140. src="../../../../assets/departure/ic_time.png"
  141. >
  142. <el-dropdown-menu
  143. slot="dropdown"
  144. class="time-zone"
  145. >
  146. <el-dropdown-item>国内Local/国际UTC</el-dropdown-item>
  147. <el-dropdown-item>Local</el-dropdown-item>
  148. <el-dropdown-item>UTC</el-dropdown-item>
  149. </el-dropdown-menu>
  150. </el-dropdown>
  151. </el-form-item>
  152. <el-form-item v-is="['i_columnSettings']">
  153. <img
  154. class="msgImg"
  155. src="../../../../assets/departure/ic_setting.png"
  156. @click="show"
  157. >
  158. </el-form-item>
  159. </el-form>
  160. </div>
  161. <!--表格-->
  162. <div
  163. v-loading="loading"
  164. class="arrival-table"
  165. element-loading-text="拼命加载中"
  166. element-loading-spinner="el-icon-loading"
  167. element-loading-background="rgba(0, 0, 0, 0.8)"
  168. >
  169. <el-table
  170. ref="table"
  171. :row-class-name="tableRowClassName"
  172. :data="tableData"
  173. class="table"
  174. :height="computedTableHeight"
  175. show-summary
  176. :summary-method="summaryMethod"
  177. border
  178. stripe
  179. @row-click="rowClick"
  180. >
  181. <el-table-column
  182. v-for="(item,index) in tableColsCopy"
  183. :key="index"
  184. :prop="item.statCode"
  185. :label="item.statName"
  186. >
  187. <el-table-column
  188. v-for="(p,i) in item.children"
  189. :key="i"
  190. :prop="p.statCode"
  191. :label="p.statName"
  192. :width="item.width"
  193. :formatter="tableFormat"
  194. />
  195. </el-table-column>
  196. </el-table>
  197. </div>
  198. <!--列设置-->
  199. <Dialog
  200. :flag="dialogFlag"
  201. class="dialog-check-cols"
  202. >
  203. <div class="col-dialog">
  204. <div class="title">列设置</div>
  205. <div class="content">
  206. <el-tree
  207. :data="tableCols"
  208. :class="colsCheckClass"
  209. show-checkbox
  210. node-key="index"
  211. :default-expand-all="true"
  212. :props="{
  213. label: 'statName',
  214. children: 'children'
  215. }"
  216. :default-checked-keys="checkedKeysTemp"
  217. @check="handleCheck"
  218. />
  219. </div>
  220. <div class="foot right t30">
  221. <el-button
  222. size="medium"
  223. class="r24"
  224. type="primary"
  225. @click="onCheck"
  226. >确定</el-button>
  227. <el-button
  228. size="medium"
  229. @click="hide"
  230. >取消</el-button>
  231. </div>
  232. </div>
  233. </Dialog>
  234. </div>
  235. </template>
  236. <script>
  237. import Dialog from '@/layout/components/Dialog'
  238. import terminalMixin from '../../mixins/terminal'
  239. import formMixin from '../../mixins/form'
  240. import tableColsMixin from '../../mixins/tableCols'
  241. export default {
  242. name: 'ArrivalTerminalView',
  243. components: { Dialog },
  244. mixins: [terminalMixin, formMixin, tableColsMixin],
  245. data() {
  246. return {
  247. // 初始表头
  248. tableCols: [
  249. {
  250. statCode: 'flightInfo',
  251. statName: '航班信息',
  252. children: [
  253. {
  254. statCode: 'FlightNO',
  255. statName: '航班号',
  256. width: 91
  257. },
  258. {
  259. statCode: 'FlightDate',
  260. statName: '执飞日期',
  261. width: 105
  262. },
  263. {
  264. statCode: 'PlanLandingTime',
  265. statName: '到港时间',
  266. width: 115
  267. },
  268. {
  269. statCode: 'PlanDepartureApt',
  270. statName: '起飞航站',
  271. width: 71
  272. },
  273. {
  274. statCode: 'LandingBuild',
  275. statName: '到达航站楼',
  276. width: 65
  277. },
  278. {
  279. statCode: 'Carousel',
  280. statName: '行李转盘',
  281. width: 68
  282. },
  283. {
  284. statCode: 'StandForLanding',
  285. statName: '停机位',
  286. width: 68
  287. }
  288. ]
  289. },
  290. {
  291. statCode: 'depatureInfo',
  292. statName: '始飞站行李信息',
  293. children: [
  294. {
  295. statCode: 'checkin',
  296. statName: '值机',
  297. width: 72
  298. },
  299. {
  300. statCode: 'expect_load',
  301. statName: '预计装载',
  302. width: 101
  303. },
  304. {
  305. statCode: 'loadflight',
  306. statName: '已装载',
  307. width: 65
  308. }
  309. ]
  310. },
  311. {
  312. statCode: 'arriveInfo',
  313. statName: '到达行李信息',
  314. children: [
  315. {
  316. statCode: 'reach',
  317. statName: '到达',
  318. width: 88
  319. },
  320. {
  321. statCode: 'did_not_arrive',
  322. statName: '未到达',
  323. width: 76
  324. },
  325. {
  326. statCode: 'special',
  327. statName: '特殊',
  328. width: 88
  329. },
  330. {
  331. statCode: 'claim',
  332. statName: '理赔',
  333. width: 83
  334. }
  335. ]
  336. },
  337. {
  338. statCode: 'uninstallInfo',
  339. statName: '卸载状态',
  340. children: [
  341. {
  342. statCode: 'uninstalled',
  343. statName: '已卸载',
  344. width: 83
  345. },
  346. {
  347. statCode: 'to_be_uninstalled',
  348. statName: '待卸载',
  349. width: 80
  350. }
  351. ]
  352. },
  353. {
  354. statCode: 'stopBaggage',
  355. statName: '终止行李',
  356. children: [
  357. {
  358. statCode: 'terminateArrive',
  359. statName: '到达',
  360. width: 79
  361. },
  362. {
  363. statCode: 'terminatedNotArrived',
  364. statName: '未到达',
  365. width: 82
  366. }
  367. ]
  368. },
  369. {
  370. statCode: 'TransferBaggage',
  371. statName: '转运行李',
  372. children: [
  373. {
  374. statCode: 'delivered',
  375. statName: '已交运',
  376. width: 89
  377. },
  378. {
  379. statCode: 'not_shipped',
  380. statName: '未交运',
  381. width: 89
  382. }
  383. ]
  384. },
  385. {
  386. statCode: 'disBaggage',
  387. statName: '行李分布',
  388. children: [
  389. {
  390. statCode: 'container',
  391. statName: '容器',
  392. width: 97
  393. },
  394. {
  395. statCode: 'bulk',
  396. statName: '散装',
  397. width: 101
  398. }
  399. ]
  400. }
  401. ]
  402. }
  403. },
  404. methods: {
  405. tableRowClassName({ row, rowIndex }) {
  406. if (rowIndex < 2) {
  407. return 'bgl-hui'
  408. }
  409. },
  410. // 获取表单下拉框数据
  411. getFormData(params) {
  412. this.relatedAirportQuery({
  413. ...params,
  414. type: 'IN'
  415. })
  416. this.inboundCarrierQuery(params)
  417. this.craftTypeQuery(params)
  418. this.flightAttrQuery(params)
  419. },
  420. // 获取表格数据
  421. getTableData(params) {
  422. this.integratedQuery({
  423. ...params,
  424. type: 'IN'
  425. })
  426. },
  427. initTableData(tableData) {
  428. this.tableData = this._.sortBy(tableData, ['FlightDate', 'PlanLandingTime'])
  429. }
  430. }
  431. }
  432. </script>
  433. <style lang="scss" scoped>
  434. .arrival-form {
  435. padding-top: 11px;
  436. ::v-deep .form {
  437. .el-form-item {
  438. margin-bottom: 0px;
  439. margin-right: 8px;
  440. button,
  441. input,
  442. optgroup,
  443. select,
  444. textarea {
  445. font-family: Helvetica, 'Microsoft YaHei';
  446. font-size: 14px;
  447. }
  448. .el-switch__label {
  449. color: #303133;
  450. }
  451. .el-form-item__error {
  452. z-index: 10;
  453. }
  454. }
  455. .checkTime {
  456. margin: 0 16px;
  457. }
  458. .msgImg {
  459. cursor: pointer;
  460. position: relative;
  461. top: 6px;
  462. }
  463. }
  464. }
  465. .arrival-table {
  466. width: calc(100vw - 60px);
  467. ::v-deep .table {
  468. width: 100%;
  469. .cell {
  470. padding: 0;
  471. text-align: center;
  472. font-family: Helvetica, 'Microsoft YaHei';
  473. font-size: 14px;
  474. letter-spacing: 0;
  475. }
  476. .el-table__header-wrapper {
  477. .cell {
  478. font-weight: bold;
  479. color: #101116;
  480. }
  481. .has-gutter {
  482. tr {
  483. .bgl-huang {
  484. background: #fcf0b1;
  485. }
  486. }
  487. }
  488. }
  489. .el-table__body-wrapper {
  490. tr.bgl-hui {
  491. background: #d2d6df;
  492. td {
  493. background: #d2d6df;
  494. }
  495. &:nth-child(5) {
  496. position: relative;
  497. &::after {
  498. content: '';
  499. position: absolute;
  500. left: 0;
  501. bottom: 0;
  502. width: 100%;
  503. height: 2px;
  504. background: #e83f82;
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. ::v-deep .dialog-check-cols .el-tree {
  512. &.has-children .el-tree-node > .el-tree-node__children {
  513. display: flex;
  514. flex-wrap: wrap;
  515. }
  516. &.no-children {
  517. display: flex;
  518. flex-wrap: wrap;
  519. }
  520. }
  521. </style>