Showing
28 changed files
with
1113 additions
and
223 deletions
| ... | @@ -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", | ... | ... |
| ... | @@ -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> |
This diff is collapsed. Click to expand it.
| 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 | +]; |
This diff is collapsed. Click to expand it.
| 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 = [] | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -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 | /** 查询原航班顺位规则*/ | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -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 | +<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: { | ... | ... |
-
Please register or login to post a comment