Elements-SY

Merge branch 'et86' into uat

...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
38 "dependencies": { 38 "dependencies": {
39 "axios": "0.21.1", 39 "axios": "0.21.1",
40 "core-js": "3.8.3", 40 "core-js": "3.8.3",
41 + "echarts": "^5.4.3",
41 "element-ui": "2.15.3", 42 "element-ui": "2.15.3",
42 "sortablejs": "^1.15.0", 43 "sortablejs": "^1.15.0",
43 "vue": "2.6.14", 44 "vue": "2.6.14",
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
6 6
7 <script> 7 <script>
8 export default { 8 export default {
9 - name: 'App' 9 + name: "App",
10 -} 10 +};
11 </script> 11 </script>
......
...@@ -29,7 +29,7 @@ export function findFlightDimRuleByFlightNo(query) { ...@@ -29,7 +29,7 @@ export function findFlightDimRuleByFlightNo(query) {
29 }) 29 })
30 } 30 }
31 31
32 -// 获取航班下航线维度(维度修改) 32 +// 航线维度设置详情
33 /** 33 /**
34 * @param purposeOfFlightNo 航班号 34 * @param purposeOfFlightNo 航班号
35 * @param flightDate 航班日期 35 * @param flightDate 航班日期
...@@ -43,7 +43,7 @@ export function findDestinationFltRuleByFlightNo(query) { ...@@ -43,7 +43,7 @@ export function findDestinationFltRuleByFlightNo(query) {
43 }) 43 })
44 } 44 }
45 45
46 -//航班优先级修改 46 +// 航班航线优先级更新
47 export function batchUpdateOrAddFlight(data) { 47 export function batchUpdateOrAddFlight(data) {
48 return request({ 48 return request({
49 url: '/destinationFlight/batchUpdateOrAddFlight', 49 url: '/destinationFlight/batchUpdateOrAddFlight',
...@@ -52,7 +52,7 @@ export function batchUpdateOrAddFlight(data) { ...@@ -52,7 +52,7 @@ export function batchUpdateOrAddFlight(data) {
52 }) 52 })
53 } 53 }
54 54
55 -//新增修改规则设置 55 +// 新增/修改航线规则设置
56 export function updateOrAddFlight(form) { 56 export function updateOrAddFlight(form) {
57 return request({ 57 return request({
58 url: '/destinationFlight/updateOrAddFlight', 58 url: '/destinationFlight/updateOrAddFlight',
...@@ -61,30 +61,23 @@ export function updateOrAddFlight(form) { ...@@ -61,30 +61,23 @@ export function updateOrAddFlight(form) {
61 }) 61 })
62 } 62 }
63 63
64 -//删除规则 64 +// 删除航线规则设置
65 -export function delFlightId(id) { 65 +export function delFlightId(data) {
66 - const data = {
67 - id
68 - }
69 return request({ 66 return request({
70 - url: '/destinationFlight/delFlightId', 67 + url: "/destinationFlight/delFlightId",
71 - method: 'post', 68 + method: "post",
72 - data: data 69 + data: data,
73 - }) 70 + });
74 } 71 }
75 72
76 -//启用/停止规则 73 +//开启/停用航线规则设置
77 -export function enableOrDisable(id, status) { 74 +export function enableOrDisable(data) {
78 //statsu 1-有效 3-停用 75 //statsu 1-有效 3-停用
79 - const data = {
80 - id,
81 - status
82 - }
83 return request({ 76 return request({
84 - url: '/destinationFlight/enableOrDisable', 77 + url: "/destinationFlight/enableOrDisable",
85 - method: 'post', 78 + method: "post",
86 - data: data 79 + data: data,
87 - }) 80 + });
88 } 81 }
89 82
90 //获取全部字典 83 //获取全部字典
...@@ -120,16 +113,13 @@ export function saveOrUpdateSpecifyDateRoute(data) { ...@@ -120,16 +113,13 @@ export function saveOrUpdateSpecifyDateRoute(data) {
120 }) 113 })
121 } 114 }
122 115
123 -// id查询目的航班 116 +// 通过id查询目的航班维度设置详情
124 -export function findByFlightId(id) { 117 +export function findByFlightId(data) {
125 - const data = {
126 - id
127 - }
128 return request({ 118 return request({
129 - url: '/destinationFlight/findByFlightId', 119 + url: "/destinationFlight/findByFlightId",
130 - method: 'post', 120 + method: "post",
131 - data: data 121 + data: data,
132 - }) 122 + });
133 } 123 }
134 124
135 //航班号查航班 125 //航班号查航班
......
...@@ -43,7 +43,7 @@ let ductLabels = { ...@@ -43,7 +43,7 @@ let ductLabels = {
43 "user": {//用户设置 43 "user": {//用户设置
44 "isValid": { 44 "isValid": {
45 "1": "启用", 45 "1": "启用",
46 - "2": "关闭", 46 + "2": "停用",
47 }, 47 },
48 }, 48 },
49 "FlightInformation": {//航班信息维护 49 "FlightInformation": {//航班信息维护
......
1 +// echarts按需引入
2 +// 引入 echarts API
3 +import * as echarts from "echarts/core";
4 +// 引入echarts图表类型
5 +import { BarChart } from "echarts/charts";
6 +// 引入echarts图表配置项
7 +import {
8 + GridComponent,
9 + PolarComponent,
10 + GeoComponent,
11 + SingleAxisComponent,
12 + ParallelComponent,
13 + CalendarComponent,
14 + GraphicComponent,
15 + ToolboxComponent,
16 + TooltipComponent,
17 + AxisPointerComponent,
18 + BrushComponent,
19 + TitleComponent,
20 + TimelineComponent,
21 + MarkPointComponent,
22 + MarkLineComponent,
23 + MarkAreaComponent,
24 + LegendComponent,
25 + DataZoomComponent,
26 + DataZoomInsideComponent,
27 + DataZoomSliderComponent,
28 + VisualMapComponent,
29 + VisualMapContinuousComponent,
30 + VisualMapPiecewiseComponent,
31 + AriaComponent,
32 + DatasetComponent,
33 + TransformComponent,
34 +} from "echarts/components";
35 +// 引入 Canvas 渲染器渲染
36 +import { CanvasRenderer } from "echarts/renderers";
37 +// 将以上引入的组件使用use()方法注册
38 +echarts.use([
39 + BarChart,
40 + GridComponent,
41 + PolarComponent,
42 + GeoComponent,
43 + SingleAxisComponent,
44 + ParallelComponent,
45 + CalendarComponent,
46 + GraphicComponent,
47 + ToolboxComponent,
48 + TooltipComponent,
49 + AxisPointerComponent,
50 + BrushComponent,
51 + TitleComponent,
52 + TimelineComponent,
53 + MarkPointComponent,
54 + MarkLineComponent,
55 + MarkAreaComponent,
56 + LegendComponent,
57 + DataZoomComponent,
58 + DataZoomInsideComponent,
59 + DataZoomSliderComponent,
60 + VisualMapComponent,
61 + VisualMapContinuousComponent,
62 + VisualMapPiecewiseComponent,
63 + AriaComponent,
64 + DatasetComponent,
65 + TransformComponent,
66 + CanvasRenderer,
67 +]);
68 +export default echarts;
......
1 <template> 1 <template>
2 <!-- 拖拽交换位置效果 --> 2 <!-- 拖拽交换位置效果 -->
3 <transition-group tag="div" class="container"> 3 <transition-group tag="div" class="container">
4 - <div class="item" v-for="(item, index) in list" :key="index" draggable="true" 4 + <div class="item" v-for="(item, index) in list" :key="item.route" draggable="true"
5 @dragstart="handleDragStart($event, item)" @dragover.prevent="handleDragOver($event, item)" 5 @dragstart="handleDragStart($event, item)" @dragover.prevent="handleDragOver($event, item)"
6 @dragenter="handleDragEnter($event, item)" @dragend="handleDragEnd($event, item)"> 6 @dragenter="handleDragEnter($event, item)" @dragend="handleDragEnd($event, item)">
7 <svg-icon v-if="!disabled" icon-class="drag-text" class="el-input__icon input-icon" style="color:#bfbfbf" /> 7 <svg-icon v-if="!disabled" icon-class="drag-text" class="el-input__icon input-icon" style="color:#bfbfbf" />
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
84 height: 150px; 84 height: 150px;
85 overflow-y: scroll; 85 overflow-y: scroll;
86 padding: 0; 86 padding: 0;
87 - border: 1px solid #ccc; 87 + border: 1px solid #e7eaec;
88 88
89 &::-webkit-scrollbar { 89 &::-webkit-scrollbar {
90 width: 7px; 90 width: 7px;
......
1 +<template>
2 + <div ref="barEcharts" class="yl-echarts-container bar-echarts"></div>
3 +</template>
4 +<script>
5 +import { optionBar } from "./optionConfig"
6 +export default {
7 + data() {
8 + return {};
9 + },
10 + computed: {},
11 + watch: {},
12 + created() {},
13 + mounted() {
14 + // 初始化echarts实例
15 + const myChart = this.$echarts.init(this.$refs.barEcharts);
16 + console.log(myChart);
17 + // 绘制图表
18 + myChart.setOption(optionBar);
19 + },
20 + methods: {},
21 +};
22 +</script>
23 +<style lang='scss'>
24 +.yl-echarts-container{
25 + // height: 200px;
26 +}
27 +</style>
1 +export const optionBar = {
2 + xAxis: {
3 + type: "category",
4 + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
5 + },
6 + yAxis: {
7 + type: "value",
8 + },
9 + series: [
10 + {
11 + data: [120, 200, 150, 80, 70, 110, 130],
12 + type: "bar",
13 + showBackground: true,
14 + backgroundStyle: {
15 + color: "rgba(180, 180, 180, 0.2)",
16 + },
17 + },
18 + ],
19 +};
...@@ -27,6 +27,8 @@ import tableHeaders from '@/assets/languages/tableHeaders' ...@@ -27,6 +27,8 @@ import tableHeaders from '@/assets/languages/tableHeaders'
27 import dictLabels from "@/assets/languages/dictLabels.js" 27 import dictLabels from "@/assets/languages/dictLabels.js"
28 import settings from './settings.js' 28 import settings from './settings.js'
29 import * as filters from "./utils/filters.js"; 29 import * as filters from "./utils/filters.js";
30 +import echarts from "@/assets/languages/echarts";
31 +
30 // 全局方法挂载 32 // 全局方法挂载
31 Vue.prototype.parseTime = parseTime 33 Vue.prototype.parseTime = parseTime
32 Vue.prototype.resetForm = resetForm 34 Vue.prototype.resetForm = resetForm
...@@ -42,7 +44,7 @@ Vue.prototype.isArray = isArray ...@@ -42,7 +44,7 @@ Vue.prototype.isArray = isArray
42 Vue.prototype.tableHeaders = tableHeaders 44 Vue.prototype.tableHeaders = tableHeaders
43 Vue.prototype.dictLabels = dictLabels 45 Vue.prototype.dictLabels = dictLabels
44 Vue.prototype.settings = settings 46 Vue.prototype.settings = settings
45 - 47 +Vue.prototype.$echarts = echarts;
46 Vue.prototype.msgSuccess = function (msg) { 48 Vue.prototype.msgSuccess = function (msg) {
47 this.$message({ showClose: true, message: msg, type: "success" }); 49 this.$message({ showClose: true, message: msg, type: "success" });
48 } 50 }
......
...@@ -73,10 +73,19 @@ export const constantRoutes = [ ...@@ -73,10 +73,19 @@ export const constantRoutes = [
73 hidden: true, 73 hidden: true,
74 children: [ 74 children: [
75 { 75 {
76 - path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", 76 + path: "/edit",
77 component: (resolve) => 77 component: (resolve) =>
78 - require(["@/views/allocationConfig/flightAllocConfig/info"], resolve), 78 + require(["@/views/et86Config/et86RuleConfig/edit"], resolve),
79 - name: "FlightAllocConfigInfo", 79 + name: "edit",
80 + meta: { title: "ET86规则", icon: "user", noCache: true },
81 + },
82 + {
83 + path: "/routeInfo",
84 + component: (resolve) =>
85 + require([
86 + "@/views/allocationConfig/flightAllocConfig/flightRouteInfo",
87 + ], resolve),
88 + name: "routeInfo",
80 meta: { title: "航班配舱", icon: "user" }, 89 meta: { title: "航班配舱", icon: "user" },
81 }, 90 },
82 { 91 {
......
...@@ -401,7 +401,7 @@ export function sortList(arr, key) { ...@@ -401,7 +401,7 @@ export function sortList(arr, key) {
401 }); 401 });
402 } 402 }
403 403
404 -// 获取计算元素的属性的margin + padding + clientHeight 404 +// 获取计算元素的属性的marginTop + marginBottom + paddingTop + paddingBottom值
405 function getPropertyValue(el) { 405 function getPropertyValue(el) {
406 let style, marginTop, marginBottom, paddingTop, paddingBottom; 406 let style, marginTop, marginBottom, paddingTop, paddingBottom;
407 style = window.getComputedStyle(el, null); 407 style = window.getComputedStyle(el, null);
...@@ -454,3 +454,101 @@ export function restTableHeight($refs) { ...@@ -454,3 +454,101 @@ export function restTableHeight($refs) {
454 let topHeaderClientHeight = document.querySelector(".headerRef").clientHeight; 454 let topHeaderClientHeight = document.querySelector(".headerRef").clientHeight;
455 return heigth + topHeaderClientHeight; 455 return heigth + topHeaderClientHeight;
456 } 456 }
457 +
458 +/**
459 + * Array Json去重 & 排序
460 + * @author SunYu
461 + * @param {Array} arr
462 + * @param {string || Object} keys
463 + * @description 对数组中指定的JSON字段去重和指定的字段进行排序
464 + * @example
465 + * 当指定一个字段去重时:removeDuplicates(arr, "name")
466 + * 当指定一个字段去重并且排序如下:
467 + * removeDuplicates(res.data.list, {
468 + * duplicate: "name", // 去重字段
469 + * sortType: "Number", // 排序类型
470 + * sortAttr: "id", // 排序字段
471 + * })
472 + */
473 +export function removeDuplicates(arr, keys) {
474 + let duplicate, dateTime;
475 + if (typeof keys == "object") {
476 + duplicate = keys.duplicate;
477 + dateTime = keys.dateTime;
478 + }
479 + // 去重
480 + let map = new Map();
481 + for (let i = 0; i < arr.length; i++) {
482 + let item = arr[i];
483 + if (
484 + !map.has(item[duplicate]) ||
485 + new Date(map.get(item[duplicate])[dateTime]) < new Date(item[dateTime])
486 + ) {
487 + map.set(item[duplicate], item);
488 + }
489 + }
490 + const result = Array.from(map.values());
491 + // 返回去重结果
492 + if (typeof keys == "string") return result;
493 + // 排序
494 + if (typeof keys == "object") {
495 + if (keys.sort) {
496 + if (keys.sortType.toLowerCase().trim() == "number") {
497 + if (result.length) {
498 + result = sortFn();
499 + }
500 + // 返回排序去重结果
501 + }
502 + }
503 + return result;
504 + }
505 + // 排序方法
506 + function sortFn() {
507 + if (isNaN(Number(result[0][keys.sortAttr]))) {
508 + return result.sort((a, b) =>
509 + a[keys.sortAttr].localeCompare(b[keys.sortAttr])
510 + ); // 按字母排序
511 + } else {
512 + return result.sort((a, b) => a[keys.sortAttr] - b[keys.sortAttr]); // 按数字排序
513 + }
514 + }
515 +}
516 +/**
517 + * Array Json
518 + * @author SunYu
519 + * @param {Array} arr
520 + * @param {string} key
521 + * @description 把所有重复的过滤出来
522 + * @example
523 + * filterRepeat(arr, "name")
524 + */
525 +export function filterRepeat(arr, key) {
526 + const newArr = arr
527 + .map((item) => item[key])
528 + .filter((key, index, array) => array.indexOf(key) !== index);
529 +
530 + return arr.filter((item) => newArr.includes(item[key]));
531 +}
532 +/**
533 + * Array Json
534 + * @author SunYu
535 + * @param {Array} arr
536 + * @param {string} key
537 + * @param {string} time
538 + * @description 把数组JSON字段重复的值过滤出来,并且根据时间戳返回最新的那一条且返回新的数组
539 + * @example
540 + * filterRepeatNewData(arr, "name", "createTime")
541 + */
542 +export function filterRepeatNewData(arr, key, time) {
543 + // 找出最大时间戳
544 + const maxDate = filterRepeat(arr, key).reduce(
545 + (max, obj) =>
546 + new Date(obj[time]).getTime() > max ? new Date(obj[time]).getTime() : max,
547 + -Infinity
548 + );
549 + // 找出最大时间戳对应的数据并且返回新的数组
550 + const result = filterRepeat(arr, key).filter(
551 + (obj) => new Date(obj[time]).getTime() === maxDate
552 + );
553 + return result;
554 +}
......
1 +<template>
2 + <el-card>
3 + <div class="row">
4 + <div class="col-6">
5 + <draggable
6 + class="list-group"
7 + tag="ul"
8 + v-model="routeList"
9 + v-bind="dragOptions"
10 + @start="dragStart"
11 + @end="dragEnd"
12 + >
13 + <transition-group type="transition" name="flip-list">
14 + <li
15 + class="list-group-item"
16 + v-for="(item, i) in routeList"
17 + :key="item.route"
18 + >
19 + <i
20 + :class="
21 + item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
22 + "
23 + @click="item.fixed = !item.fixed"
24 + aria-hidden="true"
25 + ></i>
26 + <span v-if="item.isEtesRoute == 'Y' || item.etesRule == 'Y'"
27 + ><i class="route-count">{{ ++i }}</i
28 + >{{ item.route }}ET86航线】</span
29 + >
30 + <span v-else
31 + ><i class="route-count">{{ ++i }}</i
32 + >{{ item.route }}</span
33 + >
34 + </li>
35 + </transition-group>
36 + </draggable>
37 + </div>
38 + </div>
39 + </el-card>
40 +</template>
41 +
42 +<script>
43 +import draggable from "vuedraggable";
44 +export default {
45 + name: "YlDraggable",
46 + props: {
47 + routeList: {
48 + // 航线
49 + type: Array,
50 + default: () => [],
51 + },
52 + dragOptions: {
53 + // 拖拽配置
54 + type: Object,
55 + default: () => {
56 + return {
57 + animation: 200,
58 + group: "description",
59 + disabled: false,
60 + ghostClass: "ghost",
61 + };
62 + },
63 + },
64 + },
65 + components: {
66 + draggable,
67 + },
68 + data() {
69 + return {};
70 + },
71 + created() {},
72 + methods: {
73 + // 排序
74 + sort() {
75 + this.routeList = this.routeList.sort(
76 + (a, b) => a.routePriority - b.routePriority
77 + );
78 + },
79 + // 开始拖拽
80 + dragStart() {},
81 + // 结束拖拽
82 + dragEnd() {
83 + this.$emit("dragEnd", this.routeList);
84 + },
85 + },
86 +};
87 +</script>
88 +<style lang="scss">
89 +.el-card__body {
90 + padding: 15px 10px 0px 10px !important;
91 +}
92 +.list-group {
93 + min-height: 20px;
94 + max-height: 150px;
95 + overflow: auto;
96 + margin-top: 0;
97 + padding: 0;
98 + &::-webkit-scrollbar {
99 + width: 7px;
100 + height: 7px;
101 + }
102 + &::-webkit-scrollbar-track {
103 + background-color: #fff;
104 + }
105 + &::-webkit-scrollbar-thumb {
106 + background-color: #ccc;
107 + border-radius: 20px;
108 + }
109 + &::-webkit-scrollbar-thumb:hover {
110 + background-color: #409eff;
111 + }
112 + &::-webkit-scrollbar-track-piece {
113 + background: #f2f6fc;
114 + }
115 +}
116 +.list-group-item {
117 + cursor: move;
118 + padding: 5px 0px;
119 +}
120 +.list-group-item i {
121 + cursor: pointer;
122 +}
123 +.route-count {
124 + font-family: initial;
125 + font-style: inherit;
126 + margin-right: 15px;
127 +}
128 +</style>
1 +<template>
2 + <div ref="routeInfo" class="route-container">
3 + <el-collapse
4 + value="1"
5 + accordion
6 + v-model="activeNames"
7 + @change="collapseChange"
8 + v-loading="loading"
9 + >
10 + <div
11 + class="collapse-item-header"
12 + v-for="(item, index) in routesInfo"
13 + :key="item.route || item.flightRoute"
14 + >
15 + <el-collapse-item :name="index" v-if="showFlightRoute(item)">
16 + <!-- 航线名 -->
17 + <template slot="title">
18 + <strong>{{ item.route || item.flightRoute }}</strong>
19 + </template>
20 + <!-- 航线设置信息 -->
21 + <div class="route-info info-item">
22 + <el-card class="route-info-card">
23 + <!-- 有数据时 -->
24 + <section v-if="item.config || item.flightRoute">
25 + <div slot="header" class="route-config-header">
26 + <el-button
27 + type="primary"
28 + size="mini"
29 + :disabled="pageName || item.status == '3' || status"
30 + :loading="item.loading"
31 + @click="saveSubmit(item, index)"
32 + >保 存</el-button
33 + >
34 + <el-button
35 + v-if="showBtnRule(item)"
36 + type="primary"
37 + size="mini"
38 + icon="el-icon-video-pause"
39 + :loading="item.loading"
40 + :disabled="pageName || status"
41 + @click="onOffSubmit(item, index)"
42 + >{{ item.status | statusBtn }}</el-button
43 + >
44 + <el-button
45 + v-if="showBtnRule(item)"
46 + type="danger"
47 + size="mini"
48 + icon="el-icon-delete"
49 + :disabled="pageName || item.status !== '3' || status"
50 + :loading="item.loading"
51 + @click="deleteSubmit(item, index)"
52 + >删 除</el-button
53 + >
54 + <span class="flight-route-title">
55 + {{ item.ruleDate ? "日期级别规则" : "普通规则" }}</span
56 + >
57 + </div>
58 + <el-divider></el-divider>
59 + <div class="route-config-info">
60 + <el-form label-position="right" label-width="120px">
61 + <el-row>
62 + <el-col :span="24">
63 + <el-form-item label="始发站">
64 + <el-col :span="2">
65 + <el-radio-group
66 + v-model="item.isLocation"
67 + @change="changeLocation"
68 + :disabled="pageName || status"
69 + >
70 + <el-radio label="1">包含始发站</el-radio>
71 + <el-radio label="2">不包含始发站</el-radio>
72 + </el-radio-group>
73 + </el-col>
74 + <el-col :span="10">
75 + <el-input
76 + v-if="item.isLocation == '1'"
77 + :disabled="pageName || status"
78 + type="textarea"
79 + v-model="item.location"
80 + :rows="4"
81 + placeholder="始发站之间用回车符分隔"
82 + style="width: 500px"
83 + >
84 + </el-input>
85 + <el-input
86 + v-else
87 + :disabled="pageName || status"
88 + type="textarea"
89 + v-model="item.notLocation"
90 + :rows="4"
91 + placeholder="始发站之间用回车符分隔"
92 + style="width: 500px"
93 + >
94 + </el-input>
95 + </el-col>
96 + </el-form-item>
97 + </el-col>
98 + <el-col :span="24">
99 + <el-form-item label="目的站">
100 + <el-col :span="2">
101 + <el-radio-group
102 + :disabled="pageName || status"
103 + v-model="item.isDestinationSite"
104 + @change="changeDestinationSite"
105 + >
106 + <el-radio label="1">包含目的站</el-radio>
107 + <el-radio label="2">不包含目的站</el-radio>
108 + </el-radio-group>
109 + </el-col>
110 + <el-col :span="10">
111 + <el-input
112 + v-if="item.isDestinationSite == '1'"
113 + :disabled="pageName || status"
114 + type="textarea"
115 + v-model="item.destinationSite"
116 + :rows="4"
117 + placeholder="目的站之间用回车符分隔"
118 + style="width: 500px"
119 + >
120 + </el-input>
121 + <el-input
122 + v-else
123 + :disabled="pageName || status"
124 + type="textarea"
125 + v-model="item.notDestinationSite"
126 + :rows="4"
127 + placeholder="目的站之间用回车符分隔"
128 + style="width: 500px"
129 + >
130 + </el-input>
131 + </el-col>
132 + </el-form-item>
133 + </el-col>
134 + <el-col :span="24">
135 + <el-col :span="10">
136 + <el-form-item label="URSA包含">
137 + <el-input
138 + :disabled="pageName || status"
139 + type="textarea"
140 + v-model="item.includeUrsa"
141 + :rows="4"
142 + placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_;P_"
143 + >
144 + </el-input>
145 + </el-form-item>
146 + </el-col>
147 + <el-col :span="10">
148 + <el-form-item label="URSA不包含">
149 + <el-input
150 + :disabled="pageName || status"
151 + type="textarea"
152 + v-model="item.notIncludeUrsa"
153 + :rows="4"
154 + placeholder="URSA之间用分号分隔,例:F1;F2;F3;P"
155 + >
156 + </el-input>
157 + </el-form-item>
158 + </el-col>
159 + </el-col>
160 + <el-col :span="24">
161 + <el-col :span="9">
162 + <el-form-item label="件数">
163 + <el-col :span="10">
164 + <el-input
165 + :disabled="pageName || status"
166 + class="numberInput"
167 + v-model.trim="item.minNumOfPieces"
168 + placeholder="最少件数"
169 + >
170 + </el-input>
171 + <span
172 + ref="minNumOfPieces"
173 + class="el-form-item__error"
174 + ></span>
175 + </el-col>
176 + <el-col style="text-align: center" :span="1"
177 + >-</el-col
178 + >
179 + <el-col :span="10">
180 + <el-input
181 + :disabled="pageName || status"
182 + class="numberInput"
183 + v-model.trim="item.maxNumOfPieces"
184 + placeholder="最多件数"
185 + >
186 + </el-input>
187 + </el-col>
188 + </el-form-item>
189 + </el-col>
190 + <el-col :span="9">
191 + <el-form-item label="重量(KG)">
192 + <el-col :span="10">
193 + <el-input
194 + :disabled="pageName || status"
195 + class="numberInput"
196 + v-model.trim="item.minWeight"
197 + placeholder="最小重量"
198 + >
199 + </el-input>
200 + <span
201 + ref="minWeight"
202 + class="el-form-item__error"
203 + ></span>
204 + </el-col>
205 + <el-col style="text-align: center" :span="1"
206 + >-</el-col
207 + >
208 + <el-col :span="10">
209 + <el-input
210 + :disabled="pageName || status"
211 + class="numberInput"
212 + v-model.trim="item.maxWeight"
213 + placeholder="最大重量"
214 + >
215 + </el-input>
216 + </el-col>
217 + </el-form-item>
218 + </el-col>
219 + </el-col>
220 + <el-col :span="24">
221 + <el-form-item label="申报类别">
222 + <el-card shadow="never" style="width: 95%">
223 + <el-checkbox-group
224 + :disabled="pageName || status"
225 + v-model="item.typeOfGoods"
226 + @change="changeCargoType"
227 + >
228 + <el-row>
229 + <el-col
230 + v-for="item in cargoType"
231 + :span="2"
232 + :key="item.id"
233 + >
234 + <el-checkbox
235 + v-if="item.status === 1"
236 + :label="item.chineseName"
237 + :name="item.chineseName"
238 + :key="item.code"
239 + >
240 + <Tooltips
241 + :content="item.chineseName"
242 + :refName="item.code"
243 + >
244 + </Tooltips>
245 + </el-checkbox>
246 + </el-col>
247 + </el-row>
248 + </el-checkbox-group>
249 + </el-card>
250 + </el-form-item>
251 + </el-col>
252 + <el-col :span="24">
253 + <el-form-item label="货物类型">
254 + <el-card shadow="never" style="width: 95%">
255 + <el-checkbox-group
256 + :disabled="pageName || status"
257 + v-model="item.cargoType"
258 + @change="changeCargoStatus"
259 + >
260 + <el-row>
261 + <el-col
262 + :span="3"
263 + v-for="item in cargoStatus"
264 + :key="item.id"
265 + >
266 + <el-checkbox
267 + v-if="item.status === 1"
268 + :label="item.chineseName"
269 + :name="item.chineseName"
270 + :key="item.code"
271 + disabled
272 + >
273 + <Tooltips
274 + :content="item.chineseName"
275 + :refName="item.code"
276 + >
277 + </Tooltips>
278 + </el-checkbox>
279 + </el-col>
280 + </el-row>
281 + </el-checkbox-group>
282 + </el-card>
283 + </el-form-item>
284 + </el-col>
285 + <el-col :span="24">
286 + <el-form-item label="取件扫描号">
287 + <el-card shadow="never" style="width: 95%">
288 + <el-checkbox-group
289 + :disabled="pageName || status"
290 + v-model="item.puporpuxCode"
291 + @change="changePuporpux"
292 + >
293 + <el-row>
294 + <el-col
295 + :span="2"
296 + v-for="item in puporpux"
297 + :key="item.id"
298 + >
299 + <el-checkbox
300 + v-if="item.status === 1"
301 + :label="item.chineseName"
302 + :name="item.chineseName"
303 + :key="item.code"
304 + >
305 + <Tooltips
306 + :content="item.chineseName"
307 + :refName="item.code"
308 + >
309 + </Tooltips>
310 + </el-checkbox>
311 + </el-col>
312 + </el-row>
313 + </el-checkbox-group>
314 + </el-card>
315 + </el-form-item>
316 + </el-col>
317 + <el-col :span="24">
318 + <el-form-item label="Service Code">
319 + <el-card shadow="never" style="width: 95%">
320 + <el-checkbox-group
321 + :disabled="pageName || status"
322 + v-model="item.serviceCode"
323 + @change="changeServiceCode"
324 + >
325 + <el-row>
326 + <el-col
327 + :span="2"
328 + v-for="item in serviceCode"
329 + :key="item.id"
330 + >
331 + <el-checkbox
332 + v-if="item.status === 1"
333 + :label="item.chineseName"
334 + :name="item.chineseName"
335 + :key="item.code"
336 + >
337 + <Tooltips
338 + :content="item.chineseName"
339 + :refName="item.code"
340 + >
341 + </Tooltips>
342 + </el-checkbox>
343 + </el-col>
344 + </el-row>
345 + </el-checkbox-group>
346 + </el-card>
347 + </el-form-item>
348 + </el-col>
349 + <el-col :span="24">
350 + <el-form-item label="Handling Code">
351 + <el-card shadow="never" style="width: 95%">
352 + <el-checkbox-group
353 + :disabled="pageName || status"
354 + v-model="item.handlingCode"
355 + @change="changeHandlingCode"
356 + >
357 + <el-row>
358 + <el-col
359 + :span="2"
360 + v-for="item in handlingCode"
361 + :key="item.id"
362 + >
363 + <el-checkbox
364 + v-if="item.status === 1"
365 + :label="item.chineseName"
366 + :name="item.chineseName"
367 + :key="item.code"
368 + >
369 + <Tooltips
370 + :content="item.chineseName"
371 + :refName="item.code"
372 + >
373 + </Tooltips>
374 + </el-checkbox>
375 + </el-col>
376 + </el-row>
377 + </el-checkbox-group>
378 + </el-card>
379 + </el-form-item>
380 + </el-col>
381 + <el-col :span="24">
382 + <el-form-item label="Sub Category">
383 + <el-card shadow="never" style="width: 95%">
384 + <el-checkbox-group
385 + :disabled="pageName || status"
386 + v-model="item.subCategory"
387 + @change="changeSubCategory"
388 + >
389 + <el-row>
390 + <el-col
391 + :span="2"
392 + v-for="item in subCategory"
393 + :key="item.id"
394 + >
395 + <el-checkbox
396 + v-if="item.status === 1"
397 + :label="item.chineseName"
398 + :name="item.chineseName"
399 + :key="item.code"
400 + >
401 + <Tooltips
402 + :content="item.chineseName"
403 + :refName="item.code"
404 + >
405 + </Tooltips>
406 + </el-checkbox>
407 + </el-col>
408 + </el-row>
409 + </el-checkbox-group>
410 + </el-card>
411 + </el-form-item>
412 + </el-col>
413 + </el-row>
414 + </el-form>
415 + </div>
416 + </section>
417 + <!-- 没有数据时 -->
418 + <div class="no-data" v-else>
419 + <el-empty description="未设置规则!">
420 + <el-button
421 + type="primary"
422 + size="small"
423 + :disabled="pageName"
424 + @click="addRouteRule(index)"
425 + >新增规则</el-button
426 + >
427 + </el-empty>
428 + </div>
429 + </el-card>
430 + </div>
431 + </el-collapse-item>
432 + </div>
433 + </el-collapse>
434 + </div>
435 +</template>
436 +<script>
437 +// import { inputBlurValidate } from "@/utils/mixins";
438 +export default {
439 + name: "routeInfo",
440 + props: {
441 + routesInfo: {
442 + // 航线规则信息
443 + type: Array,
444 + default: () => [],
445 + },
446 + cargoType: {
447 + // 申报类别
448 + type: Array,
449 + default: () => [],
450 + },
451 + cargoStatus: {
452 + // 货物类型
453 + type: Array,
454 + default: () => [],
455 + },
456 + puporpux: {
457 + // 取件扫描号
458 + type: Array,
459 + default: () => [],
460 + },
461 + serviceCode: {
462 + // Service Code
463 + type: Array,
464 + default: () => [],
465 + },
466 + handlingCode: {
467 + // Handling Code
468 + type: Array,
469 + default: () => [],
470 + },
471 + subCategory: {
472 + // Sub Category
473 + type: Array,
474 + default: () => [],
475 + },
476 + status: {
477 + // 标识是详情还是编辑
478 + type: Boolean,
479 + default: false,
480 + },
481 + loading: {
482 + // 折叠面板
483 + type: Boolean,
484 + default: false,
485 + },
486 + },
487 + // mixins: [inputBlurValidate],
488 + data() {
489 + return {
490 + activeNames: [0], // 展开指定项
491 + };
492 + },
493 + computed: {
494 + pageName() {
495 + if (
496 + this.$route.query.pageName == "dmLog" ||
497 + this.$route.query.pageName == "flightRandConfig" ||
498 + this.$route.query.dataStatus == "view"
499 + ) {
500 + return true;
501 + }
502 + },
503 + },
504 + filters: {
505 + // 状态:0 无效,1 有效 2 配置中 3 停用
506 + statusBtn(status) {
507 + if (status == "0") {
508 + return "无 效";
509 + } else if (status == "1") {
510 + return "停 用";
511 + } else if (status == "3") {
512 + return "开 启";
513 + } else {
514 + return "保 存";
515 + }
516 + },
517 + },
518 + methods: {
519 + // 航线回显逻辑:如果航线无效并且没有数据,则不展示该航线
520 + showFlightRoute(item) {
521 + if (this.$route.query.status == "3" && item.config == false) {
522 + return false;
523 + } else {
524 + return true;
525 + }
526 + },
527 + // 航线操作按钮回显逻辑
528 + showBtnRule(item) {
529 + /*
530 + 展示保存按钮、开启按钮/停用按钮、删除按钮逻辑如下:
531 + 1:当status状态等于3的时候展示:保存按钮、开启按钮/停用按钮、删除按钮;
532 + 2:当status状态等于1并且ruleDate字段有值的时候展示:保存按钮、开启按钮/停用按钮、删除按钮;
533 + 3:当从航班配置设置不查询日期的时候“查看&修改”的时候,
534 + 有效的航线也就是status状态等于1的时候也要展示:保存按钮、开启按钮/停用按钮、删除按钮;
535 + 4:那么问题来了当从航班配置设置不查询日期的时候状态为1的时候也要展示:保存按钮、开启按钮/停用按钮、删除按钮;
536 + 那么要么跳转的时候传过来一个参数;
537 + 5:如果是从【航班顺位】和【DM数据处理】跳转过来,那么航班航线设置维度只作为详情查看,禁用所有的操作。
538 + 所以展示不展示保存按钮、开启按钮/停用按钮、删除按钮毫无意义
539 + */
540 + if (item.status == "3" || (item.status == "1" && item.ruleDate)) {
541 + return true;
542 + } else if (
543 + item.status == "1" &&
544 + this.$route.query.querySpecifyData == "2"
545 + ) {
546 + // 航班配舱设置非日期级别情况下
547 + return true;
548 + } else if (item.status == "1" && this.$route.query.dataStatus == "add") {
549 + // 添加航班配舱设置非日期级别情况下
550 + return true;
551 + } else if (item.status == "2") {
552 + return true;
553 + } else {
554 + return false;
555 + }
556 + },
557 + // 当前激活面板改变时触发
558 + collapseChange(name) {
559 + this.$emit("collapse", name);
560 + },
561 + // 始发站
562 + changeLocation(val) {
563 + this.$emit("location", val);
564 + },
565 + // 目的站
566 + changeDestinationSite(val) {
567 + this.$emit("destinationSite", val);
568 + },
569 + // 申报类别
570 + changeCargoType(arr) {
571 + this.$emit("cargoType", arr);
572 + },
573 + // 货物类型
574 + changeCargoStatus(arr) {
575 + this.$emit("cargoStatus", arr);
576 + },
577 + // 取件扫描号
578 + changePuporpux(arr) {
579 + this.$emit("puporpux", arr);
580 + },
581 + // Service Code
582 + changeServiceCode(arr) {
583 + this.$emit("serviceCode", arr);
584 + },
585 + // Handling Code
586 + changeHandlingCode(arr) {
587 + this.$emit("handlingCode", arr);
588 + },
589 + // Sub Category
590 + changeSubCategory(arr) {
591 + this.$emit("subCategory", arr);
592 + },
593 + // 新增规则
594 + addRouteRule(index) {
595 + this.$emit("addRlue", index);
596 + },
597 + // 保存
598 + saveSubmit(item, index) {
599 + this.$emit("save", item, index);
600 + },
601 + // 开启/暂停
602 + onOffSubmit(item, index) {
603 + this.$emit("onOff", item, index);
604 + },
605 + // 删除
606 + deleteSubmit(item, index) {
607 + this.$emit("delete", item, index);
608 + },
609 + },
610 +};
611 +</script>
612 +<style lang="scss">
613 +.collapse-item-header {
614 + padding-left: 40px;
615 +}
616 +.el-collapse {
617 + border: 0 !important;
618 +}
619 +.el-collapse-item__header {
620 + background-color: #d9ecff !important;
621 + border-bottom: 1px solid #ccc;
622 + padding: 0 10px 0 30px;
623 +}
624 +.el-collapse-item__wrap {
625 + border-bottom: 0 !important;
626 +}
627 +.el-collapse-item {
628 + border-bottom: 1px solid #ccc;
629 +}
630 +.el-collapse-item:last-child {
631 +}
632 +.route-container {
633 + strong {
634 + font-size: 14px;
635 + }
636 + .route-info {
637 + .route-info-card {
638 + section {
639 + padding: 12px 70px;
640 + .route-config-header {
641 + .flight-route-title {
642 + margin-left: 8px;
643 + }
644 + }
645 + }
646 + .route-config-info {
647 + }
648 + }
649 + }
650 +}
651 +.el-form-item__error {
652 + color: #ff4949;
653 + font-size: 12px;
654 + line-height: 1;
655 + padding-top: 4px;
656 + position: absolute;
657 + top: 100%;
658 + left: 0;
659 + font-weight: 500;
660 + width: 100% !important;
661 +}
662 +</style>
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" 3 + <el-dialog
4 - @close="close" append-to-body center> 4 + title="航线优先级排序"
5 - <el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent> 5 + :visible.sync="open"
6 + width="25%"
7 + :close-on-click-modal="false"
8 + :show-close="false"
9 + @close="close"
10 + append-to-body
11 + center
12 + >
13 + <el-form
14 + ref="routeOrder"
15 + label-width="auto"
16 + label-position="left"
17 + size="small"
18 + @submit.native.prevent
19 + >
6 <el-form-item label="航班号:" prop="fltNo"> 20 <el-form-item label="航班号:" prop="fltNo">
7 <span>{{ fltNo }}</span> 21 <span>{{ fltNo }}</span>
8 </el-form-item> 22 </el-form-item>
...@@ -14,7 +28,9 @@ ...@@ -14,7 +28,9 @@
14 </el-form-item> 28 </el-form-item>
15 </el-form> 29 </el-form>
16 <div slot="footer" class="dialog-footer"> 30 <div slot="footer" class="dialog-footer">
17 - <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> 31 + <el-button type="primary" :loading="loading" @click="submit"
32 + >确 定</el-button
33 + >
18 <el-button @click="close">取 消</el-button> 34 <el-button @click="close">取 消</el-button>
19 </div> 35 </div>
20 </el-dialog> 36 </el-dialog>
...@@ -22,81 +38,85 @@ ...@@ -22,81 +38,85 @@
22 </template> 38 </template>
23 39
24 <script> 40 <script>
25 -import { allRouteQuery, saveOrUpdateSpecifyDateRoute } from "@/api/destinationFlight"; 41 +import {
42 + allRouteQuery,
43 + saveOrUpdateSpecifyDateRoute,
44 +} from "@/api/destinationFlight";
26 45
27 export default { 46 export default {
28 name: "", 47 name: "",
29 props: { 48 props: {
30 open: { 49 open: {
31 type: Boolean, 50 type: Boolean,
32 - default: false 51 + default: false,
33 }, 52 },
34 fltData: { 53 fltData: {
35 type: Object, 54 type: Object,
36 - default: null 55 + default: null,
37 - } 56 + },
38 }, 57 },
39 data() { 58 data() {
40 return { 59 return {
41 - fltNo: '', 60 + fltNo: "",
42 - fltDate: '', 61 + fltDate: "",
43 routeList: [], 62 routeList: [],
44 submitData: [], 63 submitData: [],
45 - loading: false 64 + loading: false,
46 - } 65 + };
47 }, 66 },
48 watch: { 67 watch: {
49 open(val) { 68 open(val) {
50 - this.routeList = [] 69 + this.routeList = [];
51 - this.submitData = [] 70 + this.submitData = [];
52 if (val) { 71 if (val) {
53 - this.fltNo = this.fltData.fltNo 72 + this.fltNo = this.fltData.fltNo;
54 - this.fltDate = this.fltData.fltDate 73 + this.fltDate = this.fltData.fltDate;
55 allRouteQuery({ 74 allRouteQuery({
56 fltNo: this.fltNo, 75 fltNo: this.fltNo,
57 - routeDate: this.fltDate 76 + routeDate: this.fltDate,
58 - }).then(res => { 77 + })
78 + .then((res) => {
59 if (res.code === 200) { 79 if (res.code === 200) {
60 - this.routeList = res.data.list 80 + this.routeList = res.data.list;
61 - this.submitData = res.data.list 81 + this.submitData = res.data.list;
62 } else { 82 } else {
63 - this.msgWarning(res.msg) 83 + this.msgWarning(res.msg);
64 } 84 }
65 - }).catch(err => {
66 - console.log(err)
67 }) 85 })
86 + .catch((err) => {
87 + console.log(err);
88 + });
68 } 89 }
69 - } 90 + },
70 }, 91 },
71 methods: { 92 methods: {
72 submit() { 93 submit() {
73 - saveOrUpdateSpecifyDateRoute(this.submitData).then(res => { 94 + saveOrUpdateSpecifyDateRoute(this.submitData)
95 + .then((res) => {
74 if (res.code === 200) { 96 if (res.code === 200) {
75 - this.msgSuccess('保存成功') 97 + this.msgSuccess("保存成功");
76 - this.close() 98 + this.close(res.code);
77 } else { 99 } else {
78 - this.msgWarning(res.msg) 100 + this.msgWarning(res.msg);
79 } 101 }
80 - }).catch(err => {
81 - console.log(err)
82 }) 102 })
103 + .catch((err) => {
104 + console.log(err);
105 + });
83 }, 106 },
84 - close() { 107 + close(code) {
85 - this.routeList = [] 108 + this.routeList = [];
86 - this.submitData = [] 109 + this.submitData = [];
87 - this.$emit('close') 110 + this.$emit("close", code);
88 }, 111 },
89 drag(val) { 112 drag(val) {
90 val.forEach((item, index) => { 113 val.forEach((item, index) => {
91 - item.ordinal = index + 1 114 + item.ordinal = index + 1;
92 - }) 115 + });
93 - this.submitData = val 116 + this.submitData = val;
94 - } 117 + },
95 - } 118 + },
96 -} 119 +};
97 -
98 </script> 120 </script>
99 121
100 -<style lang="scss" scoped>
101 -
102 -</style>
...\ No newline at end of file ...\ No newline at end of file
122 +<style lang="scss" scoped></style>
......
1 +export const formConfig = [
2 + {
3 + label: "航班号",
4 + type: "Input",
5 + name: "purposeOfFlightNo",
6 + prop: "purposeOfFlightNo",
7 + placeholder: "请输入航班号",
8 + span: 4,
9 + trigger: "blur",
10 + labelWidth: "55px",
11 + disable: false,
12 + },
13 + {
14 + label: "航班日期",
15 + type: "Date",
16 + name: "flightDate",
17 + prop: "flightDate",
18 + placeholder: "请选择航班日期",
19 + format: "yyyy-MM-dd",
20 + colWidth: "18%",
21 + inputWidth: "100%",
22 + disable: false,
23 + hidden: false,
24 + },
25 + {
26 + label: "航线",
27 + type: "Input",
28 + name: "flightRouteListStr",
29 + prop: "flightRouteListStr",
30 + placeholder: "",
31 + span: 6,
32 + labelWidth: "40px",
33 + trigger: "blur", // 事件名
34 + disable: false,
35 + hidden: false,
36 + },
37 + {
38 + label: "航线优先级",
39 + type: "slot",
40 + name: "flightRoute",
41 + prop: "flightRoute",
42 + placeholder: "",
43 + colWidth: "23%",
44 + labelWidth: "85px",
45 + trigger: "blur", // 事件名
46 + },
47 +];
48 +// 航线规则表单
49 +export const routeRuleForm = {
50 + config: true,
51 + purposeOfFlightNo: "",
52 + flightRoute: "", // 飞行航线
53 + routeSpecifyDateSeq: "", // 航线优先级
54 + declarationCategory: "",
55 + location: null, // 包含始发站
56 + notLocation: null, // 不包含始发站
57 + destinationSite: null, // 包含目的站
58 + notDestinationSite: null, // 不包含目的站
59 + includeUrsa: "", // URSA包含
60 + notIncludeUrsa: "", // URSA不包含
61 + minNumOfPieces: "", // 最小件数
62 + maxNumOfPieces: "", // 最大件数
63 + minWeight: "", // 最小重量
64 + maxWeight: "", // 最大重量
65 + typeOfGoods: [], // 申报类别
66 + cargoType: [], // 货物类型
67 + puporpuxCode: [], // 取件扫描号
68 + serviceCode: [], // Service Code
69 + handlingCode: [], // Handling Code
70 + subCategory: [], // Sub Category
71 + ruleDate: "",
72 +};
73 +// 校验表单域的选项
74 +export const validateForm = [
75 + "location",
76 + "notLocation",
77 + "destinationSite",
78 + "notDestinationSite",
79 + "includeUrsa",
80 + "notIncludeUrsa",
81 + "minNumOfPieces",
82 + "maxNumOfPieces",
83 + "minWeight",
84 + "maxWeight",
85 + "typeOfGoods",
86 + "cargoType",
87 + "puporpuxCode",
88 + "serviceCode",
89 + "handlingCode",
90 + "subCategory",
91 +];
1 +<template>
2 + <div ref="barEcharts" class="route-info-container">
3 + <!-- 航线设置规则信息查询条件 -->
4 + <el-row style="padding: 0 50px">
5 + <el-col>
6 + <yl-form
7 + ref="ruleForm"
8 + :formConfig="formConfig"
9 + :queryForm="queryForm"
10 + :inline="false"
11 + formWidth="auto"
12 + @blur="blurEvent"
13 + >
14 + <route-draggable
15 + :routeList="routeList"
16 + :dragOptions="dragOptions"
17 + ></route-draggable>
18 + </yl-form>
19 + </el-col>
20 + </el-row>
21 + <!-- 航线设置规则信息 -->
22 + <el-row>
23 + <el-col :span="24">
24 + <el-divider content-position="left">航线维度设置</el-divider>
25 + </el-col>
26 + <el-col>
27 + <route-info
28 + ref="routeInfo"
29 + :routesInfo="routesInfo"
30 + :cargoType="cargoType"
31 + :cargoStatus="cargoStatus"
32 + :puporpux="puporpux"
33 + :serviceCode="serviceCode"
34 + :handlingCode="handlingCode"
35 + :subCategory="subCategory"
36 + :status="getRouter"
37 + :loading="loading"
38 + @location="changeLocation"
39 + @destinationSite="changeDestinationSite"
40 + @addRlue="addRlue"
41 + @save="saveSubmit"
42 + @onOff="onOffSubmit"
43 + @delete="deleteSubmit"
44 + >
45 + </route-info>
46 + </el-col>
47 + </el-row>
48 + </div>
49 +</template>
50 +<script>
51 +import YlForm from "@/components/YlForm";
52 +import RouteInfo from "../components/RouteInfo";
53 +import RouteDraggable from "../components/RouteDraggable";
54 +import { formConfig, routeRuleForm, validateForm } from "./formConfig";
55 +import {
56 + updateOrAddFlight, // 新增/修改航线规则设置
57 + delFlightId, // 删除航线规则设置
58 + enableOrDisable, // 开启/停用航线规则设置
59 + batchUpdateOrAddFlight, // 航班航线优先级更新
60 + queryRouteByFltNo, // 通过航班号查询航线
61 +} from "@/api/destinationFlight";
62 +import indexMixins from "../mixins";
63 +export default {
64 + components: {
65 + YlForm,
66 + RouteInfo,
67 + RouteDraggable,
68 + },
69 + mixins: [indexMixins],
70 + data() {
71 + return {
72 + loading: false, // 折叠面板
73 + dragOptions: {
74 + // 航线优先级拖拽配置
75 + animation: 200,
76 + group: "description",
77 + disabled: true, // 是否禁止拖拽
78 + ghostClass: "ghost",
79 + },
80 + formConfig: formConfig, // 表单配置项
81 + queryForm: {
82 + // 表单参数
83 + },
84 + routeList: [], // 航线
85 + routesInfo: [], // 航线规则信息
86 + cargoType: [], // 申报类别
87 + cargoStatus: [], // 货物类型
88 + puporpux: [], // 取件扫描号
89 + serviceCode: [], // Service Code
90 + handlingCode: [], // Handling Code
91 + subCategory: [], // Sub Category
92 + };
93 + },
94 + /*
95 + 判断有日期的找到了就走有日期的,如果日期级别的没有找到再去走一次普通级别的接口
96 + */
97 + created() {
98 + this.getAllDictData(); // 获取全部字典
99 + const parmas = {
100 + querySpecifyData: this.$route.query.querySpecifyData || "", // 查询特殊数据字段
101 + purposeOfFlightNo: this.$route.query.purposeOfFlightNo || "", // 航班号
102 + flightDate: this.$route.query.flightDate || "", // 飞行日期
103 + flightRouteListStr: this.$route.query.flightRouteListStr || "", // 飞行航线集合
104 + status: this.$route.query.status || "", // 状态
105 + dataStatus: this.$route.query.dataStatus || "", // add 、edit、view
106 + flightKindName: this.$route.query.flightKindName || "", // 航班种类White Tail 、Purple Tail
107 + pageName: this.$route.query.pageName || "", //
108 + id: this.$route.query.id || "",
109 + };
110 + // 指定隐藏或显示From表单域
111 + this.hiddenFormItem(parmas);
112 + // queryCondition只负责接收参数和接口调用
113 + this.queryCondition(parmas);
114 + },
115 + mounted() {},
116 + methods: {
117 + // 【通过航班号查询航线】
118 + getQueryRouteByFltNo(parmas) {
119 + queryRouteByFltNo(parmas)
120 + .then((res) => {
121 + const { code, data } = res;
122 + if (code == 200) {
123 + if (data.list.length) {
124 + let isEtesRoute = data.list.filter(
125 + (item) => item.isEtesRoute == "N"
126 + ); // 过滤ET86航线
127 + const routes = [];
128 + isEtesRoute.map((item) => {
129 + routes.push({ config: false, route: item.route });
130 + });
131 + this.routeList = isEtesRoute;
132 + this.routesInfo = routes;
133 + } else {
134 + this.routeList = [];
135 + this.msgError("暂无航线");
136 + }
137 + }
138 + })
139 + .catch(() => {});
140 + },
141 + // 航班号输入框失焦事件
142 + blurEvent({ purposeOfFlightNo }) {
143 + // 航班号转大写
144 + routeRuleForm.flightRoute = this.upCase(purposeOfFlightNo);
145 + // 通过航班号查询航线
146 + this.getQueryRouteByFltNo({ fltNo: this.upCase(purposeOfFlightNo) });
147 + this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo);
148 + },
149 + // 新增规则
150 + addRlue(index) {
151 + // 如果当前航班号的航线下没有数据,新增规则给默认数据
152 + routeRuleForm.purposeOfFlightNo = this.$route.query.purposeOfFlightNo;
153 + this.setattrVal(routeRuleForm);
154 + const mergeObj = {
155 + ...this.routesInfo[index],
156 + ...routeRuleForm,
157 + };
158 + this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
159 + },
160 + // 保存 【新增/修改航线规则设置】
161 + saveSubmit(item, index) {
162 + item.flightRoute = item.route || item.flightRoute;
163 + item.ruleDate = item.ruleDate || this.queryForm.flightDate;
164 + let parmas = JSON.parse(JSON.stringify(item));
165 + this.returnString(parmas, "cargoType");
166 + this.returnString(parmas, "typeOfGoods");
167 + this.returnString(parmas, "puporpuxCode");
168 + this.returnString(parmas, "serviceCode");
169 + this.returnString(parmas, "handlingCode");
170 + this.returnString(parmas, "subCategory");
171 + if (parmas.minWeight || parmas.maxWeight) {
172 + if (
173 + !/^(0|[1-9]\d*)(.\d{1,5})?$/.test(
174 + parmas.minWeight || parmas.maxWeight
175 + )
176 + ) {
177 + this.msgWarning("请输入有效重量,小数保留5位");
178 + return;
179 + }
180 + }
181 + if (parmas.minNumOfPieces || parmas.maxNumOfPieces) {
182 + if (!/^\d+$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) {
183 + this.msgWarning("请输入有效件数");
184 + return;
185 + }
186 + }
187 + if (parmas.minNumOfPieces && parmas.maxNumOfPieces) {
188 + if (Number(parmas.minNumOfPieces) > Number(parmas.maxNumOfPieces)) {
189 + this.msgWarning("最小件数不能大于最大件数");
190 + return;
191 + }
192 + }
193 + if (parmas.minWeight && parmas.maxWeight) {
194 + if (Number(parmas.minWeight) > Number(parmas.maxWeight)) {
195 + this.msgWarning("最小重量不能大于最大重量");
196 + return;
197 + }
198 + }
199 + // 校验表单域的选项
200 + let validate = validateForm.some((key) => parmas[key]);
201 + if (validate) {
202 + this.loading = true;
203 + updateOrAddFlight(parmas)
204 + .then((res) => {
205 + const { code, msg, data } = res;
206 + if (code == 200) {
207 + this.hasOwnProperty(data, "typeOfGoods");
208 + this.hasOwnProperty(data, "puporpuxCode");
209 + this.hasOwnProperty(data, "serviceCode");
210 + this.hasOwnProperty(data, "handlingCode");
211 + this.hasOwnProperty(data, "subCategory");
212 + this.setattrVal(data); // 设置属性值
213 + this.$set(this.routesInfo, index, {
214 + config: true,
215 + ...data,
216 + });
217 + this.msgSuccess("保存成功!");
218 + } else {
219 + this.msgWarning(msg);
220 + }
221 + this.loading = false;
222 + })
223 + .catch(() => {
224 + this.loading = false;
225 + });
226 + } else {
227 + this.msgWarning("未添加规则信息,请添加后再保存!");
228 + }
229 + },
230 + // 开启/停用【开启/停用航线规则设置】
231 + onOffSubmit(item, index) {
232 + this.loading = true;
233 + let tip = item.status == "1" ? "停用" : "启用";
234 + let parmas = {
235 + id: item.id,
236 + status: item.status == "1" ? "3" : "1",
237 + };
238 + this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
239 + confirmButtonText: "确定",
240 + cancelButtonText: "取消",
241 + type: "warning",
242 + })
243 + .then(() => {
244 + enableOrDisable(parmas)
245 + .then((res) => {
246 + const { code, msg, data } = res;
247 + if (code == 200) {
248 + this.hasOwnProperty(data, "typeOfGoods");
249 + this.hasOwnProperty(data, "puporpuxCode");
250 + this.hasOwnProperty(data, "serviceCode");
251 + this.hasOwnProperty(data, "handlingCode");
252 + this.hasOwnProperty(data, "subCategory");
253 + this.setattrVal(data); // 设置属性值
254 + this.$set(this.routesInfo, index, {
255 + config: true,
256 + ...data,
257 + });
258 + this.msgSuccess(tip + "成功");
259 + } else {
260 + this.msgWarning(msg);
261 + }
262 + this.loading = false;
263 + })
264 + .catch(() => {
265 + this.loading = false;
266 + });
267 + })
268 + .catch(() => {
269 + this.loading = false;
270 + });
271 + },
272 + // 删除航线规则设置
273 + deleteSubmit(item, index) {
274 + this.loading = true;
275 + let parmas = {
276 + id: item.id,
277 + };
278 + this.$confirm("是否确认删除此航班规则?", "警告", {
279 + confirmButtonText: "确定",
280 + cancelButtonText: "取消",
281 + showCancelButton: true,
282 + type: "warning",
283 + })
284 + .then(() => {
285 + delFlightId(parmas)
286 + .then((res) => {
287 + const { code, msg, data } = res;
288 + if (code == 200) {
289 + this.$set(this.routesInfo, index, {
290 + route: item.flightRoute,
291 + config: false,
292 + });
293 + this.msgSuccess(msg);
294 + } else {
295 + this.msgWarning(msg);
296 + }
297 + this.loading = false;
298 + })
299 + .catch(() => {
300 + this.loading = false;
301 + });
302 + })
303 + .catch(() => {
304 + this.loading = false;
305 + });
306 + },
307 + },
308 +};
309 +</script>
310 +<style lang="scss" scoped>
311 +.route-info-container {
312 + padding: 20px;
313 +}
314 +</style>
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form ref="flightAllocForm" :model="queryParams" class="form-header" size="small" label-position="right" 3 + <el-form
4 - label-width="auto" @submit.native.prevent> 4 + ref="flightAllocForm"
5 + :model="queryParams"
6 + class="form-header"
7 + size="small"
8 + label-position="right"
9 + label-width="auto"
10 + @submit.native.prevent
11 + >
5 <el-row> 12 <el-row>
6 <el-col :span="6"> 13 <el-col :span="6">
7 <el-form-item label="航班号"> 14 <el-form-item label="航班号">
8 - <el-input class="formItem" v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"> 15 + <el-input
16 + class="formItem"
17 + v-model.trim="purposeOfFlightNo"
18 + placeholder="航班号"
19 + @keyup.enter.native="getList"
20 + >
9 </el-input> 21 </el-input>
10 </el-form-item> 22 </el-form-item>
11 </el-col> 23 </el-col>
12 <el-col :span="6"> 24 <el-col :span="6">
13 <el-form-item label="航班日期"> 25 <el-form-item label="航班日期">
14 - <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期" 26 + <el-date-picker
15 - value-format="yyyy-MM-dd" clearable :disabled="queryParams.querySpecifyData == '2'"> 27 + class="formItem"
28 + v-model="queryParams.flightDate"
29 + type="date"
30 + placeholder="选择日期"
31 + value-format="yyyy-MM-dd"
32 + clearable
33 + :disabled="queryParams.querySpecifyData == '2'"
34 + >
16 </el-date-picker> 35 </el-date-picker>
17 </el-form-item> 36 </el-form-item>
18 </el-col> 37 </el-col>
19 <el-col :span="4"> 38 <el-col :span="4">
20 <el-form-item label="状态"> 39 <el-form-item label="状态">
21 - <el-select class="formItem" v-model="queryParams.status" placeholder="状态"> 40 + <el-select
41 + class="formItem"
42 + v-model="queryParams.status"
43 + placeholder="状态"
44 + >
22 <el-option label="有效" value="1"></el-option> 45 <el-option label="有效" value="1"></el-option>
23 <el-option label="停用" value="3"></el-option> 46 <el-option label="停用" value="3"></el-option>
24 </el-select> 47 </el-select>
...@@ -26,35 +49,76 @@ ...@@ -26,35 +49,76 @@
26 </el-col> 49 </el-col>
27 </el-row> 50 </el-row>
28 <div> 51 <div>
29 - <el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button> 52 + <el-button
30 - <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']" 53 + type="primary"
31 - @click=" 54 + icon="el-icon-search"
32 - $router.push({ 55 + :loading="loading"
33 - name: 'FlightAllocConfigInfo', 56 + @click="getList"
34 - params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' }, 57 + size="mini"
35 - }) 58 + >查询</el-button
36 - ">添加</el-button> 59 + >
37 - <el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1" 60 + <el-button
38 - inactive-value="2" active-color="#13ce66" inactive-color="#909399" @change="switchChange"></el-switch> 61 + class="mb20"
62 + type="primary"
63 + icon="el-icon-plus"
64 + size="mini"
65 + v-hasPermi="['allocation:alloc:add']"
66 + @click="addFlightRouteConfig"
67 + >添加</el-button
68 + >
69 + <el-switch
70 + style="margin-left: 10px"
71 + v-model="queryParams.querySpecifyData"
72 + inactive-text="日期查询"
73 + active-value="1"
74 + inactive-value="2"
75 + active-color="#13ce66"
76 + inactive-color="#909399"
77 + @change="switchChange"
78 + ></el-switch>
39 </div> 79 </div>
40 </el-form> 80 </el-form>
41 - <Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true" 81 + <Tables
42 - :totalCount="total" :loading="loading" :limitSize="queryParams.limit" :limitStart="queryParams.start" 82 + ref="newTables"
43 - :page="curPage" :pageSizes="[20]" :height="tableHeight" @currentChange="currentChange"> 83 + ductName="FlightAlloc"
84 + :data="flyList"
85 + :headerData="tableHeaders['flightAlloc']"
86 + :order="true"
87 + :totalCount="total"
88 + :loading="loading"
89 + :limitSize="queryParams.limit"
90 + :limitStart="queryParams.start"
91 + :page="curPage"
92 + :pageSizes="[20]"
93 + :height="tableHeight"
94 + @currentChange="currentChange"
95 + >
44 <template v-slot:ruleDate="scope"> 96 <template v-slot:ruleDate="scope">
45 - <el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)"> 97 + <el-link
46 - {{ 98 + v-if="scope.row.ruleDate"
47 - scope.row.ruleDate 99 + type="primary"
48 - }}<i class="el-icon-link"></i> </el-link> 100 + @click="toRouteOrder(scope.row)"
101 + >
102 + {{ scope.row.ruleDate }}<i class="el-icon-link"></i>
103 + </el-link>
49 </template> 104 </template>
50 <template slot="optionColumn"> 105 <template slot="optionColumn">
51 <el-table-column label="操作" align="center" width="150"> 106 <el-table-column label="操作" align="center" width="150">
52 <template slot-scope="scope"> 107 <template slot-scope="scope">
53 - <el-button type="text" size="mini" icon="el-icon-view" 108 + <el-button
54 - @click="handleClick(scope.row.purposeOfFlightNo, 'detail', scope.row.ruleDate, scope.row.status)">查看 109 + type="text"
110 + size="mini"
111 + icon="el-icon-view"
112 + @click="handleClick(scope.row, 'view')"
113 + >查看
55 </el-button> 114 </el-button>
56 - <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" 115 + <el-button
57 - @click="handleClick(scope.row.purposeOfFlightNo, 'update', scope.row.ruleDate, scope.row.status)">修改 116 + type="text"
117 + size="mini"
118 + icon="el-icon-edit"
119 + v-hasPermi="['allocation:alloc:update']"
120 + @click="handleClick(scope.row, 'edit')"
121 + >修改
58 </el-button> 122 </el-button>
59 <!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" 123 <!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
60 v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button> 124 v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
...@@ -71,22 +135,20 @@ ...@@ -71,22 +135,20 @@
71 </template> 135 </template>
72 136
73 <script> 137 <script>
74 -import { 138 +import { findFlightDimRuleByFlightNo } from "@/api/destinationFlight";
75 - findFlightDimRuleByFlightNo 139 +import Dialog from "./dialog.vue";
76 -} from "@/api/destinationFlight";
77 -import Dialog from './dialog.vue'
78 140
79 export default { 141 export default {
80 name: "FlightAllocConfig", 142 name: "FlightAllocConfig",
81 components: { 143 components: {
82 - Dialog 144 + Dialog,
83 }, 145 },
84 data() { 146 data() {
85 return { 147 return {
86 queryParams: { 148 queryParams: {
87 purposeOfFlightNo: null, 149 purposeOfFlightNo: null,
88 flightDate: undefined, 150 flightDate: undefined,
89 - querySpecifyData: '2', 151 + querySpecifyData: "2",
90 status: "1", 152 status: "1",
91 start: 0, 153 start: 0,
92 limit: 20, 154 limit: 20,
...@@ -114,13 +176,14 @@ export default { ...@@ -114,13 +176,14 @@ export default {
114 // }) 176 // })
115 }, 177 },
116 mounted() { 178 mounted() {
117 - this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200 179 + this.tableHeight =
180 + window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
118 }, 181 },
119 activated() { 182 activated() {
120 - this.getList() 183 + this.getList();
121 }, 184 },
122 deactivated() { 185 deactivated() {
123 - this.flyList = [] 186 + this.flyList = [];
124 }, 187 },
125 methods: { 188 methods: {
126 getList() { 189 getList() {
...@@ -130,59 +193,78 @@ export default { ...@@ -130,59 +193,78 @@ export default {
130 this.queryParams.start = 0; 193 this.queryParams.start = 0;
131 } 194 }
132 this.loading = true; 195 this.loading = true;
133 - findFlightDimRuleByFlightNo(this.queryParams).then(res => { 196 + findFlightDimRuleByFlightNo(this.queryParams)
134 - this.loading = false 197 + .then((res) => {
198 + this.loading = false;
135 if (res.code === 200) { 199 if (res.code === 200) {
136 - this.flyList = res.data.list 200 + this.flyList = res.data.list;
137 - this.total = res.data.totalCount 201 + this.total = res.data.totalCount;
138 } else { 202 } else {
139 - this.msgWarning(res.msg) 203 + this.msgWarning(res.msg);
140 } 204 }
141 - }).catch(err => {
142 - this.loading = false
143 - console.log(err)
144 }) 205 })
206 + .catch((err) => {
207 + this.loading = false;
208 + console.log(err);
209 + });
210 + },
211 + // 添加
212 + addFlightRouteConfig() {
213 + this.$router.push({
214 + path: "/routeInfo",
215 + query: {
216 + flightDate: "", // 跳转的时候默认当天日期
217 + purposeOfFlightNo: "",
218 + flightRouteListStr: "",
219 + status: "",
220 + pageName: "flightAllocConfig",
221 + dataStatus: "add",
222 + disable: "",
223 + },
224 + });
145 }, 225 },
146 //跳转到查看,修改页面 226 //跳转到查看,修改页面
147 - handleClick(fltNo, handle, fltDate, status) { 227 + handleClick({ purposeOfFlightNo, ruleDate, flightRoute, status }, name) {
148 - let obj = {
149 - id: ' ',
150 - handle: handle,
151 - fltNo: fltNo,
152 - fltDate: fltDate != null ? fltDate : ' ',
153 - route: ' ',
154 - routeStatus: 'FlightAllocConfig',
155 - status: status == '3' ? '3' : ' ',
156 - createStatus: 1
157 - }
158 this.$router.push({ 228 this.$router.push({
159 - name: "FlightAllocConfigInfo", 229 + path: "/routeInfo",
160 - params: obj, 230 + query: {
231 + flightDate: ruleDate,
232 + purposeOfFlightNo: purposeOfFlightNo,
233 + flightRouteListStr: flightRoute,
234 + status: status,
235 + pageName: "flightAllocConfig",
236 + dataStatus: name,
237 + querySpecifyData: this.queryParams.querySpecifyData,
238 + disable: true,
239 + },
161 }); 240 });
162 }, 241 },
163 //航班优先级修改 242 //航班优先级修改
164 toRouteOrder(val) { 243 toRouteOrder(val) {
165 this.colData = { 244 this.colData = {
166 fltNo: val.purposeOfFlightNo, 245 fltNo: val.purposeOfFlightNo,
167 - fltDate: val.ruleDate 246 + fltDate: val.ruleDate,
168 - } 247 + };
169 - this.open = true 248 + this.open = true;
170 }, 249 },
171 //开关改变 250 //开关改变
172 switchChange(val) { 251 switchChange(val) {
173 - if (val == '2') { 252 + if (val == "2") {
174 - this.queryParams.flightDate = undefined 253 + this.queryParams.flightDate = undefined;
175 } 254 }
176 }, 255 },
177 - close() { 256 + close(code) {
178 - this.open = false 257 + if (code == 200) {
258 + this.getList();
259 + }
260 + this.open = false;
179 }, 261 },
180 //翻页 262 //翻页
181 currentChange(val) { 263 currentChange(val) {
182 - this.curPage = val.page 264 + this.curPage = val.page;
183 this.queryParams.start = val.start; 265 this.queryParams.start = val.start;
184 this.getList(); 266 this.getList();
185 - } 267 + },
186 }, 268 },
187 computed: { 269 computed: {
188 purposeOfFlightNo: { 270 purposeOfFlightNo: {
...@@ -196,5 +278,3 @@ export default { ...@@ -196,5 +278,3 @@ export default {
196 }, 278 },
197 }; 279 };
198 </script> 280 </script>
199 -
200 -
......
...@@ -1220,8 +1220,10 @@ export default { ...@@ -1220,8 +1220,10 @@ export default {
1220 queryRouteByFltNo({ fltNo: this.infoForm.fltNo }).then(res => { 1220 queryRouteByFltNo({ fltNo: this.infoForm.fltNo }).then(res => {
1221 if (res.code === 200) { 1221 if (res.code === 200) {
1222 if (res.data.list.length > 0) { 1222 if (res.data.list.length > 0) {
1223 - this.routeList = res.data.list 1223 + let isEtesRoute = res.data.list.filter((item) => item.isEtesRoute == "N"); // 过滤ET86航线
1224 - res.data.list.forEach(item => { 1224 + this.routeList = isEtesRoute
1225 + if(isEtesRoute.length){
1226 + isEtesRoute.forEach(item => {
1225 this.infoForm.list.push({ 1227 this.infoForm.list.push({
1226 purposeOfFlightNo: this.infoForm.fltNo, 1228 purposeOfFlightNo: this.infoForm.fltNo,
1227 ruleDate: this.infoForm.fltDate, 1229 ruleDate: this.infoForm.fltDate,
...@@ -1229,6 +1231,9 @@ export default { ...@@ -1229,6 +1231,9 @@ export default {
1229 routePriority: item.ordinal 1231 routePriority: item.ordinal
1230 }) 1232 })
1231 }) 1233 })
1234 + }else{
1235 + this.msgWarning('未查询到航线信息!')
1236 + }
1232 } else { 1237 } else {
1233 this.msgWarning('未查询到航线信息!') 1238 this.msgWarning('未查询到航线信息!')
1234 this.routeList = [] 1239 this.routeList = []
......
1 +import {
2 + allDictData, // 获取全部字典
3 + findDestinationFltRuleByFlightNo, // 航线维度设置详情
4 + findByFlightId, // 通过id查询目的航班维度设置详情
5 +} from "@/api/destinationFlight";
6 +import { formConfig, routeRuleForm } from "../flightRouteInfo/formConfig";
7 +import { removeDuplicates } from "@/utils";
8 +export default {
9 + data() {
10 + return {
11 + formConfig: formConfig, // 表单配置项
12 + queryForm: {
13 + // 表单参数
14 + },
15 + };
16 + },
17 + computed: {
18 + // 获取路由参数
19 + getRouter() {
20 + if (this.$route.query.name == "add") {
21 + return "保存";
22 + } else if (this.$route.query.name == "edit") {
23 + return "修改";
24 + } else {
25 + return false;
26 + }
27 + },
28 + },
29 + methods: {
30 + // 指定隐藏或显示From表单域
31 + hiddenFormItem({ dataStatus, querySpecifyData }) {
32 + // 指定隐藏或显示From表单域【add时】
33 + if (dataStatus == "add") {
34 + formConfig.map((item) => {
35 + if (item.type !== "slot") {
36 + item.disable = false;
37 + if (item.label == "航班日期" || item.label == "航线") {
38 + item.hidden = true;
39 + }
40 + }
41 + });
42 + } else {
43 + // 【edit和view及空值时】
44 + formConfig.map((item) => {
45 + if (item.type !== "slot") {
46 + item.disable = true;
47 + if (item.label == "航班日期" || item.label == "航线") {
48 + item.hidden = false;
49 + }
50 + }
51 + });
52 + }
53 + // 【航班配舱设置】非日期级别
54 + if (querySpecifyData == "2") {
55 + formConfig.map((item) => {
56 + if (item.type !== "slot") {
57 + if (item.label == "航线") {
58 + item.hidden = true;
59 + }
60 + }
61 + });
62 + }
63 + // 【航班配舱设置】日期级别
64 + if (querySpecifyData == "1") {
65 + formConfig.map((item) => {
66 + if (item.type !== "slot") {
67 + if (item.label == "航线") {
68 + item.hidden = true;
69 + }
70 + }
71 + });
72 + }
73 + },
74 + // 页面跳转传参
75 + queryCondition(parmas) {
76 + let _this = this;
77 + // 航班配舱维度规则设置查询条件
78 + let queryCondition = {
79 + // 航班配舱设置
80 + flightAllocConfig: {
81 + noDateParmas: {
82 + flightDate: "",
83 + flightRoute: "",
84 + purposeOfFlightNo: parmas.purposeOfFlightNo,
85 + status: "",
86 + },
87 + dateParmas: {
88 + flightDate: parmas.flightDate,
89 + flightRoute: "",
90 + flightRouteListStr: "",
91 + purposeOfFlightNo: parmas.purposeOfFlightNo,
92 + status: "",
93 + },
94 + queryParmas: function () {
95 + // 非日期级别
96 + if (parmas.querySpecifyData == "2") {
97 + _this.noDateLevelData(this.noDateParmas);
98 + }
99 + // 日期级别
100 + if (parmas.querySpecifyData == "1") {
101 + _this.dateLevelData({
102 + dateParmas: this.dateParmas,
103 + noDateParmas: this.noDateParmas,
104 + });
105 + }
106 + _this.queryForm = _this.$route.query; // 获取跳转过来的参数
107 + },
108 + },
109 + // 航班信息维护
110 + flightInformationMaintenance: {
111 + noDateParmas: {
112 + purposeOfFlightNo: parmas.purposeOfFlightNo,
113 + flightRouteListStr: parmas.flightRouteListStr,
114 + status: "",
115 + },
116 + dateParmas: {
117 + purposeOfFlightNo: parmas.purposeOfFlightNo,
118 + flightDate: parmas.flightDate,
119 + flightRouteListStr: parmas.flightRouteListStr,
120 + status: "",
121 + },
122 + queryParmas: function () {
123 + // White Tail
124 + if (parmas.flightKindName == "White Tail") {
125 + _this.dateLevelData({
126 + dateParmas: this.dateParmas,
127 + noDateParmas: this.noDateParmas,
128 + });
129 + }
130 + // Purple Tail
131 + if (parmas.flightKindName == "Purple Tail") {
132 + _this.dateLevelData({
133 + dateParmas: this.dateParmas,
134 + noDateParmas: this.noDateParmas,
135 + });
136 + }
137 + },
138 + },
139 + // 航班顺位设置
140 + flightRandConfig: {
141 + noDateParmas: {
142 + flightRoute: "",
143 + flightRouteListStr: "",
144 + purposeOfFlightNo: parmas.purposeOfFlightNo,
145 + status: "",
146 + },
147 + dateParmas: {
148 + flightDate: parmas.flightDate,
149 + flightRoute: "",
150 + purposeOfFlightNo: parmas.purposeOfFlightNo,
151 + status: "",
152 + },
153 + queryParmas: function () {
154 + // 普通级别
155 + if (parmas.pageName == "flightRandConfig") {
156 + _this.dateLevelData({
157 + dateParmas: this.dateParmas,
158 + noDateParmas: this.noDateParmas,
159 + });
160 + }
161 + },
162 + },
163 + // 【系统日志】DM数据处理
164 + dmLog: {
165 + queryParmas: function () {
166 + if (parmas.pageName == "dmLog") {
167 + _this.getFindByFlightId({
168 + id: parmas.id,
169 + });
170 + }
171 + },
172 + },
173 + };
174 + // 航班配舱设置
175 + queryCondition.flightAllocConfig.queryParmas();
176 + // 航班信息维护
177 + queryCondition.flightInformationMaintenance.queryParmas();
178 + // 航班顺位设置
179 + queryCondition.flightRandConfig.queryParmas();
180 + // 【系统日志】DM数据处理
181 + queryCondition.dmLog.queryParmas();
182 + },
183 + // 获取所有数据字典
184 + getAllDictData() {
185 + allDictData()
186 + .then((res) => {
187 + if (res.code != 200) {
188 + this.msgError(res.msg);
189 + return;
190 + }
191 + // 给checkBox表单赋值做展示信息
192 + const { data } = res;
193 + this.cargoType = data.cargoType; // 申报类别
194 + this.cargoStatus = data.cargoStatus; // 货物类型
195 + this.puporpux = data.puporpux; // 取件扫描号
196 + this.serviceCode = this.dicSort(
197 + data.serviceCode.sort((a, b) =>
198 + a.chineseName.localeCompare(b.chineseName)
199 + )
200 + ); // Service Code
201 + this.handlingCode = this.dicSort(
202 + this.sorttodo(data.handlingCode, "BLANK")
203 + ); // Handling Code
204 + this.subCategory = this.dicSort(
205 + this.sorttodo(data.subCategory, "Blank")
206 + ); // Sub Category
207 + })
208 + .catch(() => {});
209 + },
210 + // 【接口调用和数据去重整合】普通级别
211 + noDateLevelRoute(parmas) {
212 + return new Promise((resolve, reject) => {
213 + findDestinationFltRuleByFlightNo(parmas)
214 + .then((res) => {
215 + const { code, data, msg } = res;
216 + if (code != 200) {
217 + this.msgError(msg);
218 + return;
219 + }
220 + let noDateRouteLists = data.routeList; // 只负责展示航线优先级
221 + let noDateRouteList = data.routeList.filter(
222 + (item) => item.etesRule == "N"
223 + ); // 航班航线基本信息(过滤ET86航线的)
224 + // 普通级别航班航线维度规则详情
225 + const noDateDataList = removeDuplicates(data.list, {
226 + duplicate: "flightRoute", // 去重字段
227 + dateTime: "createTime", // 从重复的数据中根据时间取最新的一条
228 + sort: false, // 是否要排序
229 + sortType: "Number", // 排序类型
230 + sortAttr: "routePriority", // 排序字段
231 + });
232 + // 整合飞行航线配置信息
233 + const mergeNoDateRouteInfo = this.mergeFlightRouteConfigObj(
234 + noDateRouteList,
235 + noDateDataList
236 + );
237 + // 当前所有航线都有航线配置信息返回true,否则返回false
238 + let noDateConfigFlag = mergeNoDateRouteInfo.every(
239 + (item) => item.config == true
240 + );
241 + resolve({
242 + noDateConfigFlag,
243 + noDateRouteLists,
244 + noDateRouteList,
245 + mergeNoDateRouteInfo,
246 + });
247 + })
248 + .catch(() => {});
249 + });
250 + },
251 + // 【接口调用和数据去重整合】日期级别
252 + dateLevelRoute(parmas) {
253 + return new Promise((resolve, reject) => {
254 + findDestinationFltRuleByFlightNo(parmas)
255 + .then((res) => {
256 + const { code, data, msg } = res;
257 + if (code != 200) {
258 + this.msgError(msg);
259 + return;
260 + }
261 + let dateDataLists = data.routeList; // 只负责展示航线优先级
262 + let dateRouteList = data.routeList.filter(
263 + (item) => item.etesRule == "N"
264 + ); // 航班航线基本信息(过滤ET86航线的)
265 + // 日期级别航班航线维度规则详情
266 + const dateDataList = removeDuplicates(data.list, {
267 + duplicate: "flightRoute", // 去重字段
268 + dateTime: "createTime", // 从重复的数据中根据时间取最新的一条
269 + sort: false, // 是否要排序
270 + sortType: "Number", // 排序类型
271 + sortAttr: "routePriority", // 排序字段
272 + });
273 + // 整合飞行航线配置信息,对没有航线配置信息的也已经做了config为false的处理;
274 + const mergeDateRouteInfo = this.mergeFlightRouteConfigObj(
275 + dateRouteList,
276 + dateDataList
277 + );
278 + /*
279 + 【dateConfigFlag】:
280 + 判断日期级别的航线有没有航线配置的数据,如果其中一条没有返回false,
281 + 然后再接着调用非日期级别的查询做数据处理;
282 + */
283 + let dateConfigFlag = mergeDateRouteInfo.every(
284 + (item) => item.config == true
285 + );
286 + // 返回日期级别查询结果
287 + resolve({
288 + dateConfigFlag,
289 + dateDataLists,
290 + dateRouteList,
291 + mergeDateRouteInfo,
292 + });
293 + })
294 + .catch(() => {});
295 + });
296 + },
297 + // 根据航班号ID查看航班航线配置详情
298 + getFindByFlightId(parmas) {
299 + findByFlightId(parmas)
300 + .then((res) => {
301 + const { code, data, msg } = res;
302 + if (code != 200) {
303 + this.msgError(msg);
304 + return;
305 + }
306 + const routeList = [data.list];
307 + // 航班航线维度规则详情
308 + const dataList = removeDuplicates(routeList, {
309 + duplicate: "flightRoute", // 去重字段
310 + dateTime: "createTime", // 从重复的数据中根据时间取最新的一条
311 + sort: false, // 是否要排序
312 + sortType: "Number", // 排序类型
313 + sortAttr: "routePriority", // 排序字段
314 + });
315 + // 将flightRoute航线赋值给route属性,并且追加到当前对象
316 + routeList.map((item) => {
317 + if (item.flightRoute) {
318 + item.route = item.flightRoute;
319 + }
320 + });
321 + // 整合飞行航线配置信息,对没有航线配置信息的也已经做了config为false的处理;
322 + const mergeRouteInfo = this.mergeFlightRouteConfigObj(
323 + routeList,
324 + dataList
325 + );
326 + // 处理属性
327 + mergeRouteInfo.map((item) => {
328 + if (item.config) {
329 + this.hasOwnProperty(item, "typeOfGoods");
330 + this.hasOwnProperty(item, "puporpuxCode");
331 + this.hasOwnProperty(item, "serviceCode");
332 + this.hasOwnProperty(item, "handlingCode");
333 + this.hasOwnProperty(item, "subCategory");
334 + this.setattrVal(item); // 设置属性值
335 + }
336 + });
337 + this.routeList = routeList; // 航班航线列表
338 + mergeRouteInfo.sort((a, b) => {
339 + return (
340 + routeList.findIndex((item) => item.route == a.route) -
341 + routeList.findIndex((item) => item.route == b.route)
342 + );
343 + });
344 + this.routesInfo = mergeRouteInfo; // 航班航线配置信息列表
345 + })
346 + .catch(() => {});
347 + },
348 + // 拿到【接口调用和数据去重整合】的数据做数据页面显示处理:非日期级别
349 + noDateLevelData(noDateParmas) {
350 + this.noDateLevelRoute(noDateParmas).then(
351 + ({ noDateConfigFlag, noDateRouteList, mergeNoDateRouteInfo }) => {
352 + // 满足非日期级别航线的配置信息
353 + // 处理属性
354 + mergeNoDateRouteInfo.map((item) => {
355 + if (item.config) {
356 + this.hasOwnProperty(item, "typeOfGoods");
357 + this.hasOwnProperty(item, "puporpuxCode");
358 + this.hasOwnProperty(item, "serviceCode");
359 + this.hasOwnProperty(item, "handlingCode");
360 + this.hasOwnProperty(item, "subCategory");
361 + this.setattrVal(item); // 设置属性值
362 + }
363 + });
364 + this.routeList = noDateRouteList; // 航班航线列表
365 + mergeNoDateRouteInfo.sort((a, b) => {
366 + return (
367 + noDateRouteList.findIndex((item) => item.route == a.route) -
368 + noDateRouteList.findIndex((item) => item.route == b.route)
369 + );
370 + });
371 + this.routesInfo = mergeNoDateRouteInfo; // 航班航线配置信息列表
372 + }
373 + );
374 + },
375 + // 拿到【接口调用和数据去重整合】的数据做数据页面显示处理:日期级别
376 + dateLevelData({ dateParmas, noDateParmas }) {
377 + this.dateLevelRoute(dateParmas).then((res) => {
378 + const {
379 + dateConfigFlag,
380 + dateDataLists,
381 + dateRouteList,
382 + mergeDateRouteInfo,
383 + } = res;
384 + if (dateConfigFlag) {
385 + // 日期级别当前航班航线配置没有缺省的,就不用再去查询非日期级别了
386 + // 处理属性
387 + mergeDateRouteInfo.map((item) => {
388 + if (item.config) {
389 + this.hasOwnProperty(item, "typeOfGoods");
390 + this.hasOwnProperty(item, "puporpuxCode");
391 + this.hasOwnProperty(item, "serviceCode");
392 + this.hasOwnProperty(item, "handlingCode");
393 + this.hasOwnProperty(item, "subCategory");
394 + this.setattrVal(item); // 设置属性值
395 + }
396 + });
397 + this.routeList = dateRouteList; // 航班航线列表
398 + mergeDateRouteInfo.sort((a, b) => {
399 + return (
400 + dateRouteList.findIndex((item) => item.route == a.route) -
401 + dateRouteList.findIndex((item) => item.route == b.route)
402 + );
403 + });
404 + this.routesInfo = mergeDateRouteInfo; // 航班航线配置信息列表
405 + if (this.$route.query.flightKindName == "Purple Tail") {
406 + this.showFlightKind(dateDataLists);
407 + }
408 + } else {
409 + // 当前航线有缺省的航线配置
410 + // 航班航线有规则配置的
411 + const dateListHas = mergeDateRouteInfo.filter(
412 + (item) => item.config == true
413 + );
414 + // 航班航线没有规则配置的
415 + const dateListNo = mergeDateRouteInfo.filter(
416 + (item) => item.config == false
417 + );
418 + this.noDateLevelRoute(noDateParmas).then(
419 + ({
420 + noDateConfigFlag,
421 + noDateRouteLists,
422 + noDateRouteList,
423 + mergeNoDateRouteInfo,
424 + }) => {
425 + // 航班种类
426 + this.flightKindName({
427 + noDateConfigFlag,
428 + noDateRouteLists,
429 + noDateRouteList,
430 + mergeNoDateRouteInfo,
431 + dateDataLists,
432 + dateRouteList,
433 + dateListHas,
434 + dateListNo,
435 + });
436 + }
437 + );
438 + }
439 + });
440 + },
441 + // 航班种类
442 + flightKindName({
443 + noDateConfigFlag,
444 + noDateRouteLists,
445 + noDateRouteList,
446 + mergeNoDateRouteInfo,
447 + dateDataLists,
448 + dateRouteList,
449 + dateListHas,
450 + dateListNo,
451 + }) {
452 + if (this.$route.query.flightKindName == "White Tail") {
453 + // White Tail只展示当前查询的一条
454 + const route = this.$route.query.flightRouteListStr;
455 + let noDateRouteInfo, result;
456 + this.routeList = dateRouteList;
457 + // 从日期取
458 + if (dateListHas.length) {
459 + const dateRouteInfo = dateListHas.filter(
460 + (item) => item.flightRoute == route
461 + );
462 + result = dateRouteInfo; // 航班航线配置信息列表
463 + } else {
464 + // 从非日期级别取
465 + noDateRouteInfo = mergeNoDateRouteInfo.filter(
466 + (item) => item.flightRoute == route
467 + );
468 + result = noDateRouteInfo; // 航班航线配置信息列表
469 + }
470 + if (result.length) {
471 + // 处理属性
472 + result.map((item) => {
473 + if (item.config) {
474 + this.hasOwnProperty(item, "typeOfGoods");
475 + this.hasOwnProperty(item, "puporpuxCode");
476 + this.hasOwnProperty(item, "serviceCode");
477 + this.hasOwnProperty(item, "handlingCode");
478 + this.hasOwnProperty(item, "subCategory");
479 + this.setattrVal(item); // 设置属性值
480 + }
481 + });
482 + result.sort((a, b) => {
483 + return (
484 + dateRouteList.findIndex((item) => item.route == a.route) -
485 + dateRouteList.findIndex((item) => item.route == b.route)
486 + );
487 + });
488 + this.routesInfo = result;
489 + } else {
490 + // 日期级别和非日期级别都没有配置信息的时候,
491 + // 从数据整合的里面取一个对应的航线数据作为回显暂无数据处理。
492 + noDateRouteInfo = mergeNoDateRouteInfo.filter(
493 + (item) => item.route == route
494 + );
495 + noDateRouteInfo.sort((a, b) => {
496 + return (
497 + dateRouteList.findIndex((item) => item.route == a.route) -
498 + dateRouteList.findIndex((item) => item.route == b.route)
499 + );
500 + });
501 + this.routesInfo = noDateRouteInfo;
502 + }
503 + } else {
504 + // 日期级别和航班种类为Purple Tail的时候
505 + // 日期级别的时候要注意dateListNo里没有flightRoute字段,也就是说只有航班航线没有航班航线配置信息;
506 + // 其次是非日期级别mergeNoDateRouteInfo也可能没有对应的数据,没有flightRoute字段。
507 + // 那么这个时候使用mergeFlightRouteConfigObj方法就会出问题。
508 + const result = this.mergeFlightRouteConfigObj(
509 + dateListNo,
510 + mergeNoDateRouteInfo
511 + );
512 + let dateList = dateListHas.concat(result);
513 + // 处理属性
514 + dateList.map((item) => {
515 + if (item.config) {
516 + this.hasOwnProperty(item, "typeOfGoods");
517 + this.hasOwnProperty(item, "puporpuxCode");
518 + this.hasOwnProperty(item, "serviceCode");
519 + this.hasOwnProperty(item, "handlingCode");
520 + this.hasOwnProperty(item, "subCategory");
521 + this.setattrVal(item); // 设置属性值
522 + }
523 + });
524 + this.routeList = dateRouteList; // 航线优先级
525 + // 查找包含的航线并且按照dateList航线排序
526 + dateList.sort((a, b) => {
527 + return (
528 + dateRouteList.findIndex((item) => item.route == a.route) -
529 + dateRouteList.findIndex((item) => item.route == b.route)
530 + );
531 + });
532 + if (this.$route.query.flightKindName == "Purple Tail") {
533 + let flightRouteListStr =
534 + this.$route.query.flightRouteListStr.split(";"); // 跳转传过来的航线
535 + // 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
536 + let inRoutes = dateDataLists
537 + .filter((item) => flightRouteListStr.includes(item.route))
538 + .sort(
539 + (a, b) =>
540 + flightRouteListStr.indexOf(a.route) -
541 + flightRouteListStr.indexOf(b.route)
542 + );
543 + // 处理航线优先级展示ET86
544 + let routes = [];
545 + inRoutes.map((item, i, arr) => {
546 + if (arr[i].etesRule == "Y") {
547 + routes.push(`${arr[i].route}(ET86)`);
548 + } else {
549 + routes.push(arr[i].route);
550 + }
551 + });
552 + // 把处理ET86航线优先级展示
553 + this.queryForm.flightRouteListStr = routes.join(";");
554 + // 跳转传过来的对应的航线把ET86航线的过滤掉
555 + let noEtesRoutes = inRoutes.filter((item) => item.etesRule == "N");
556 + let noRoutes = dateList.filter((item) => {
557 + return noEtesRoutes.some((el) => el.route === item.route);
558 + });
559 + const result = noRoutes
560 + .filter((item2) => {
561 + return noEtesRoutes.some((item1) => {
562 + return item1.route === item2.route;
563 + });
564 + })
565 + .sort((a, b) => {
566 + return (
567 + noEtesRoutes.findIndex((item) => item.route === a.route) -
568 + noEtesRoutes.findIndex((item) => item.route === b.route)
569 + );
570 + });
571 + this.routesInfo = result;
572 + } else {
573 + this.queryForm = this.$route.query; // 获取跳转过来的参数
574 + this.routesInfo = dateList;
575 + }
576 + }
577 + },
578 + // 处理跳转显示航线种类
579 + showFlightKind(dateDataLists) {
580 + let flightRouteListStr = this.$route.query.flightRouteListStr.split(";"); // 跳转传过来的航线
581 + // 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
582 + let inRoutes = dateDataLists
583 + .filter((item) => flightRouteListStr.includes(item.route))
584 + .sort(
585 + (a, b) =>
586 + flightRouteListStr.indexOf(a.route) -
587 + flightRouteListStr.indexOf(b.route)
588 + );
589 + // 处理航线优先级展示ET86
590 + let routes = [];
591 + inRoutes.map((item, i, arr) => {
592 + if (arr[i].etesRule == "Y") {
593 + routes.push(`${arr[i].route}(ET86)`);
594 + } else {
595 + routes.push(arr[i].route);
596 + }
597 + });
598 + // 把处理ET86航线优先级展示
599 + this.queryForm.flightRouteListStr = routes.join(";");
600 + },
601 + // 整合飞行航线配置信息
602 + mergeFlightRouteConfigObj(routeList, dataList) {
603 + if (dataList.length) {
604 + let flightRoute1 = routeList.some((obj) =>
605 + obj.hasOwnProperty("flightRoute")
606 + );
607 + let flightRoute2 = dataList.some((obj) =>
608 + obj.hasOwnProperty("flightRoute")
609 + );
610 + const result = routeList.map((item1) => {
611 + const item2 = dataList.find((item2) => {
612 + if (flightRoute1) {
613 + if (item2.route === item1.flightRoute) {
614 + item2.config = true;
615 + return item2;
616 + }
617 + } else if (flightRoute2) {
618 + if (item2.flightRoute === item1.route) {
619 + item2.config = true;
620 + return item2;
621 + }
622 + }
623 + }); // 返回当前相等的一条数据
624 + if (item2) {
625 + return { ...item1, ...item2 };
626 + } else {
627 + item1.config = false;
628 + return item1; // 没有的返回当前的
629 + }
630 + });
631 + return result;
632 + } else {
633 + // 没有航班航线配置的情况下
634 + const result = routeList.map((item) => {
635 + item.config = false;
636 + if (item) {
637 + return item;
638 + }
639 + });
640 + return result;
641 + }
642 + },
643 + // 回显时所用:判断对象是否存在某个属性,并且把这个属性值使用分号分隔
644 + hasOwnProperty(item, key) {
645 + if (item.hasOwnProperty(key)) {
646 + if (item[key]) {
647 + item[key] = item[key].split(";");
648 + } else {
649 + item[key] = [];
650 + }
651 + }
652 + },
653 + // 保存提交时所用:改方法主要用于提交保存时,再把数组转换成字符串,与hasOwnProperty相反
654 + returnString(parmas, key) {
655 + if (parmas.hasOwnProperty(key)) {
656 + if (parmas[key].length) {
657 + parmas[key] = parmas[key].join(";");
658 + } else {
659 + parmas[key] = null;
660 + }
661 + }
662 + },
663 + //排序
664 + sorttodo(arr, chineseName) {
665 + var index = 1,
666 + newArr = [],
667 + length = arr.length;
668 + for (var i = 0; i < length; i++) {
669 + if (arr[i].chineseName === chineseName) {
670 + newArr[0] = arr[i];
671 + } else {
672 + newArr[index++] = arr[i];
673 + }
674 + }
675 + return newArr;
676 + },
677 + // 数据字典排序
678 + dicSort(val) {
679 + let status1 = [];
680 + let status0 = [];
681 + let arr = [];
682 + val.forEach((item) => {
683 + if (item.status == 1) {
684 + status1.push(item);
685 + } else {
686 + status0.push(item);
687 + }
688 + });
689 + arr = status1.concat(status0);
690 + return arr;
691 + },
692 + // 设置属性值
693 + setattrVal(item) {
694 + if (item.location) {
695 + // 始发站
696 + item.isLocation = "1";
697 + }
698 + if (item.notLocation) {
699 + item.isLocation = "2";
700 + }
701 + if (item.location == null && item.notLocation == null) {
702 + item.isLocation = "1";
703 + }
704 + if (item.destinationSite) {
705 + // 目的站
706 + item.isDestinationSite = "1";
707 + }
708 + if (item.notDestinationSite) {
709 + item.isDestinationSite = "2";
710 + }
711 + if (item.destinationSite == null && item.notDestinationSite == null) {
712 + item.isDestinationSite = "1";
713 + }
714 + let routes = [];
715 + if (this.routeList.length) {
716 + this.routeList.map((item) => {
717 + routes.push(item.route);
718 + });
719 + routeRuleForm.routeSpecifyDateSeq = routes.join(";");
720 + }
721 + },
722 + // 失焦事件
723 + blurEvent({ originOfFlightNo }) {
724 + this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo);
725 + },
726 + // 始发站
727 + changeLocation(val) {
728 + // console.log("始发站:", val);
729 + },
730 + // 目的站
731 + changeDestinationSite(val) {
732 + // console.log("目的站:", val);
733 + },
734 + },
735 +};
736 +/*
737 + 【整个航班航线维度设置的回显逻辑以及数据处理思路】如下:
738 + 1:获取航班航线列表和航班航线配置信息列表。
739 + 2:如果航班航线配置信息列表有数据,先做航线去重。
740 + 3:拿航班航线列表和航班航线配置信息列表去做遍历,判断当前航班航线在航班航线配置信息列表中有没有对应的数据。
741 + 如果有给当前航班航线设置一个属性值为true的config属性,并且把当前航班航线与航线配置信息列表中对应的对象合并,
742 + 如果当前航班航线没有在航线配置列表中找到,那么直接给航班航线列表中的这条航线数据设置一个属性值为false的config属性。
743 + 4:当把航班航线列表和航班航线配置信息列表数据整合到一块以后,那么在做数据渲染的时候就可以根据config值来显示当前航班航线有没有航线配置信息,
744 + 从而显示暂无数据用来去展示“新增规则”按钮。
745 + 此外config属性还有一个作用就是在做日期级别航线查询的时候,如果日期级别的航线没有航线配置信息会走一次非日期级别的航线配置信息查询,
746 + 那么当有了这个config属性,如果在做日期级别航线配置信息查询的时候,当前日期级别航班航线列表与航班航线配置信息列表做遍历查询时,
747 + 且航班航线列表每一个航线都有航班航线配置信息,那么就可以使用every对航班航线列表与航班配置信息列表做数据整合之后做遍历。
748 + 当返回true时,那么就不需要再走一次非日期级别的航线配置信息查询了,当返回false说明航班航线列表中存在没有航班航线的配置信息,
749 + 那么这个时候就可以根据config属性值为false走一次非日期级别的航线配置信息查询;
750 + 5:【航班配舱设置】逻辑:根据路由跳转传参过来的querySpecifyData值,如果querySpecifyData等于2的时候就是非日期级别,
751 + 那么只需要走非日期级别的查询即可,如果querySpecifyData属性值等于1的时候,说明是日期级别的,那么则走日期级别的查询,
752 + 但是当航班航线列表和航班航线配置信息列表做数据整合之后返回的数组中的JSON对象中config属性值有一个为false,
753 + 那么如同上述第4条提的,就需要再走一次非日期级别的航线配置信息查询;反之则不需要;
754 + 6:【航班信息维护】逻辑:和上述第5条查询的区别之处是根据航班种类flightKindName字段是White Tail还是Purple Tail,
755 + 但是不管是哪种航班类型都是先走日期级别的航班航线配置信息查询,当有config属性值有一个为false的时候还需要走一次非日期级别的航班航线配置信息查询。
756 + 但是有一点就是White Tail只查询一条航班航线配置信息,根据从航班信息维护White Tail类型查看维度,
757 + 做路由跳转传参带过来的航线首先在日期级别航线配置信息中遍历查询有没有该航班航线的配置信息,如果有,
758 + 那么则不需要再走一次非日期级别的航班航线配置信息查询,如果没有那么则再走一次非日期航班航线配置信息查询。
759 + 但是航线优先级显示的航线还是取日期级别航班航线列表中的航线。
760 + 7:航班航线信息列表和航班航线配置信息列表在做完航班航线配置信息列表去重之后和航班航线列表做数据整合之后,
761 + 还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框;
762 + 8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理;
763 +*/
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> 67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
68 <template slot-scope="scope"> 68 <template slot-scope="scope">
69 <el-button size="mini" type="text" icon="el-icon-edit" 69 <el-button size="mini" type="text" icon="el-icon-edit"
70 - @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度 70 + @click="handleClick(scope.row)">查看配置维度
71 </el-button> 71 </el-button>
72 </template> 72 </template>
73 </el-table-column> 73 </el-table-column>
...@@ -275,21 +275,18 @@ export default { ...@@ -275,21 +275,18 @@ export default {
275 }, 275 },
276 methods: { 276 methods: {
277 //跳转到查看,修改页面 277 //跳转到查看,修改页面
278 - handleClick(fltNo, handle, fltDate, route, status) { 278 + handleClick({ actualFlight, flightDate, route }) {
279 this.openFlightDate = false; 279 this.openFlightDate = false;
280 - let obj = {
281 - id: ' ',
282 - handle: handle,
283 - fltNo: fltNo,
284 - fltDate: fltDate != null ? fltDate : ' ',
285 - route: route,
286 - routeStatus: 'FlightRandConfig',
287 - status: status,
288 - createStatus: 1,
289 - }
290 this.$router.push({ 280 this.$router.push({
291 - name: "FlightAllocConfigInfo", 281 + path: "/routeInfo",
292 - params: obj, 282 + query: {
283 + flightDate: flightDate,
284 + purposeOfFlightNo: actualFlight,
285 + flightRouteListStr: route,
286 + status: "",
287 + pageName: "flightRandConfig",
288 + disable: true,
289 + },
293 }); 290 });
294 }, 291 },
295 /** 查询原航班顺位规则*/ 292 /** 查询原航班顺位规则*/
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" 3 + <el-form
4 - size="small"> 4 + class="form-header"
5 + :model="queryParams"
6 + ref="queryForm"
7 + label-position="right"
8 + label-width="auto"
9 + size="small"
10 + >
5 <el-row> 11 <el-row>
6 <el-col :span="6"> 12 <el-col :span="6">
7 <el-form-item label="航班日期从" prop="fltDateStart"> 13 <el-form-item label="航班日期从" prop="fltDateStart">
8 - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" 14 + <el-date-picker
9 - placeholder="选择日期"> 15 + class="formItem"
16 + value-format="yyyy-MM-dd"
17 + v-model="queryParams.fltDateStart"
18 + type="date"
19 + placeholder="选择日期"
20 + >
10 </el-date-picker> 21 </el-date-picker>
11 </el-form-item> 22 </el-form-item>
12 </el-col> 23 </el-col>
13 <el-col :span="6"> 24 <el-col :span="6">
14 <el-form-item label="到" prop="fltDateEnd"> 25 <el-form-item label="到" prop="fltDateEnd">
15 - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" 26 + <el-date-picker
16 - placeholder="选择日期"> 27 + class="formItem"
28 + value-format="yyyy-MM-dd"
29 + v-model="queryParams.fltDateEnd"
30 + type="date"
31 + placeholder="选择日期"
32 + >
17 </el-date-picker> 33 </el-date-picker>
18 </el-form-item> 34 </el-form-item>
19 </el-col> 35 </el-col>
20 <el-col :span="6"> 36 <el-col :span="6">
21 <el-form-item label="航班号" prop="fltNo"> 37 <el-form-item label="航班号" prop="fltNo">
22 - <el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable /> 38 + <el-input
39 + class="formItem"
40 + v-model="queryParams.fltNo"
41 + placeholder="请输入航班号"
42 + clearable
43 + />
23 </el-form-item> 44 </el-form-item>
24 </el-col> 45 </el-col>
25 <el-col :span="6"> 46 <el-col :span="6">
26 <el-form-item label="航班类型" prop="typeId"> 47 <el-form-item label="航班类型" prop="typeId">
27 - <el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable> 48 + <el-select
28 - <el-option v-for="dict in selectOption.flightTypelist" :key="dict.id" :label="dict.chineseName" 49 + class="formItem"
29 - :value="dict.id" /> 50 + v-model="queryParams.typeId"
51 + placeholder="请选择航班类型"
52 + clearable
53 + >
54 + <el-option
55 + v-for="dict in selectOption.flightTypelist"
56 + :key="dict.id"
57 + :label="dict.chineseName"
58 + :value="dict.id"
59 + />
30 </el-select> 60 </el-select>
31 </el-form-item> 61 </el-form-item>
32 </el-col> 62 </el-col>
33 <el-col :span="6"> 63 <el-col :span="6">
34 <el-form-item label="航班状态" prop="statusId"> 64 <el-form-item label="航班状态" prop="statusId">
35 - <el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable> 65 + <el-select
36 - <el-option v-for="dict in selectOption.flightStatuslist" :key="dict.id" :label="dict.chineseName" 66 + class="formItem"
37 - :value="dict.id" /> 67 + v-model="queryParams.statusId"
68 + placeholder="请选择航班状态"
69 + clearable
70 + >
71 + <el-option
72 + v-for="dict in selectOption.flightStatuslist"
73 + :key="dict.id"
74 + :label="dict.chineseName"
75 + :value="dict.id"
76 + />
38 </el-select> 77 </el-select>
39 </el-form-item> 78 </el-form-item>
40 </el-col> 79 </el-col>
41 <el-col :span="6"> 80 <el-col :span="6">
42 <el-form-item label="航班种类" prop="flightKindId"> 81 <el-form-item label="航班种类" prop="flightKindId">
43 - <el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable> 82 + <el-select
44 - <el-option v-for="dict in selectOption.flightKindlist" :key="dict.id" :label="dict.chineseName" 83 + class="formItem"
45 - :value="dict.id" /> 84 + v-model="queryParams.flightKindId"
85 + placeholder="请选择航班种类"
86 + clearable
87 + >
88 + <el-option
89 + v-for="dict in selectOption.flightKindlist"
90 + :key="dict.id"
91 + :label="dict.chineseName"
92 + :value="dict.id"
93 + />
46 </el-select> 94 </el-select>
47 </el-form-item> 95 </el-form-item>
48 </el-col> 96 </el-col>
49 </el-row> 97 </el-row>
50 - <el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索 98 + <el-button
99 + class="mt10"
100 + type="primary"
101 + icon="el-icon-search"
102 + size="mini"
103 + :loading="loading"
104 + @click="handleQuery"
105 + >搜索
51 </el-button> 106 </el-button>
52 - <el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 107 + <el-button
53 - <el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" 108 + class="mt10"
54 - v-hasPermi="['base:flightInfo:add']"> 109 + icon="el-icon-refresh"
55 - 新增</el-button> 110 + size="mini"
56 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 111 + @click="resetQuery"
57 - @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button> 112 + >重置</el-button
58 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 113 + >
59 - @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button> 114 + <el-button
60 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 115 + class="mt10"
61 - @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> 116 + type="primary"
62 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 117 + icon="el-icon-plus"
63 - @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> 118 + size="mini"
64 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 119 + @click="handleAdd"
65 - @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启 120 + v-hasPermi="['base:flightInfo:add']"
121 + >
122 + 新增</el-button
123 + >
124 + <el-button
125 + class="mt10"
126 + type="primary"
127 + icon="el-icon-circle-check"
128 + size="mini"
129 + :disabled="ids.length == 0"
130 + @click="handleFlightStatus('flightStatus10')"
131 + v-hasPermi="['base:flightInfo:open']"
132 + >自动配舱开启</el-button
133 + >
134 + <el-button
135 + class="mt10"
136 + type="primary"
137 + icon="el-icon-circle-close"
138 + size="mini"
139 + :disabled="ids.length == 0"
140 + @click="handleFlightStatus('flightStatus80')"
141 + v-hasPermi="['base:flightInfo:close']"
142 + >自动配舱关闭</el-button
143 + >
144 + <el-button
145 + class="mt10"
146 + type="primary"
147 + icon="el-icon-circle-check"
148 + size="mini"
149 + :disabled="ids.length == 0"
150 + @click="autoPushBatch('open')"
151 + v-hasPermi="['base:flightInfo:autoPushOpen']"
152 + >自动推送开启</el-button
153 + >
154 + <el-button
155 + class="mt10"
156 + type="primary"
157 + icon="el-icon-circle-close"
158 + size="mini"
159 + :disabled="ids.length == 0"
160 + @click="autoPushBatch('close')"
161 + v-hasPermi="['base:flightInfo:autoPushClose']"
162 + >自动推送关闭</el-button
163 + >
164 + <el-button
165 + class="mt10"
166 + type="primary"
167 + icon="el-icon-circle-check"
168 + size="mini"
169 + :disabled="ids.length == 0"
170 + @click="whiteListSwitchStatus(1)"
171 + v-hasPermi="['base:flightInfo:whiteOpen']"
172 + >白名单自动配舱开启
66 </el-button> 173 </el-button>
67 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 174 + <el-button
68 - @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭 175 + class="mt10"
176 + type="primary"
177 + icon="el-icon-circle-close"
178 + size="mini"
179 + :disabled="ids.length == 0"
180 + @click="whiteListSwitchStatus(0)"
181 + v-hasPermi="['base:flightInfo:whiteClose']"
182 + >白名单自动配舱关闭
69 </el-button> 183 </el-button>
70 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 184 + <el-button
71 - @click="BlackListSwitchStatus(1)">黑名单自动配舱开启 185 + class="mt10"
186 + type="primary"
187 + icon="el-icon-circle-check"
188 + size="mini"
189 + :disabled="ids.length == 0"
190 + @click="BlackListSwitchStatus(1)"
191 + >黑名单自动配舱开启
72 </el-button> 192 </el-button>
73 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 193 + <el-button
74 - @click="BlackListSwitchStatus(0)">黑名单自动配舱关闭 194 + class="mt10"
195 + type="primary"
196 + icon="el-icon-circle-close"
197 + size="mini"
198 + :disabled="ids.length == 0"
199 + @click="BlackListSwitchStatus(0)"
200 + >黑名单自动配舱关闭
75 </el-button> 201 </el-button>
76 - <el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" 202 + <el-button
77 - @click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除 203 + class="mt10"
204 + type="danger"
205 + icon="el-icon-delete"
206 + size="mini"
207 + :disabled="ids.length == 0"
208 + @click="handleDelete"
209 + v-hasPermi="['base:flightInfo:delete']"
210 + >删除
78 </el-button> 211 </el-button>
79 </el-form> 212 </el-form>
80 - <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" 213 + <Tables
81 - :order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize" 214 + ref="flightInfoTable"
82 - :page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]" 215 + ductName="FlightInformation"
83 - @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" @sortChange="sortChange" 216 + :data="findAllFltDatList"
84 - @sizeChange="sizeChange"> 217 + :headerData="tableHeader"
218 + :order="true"
219 + :selection="true"
220 + :totalCount="total"
221 + :loading="loading"
222 + :limitSize="queryParams.limitSize"
223 + :page="queryParams.pageNum"
224 + :shiftKey="shiftKey"
225 + :height="tableHeight"
226 + :pageSizes="[20, 30, 40, 50, 100]"
227 + @tableSelect="tableSelect"
228 + @tableSelectAll="tableSelectAll"
229 + @currentChange="currentChange"
230 + @sortChange="sortChange"
231 + @sizeChange="sizeChange"
232 + >
85 <template slot="optionColumn"> 233 <template slot="optionColumn">
86 - <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" 234 + <el-table-column
87 - class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160"> 235 + v-if="findAllFltDatList.length > 0"
236 + label="操作"
237 + align="center"
238 + class-name="small-padding fixed-width"
239 + :fixed="tableHeader.length > 10 ? 'right' : false"
240 + width="160"
241 + >
88 <template slot-scope="scope"> 242 <template slot-scope="scope">
89 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" 243 + <el-button
90 - v-hasPermi="['base:flightInfo:update']">修改</el-button> 244 + size="mini"
91 - <el-button size="mini" type="text" icon="el-icon-link" @click="goFlightAllocConfig(scope.row)">查看维度 245 + type="text"
246 + icon="el-icon-edit"
247 + @click="handleUpdate(scope.row)"
248 + v-hasPermi="['base:flightInfo:update']"
249 + >修改</el-button
250 + >
251 + <el-button
252 + size="mini"
253 + type="text"
254 + icon="el-icon-link"
255 + @click="goFlightAllocConfig(scope.row)"
256 + >查看维度
92 </el-button> 257 </el-button>
93 </template> 258 </template>
94 </el-table-column> 259 </el-table-column>
95 </template> 260 </template>
96 </Tables> 261 </Tables>
97 <!-- 添加或修改对话框 --> 262 <!-- 添加或修改对话框 -->
98 - <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true" 263 + <el-dialog
99 - :show-close="false" @close="cancel"> 264 + :title="title"
100 - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small"> 265 + :visible.sync="open"
266 + width="60%"
267 + :close-on-click-modal="false"
268 + :append-to-body="true"
269 + :show-close="false"
270 + @close="cancel"
271 + >
272 + <el-form
273 + ref="form"
274 + :model="form"
275 + :rules="rules"
276 + label-position="right"
277 + label-width="auto"
278 + size="small"
279 + >
101 <el-row> 280 <el-row>
102 <el-col :span="12"> 281 <el-col :span="12">
103 <el-form-item label="航班号" prop="fltNo"> 282 <el-form-item label="航班号" prop="fltNo">
104 - <el-input class="wid80" @blur="blurfltNo" :disabled="formdisabled.fltNo" v-model="form.fltNo" 283 + <el-input
105 - placeholder="请输入航班号" maxlength="20" /> 284 + class="wid80"
285 + @blur="blurfltNo"
286 + :disabled="formdisabled.fltNo"
287 + v-model="form.fltNo"
288 + placeholder="请输入航班号"
289 + maxlength="20"
290 + />
106 </el-form-item> 291 </el-form-item>
107 </el-col> 292 </el-col>
108 <el-col :span="12"> 293 <el-col :span="12">
109 <el-form-item label="该航班预审状态:"> 294 <el-form-item label="该航班预审状态:">
110 - <el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }} 295 + <el-tag
296 + v-if="preAudit"
297 + :type="preAudit == '开启' ? 'success' : 'info'"
298 + effect="dark"
299 + >{{ preAudit }}
111 </el-tag> 300 </el-tag>
112 </el-form-item> 301 </el-form-item>
113 </el-col> 302 </el-col>
...@@ -115,56 +304,145 @@ ...@@ -115,56 +304,145 @@
115 <el-row> 304 <el-row>
116 <el-col :span="12"> 305 <el-col :span="12">
117 <el-form-item label="航班日期" prop="fltDate"> 306 <el-form-item label="航班日期" prop="fltDate">
118 - <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate" 307 + <el-date-picker
119 - type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> 308 + class="wid80"
309 + :disabled="formdisabled.fltDate"
310 + clearable
311 + size="small"
312 + v-model="form.fltDate"
313 + type="date"
314 + value-format="yyyy-MM-dd"
315 + placeholder="选择航班日期"
316 + >
120 </el-date-picker> 317 </el-date-picker>
121 </el-form-item> 318 </el-form-item>
122 </el-col> 319 </el-col>
123 <el-col :span="12"> 320 <el-col :span="12">
124 <el-form-item label="航班种类" prop="kindId"> 321 <el-form-item label="航班种类" prop="kindId">
125 - <el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类" 322 + <el-select
126 - @change="kindChange"> 323 + class="wid80"
127 - <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" 324 + v-model="form.kindId"
128 - :value="item.id"> 325 + :disabled="formdisabled.kindId"
326 + placeholder="请选择航班种类"
327 + @change="kindChange"
328 + >
329 + <el-option
330 + v-for="item in selectOption.flightKindlist"
331 + :key="item.id"
332 + :label="item.chineseName"
333 + :value="item.id"
334 + >
129 </el-option> 335 </el-option>
130 </el-select> 336 </el-select>
131 </el-form-item> 337 </el-form-item>
132 </el-col> 338 </el-col>
133 </el-row> 339 </el-row>
134 - <el-row style="margin-bottom:5px"> 340 + <el-row style="margin-bottom: 5px">
135 <el-col :span="12"> 341 <el-col :span="12">
136 <el-form-item> 342 <el-form-item>
137 <template slot="label"> 343 <template slot="label">
138 - <div style="display:inline-block"> 344 + <div style="display: inline-block">
139 <span class="error-route">*</span> 345 <span class="error-route">*</span>
140 航班路线 346 航班路线
141 - <el-tooltip class="item" effect="dark" content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线" 347 + <el-tooltip
142 - placement="top-start"> 348 + class="item"
143 - <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> 349 + effect="dark"
350 + content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线"
351 + placement="top-start"
352 + >
353 + <span
354 + class="el-icon-warning"
355 + style="color: #1890ff; font-size: 16px"
356 + ></span>
144 </el-tooltip> 357 </el-tooltip>
145 </div> 358 </div>
146 </template> 359 </template>
147 - <el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route" 360 + <el-select
148 - :disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" @blur="blurRoute" 361 + v-if="routeMultiple"
149 - :loading="routeLoading" :multiple='true' :key="routeMultiple"> 362 + ref="routeSelect"
150 - <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 363 + class="wid80"
364 + v-model="form.route"
365 + :disabled="formdisabled.route"
366 + placeholder="请选择航线"
367 + no-data-text="未查询到航线"
368 + @change="routeChange"
369 + @blur="blurRoute"
370 + :loading="routeLoading"
371 + :multiple="true"
372 + >
373 + <el-option
374 + v-for="item in routeList"
375 + :key="item.route"
376 + :label="item.route"
377 + :value="item.route"
378 + >
379 + <span style="float: left">{{ item.route }}</span>
380 + <span
381 + style="
382 + float: right;
383 + margin-right: 30px;
384 + color: #8492a6;
385 + font-size: 13px;
386 + "
387 + >{{ item.isEtesRoute == "Y" ? "(ET86)" : "" }}</span
388 + >
151 </el-option> 389 </el-option>
152 </el-select> 390 </el-select>
153 - <el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route" 391 + <el-select
154 - :disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" @blur="blurRoute" 392 + v-if="routeMultiple == false"
155 - :loading="routeLoading" :multiple='false' :key="routeMultiple"> 393 + ref="routeSelect"
156 - <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 394 + class="wid80"
395 + v-model="form.route"
396 + :disabled="formdisabled.route"
397 + placeholder="请选择航线"
398 + no-data-text="未查询到航线"
399 + @change="routeChange"
400 + @blur="blurRoute"
401 + :loading="routeLoading"
402 + :multiple="false"
403 + >
404 + <el-option
405 + v-for="item in routeList"
406 + :key="item.id"
407 + :label="item.route"
408 + :value="item.route"
409 + >
410 + <span style="float: left">{{ item.route }}</span>
411 + <span
412 + style="
413 + float: right;
414 + margin-right: 30px;
415 + color: #8492a6;
416 + font-size: 13px;
417 + "
418 + >{{ item.isEtesRoute == "Y" ? "(ET86)" : "" }}</span
419 + >
157 </el-option> 420 </el-option>
158 </el-select> 421 </el-select>
159 - <span ref="errorRoute" class="el-form-item__error" v-show="routeError">航班路线不能为空</span> 422 + <span
423 + ref="errorRoute"
424 + class="el-form-item__error"
425 + v-show="routeError"
426 + >航班路线不能为空</span
427 + >
160 </el-form-item> 428 </el-form-item>
161 - <div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div> 429 + <div class="formTips" v-if="title == '修改航班信息'">
430 + 注意!:移除航线,相对应日期级别航线维度会同时删除
431 + </div>
162 </el-col> 432 </el-col>
163 <el-col :span="12"> 433 <el-col :span="12">
164 <el-form-item label="航班类型" prop="typeId"> 434 <el-form-item label="航班类型" prop="typeId">
165 - <el-select class="wid80" v-model="form.typeId" placeholder="请选择航班类型"> 435 + <el-select
166 - <el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName" 436 + class="wid80"
167 - :value="item.id"> 437 + v-model="form.typeId"
438 + placeholder="请选择航班类型"
439 + >
440 + <el-option
441 + v-for="item in selectOption.flightTypelist"
442 + :key="item.id"
443 + :label="item.chineseName"
444 + :value="item.id"
445 + >
168 </el-option> 446 </el-option>
169 </el-select> 447 </el-select>
170 </el-form-item> 448 </el-form-item>
...@@ -173,31 +451,60 @@ ...@@ -173,31 +451,60 @@
173 <el-row> 451 <el-row>
174 <el-col :span="12"> 452 <el-col :span="12">
175 <el-form-item label="航班状态" prop="statusId"> 453 <el-form-item label="航班状态" prop="statusId">
176 - <el-select class="wid80" :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> 454 + <el-select
177 - <el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName" 455 + class="wid80"
178 - :value="item.id"> 456 + :disabled="true"
457 + v-model="form.statusId"
458 + placeholder="请选择航班状态"
459 + >
460 + <el-option
461 + v-for="item in selectOption.flightStatuslist"
462 + :key="item.id"
463 + :label="item.chineseName"
464 + :value="item.id"
465 + >
179 </el-option> 466 </el-option>
180 </el-select> 467 </el-select>
181 </el-form-item> 468 </el-form-item>
182 </el-col> 469 </el-col>
183 <el-col :span="12"> 470 <el-col :span="12">
184 <el-form-item label="原始重量(KG)" prop="originalWeight"> 471 <el-form-item label="原始重量(KG)" prop="originalWeight">
185 - <el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入原始重量(KG)" 472 + <el-input-number
186 - v-model="form.originalWeight" v-input-filter></el-input-number> 473 + class="wid80"
474 + @change="LowHighAvailable"
475 + :min="0"
476 + :precision="0"
477 + placeholder="请输入原始重量(KG)"
478 + v-model="form.originalWeight"
479 + v-input-filter
480 + ></el-input-number>
187 </el-form-item> 481 </el-form-item>
188 </el-col> 482 </el-col>
189 </el-row> 483 </el-row>
190 <el-row> 484 <el-row>
191 <el-col :span="12"> 485 <el-col :span="12">
192 <el-form-item label="额外增重百分比" prop="extraWeightPercent"> 486 <el-form-item label="额外增重百分比" prop="extraWeightPercent">
193 - <el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入额外增重百分比" 487 + <el-input-number
194 - v-model="form.extraWeightPercent" v-input-filter></el-input-number> 488 + class="wid80"
489 + @change="LowHighAvailable"
490 + :min="0"
491 + :precision="0"
492 + placeholder="请输入额外增重百分比"
493 + v-model="form.extraWeightPercent"
494 + v-input-filter
495 + ></el-input-number>
195 </el-form-item> 496 </el-form-item>
196 </el-col> 497 </el-col>
197 <el-col :span="12"> 498 <el-col :span="12">
198 <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> 499 <el-form-item label="是否开启高低价" prop="highLowPriceFlg">
199 - <el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1" 500 + <el-switch
200 - :inactive-value="0" active-color="#13ce66"> 501 + class="wid80"
502 + @change="LowHighAvailable"
503 + v-model="form.highLowPriceFlg"
504 + :active-value="1"
505 + :inactive-value="0"
506 + active-color="#13ce66"
507 + >
201 </el-switch> 508 </el-switch>
202 </el-form-item> 509 </el-form-item>
203 </el-col> 510 </el-col>
...@@ -205,72 +512,120 @@ ...@@ -205,72 +512,120 @@
205 <el-row> 512 <el-row>
206 <el-col :span="12"> 513 <el-col :span="12">
207 <el-form-item label="今日航班预审状态" prop="isNeedRequired"> 514 <el-form-item label="今日航班预审状态" prop="isNeedRequired">
208 - <el-select class="wid80" v-model="form.isNeedRequired" placeholder=""> 515 + <el-select
209 - <el-option label="未设置" :value="2"> 516 + class="wid80"
210 - </el-option> 517 + v-model="form.isNeedRequired"
211 - <el-option label="开启" :value="1"> 518 + placeholder=""
212 - </el-option> 519 + >
213 - <el-option label="关闭" :value="0"> 520 + <el-option label="未设置" :value="2"> </el-option>
214 - </el-option> 521 + <el-option label="开启" :value="1"> </el-option>
522 + <el-option label="关闭" :value="0"> </el-option>
215 </el-select> 523 </el-select>
216 </el-form-item> 524 </el-form-item>
217 </el-col> 525 </el-col>
218 <el-col :span="12"> 526 <el-col :span="12">
219 <el-form-item label="高价百分比" prop="highPriceWeightPercent"> 527 <el-form-item label="高价百分比" prop="highPriceWeightPercent">
220 - <el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" 528 + <el-input-number
221 - placeholder="开启高低价后可修改" v-model="form.highPriceWeightPercent"></el-input-number> 529 + class="wid80"
530 + :disabled="ishighPriceWeightPercent"
531 + @change="LowHighAvailable"
532 + placeholder="开启高低价后可修改"
533 + v-model="form.highPriceWeightPercent"
534 + ></el-input-number>
222 </el-form-item> 535 </el-form-item>
223 </el-col> 536 </el-col>
224 </el-row> 537 </el-row>
225 <el-row> 538 <el-row>
226 <el-col :span="12"> 539 <el-col :span="12">
227 <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> 540 <el-form-item label="低价百分比" prop="lowPriceWeightPercent">
228 - <el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" 541 + <el-input-number
229 - v-model="form.lowPriceWeightPercent"></el-input-number> 542 + class="wid80"
543 + :disabled="true"
544 + placeholder="开启高低价后计算"
545 + v-model="form.lowPriceWeightPercent"
546 + ></el-input-number>
230 </el-form-item> 547 </el-form-item>
231 </el-col> 548 </el-col>
232 <el-col :span="12"> 549 <el-col :span="12">
233 <el-form-item label="高价可配重量" prop="highAvailableWeight"> 550 <el-form-item label="高价可配重量" prop="highAvailableWeight">
234 - <el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" v-model="form.highAvailableWeight" 551 + <el-input-number
235 - :precision="2"></el-input-number> 552 + class="wid80"
553 + :disabled="true"
554 + placeholder="开启高低价后计算"
555 + v-model="form.highAvailableWeight"
556 + :precision="2"
557 + ></el-input-number>
236 </el-form-item> 558 </el-form-item>
237 </el-col> 559 </el-col>
238 </el-row> 560 </el-row>
239 <el-row> 561 <el-row>
240 <el-col :span="12"> 562 <el-col :span="12">
241 <el-form-item label="低价可配重量" prop="lowAvailableWeight"> 563 <el-form-item label="低价可配重量" prop="lowAvailableWeight">
242 - <el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" v-model="form.lowAvailableWeight" 564 + <el-input-number
243 - :precision="2"></el-input-number> 565 + class="wid80"
566 + :disabled="true"
567 + placeholder="开启高低价后计算"
568 + v-model="form.lowAvailableWeight"
569 + :precision="2"
570 + ></el-input-number>
244 </el-form-item> 571 </el-form-item>
245 </el-col> 572 </el-col>
246 <el-col :span="12"> 573 <el-col :span="12">
247 <el-form-item label="高价已配重量" prop="highAllocatedWeight"> 574 <el-form-item label="高价已配重量" prop="highAllocatedWeight">
248 - <el-input-number class="wid80" :disabled="true" placeholder="请输入高价已配重量" v-model="form.highAllocatedWeight" 575 + <el-input-number
249 - :precision="2"></el-input-number> 576 + class="wid80"
577 + :disabled="true"
578 + placeholder="请输入高价已配重量"
579 + v-model="form.highAllocatedWeight"
580 + :precision="2"
581 + ></el-input-number>
250 </el-form-item> 582 </el-form-item>
251 </el-col> 583 </el-col>
252 </el-row> 584 </el-row>
253 <el-row> 585 <el-row>
254 <el-col :span="12"> 586 <el-col :span="12">
255 <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> 587 <el-form-item label="低价已配重量" prop="lowAllocatedWeight">
256 - <el-input-number class="wid80" :disabled="true" placeholder="请输入低价已配重量" v-model="form.lowAllocatedWeight" 588 + <el-input-number
257 - :precision="2"></el-input-number> 589 + class="wid80"
590 + :disabled="true"
591 + placeholder="请输入低价已配重量"
592 + v-model="form.lowAllocatedWeight"
593 + :precision="2"
594 + ></el-input-number>
258 </el-form-item> 595 </el-form-item>
259 </el-col> 596 </el-col>
260 <el-col :span="12"> 597 <el-col :span="12">
261 <el-form-item label="已配总重量" prop="alloctedWeight"> 598 <el-form-item label="已配总重量" prop="alloctedWeight">
262 - <el-input-number class="wid80" :disabled="true" placeholder="请输入已配总重量" v-model="form.alloctedWeight" 599 + <el-input-number
263 - :precision="2"></el-input-number> 600 + class="wid80"
601 + :disabled="true"
602 + placeholder="请输入已配总重量"
603 + v-model="form.alloctedWeight"
604 + :precision="2"
605 + ></el-input-number>
264 </el-form-item> 606 </el-form-item>
265 </el-col> 607 </el-col>
266 <el-col :span="12"> 608 <el-col :span="12">
267 <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> 609 <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
268 - <el-input-number class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" /> 610 + <el-input-number
611 + class="wid80"
612 + v-model="form.accountTotalWeight"
613 + disabled
614 + placeholder="配置特殊规则后计算"
615 + />
269 </el-form-item> 616 </el-form-item>
270 </el-col> 617 </el-col>
271 <el-col :span="12"> 618 <el-col :span="12">
272 - <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> 619 + <el-form-item
273 - <el-input-number class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" /> 620 + label="特殊规则已配重量"
621 + prop="accountAllocatedWeight"
622 + >
623 + <el-input-number
624 + class="wid80"
625 + v-model="form.accountAllocatedWeight"
626 + disabled
627 + placeholder="配置特殊规则后计算"
628 + />
274 </el-form-item> 629 </el-form-item>
275 </el-col> 630 </el-col>
276 </el-row> 631 </el-row>
...@@ -280,12 +635,22 @@ ...@@ -280,12 +635,22 @@
280 <el-button @click="cancel">取 消</el-button> 635 <el-button @click="cancel">取 消</el-button>
281 </div> 636 </div>
282 </el-dialog> 637 </el-dialog>
283 - <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" 638 + <el-dialog
284 - :append-to-body="true" :close-on-press-escape="false"> 639 + title="未删除成功航班"
640 + width="40%"
641 + center
642 + :visible.sync="dialogTableVisible"
643 + :close-on-click-modal="false"
644 + :append-to-body="true"
645 + :close-on-press-escape="false"
646 + >
285 <el-table :data="gridData"> 647 <el-table :data="gridData">
286 <el-table-column property="fltNo" label="航班号"></el-table-column> 648 <el-table-column property="fltNo" label="航班号"></el-table-column>
287 <el-table-column property="fltDate" label="航班日期"></el-table-column> 649 <el-table-column property="fltDate" label="航班日期"></el-table-column>
288 - <el-table-column property="alloctedWeight" label="已配重量"></el-table-column> 650 + <el-table-column
651 + property="alloctedWeight"
652 + label="已配重量"
653 + ></el-table-column>
289 </el-table> 654 </el-table>
290 </el-dialog> 655 </el-dialog>
291 </div> 656 </div>
...@@ -302,11 +667,11 @@ import { ...@@ -302,11 +667,11 @@ import {
302 updateStatusBatch, 667 updateStatusBatch,
303 updateAutoPushBatch, 668 updateAutoPushBatch,
304 updateWhiteListSwitchBatch, 669 updateWhiteListSwitchBatch,
305 - updateBlackListSwitchBatch 670 + updateBlackListSwitchBatch,
306 } from "@/api/findAllFltData"; 671 } from "@/api/findAllFltData";
307 -import { getpreAudit } from '@/api/system/preReview.js' 672 +import { getpreAudit } from "@/api/system/preReview.js";
308 -import { queryRouteByFltNo } from '@/api/destinationFlight.js' 673 +import { queryRouteByFltNo } from "@/api/destinationFlight.js";
309 - 674 +import { queryRoute } from "@/api/system/dictionary.js";
310 export default { 675 export default {
311 name: "FlightInformationMaintenance", 676 name: "FlightInformationMaintenance",
312 data() { 677 data() {
...@@ -355,14 +720,14 @@ export default { ...@@ -355,14 +720,14 @@ export default {
355 { 720 {
356 required: true, 721 required: true,
357 message: "原始重量(KG)不能为空", 722 message: "原始重量(KG)不能为空",
358 - trigger: ["change","blur"], 723 + trigger: ["change", "blur"],
359 }, 724 },
360 ], 725 ],
361 }, 726 },
362 //原航班规则数据 727 //原航班规则数据
363 findAllFltDatList: [], 728 findAllFltDatList: [],
364 //表头 729 //表头
365 - tableHeader: this.tableHeaders['FlightInformation'], 730 + tableHeader: this.tableHeaders["FlightInformation"],
366 //删除失败数据 731 //删除失败数据
367 gridData: [], 732 gridData: [],
368 //form属性禁用状态 733 //form属性禁用状态
...@@ -472,6 +837,7 @@ export default { ...@@ -472,6 +837,7 @@ export default {
472 //shift键状态 837 //shift键状态
473 shiftKey: false, 838 shiftKey: false,
474 routeError: false, // 请选择航线错误显示 839 routeError: false, // 请选择航线错误显示
840 + routes: [],
475 }; 841 };
476 }, 842 },
477 directives: { 843 directives: {
...@@ -499,7 +865,7 @@ export default { ...@@ -499,7 +865,7 @@ export default {
499 }, 865 },
500 created() { 866 created() {
501 //查询条件数据源 867 //查询条件数据源
502 - this.queryParams.fltDateStart = this.nowDate() 868 + this.queryParams.fltDateStart = this.nowDate();
503 if (this.$store.state.tagsView.cachedViews.length == 0) { 869 if (this.$store.state.tagsView.cachedViews.length == 0) {
504 this.findFltConditionData(); 870 this.findFltConditionData();
505 this.findAllFltData(); 871 this.findAllFltData();
...@@ -514,7 +880,7 @@ export default { ...@@ -514,7 +880,7 @@ export default {
514 // }) 880 // })
515 }, 881 },
516 activated() { 882 activated() {
517 - this.ids = [] 883 + this.ids = [];
518 this.findFltConditionData(); 884 this.findFltConditionData();
519 this.findAllFltData(); 885 this.findAllFltData();
520 }, 886 },
...@@ -532,22 +898,22 @@ export default { ...@@ -532,22 +898,22 @@ export default {
532 this.shiftKey = false; 898 this.shiftKey = false;
533 } 899 }
534 }); 900 });
535 - this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120; 901 + this.tableHeight =
902 + window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
536 }, 903 },
537 methods: { 904 methods: {
538 //输入航班号后 905 //输入航班号后
539 blurfltNo() { 906 blurfltNo() {
540 -
541 // this.routeList = [] 907 // this.routeList = []
542 - this.form.accountTotalWeight = 0 908 + this.form.accountTotalWeight = 0;
543 - this.form.accountAllocatedWeight = 0 909 + this.form.accountAllocatedWeight = 0;
544 if ( 910 if (
545 this.form.fltNo != null && 911 this.form.fltNo != null &&
546 this.form.fltNo != undefined && 912 this.form.fltNo != undefined &&
547 this.form.fltNo != "" 913 this.form.fltNo != ""
548 ) { 914 ) {
549 this.form.fltNo = this.form.fltNo.toUpperCase(); 915 this.form.fltNo = this.form.fltNo.toUpperCase();
550 - this.perStatus(this.form.fltNo) 916 + this.perStatus(this.form.fltNo);
551 findFltCommonConf(this.form).then((response) => { 917 findFltCommonConf(this.form).then((response) => {
552 if (response.code == 200) { 918 if (response.code == 200) {
553 //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 919 //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
...@@ -603,23 +969,28 @@ export default { ...@@ -603,23 +969,28 @@ export default {
603 this.msgError(response.msg); 969 this.msgError(response.msg);
604 } 970 }
605 }); 971 });
606 - this.routeLoading = true 972 + this.routeLoading = true;
607 //获取航线 973 //获取航线
608 - queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => { 974 + queryRouteByFltNo({ fltNo: this.form.fltNo })
609 - this.routeLoading = false 975 + .then((res) => {
976 + this.routeLoading = false;
610 if (res.code === 200) { 977 if (res.code === 200) {
611 - this.routeList = res.data.list 978 + if (res.data.list.length) {
979 + this.routeList = res.data.list;
980 + }
612 if (res.data.list.length == 0) { 981 if (res.data.list.length == 0) {
613 this.form.route = ""; 982 this.form.route = "";
983 + this.routeList = [];
614 this.msgError("该航班没有设置航线"); 984 this.msgError("该航班没有设置航线");
615 } 985 }
616 } else { 986 } else {
617 - this.msgWarning(res.msg) 987 + this.msgWarning(res.msg);
618 } 988 }
619 - }).catch(err => {
620 - this.routeLoading = false
621 - console.log(err)
622 }) 989 })
990 + .catch((err) => {
991 + this.routeLoading = false;
992 + console.log(err);
993 + });
623 } else { 994 } else {
624 this.form.route = ""; 995 this.form.route = "";
625 this.routeList = []; 996 this.routeList = [];
...@@ -627,18 +998,18 @@ export default { ...@@ -627,18 +998,18 @@ export default {
627 }, 998 },
628 //航班种类修改 999 //航班种类修改
629 kindChange(val) { 1000 kindChange(val) {
630 - this.selectOption.flightKindlist.forEach(item => { 1001 + this.selectOption.flightKindlist.forEach((item) => {
631 if (item.id == val) { 1002 if (item.id == val) {
632 - if (item.chineseName.indexOf('White') >= 0) { 1003 + if (item.chineseName.indexOf("White") >= 0) {
633 - this.routeMultiple = false 1004 + this.routeMultiple = false;
634 - this.form.route = '' 1005 + this.form.route = "";
635 - } else if (item.chineseName.indexOf('Purple') >= 0) { 1006 + } else if (item.chineseName.indexOf("Purple") >= 0) {
636 - this.routeMultiple = true 1007 + this.routeMultiple = true;
637 - this.form.route = [] 1008 + this.form.route = [];
638 } 1009 }
639 - this.routeError = true 1010 + this.routeError = true;
640 } 1011 }
641 - }) 1012 + });
642 // this.$refs.routeSelect.$forceUpdate() 1013 // this.$refs.routeSelect.$forceUpdate()
643 }, 1014 },
644 //查询条件数据源 1015 //查询条件数据源
...@@ -658,15 +1029,24 @@ export default { ...@@ -658,15 +1029,24 @@ export default {
658 }, 1029 },
659 //获取航班预审状态 1030 //获取航班预审状态
660 perStatus(val) { 1031 perStatus(val) {
661 - getpreAudit({ fltNo: val, page: 1, size: 20 }).then(res => { 1032 + getpreAudit({ fltNo: val, page: 1, size: 20 })
1033 + .then((res) => {
662 if (res.code === 200) { 1034 if (res.code === 200) {
663 - this.preAudit = res.data.list.length == 0 ? '关闭' : res.data.list[0].status == 0 ? '关闭' : res.data.list[0].status == 1 ? '开启' : '' 1035 + this.preAudit =
1036 + res.data.list.length == 0
1037 + ? "关闭"
1038 + : res.data.list[0].status == 0
1039 + ? "关闭"
1040 + : res.data.list[0].status == 1
1041 + ? "开启"
1042 + : "";
664 } else { 1043 } else {
665 - this.msgWarning(res.msg) 1044 + this.msgWarning(res.msg);
666 } 1045 }
667 - }).catch(err => {
668 - console.log(err)
669 }) 1046 })
1047 + .catch((err) => {
1048 + console.log(err);
1049 + });
670 }, 1050 },
671 /** 航班信息维护查询*/ 1051 /** 航班信息维护查询*/
672 findAllFltData() { 1052 findAllFltData() {
...@@ -699,7 +1079,7 @@ export default { ...@@ -699,7 +1079,7 @@ export default {
699 handleAdd() { 1079 handleAdd() {
700 this.reset(); 1080 this.reset();
701 this.findFltConditionData(); 1081 this.findFltConditionData();
702 - this.preAudit = null 1082 + this.preAudit = null;
703 this.open = true; 1083 this.open = true;
704 this.title = "添加航班信息"; 1084 this.title = "添加航班信息";
705 this.form.id = null; 1085 this.form.id = null;
...@@ -721,8 +1101,8 @@ export default { ...@@ -721,8 +1101,8 @@ export default {
721 this.formdisabled.originalWeight = false; 1101 this.formdisabled.originalWeight = false;
722 this.routeError = false; 1102 this.routeError = false;
723 this.$nextTick(() => { 1103 this.$nextTick(() => {
724 - this.$refs.form.clearValidate() 1104 + this.$refs.form.clearValidate();
725 - }) 1105 + });
726 }, 1106 },
727 //计算高低价可配 1107 //计算高低价可配
728 LowHighAvailable() { 1108 LowHighAvailable() {
...@@ -742,7 +1122,9 @@ export default { ...@@ -742,7 +1122,9 @@ export default {
742 this.$set( 1122 this.$set(
743 this.form, 1123 this.form,
744 "highAvailableWeight", 1124 "highAvailableWeight",
745 - (Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) * 1125 + (Weight -
1126 + this.form.accountTotalWeight -
1127 + (this.form.alloctedWeight - this.form.accountAllocatedWeight)) *
746 (this.form.highPriceWeightPercent / 100) 1128 (this.form.highPriceWeightPercent / 100)
747 ); 1129 );
748 this.$set( 1130 this.$set(
...@@ -778,7 +1160,10 @@ export default { ...@@ -778,7 +1160,10 @@ export default {
778 this.$set( 1160 this.$set(
779 this.form, 1161 this.form,
780 "lowAvailableWeight", 1162 "lowAvailableWeight",
781 - (Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) - this.form.highAvailableWeight 1163 + Weight -
1164 + this.form.accountTotalWeight -
1165 + (this.form.alloctedWeight - this.form.accountAllocatedWeight) -
1166 + this.form.highAvailableWeight
782 ); 1167 );
783 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; 1168 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
784 } else if ( 1169 } else if (
...@@ -810,7 +1195,9 @@ export default { ...@@ -810,7 +1195,9 @@ export default {
810 Weightall() { 1195 Weightall() {
811 let Weight = 0; 1196 let Weight = 0;
812 if (this.form.extraWeightPercent > 0) { 1197 if (this.form.extraWeightPercent > 0) {
813 - Weight = this.form.originalWeight * (this.form.extraWeightPercent / 100) + this.form.originalWeight; 1198 + Weight =
1199 + this.form.originalWeight * (this.form.extraWeightPercent / 100) +
1200 + this.form.originalWeight;
814 } else { 1201 } else {
815 Weight = this.form.originalWeight; 1202 Weight = this.form.originalWeight;
816 } 1203 }
...@@ -818,13 +1205,13 @@ export default { ...@@ -818,13 +1205,13 @@ export default {
818 }, 1205 },
819 /** 修改按钮操作 */ 1206 /** 修改按钮操作 */
820 handleUpdate(row) { 1207 handleUpdate(row) {
821 - if(row.statusName == "已删除"){ 1208 + if (row.statusName == "已删除") {
822 this.msgError("已删除不可操作"); 1209 this.msgError("已删除不可操作");
823 - return 1210 + return;
824 } 1211 }
825 this.reset(); 1212 this.reset();
826 this.findFltConditionData(); 1213 this.findFltConditionData();
827 - this.perStatus(row.fltNo) 1214 + this.perStatus(row.fltNo);
828 this.open = true; 1215 this.open = true;
829 this.title = "修改航班信息"; 1216 this.title = "修改航班信息";
830 //航班号 1217 //航班号
...@@ -838,7 +1225,7 @@ export default { ...@@ -838,7 +1225,7 @@ export default {
838 findFltById(row).then((response) => { 1225 findFltById(row).then((response) => {
839 if (response.code == 200) { 1226 if (response.code == 200) {
840 this.form = response.data; 1227 this.form = response.data;
841 - this.form.route = this.form.route.split(';') 1228 + this.form.route = this.form.route.split(";");
842 //是否开启高低价 1229 //是否开启高低价
843 // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; 1230 // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false;
844 //是否预审 1231 //是否预审
...@@ -847,73 +1234,149 @@ export default { ...@@ -847,73 +1234,149 @@ export default {
847 // this.LowHighAvailable(); 1234 // this.LowHighAvailable();
848 1235
849 //航线 1236 //航线
850 - this.selectOption.flightKindlist.forEach(item => { 1237 + this.selectOption.flightKindlist.forEach((item) => {
851 if (item.id == this.form.kindId) { 1238 if (item.id == this.form.kindId) {
852 - if (item.chineseName.indexOf('White') >= 0) { 1239 + if (item.chineseName.indexOf("White") >= 0) {
853 - this.formdisabled.route = true 1240 + this.formdisabled.route = true;
854 - } else if (item.chineseName.indexOf('Purple') >= 0) { 1241 + } else if (item.chineseName.indexOf("Purple") >= 0) {
855 - this.formdisabled.route = false 1242 + this.formdisabled.route = false;
856 - this.routeMultiple = true 1243 + this.routeMultiple = true;
857 //获取航线 1244 //获取航线
858 - queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => { 1245 + queryRouteByFltNo({ fltNo: this.form.fltNo })
859 - this.routeLoading = false 1246 + .then((res) => {
1247 + this.routeLoading = false;
860 if (res.code === 200) { 1248 if (res.code === 200) {
861 - this.routeList = res.data.list 1249 + if (res.data.list.length) {
1250 + this.routeList = res.data.list;
1251 + } else {
1252 + this.routeList = [];
1253 + }
862 } else { 1254 } else {
863 - this.msgWarning(res.msg) 1255 + this.msgWarning(res.msg);
864 } 1256 }
865 - }).catch(err => {
866 - this.routeLoading = false
867 - console.log(err)
868 }) 1257 })
1258 + .catch((err) => {
1259 + this.routeLoading = false;
1260 + console.log(err);
1261 + });
869 } 1262 }
870 } 1263 }
871 - }) 1264 + });
872 - this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true 1265 + this.ishighPriceWeightPercent =
1266 + this.form.highLowPriceFlg === 1 ? false : true;
873 } else { 1267 } else {
874 this.msgError(response.msg); 1268 this.msgError(response.msg);
875 } 1269 }
876 }); 1270 });
877 }, 1271 },
878 - //查看航班维度 1272 + /*
879 - goFlightAllocConfig(val) { 1273 + 查看航班维度
880 - if(val.statusName == "已删除"){ 1274 + 不仅分为航班种类又分当前航班航线是不是ET86,
1275 + 如果航班航种类是Purple Tail,遍历航班航线查询的是不是全都是ET86航线,如果全部是ET86航线,那么不做跳转。
1276 + 如果是White Tail也就是只差当前的一条航班航线,如果当前航班航线是ET86航线那么就不做跳转;
1277 + */
1278 + goFlightAllocConfig(row) {
1279 + if (row.statusName == "已删除") {
881 this.msgError("已删除不可操作"); 1280 this.msgError("已删除不可操作");
882 - return 1281 + return;
883 } 1282 }
884 - let obj = { 1283 + let params = {
885 - id: ' ', 1284 + fltNo: row.fltNo,
886 - handle: 'updated', 1285 + page: 1,
887 - fltNo: val.fltNo, 1286 + size: 20,
888 - fltDate: val.fltDate ? val.fltDate : null, 1287 + };
889 - route: val.route, 1288 + let routeInfo = {
890 - routeStatus: 'flightInformationMaintenance' + val.flightKindName, 1289 + fltNo: "",
891 - status: ' ', 1290 + isEtesRoute: false,
892 - createStatus: 1, 1291 + fltRoute: "",
1292 + };
1293 + // 本次判断跳转只是对接口的,并没有对勾选的取
1294 + queryRoute(params)
1295 + .then((res) => {
1296 + const { code, data } = res;
1297 + const et86RouteList = [];
1298 + if (code == 200) {
1299 + if (data.list.length) {
1300 + // Purple Tail是不是全部是ET86航线
1301 + routeInfo.isEtesRoute = data.list.every(
1302 + (item) => item.isEtesRoute == "Y"
1303 + );
1304 + // 有没有ET86航线
1305 + const isEtesRoute = data.list.filter(
1306 + (item) => item.isEtesRoute == "Y"
1307 + );
1308 + // 处理alert提示语展示数据
1309 + if (isEtesRoute.length) {
1310 + isEtesRoute.map((item) => {
1311 + et86RouteList.push(item.route);
1312 + });
1313 + routeInfo.fltNo = row.fltNo;
1314 + routeInfo.fltRoute = et86RouteList;
1315 + }
1316 + // White Tail 当前航线在航班航线中是否为ET86航线
1317 + if (row.flightKindName == "White Tail") {
1318 + if (isEtesRoute.length) {
1319 + let whiteEt86 = isEtesRoute.filter(
1320 + (item) => item.route == row.route
1321 + );
1322 + routeInfo.isEtesRoute = whiteEt86.length;
1323 + }
1324 + } else {
1325 + routeInfo.isEtesRoute = row.route
1326 + .split(";")
1327 + .every((item) => et86RouteList.includes(item));
1328 + }
1329 + } else {
1330 + this.msgError("暂无当前航班航线");
1331 + }
1332 + if (routeInfo.isEtesRoute) {
1333 + let msg = routeInfo.fltNo + ": " + routeInfo.fltRoute.join(";");
1334 + this.$alert(
1335 + `当前${msg}为ET86航线,不可操作该按钮。可在ET86规则界面维护。`,
1336 + "提示",
1337 + {
1338 + confirmButtonText: "关闭",
1339 + callback: (action) => {},
1340 + }
1341 + );
1342 + return;
893 } 1343 }
894 this.$router.push({ 1344 this.$router.push({
895 - name: 'FlightAllocConfigInfo', 1345 + path: "/routeInfo",
896 - params: obj 1346 + query: {
1347 + flightDate: row.fltDate,
1348 + purposeOfFlightNo: row.fltNo,
1349 + flightRouteListStr: row.route,
1350 + status: row.status,
1351 + flightKindName: row.flightKindName,
1352 + pageName: "flightInformationMaintenance",
1353 + disable: true,
1354 + },
1355 + });
1356 + }
897 }) 1357 })
1358 + .catch(() => {});
898 }, 1359 },
899 // 航班状态 1360 // 航班状态
900 flightState(multipleSelection, statusName) { 1361 flightState(multipleSelection, statusName) {
901 - let flightState = multipleSelection.some(item => item.statusName == statusName); 1362 + let flightState = multipleSelection.some(
1363 + (item) => item.statusName == statusName
1364 + );
902 if (flightState) { 1365 if (flightState) {
903 this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`); 1366 this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`);
904 } else { 1367 } else {
905 - flightState = false 1368 + flightState = false;
906 } 1369 }
907 - return flightState 1370 + return flightState;
908 }, 1371 },
909 /** 删除按钮操作 */ 1372 /** 删除按钮操作 */
910 handleDelete(row) { 1373 handleDelete(row) {
911 let fIds = []; 1374 let fIds = [];
912 - this.ids.forEach(item => { 1375 + this.ids.forEach((item) => {
913 - fIds.push(item.id) 1376 + fIds.push(item.id);
914 }); 1377 });
915 // 航班状态 1378 // 航班状态
916 - if (this.flightState(this.ids, "已删除")) return 1379 + if (this.flightState(this.ids, "已删除")) return;
917 this.$confirm("是否确认删除所选数据?", "警告", { 1380 this.$confirm("是否确认删除所选数据?", "警告", {
918 confirmButtonText: "确定", 1381 confirmButtonText: "确定",
919 cancelButtonText: "取消", 1382 cancelButtonText: "取消",
...@@ -935,27 +1398,27 @@ export default { ...@@ -935,27 +1398,27 @@ export default {
935 .then(() => { 1398 .then(() => {
936 this.dialogTableVisible = true; 1399 this.dialogTableVisible = true;
937 }) 1400 })
938 - .catch(() => { }); 1401 + .catch(() => {});
939 } else { 1402 } else {
940 this.msgSuccess(response.msg); 1403 this.msgSuccess(response.msg);
941 } 1404 }
942 }) 1405 })
943 - .catch(() => { }); 1406 + .catch(() => {});
944 }, 1407 },
1408 +
945 /** 提交按钮 */ 1409 /** 提交按钮 */
946 submitForm: function () { 1410 submitForm: function () {
947 this.$refs["form"].validate((valid) => { 1411 this.$refs["form"].validate((valid) => {
948 - if(this.form.route == undefined){ 1412 + if (this.form.route == undefined) {
949 this.routeError = true; 1413 this.routeError = true;
950 - return 1414 + return;
951 } 1415 }
952 - if(this.form.route.length || this.form.route !== undefined){ 1416 + if (this.form.route.length || this.form.route !== undefined) {
953 this.routeError = false; 1417 this.routeError = false;
954 } 1418 }
955 - 1419 + if (this.form.route.length == 0) {
956 - if(this.form.route.length == 0){
957 this.routeError = true; 1420 this.routeError = true;
958 - return 1421 + return;
959 } 1422 }
960 if (valid) { 1423 if (valid) {
961 let formdata = JSON.parse(JSON.stringify(this.form)); 1424 let formdata = JSON.parse(JSON.stringify(this.form));
...@@ -988,18 +1451,26 @@ export default { ...@@ -988,18 +1451,26 @@ export default {
988 // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; 1451 // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
989 //总重量更新 1452 //总重量更新
990 // formdata.totalWeight = this.Weightall() 1453 // formdata.totalWeight = this.Weightall()
991 - formdata.route = this.form.route.toString().replace(/,/g, ';') 1454 + formdata.route = this.form.route.toString().replace(/,/g, ";");
1455 + if (
1456 + this.form.extraWeightPercent == undefined ||
1457 + this.form.extraWeightPercent == null
1458 + ) {
1459 + formdata.extraWeightPercent = 0;
1460 + }
992 //处理数据 1461 //处理数据
993 - saveOrUpdate(formdata).then((response) => { 1462 + saveOrUpdate(formdata)
1463 + .then((response) => {
994 if (response.code === 200) { 1464 if (response.code === 200) {
995 this.msgSuccess("保存成功"); 1465 this.msgSuccess("保存成功");
996 - this.routeList = [] 1466 + this.routeList = [];
997 this.open = false; 1467 this.open = false;
998 this.findAllFltData(); 1468 this.findAllFltData();
999 } else { 1469 } else {
1000 this.msgError(response.msg); 1470 this.msgError(response.msg);
1001 } 1471 }
1002 - }); 1472 + })
1473 + .catch(() => {});
1003 } 1474 }
1004 }); 1475 });
1005 }, 1476 },
...@@ -1010,11 +1481,11 @@ export default { ...@@ -1010,11 +1481,11 @@ export default {
1010 }, 1481 },
1011 //取消按钮 1482 //取消按钮
1012 cancel() { 1483 cancel() {
1013 - this.routeError = false 1484 + this.routeError = false;
1014 - this.routeList = [] 1485 + this.routeList = [];
1015 - this.ishighPriceWeightPercent = true 1486 + this.ishighPriceWeightPercent = true;
1016 - this.routeMultiple = false 1487 + this.routeMultiple = false;
1017 - this.routeLoading = false 1488 + this.routeLoading = false;
1018 this.open = false; 1489 this.open = false;
1019 this.findAllFltData(); 1490 this.findAllFltData();
1020 this.findFltConditionData(); 1491 this.findFltConditionData();
...@@ -1034,23 +1505,28 @@ export default { ...@@ -1034,23 +1505,28 @@ export default {
1034 //批量开启/关闭航班 1505 //批量开启/关闭航班
1035 handleFlightStatus(status) { 1506 handleFlightStatus(status) {
1036 // 航班状态 1507 // 航班状态
1037 - if (this.flightState(this.ids, "已删除")) return 1508 + if (this.flightState(this.ids, "已删除")) return;
1038 let handle = status == "flightStatus80" ? "关闭" : "开启"; 1509 let handle = status == "flightStatus80" ? "关闭" : "开启";
1510 + let state = this.ids.some((item) => item.statusName == `已${handle}`);
1511 + if (state) {
1512 + this.msgError(`勾选的航班,航班状态为已${handle},不可操作该按钮`);
1513 + return;
1514 + }
1039 let data = { 1515 let data = {
1040 updateIds: [], 1516 updateIds: [],
1041 }; 1517 };
1042 - this.ids.map(item => { 1518 + this.ids.map((item) => {
1043 data.status = status; 1519 data.status = status;
1044 - if (status === 'flightStatus80') { 1520 + if (status === "flightStatus80") {
1045 - if (item.statusName === '已开启') { 1521 + if (item.statusName === "已开启") {
1046 - data.updateIds.push(item.id) 1522 + data.updateIds.push(item.id);
1047 } 1523 }
1048 } else { 1524 } else {
1049 - if (item.statusName === '已关闭') { 1525 + if (item.statusName === "已关闭") {
1050 - data.updateIds.push(item.id) 1526 + data.updateIds.push(item.id);
1051 } 1527 }
1052 } 1528 }
1053 - }) 1529 + });
1054 if (data.updateIds.length > 0) { 1530 if (data.updateIds.length > 0) {
1055 updateStatusBatch(data).then((response) => { 1531 updateStatusBatch(data).then((response) => {
1056 if (response.code === 200) { 1532 if (response.code === 200) {
...@@ -1065,7 +1541,7 @@ export default { ...@@ -1065,7 +1541,7 @@ export default {
1065 //自动推送开关 1541 //自动推送开关
1066 autoPushBatch(status) { 1542 autoPushBatch(status) {
1067 // 航班状态 1543 // 航班状态
1068 - if (this.flightState(this.ids, "已删除")) return 1544 + if (this.flightState(this.ids, "已删除")) return;
1069 let msg = status == "open" ? "开启" : "关闭"; 1545 let msg = status == "open" ? "开启" : "关闭";
1070 let data = { 1546 let data = {
1071 updateIds: [], 1547 updateIds: [],
...@@ -1093,7 +1569,7 @@ export default { ...@@ -1093,7 +1569,7 @@ export default {
1093 this.msgError(res.msg); 1569 this.msgError(res.msg);
1094 } 1570 }
1095 }) 1571 })
1096 - .catch(err => { 1572 + .catch((err) => {
1097 this.msgError(err); 1573 this.msgError(err);
1098 }); 1574 });
1099 } else { 1575 } else {
...@@ -1104,60 +1580,64 @@ export default { ...@@ -1104,60 +1580,64 @@ export default {
1104 //白名单配舱开关 1580 //白名单配舱开关
1105 whiteListSwitchStatus(val) { 1581 whiteListSwitchStatus(val) {
1106 // 航班状态 1582 // 航班状态
1107 - if (this.flightState(this.ids, "已删除")) return 1583 + if (this.flightState(this.ids, "已删除")) return;
1108 let obj = { 1584 let obj = {
1109 - updateIds: [] 1585 + updateIds: [],
1110 - } 1586 + };
1111 - obj.status = val 1587 + obj.status = val;
1112 - this.ids.forEach(item => { 1588 + this.ids.forEach((item) => {
1113 - obj.updateIds.push(item.id) 1589 + obj.updateIds.push(item.id);
1114 - }) 1590 + });
1115 - updateWhiteListSwitchBatch(obj).then(res => { 1591 + updateWhiteListSwitchBatch(obj)
1592 + .then((res) => {
1116 if (res.code === 200) { 1593 if (res.code === 200) {
1117 - this.msgSuccess(res.msg) 1594 + this.msgSuccess(res.msg);
1118 - this.findAllFltData() 1595 + this.findAllFltData();
1119 } else { 1596 } else {
1120 - this.msgWarning(res.msg) 1597 + this.msgWarning(res.msg);
1121 } 1598 }
1122 - }).catch(err => {
1123 - console.log(err)
1124 }) 1599 })
1600 + .catch((err) => {
1601 + console.log(err);
1602 + });
1125 }, 1603 },
1126 //黑名单配舱开关 1604 //黑名单配舱开关
1127 BlackListSwitchStatus(val) { 1605 BlackListSwitchStatus(val) {
1128 // 航班状态 1606 // 航班状态
1129 - if (this.flightState(this.ids, "已删除")) return 1607 + if (this.flightState(this.ids, "已删除")) return;
1130 let obj = { 1608 let obj = {
1131 - updateIds: [] 1609 + updateIds: [],
1132 - } 1610 + };
1133 - obj.status = val 1611 + obj.status = val;
1134 - this.ids.forEach(item => { 1612 + this.ids.forEach((item) => {
1135 - obj.updateIds.push(item.id) 1613 + obj.updateIds.push(item.id);
1136 - }) 1614 + });
1137 - updateBlackListSwitchBatch(obj).then(res => { 1615 + updateBlackListSwitchBatch(obj)
1616 + .then((res) => {
1138 if (res.code === 200) { 1617 if (res.code === 200) {
1139 - this.msgSuccess(res.msg) 1618 + this.msgSuccess(res.msg);
1140 - this.findAllFltData() 1619 + this.findAllFltData();
1141 } else { 1620 } else {
1142 - this.msgWarning(res.msg) 1621 + this.msgWarning(res.msg);
1143 } 1622 }
1144 - }).catch(err => {
1145 - console.log(err)
1146 }) 1623 })
1624 + .catch((err) => {
1625 + console.log(err);
1626 + });
1147 }, 1627 },
1148 //航线修改 1628 //航线修改
1149 routeChange(val) { 1629 routeChange(val) {
1150 - if(this.form.route.length){ 1630 + if (this.form.route.length) {
1151 this.routeError = false; 1631 this.routeError = false;
1152 - }else{ 1632 + } else {
1153 this.routeError = true; 1633 this.routeError = true;
1154 } 1634 }
1155 - this.$forceUpdate() 1635 + this.$forceUpdate();
1156 }, 1636 },
1157 - blurRoute(){ 1637 + blurRoute() {
1158 - if(this.form.route.length){ 1638 + if (this.form.route !== undefined && this.form.route.length) {
1159 this.routeError = false; 1639 this.routeError = false;
1160 - }else{ 1640 + } else {
1161 this.routeError = true; 1641 this.routeError = true;
1162 } 1642 }
1163 }, 1643 },
...@@ -1181,11 +1661,11 @@ export default { ...@@ -1181,11 +1661,11 @@ export default {
1181 //每页长度 1661 //每页长度
1182 sizeChange(val) { 1662 sizeChange(val) {
1183 this.queryParams.limitSize = val; 1663 this.queryParams.limitSize = val;
1184 - this.queryParams.pageNum = 1 1664 + this.queryParams.pageNum = 1;
1185 this.findAllFltData(); 1665 this.findAllFltData();
1186 }, 1666 },
1187 setClose() { 1667 setClose() {
1188 - this.tableHeader = this.tableHeaders['FlightInformation'] 1668 + this.tableHeader = this.tableHeaders["FlightInformation"];
1189 }, 1669 },
1190 }, 1670 },
1191 computed: { 1671 computed: {
...@@ -1196,19 +1676,19 @@ export default { ...@@ -1196,19 +1676,19 @@ export default {
1196 set: function (val) { 1676 set: function (val) {
1197 this.form.route = this.upCase(val); 1677 this.form.route = this.upCase(val);
1198 }, 1678 },
1199 - } 1679 + },
1200 - } 1680 + },
1201 }; 1681 };
1202 </script> 1682 </script>
1203 1683
1204 <style> 1684 <style>
1205 .el-table--striped .el-table__body tr.el-table__row--striped.current-row td, 1685 .el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
1206 -.el-table__body tr.current-row>td { 1686 +.el-table__body tr.current-row > td {
1207 background-color: #a0cfff; 1687 background-color: #a0cfff;
1208 } 1688 }
1209 1689
1210 -.el-table--striped .el-table__body tr.hover-row.el-table__row--striped>td, 1690 +.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td,
1211 -.el-table__body tr.hover-row>td { 1691 +.el-table__body tr.hover-row > td {
1212 background-color: #d9ecff !important; 1692 background-color: #d9ecff !important;
1213 } 1693 }
1214 1694
...@@ -1217,7 +1697,7 @@ export default { ...@@ -1217,7 +1697,7 @@ export default {
1217 color: #ff4949; 1697 color: #ff4949;
1218 text-align: right; 1698 text-align: right;
1219 } 1699 }
1220 -.error-route{ 1700 +.error-route {
1221 color: #ff4949; 1701 color: #ff4949;
1222 } 1702 }
1223 </style> 1703 </style>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 </el-row> 17 </el-row>
18 </el-form> 18 </el-form>
19 <Tables ref="cargoLog" ductName="cargoLog" :order="false" :border='false' :data="data.tableData" 19 <Tables ref="cargoLog" ductName="cargoLog" :order="false" :border='false' :data="data.tableData"
20 - :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" 20 + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false"
21 :page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false" 21 :page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false"
22 :loading="loading" @currentChange="currentChange"> 22 :loading="loading" @currentChange="currentChange">
23 </Tables> 23 </Tables>
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
132 <el-form-item> 132 <el-form-item>
133 <template slot="label"> 133 <template slot="label">
134 <div style="display:inline-block">配载航线 134 <div style="display:inline-block">配载航线
135 - <el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应航线" placement="top-start"> 135 + <el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应航线" placement="top-start">
136 <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> 136 <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
137 </el-tooltip> 137 </el-tooltip>
138 </div> 138 </div>
......
1 +import YlElInputNumber from "./src/input-number";
2 +
3 +YlElInputNumber.install = function (Vue) {
4 + Vue.component(YlElInputNumber.name, YlElInputNumber);
5 +};
6 +// 该组件是基于Element UI InputNumber 计数器
7 +export default YlElInputNumber;
1 +<template>
2 + <div
3 + @dragstart.prevent
4 + :class="[
5 + 'el-input-number',
6 + inputNumberSize ? 'el-input-number--' + inputNumberSize : '',
7 + { 'is-disabled': inputNumberDisabled },
8 + { 'is-without-controls': !controls },
9 + { 'is-controls-right': controlsAtRight }
10 + ]">
11 + <span
12 + class="el-input-number__decrease"
13 + role="button"
14 + v-if="controls"
15 + @click="decrease"
16 + :class="{'is-disabled': minDisabled}"
17 + @keydown.enter="decrease">
18 + <i :class="`el-icon-${controlsAtRight ? 'arrow-down' : 'minus'}`"></i>
19 + </span>
20 + <span
21 + class="el-input-number__increase"
22 + role="button"
23 + v-if="controls"
24 + @click="increase"
25 + :class="{'is-disabled': maxDisabled}"
26 + @keydown.enter="increase">
27 + <i :class="`el-icon-${controlsAtRight ? 'arrow-up' : 'plus'}`"></i>
28 + </span>
29 + <el-input
30 + ref="input"
31 + :value="displayValue"
32 + :placeholder="placeholder"
33 + :disabled="inputNumberDisabled"
34 + :size="inputNumberSize"
35 + :max="max"
36 + :min="min"
37 + :name="name"
38 + :label="label"
39 + @keydown.up.native.prevent="increase"
40 + @keydown.down.native.prevent="decrease"
41 + @blur="handleBlur"
42 + @focus="handleFocus"
43 + @input="handleInput"
44 + @change="handleInputChange">
45 + </el-input>
46 + </div>
47 +</template>
48 +<script>
49 + export default {
50 + name: 'YlElInputNumber',
51 + inject: {
52 + elForm: {
53 + default: ''
54 + },
55 + elFormItem: {
56 + default: ''
57 + }
58 + },
59 + props: {
60 + step: {
61 + type: Number,
62 + default: 1
63 + },
64 + stepStrictly: {
65 + type: Boolean,
66 + default: false
67 + },
68 + max: {
69 + type: Number,
70 + default: Infinity
71 + },
72 + min: {
73 + type: Number,
74 + default: -Infinity
75 + },
76 + value: {},
77 + disabled: Boolean,
78 + size: String,
79 + controls: {
80 + type: Boolean,
81 + default: true
82 + },
83 + controlsPosition: {
84 + type: String,
85 + default: ''
86 + },
87 + name: String,
88 + label: String,
89 + placeholder: String,
90 + precision: {
91 + type: Number,
92 + validator(val) {
93 + return val >= 0 && val === parseInt(val, 10);
94 + }
95 + }
96 + },
97 + data() {
98 + return {
99 + currentValue: 0,
100 + userInput: null
101 + };
102 + },
103 + watch: {
104 + value: {
105 + immediate: true,
106 + handler(value) {
107 + let newVal = value === undefined ? value : Number(value);
108 + if (newVal !== undefined) {
109 + if (isNaN(newVal)) {
110 + return;
111 + }
112 + if (this.stepStrictly) {
113 + const stepPrecision = this.getPrecision(this.step);
114 + const precisionFactor = Math.pow(10, stepPrecision);
115 + newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
116 + }
117 + if (this.precision !== undefined) {
118 + newVal = this.toPrecision(newVal, this.precision);
119 + }
120 + }
121 + if (newVal >= this.max) newVal = this.max;
122 + if (newVal <= this.min) newVal = this.min;
123 + this.currentValue = newVal;
124 + this.userInput = null;
125 + this.$emit('input', newVal);
126 + }
127 + }
128 + },
129 + computed: {
130 + minDisabled() {
131 + return this._decrease(this.value, this.step) < this.min;
132 + },
133 + maxDisabled() {
134 + return this._increase(this.value, this.step) > this.max;
135 + },
136 + numPrecision() {
137 + const { value, step, getPrecision, precision } = this;
138 + const stepPrecision = getPrecision(step);
139 + if (precision !== undefined) {
140 + if (stepPrecision > precision) {
141 + console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
142 + }
143 + return precision;
144 + } else {
145 + return Math.max(getPrecision(value), stepPrecision);
146 + }
147 + },
148 + controlsAtRight() {
149 + return this.controls && this.controlsPosition === 'right';
150 + },
151 + _elFormItemSize() {
152 + return (this.elFormItem || {}).elFormItemSize;
153 + },
154 + inputNumberSize() {
155 + return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
156 + },
157 + inputNumberDisabled() {
158 + return this.disabled || !!(this.elForm || {}).disabled;
159 + },
160 + displayValue() {
161 + if (this.userInput !== null) {
162 + return this.userInput;
163 + }
164 + let currentValue = this.currentValue;
165 + if (typeof currentValue === 'number') {
166 + if (this.stepStrictly) {
167 + const stepPrecision = this.getPrecision(this.step);
168 + const precisionFactor = Math.pow(10, stepPrecision);
169 + currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
170 + }
171 +
172 + if (this.precision !== undefined) {
173 + currentValue = currentValue.toFixed(this.precision);
174 + }
175 + }
176 + return currentValue;
177 + }
178 + },
179 + methods: {
180 + toPrecision(num, precision) {
181 + if (precision === undefined) precision = this.numPrecision;
182 + return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
183 + },
184 + getPrecision(value) {
185 + if (value === undefined) return 0;
186 + const valueString = value.toString();
187 + const dotPosition = valueString.indexOf('.');
188 + let precision = 0;
189 + if (dotPosition !== -1) {
190 + precision = valueString.length - dotPosition - 1;
191 + }
192 + return precision;
193 + },
194 + _increase(val, step) {
195 + if (typeof val !== 'number' && val !== undefined) return this.currentValue;
196 + const precisionFactor = Math.pow(10, this.numPrecision);
197 + return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
198 + },
199 + _decrease(val, step) {
200 + if (typeof val !== 'number' && val !== undefined) return this.currentValue;
201 + const precisionFactor = Math.pow(10, this.numPrecision);
202 + return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
203 + },
204 + increase() {
205 + if (this.inputNumberDisabled || this.maxDisabled) return;
206 + const value = this.value || 0;
207 + const newVal = this._increase(value, this.step);
208 + this.setCurrentValue(newVal);
209 + },
210 + decrease() {
211 + if (this.inputNumberDisabled || this.minDisabled) return;
212 + const value = this.value || 0;
213 + const newVal = this._decrease(value, this.step);
214 + this.setCurrentValue(newVal);
215 + },
216 + handleBlur(event) {
217 + this.$emit('blur', event);
218 + },
219 + handleFocus(event) {
220 + this.$emit('focus', event);
221 + },
222 + setCurrentValue(newVal) {
223 + const oldVal = this.currentValue;
224 + if (typeof newVal === 'number' && this.precision !== undefined) {
225 + newVal = this.toPrecision(newVal, this.precision);
226 + }
227 + if (newVal >= this.max) newVal = this.max;
228 + if (newVal <= this.min) newVal = this.min;
229 + if (oldVal === newVal) return;
230 + this.userInput = null;
231 + this.$emit('input', newVal);
232 + this.$emit('change', newVal, oldVal);
233 + this.currentValue = newVal;
234 + },
235 + handleInput(value) {
236 + this.userInput = value;
237 + },
238 + handleInputChange(value) {
239 + const newVal = value === '' ? undefined : Number(value);
240 + if (!isNaN(newVal) || value === '') {
241 + this.setCurrentValue(newVal);
242 + }
243 + this.userInput = null;
244 + },
245 + select() {
246 + this.$refs.input.select();
247 + }
248 + },
249 + mounted() {
250 + let innerInput = this.$refs.input.$refs.input;
251 + innerInput.setAttribute('role', 'spinbutton');
252 + innerInput.setAttribute('aria-valuemax', this.max);
253 + innerInput.setAttribute('aria-valuemin', this.min);
254 + innerInput.setAttribute('aria-valuenow', this.currentValue);
255 + innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
256 + },
257 + updated() {
258 + if (!this.$refs || !this.$refs.input) return;
259 + const innerInput = this.$refs.input.$refs.input;
260 + innerInput.setAttribute('aria-valuenow', this.currentValue);
261 + }
262 + };
263 +</script>
...@@ -74,10 +74,11 @@ ...@@ -74,10 +74,11 @@
74 <script> 74 <script>
75 import Chart from '@/components/echarts/echarts-series.vue' 75 import Chart from '@/components/echarts/echarts-series.vue'
76 import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig"; 76 import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
77 - 77 +// import YlEchartsBar from "@/components/YlEcharts/YlEchartsBar"
78 export default { 78 export default {
79 components: { 79 components: {
80 - Chart 80 + Chart,
81 + // YlEchartsBar
81 }, 82 },
82 data() { 83 data() {
83 return { 84 return {
......
...@@ -71,15 +71,13 @@ ...@@ -71,15 +71,13 @@
71 </el-col> 71 </el-col>
72 <el-col :span="24"> 72 <el-col :span="24">
73 <el-form-item label="所属角色:" prop="roleIds"> 73 <el-form-item label="所属角色:" prop="roleIds">
74 - <el-checkbox-group v-model="roleid" :disabled="userFormDisabled" @change="change"> 74 + <el-checkbox-group v-model="roleid" :disabled="userFormDisabled" @change="change" style="padding-top: 6px;box-sizing: border-box;">
75 - <el-row> 75 + <span v-for="(item,i) in roleList" :key="item.id" style="vertical-align:middle;" :style="{ marginLeft: i !=0 ? '15px' : 0 }">
76 - <el-col :span="4" v-for="item in roleList" :key="item.id">
77 <el-checkbox :label="item.id"> 76 <el-checkbox :label="item.id">
78 {{ item.name }} 77 {{ item.name }}
79 <Tooltips :content="item.englishName" :refName="item.code"></Tooltips> 78 <Tooltips :content="item.englishName" :refName="item.code"></Tooltips>
80 </el-checkbox> 79 </el-checkbox>
81 - </el-col> 80 + </span>
82 - </el-row>
83 </el-checkbox-group> 81 </el-checkbox-group>
84 </el-form-item> 82 </el-form-item>
85 </el-col> 83 </el-col>
...@@ -275,6 +273,12 @@ export default { ...@@ -275,6 +273,12 @@ export default {
275 }; 273 };
276 </script> 274 </script>
277 275
278 -<style> 276 +<style lang="scss" scoped>
279 - 277 + .el-checkbox-group .el-checkbox {
278 + width: auto !important;
279 + margin-left: 15px !important;
280 +}
281 +.el-checkbox:first-child{
282 + margin-left: 0px !important;
283 +}
280 </style> 284 </style>
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form ref="dmLogForm" class="form-header" :model="selectForm" label-width="auto" size="small" 3 + <el-form
4 - @submit.native.prevent> 4 + ref="dmLogForm"
5 + class="form-header"
6 + :model="selectForm"
7 + label-width="auto"
8 + size="small"
9 + @submit.native.prevent
10 + >
5 <el-row type="flex" style="flex-wrap: wrap !important"> 11 <el-row type="flex" style="flex-wrap: wrap !important">
6 <el-col :span="6"> 12 <el-col :span="6">
7 <el-form-item label="ACCS原航班号"> 13 <el-form-item label="ACCS原航班号">
8 - <el-input v-model.trim="fltNo" class="formItem" placeholder="请输入航班号" clearable></el-input> 14 + <el-input
15 + v-model.trim="fltNo"
16 + class="formItem"
17 + placeholder="请输入航班号"
18 + clearable
19 + ></el-input>
9 </el-form-item> 20 </el-form-item>
10 </el-col> 21 </el-col>
11 <el-col :span="6"> 22 <el-col :span="6">
12 <el-form-item label="数据接收日期" prop="createTime"> 23 <el-form-item label="数据接收日期" prop="createTime">
13 - <el-date-picker v-model="selectForm.createTime" class="formItem" type="date" placeholder="选择日期" 24 + <el-date-picker
14 - :value-format="valueFormat" clearable> 25 + v-model="selectForm.createTime"
26 + class="formItem"
27 + type="date"
28 + placeholder="选择日期"
29 + :value-format="valueFormat"
30 + clearable
31 + >
15 </el-date-picker> 32 </el-date-picker>
16 </el-form-item> 33 </el-form-item>
17 </el-col> 34 </el-col>
18 <el-col :span="6"> 35 <el-col :span="6">
19 <el-form-item label="运单号"> 36 <el-form-item label="运单号">
20 - <el-input v-model="selectForm.awbNbr" class="formItem" placeholder="请输入运单号" clearable></el-input> 37 + <el-input
38 + v-model="selectForm.awbNbr"
39 + class="formItem"
40 + placeholder="请输入运单号"
41 + clearable
42 + ></el-input>
21 </el-form-item> 43 </el-form-item>
22 </el-col> 44 </el-col>
23 <el-col :span="6"> 45 <el-col :span="6">
24 <el-form-item label="处理状态级别"> 46 <el-form-item label="处理状态级别">
25 - <el-select v-model="selectForm.status" class="formItem" placeholder="不限" clearable> 47 + <el-select
48 + v-model="selectForm.status"
49 + class="formItem"
50 + placeholder="不限"
51 + clearable
52 + >
26 <el-option label="未处理" value="0"></el-option> 53 <el-option label="未处理" value="0"></el-option>
27 <el-option label="处理成功" value="1"></el-option> 54 <el-option label="处理成功" value="1"></el-option>
28 <el-option label="无需处理" value="2"></el-option> 55 <el-option label="无需处理" value="2"></el-option>
...@@ -34,52 +61,85 @@ ...@@ -34,52 +61,85 @@
34 </el-col> 61 </el-col>
35 <el-col :span="6"> 62 <el-col :span="6">
36 <el-form-item label="ACCS原航班日期"> 63 <el-form-item label="ACCS原航班日期">
37 - <el-date-picker v-model="selectForm.fltDate" class="formItem" type="date" placeholder="选择日期" 64 + <el-date-picker
38 - :value-format="valueFormat" clearable> 65 + v-model="selectForm.fltDate"
66 + class="formItem"
67 + type="date"
68 + placeholder="选择日期"
69 + :value-format="valueFormat"
70 + clearable
71 + >
39 </el-date-picker> 72 </el-date-picker>
40 </el-form-item> 73 </el-form-item>
41 </el-col> 74 </el-col>
42 <el-col :span="6"> 75 <el-col :span="6">
43 <el-form-item label="回推ACCS结果"> 76 <el-form-item label="回推ACCS结果">
44 - <el-select v-model="selectForm.sendLogSendResult" class="formItem" placeholder="不限" clearable> 77 + <el-select
45 - <el-option label="未推" value="0"> 78 + v-model="selectForm.sendLogSendResult"
46 - </el-option> 79 + class="formItem"
47 - <el-option label="推送成功" value="1"> 80 + placeholder="不限"
48 - </el-option> 81 + clearable
49 - <el-option label="推送失败" value="2"> 82 + >
50 - </el-option> 83 + <el-option label="未推" value="0"> </el-option>
84 + <el-option label="推送成功" value="1"> </el-option>
85 + <el-option label="推送失败" value="2"> </el-option>
51 </el-select> 86 </el-select>
52 </el-form-item> 87 </el-form-item>
53 </el-col> 88 </el-col>
54 </el-row> 89 </el-row>
55 <div class="ml20" style="display: flex"> 90 <div class="ml20" style="display: flex">
56 - <el-button type="primary" size="mini" icon="el-icon-search" :loading="loading" @click="selectDMData(0)">查询 91 + <el-button
92 + type="primary"
93 + size="mini"
94 + icon="el-icon-search"
95 + :loading="loading"
96 + @click="selectDMData(0)"
97 + >查询
57 </el-button> 98 </el-button>
58 </div> 99 </div>
59 </el-form> 100 </el-form>
60 - <Tables ref="dmLogTables" ductName="logDmData" :order="true" :data="data" :headerData="tableHeader" 101 + <Tables
61 - tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectForm.page" 102 + ref="dmLogTables"
62 - :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total" :loading="loading" 103 + ductName="logDmData"
63 - @currentChange="currentChange"> 104 + :order="true"
105 + :data="data"
106 + :headerData="tableHeader"
107 + tableAlign="center"
108 + :showOverflowTooltip="false"
109 + :height="tableHeight"
110 + :page="selectForm.page"
111 + :limitSize="selectForm.size"
112 + :pageSizes="[100]"
113 + :totalCount="total"
114 + :loading="loading"
115 + @currentChange="currentChange"
116 + >
64 <template v-slot:awbNbr="scope"> 117 <template v-slot:awbNbr="scope">
65 <el-link type="primary" @click="gotoWeatherTable(scope.row)"> 118 <el-link type="primary" @click="gotoWeatherTable(scope.row)">
66 - {{ 119 + {{ scope.row.awbNbr }}<i class="el-icon-link"></i>
67 - scope.row.awbNbr 120 + </el-link>
68 - }}<i class="el-icon-link"></i> </el-link>
69 </template> 121 </template>
70 <template v-slot:flightFltNo="scope"> 122 <template v-slot:flightFltNo="scope">
71 - <el-link v-if="scope.row.allocDimId" type="primary" 123 + <el-link
72 - @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1, } })"> 124 + v-if="scope.row.allocDimId"
73 - {{ 125 + type="primary"
74 - scope.row.flightFltNo 126 + @click="viewRouteConfig(scope.row)"
75 - }}<i class="el-icon-link"></i> </el-link> 127 + >
128 + {{ scope.row.flightFltNo }}<i class="el-icon-link"></i>
129 + </el-link>
76 <span v-else>{{ scope.row.flightFltNo }}</span> 130 <span v-else>{{ scope.row.flightFltNo }}</span>
77 </template> 131 </template>
78 <template v-slot:remarksDetail="scope"> 132 <template v-slot:remarksDetail="scope">
79 - <span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail 133 + <span
80 - }}</span> 134 + v-if="
135 + scope.row.remarksDetail == null || scope.row.remarksDetail == ''
136 + "
137 + >{{ scope.row.remarksDetail }}</span
138 + >
81 <div v-else> 139 <div v-else>
82 - <div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div> 140 + <div v-for="item in scope.row.remarksDetail.split('\\r\\n')">
141 + {{ item }}
142 + </div>
83 </div> 143 </div>
84 </template> 144 </template>
85 </Tables> 145 </Tables>
...@@ -100,7 +160,7 @@ export default { ...@@ -100,7 +160,7 @@ export default {
100 size: 100, 160 size: 100,
101 }, 161 },
102 data: [], 162 data: [],
103 - tableHeader: this.tableHeaders['DM'], 163 + tableHeader: this.tableHeaders["DM"],
104 portList: [], 164 portList: [],
105 rules: { 165 rules: {
106 createTime: [ 166 createTime: [
...@@ -138,7 +198,8 @@ export default { ...@@ -138,7 +198,8 @@ export default {
138 this.data = []; 198 this.data = [];
139 }, 199 },
140 mounted() { 200 mounted() {
141 - this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130; 201 + this.tableHeight =
202 + window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
142 }, 203 },
143 methods: { 204 methods: {
144 //数据查询 205 //数据查询
...@@ -151,32 +212,37 @@ export default { ...@@ -151,32 +212,37 @@ export default {
151 getDmDataList(this.selectForm).then((res) => { 212 getDmDataList(this.selectForm).then((res) => {
152 this.loading = false; 213 this.loading = false;
153 if (res.code === 200) { 214 if (res.code === 200) {
154 - this.total = res.data.total 215 + this.total = res.data.total;
155 if (res.data.total === 0) { 216 if (res.data.total === 0) {
156 - this.msgWarning('未查询到数据') 217 + this.msgWarning("未查询到数据");
157 } else { 218 } else {
158 this.data = res.data.list; 219 this.data = res.data.list;
159 } 220 }
160 } else { 221 } else {
161 - this.msgWarning(res.msg) 222 + this.msgWarning(res.msg);
162 } 223 }
163 }); 224 });
164 }, 225 },
165 //跳转流水 226 //跳转流水
166 gotoWeatherTable(val) { 227 gotoWeatherTable(val) {
167 - getDmFlowInformation('accsId=' + val.dmAccsId).then(res => { 228 + getDmFlowInformation("accsId=" + val.dmAccsId)
229 + .then((res) => {
168 if (res.code === 200) { 230 if (res.code === 200) {
169 if (res.data.list.length > 0) { 231 if (res.data.list.length > 0) {
170 - this.$router.push({ name: 'weatherTable', params: { data: res.data.list, awbNbr: val.awbNbr } }) 232 + this.$router.push({
233 + name: "weatherTable",
234 + params: { data: res.data.list, awbNbr: val.awbNbr },
235 + });
171 } else { 236 } else {
172 - this.msgWarning('未查询到该条数据的流水') 237 + this.msgWarning("未查询到该条数据的流水");
173 } 238 }
174 } else { 239 } else {
175 - this.msgWarning(res.msg) 240 + this.msgWarning(res.msg);
176 } 241 }
177 - }).catch(err => {
178 - console.log(err)
179 }) 242 })
243 + .catch((err) => {
244 + console.log(err);
245 + });
180 }, 246 },
181 //分页 247 //分页
182 currentChange(val) { 248 currentChange(val) {
...@@ -204,6 +270,20 @@ export default { ...@@ -204,6 +270,20 @@ export default {
204 item.index = index; 270 item.index = index;
205 }); 271 });
206 }, 272 },
273 + // 当前配载航班号跳转查看航线配置详情
274 + viewRouteConfig(row) {
275 + this.$router.push({
276 + path: "/routeInfo",
277 + query: {
278 + id: row.allocDimId,
279 + purposeOfFlightNo: row.flightFltNo,
280 + flightDate: row.flightFltDate,
281 + flightRouteListStr: row.currentFlightRoute,
282 + pageName: "dmLog",
283 + disable: true,
284 + },
285 + });
286 + },
207 }, 287 },
208 computed: { 288 computed: {
209 fltNo: { 289 fltNo: {
......