Elements-SY

modify

......@@ -3,7 +3,7 @@ import request from '@/utils/request'
//查询航班航线
//查询航线
/**
* @param fltNo 航班号
* @param fltNo 航班号
*/
export function queryRouteByFltNo(data) {
return request({
......@@ -17,7 +17,7 @@ export function queryRouteByFltNo(data) {
/**
* @param purposeOfFlightNo 航班号
* @param flightDate 航班日期
* @param status 状态
* @param status 状态
* @param start 开始位置 *
* @param limit 每页长度 *
*/
......@@ -121,15 +121,12 @@ export function saveOrUpdateSpecifyDateRoute(data) {
}
// id查询目的航班
export function findByFlightId(id) {
const data = {
id
}
export function findByFlightId(data) {
return request({
url: '/destinationFlight/findByFlightId',
method: 'post',
data: data
})
url: "/destinationFlight/findByFlightId",
method: "post",
data: data,
});
}
//航班号查航班
......@@ -142,4 +139,4 @@ export function findDestinationFltRuleByActualFlight(actualFlight) {
// method: 'post',
// data: data
// })
}
\ No newline at end of file
}
......
......@@ -2,12 +2,35 @@
<el-card>
<div class="row">
<div class="col-6">
<draggable class="list-group" tag="ul" v-model="routeList" v-bind="dragOptions" @start="dragStart" @end="dragEnd">
<draggable
class="list-group"
tag="ul"
v-model="routeList"
v-bind="dragOptions"
@start="dragStart"
@end="dragEnd"
>
<transition-group type="transition" name="flip-list">
<li class="list-group-item" v-for="item in routeList" :key="item.routePriority">
<i :class="item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
" @click="item.fixed = !item.fixed" aria-hidden="true"></i>
{{ item.route }}
<li
class="list-group-item"
v-for="(item, i) in routeList"
:key="item.route"
>
<i
:class="
item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
"
@click="item.fixed = !item.fixed"
aria-hidden="true"
></i>
<span v-if="item.isEtesRoute == 'Y' || item.etesRule == 'Y'"
><i class="route-count">{{ ++i }}</i
>{{ item.route }}ET86航线】</span
>
<span v-else
><i class="route-count">{{ ++i }}</i
>{{ item.route }}</span
>
</li>
</transition-group>
</draggable>
......@@ -34,13 +57,13 @@ export default {
animation: 200,
group: "description",
disabled: false,
ghostClass: "ghost"
}
ghostClass: "ghost",
};
},
},
},
components: {
draggable
draggable,
},
data() {
return {};
......@@ -49,12 +72,12 @@ export default {
methods: {
// 排序
sort() {
this.routeList = this.routeList.sort((a, b) => a.routePriority - b.routePriority);
this.routeList = this.routeList.sort(
(a, b) => a.routePriority - b.routePriority
);
},
// 开始拖拽
dragStart() {
},
dragStart() {},
// 结束拖拽
dragEnd() {
this.$emit("dragEnd", this.routeList);
......@@ -62,48 +85,44 @@ export default {
},
};
</script>
<style lang="scss">
.el-card__body {
padding: 15px 10px 0px 10px !important;
}
.list-group {
min-height: 20px;
max-height: 150px;
overflow: auto;
margin-top: 0;
padding: 0;
&::-webkit-scrollbar {
width: 7px;
height: 7px;
}
&::-webkit-scrollbar-track {
background-color: #fff;
}
&::-webkit-scrollbar-thumb {
background-color: #ccc;
border-radius: 20px;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #409eff;
}
&::-webkit-scrollbar-track-piece {
background: #F2F6FC;
background: #f2f6fc;
}
}
.list-group-item {
cursor: move;
padding: 5px 0px;
}
.list-group-item i {
cursor: pointer;
}
.route-count {
font-family: initial;
font-style: inherit;
margin-right: 15px;
}
</style>
......
This diff is collapsed. Click to expand it.
......@@ -90,7 +90,7 @@ export const constantRoutes = [
path: "/routeInfo",
component: (resolve) =>
require([
"@/views/allocationConfig/flightAllocConfig/routeInfo",
"@/views/allocationConfig/flightAllocConfig/flightRouteInfo",
], resolve),
name: "routeInfo",
meta: { title: "航班配舱", icon: "user" },
......
......@@ -471,50 +471,45 @@ export function restTableHeight($refs) {
* })
*/
export function removeDuplicates(arr, keys) {
const dict = {};
const result = {
repeat: [],
unique: [],
};
let duplicate = keys;
let duplicate, dateTime;
if (typeof keys == "object") {
duplicate = keys.duplicate;
dateTime = keys.dateTime;
}
// 去重
result.unique = arr.reduce((res, currentValue) => {
if (!dict[currentValue[duplicate]]) {
dict[currentValue[duplicate]] = true;
res.push(currentValue);
} else {
result.repeat.push(currentValue);
let map = new Map();
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (
!map.has(item[duplicate]) ||
new Date(map.get(item[duplicate])[dateTime]) < new Date(item[dateTime])
) {
map.set(item[duplicate], item);
}
return res;
}, []);
}
const result = Array.from(map.values());
// 返回去重结果
if (typeof keys == "string") return result;
// 排序
if (typeof keys == "object") {
if (keys.sort) {
if (keys.sortType.toLowerCase().trim() == "number") {
if (result.repeat.length) {
result.repeat = sortFn("repeat");
}
if (result.unique.length) {
result.unique = sortFn("unique");
if (result.length) {
result = sortFn();
}
// 返回排序去重结果
}
}
return result;
return result;
}
// 排序方法
function sortFn(attr) {
if (isNaN(Number(result[attr][0][keys.sortAttr]))) {
return result[attr].sort((a, b) =>
function sortFn() {
if (isNaN(Number(result[0][keys.sortAttr]))) {
return result.sort((a, b) =>
a[keys.sortAttr].localeCompare(b[keys.sortAttr])
); // 按字母排序
} else {
return result[attr].sort((a, b) => a[keys.sortAttr] - b[keys.sortAttr]); // 按数字排序
return result.sort((a, b) => a[keys.sortAttr] - b[keys.sortAttr]); // 按数字排序
}
}
}
......
......@@ -8,6 +8,7 @@ export const formConfig = [
span: 5,
trigger: "blur",
labelWidth: "55px",
disable: false,
},
{
label: "航班日期",
......@@ -18,6 +19,8 @@ export const formConfig = [
format: "yyyy-MM-dd",
colWidth: "23%",
inputWidth: "100%",
disable: false,
hidden: false,
},
{
label: "航线",
......@@ -28,6 +31,8 @@ export const formConfig = [
span: 5,
labelWidth: "40px",
trigger: "blur", // 事件名
disable: false,
hidden: false,
},
{
label: "航线优先级",
......@@ -43,8 +48,10 @@ export const formConfig = [
// 航线规则表单
export const routeRuleForm = {
config: true,
remark: true,
purposeOfFlightNo: "LP001",
flightRoute: "", // 飞行航线
routeSpecifyDateSeq: "", // 航线优先级
declarationCategory: "",
location: null, // 包含始发站
notLocation: null, // 不包含始发站
destinationSite: null, // 包含目的站
......
<template>
<div>
<el-form ref="flightAllocForm" :model="queryParams" class="form-header" size="small" label-position="right"
label-width="auto" @submit.native.prevent>
<el-form
ref="flightAllocForm"
:model="queryParams"
class="form-header"
size="small"
label-position="right"
label-width="auto"
@submit.native.prevent
>
<el-row>
<el-col :span="6">
<el-form-item label="航班号">
<el-input class="formItem" v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList">
<el-input
class="formItem"
v-model.trim="purposeOfFlightNo"
placeholder="航班号"
@keyup.enter.native="getList"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班日期">
<el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable :disabled="queryParams.querySpecifyData == '2'">
<el-date-picker
class="formItem"
v-model="queryParams.flightDate"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
clearable
:disabled="queryParams.querySpecifyData == '2'"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态">
<el-select class="formItem" v-model="queryParams.status" placeholder="状态">
<el-select
class="formItem"
v-model="queryParams.status"
placeholder="状态"
>
<el-option label="有效" value="1"></el-option>
<el-option label="停用" value="3"></el-option>
</el-select>
......@@ -26,34 +49,76 @@
</el-col>
</el-row>
<div>
<el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button>
<el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']"
@click="
$router.push({
name: 'FlightAllocConfigInfo',
params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' },
})
">添加</el-button>
<el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1"
inactive-value="2" active-color="#13ce66" inactive-color="#909399" @change="switchChange"></el-switch>
<el-button
type="primary"
icon="el-icon-search"
:loading="loading"
@click="getList"
size="mini"
>查询</el-button
>
<el-button
class="mb20"
type="primary"
icon="el-icon-plus"
size="mini"
v-hasPermi="['allocation:alloc:add']"
@click="addFlightRouteConfig"
>添加</el-button
>
<el-switch
style="margin-left: 10px"
v-model="queryParams.querySpecifyData"
inactive-text="日期查询"
active-value="1"
inactive-value="2"
active-color="#13ce66"
inactive-color="#909399"
@change="switchChange"
></el-switch>
</div>
</el-form>
<Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true"
:totalCount="total" :loading="loading" :limitSize="queryParams.limit" :limitStart="queryParams.start"
:page="curPage" :pageSizes="[20]" :height="tableHeight" @currentChange="currentChange">
<Tables
ref="newTables"
ductName="FlightAlloc"
:data="flyList"
:headerData="tableHeaders['flightAlloc']"
:order="true"
:totalCount="total"
:loading="loading"
:limitSize="queryParams.limit"
:limitStart="queryParams.start"
:page="curPage"
:pageSizes="[20]"
:height="tableHeight"
@currentChange="currentChange"
>
<template v-slot:ruleDate="scope">
<el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)">
{{
scope.row.ruleDate
}}<i class="el-icon-link"></i> </el-link>
<el-link
v-if="scope.row.ruleDate"
type="primary"
@click="toRouteOrder(scope.row)"
>
{{ scope.row.ruleDate }}<i class="el-icon-link"></i>
</el-link>
</template>
<template slot="optionColumn">
<el-table-column label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row, 'view')">查看
<el-button
type="text"
size="mini"
icon="el-icon-view"
@click="handleClick(scope.row, 'view')"
>查看
</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row, 'edit')">修改
<el-button
type="text"
size="mini"
icon="el-icon-edit"
v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row, 'edit')"
>修改
</el-button>
<!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
......@@ -70,22 +135,20 @@
</template>
<script>
import {
findFlightDimRuleByFlightNo
} from "@/api/destinationFlight";
import Dialog from './dialog.vue'
import { findFlightDimRuleByFlightNo } from "@/api/destinationFlight";
import Dialog from "./dialog.vue";
export default {
name: "FlightAllocConfig",
components: {
Dialog
Dialog,
},
data() {
return {
queryParams: {
purposeOfFlightNo: null,
flightDate: undefined,
querySpecifyData: '2',
querySpecifyData: "2",
status: "1",
start: 0,
limit: 20,
......@@ -113,13 +176,14 @@ export default {
// })
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200
this.tableHeight =
window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
},
activated() {
this.getList()
this.getList();
},
deactivated() {
this.flyList = []
this.flyList = [];
},
methods: {
getList() {
......@@ -129,18 +193,35 @@ export default {
this.queryParams.start = 0;
}
this.loading = true;
findFlightDimRuleByFlightNo(this.queryParams).then(res => {
this.loading = false
if (res.code === 200) {
this.flyList = res.data.list
this.total = res.data.totalCount
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
findFlightDimRuleByFlightNo(this.queryParams)
.then((res) => {
this.loading = false;
if (res.code === 200) {
this.flyList = res.data.list;
this.total = res.data.totalCount;
} else {
this.msgWarning(res.msg);
}
})
.catch((err) => {
this.loading = false;
console.log(err);
});
},
// 添加
addFlightRouteConfig() {
this.$router.push({
path: "/routeInfo",
query: {
flightDate: '', // 跳转的时候默认当天日期
purposeOfFlightNo: '',
flightRouteListStr: '',
status: '',
pageName: "flightAllocConfig",
dataStatus: "add",
disable: '',
},
});
},
//跳转到查看,修改页面
handleClick({ purposeOfFlightNo, ruleDate, flightRoute, status }, name) {
......@@ -153,7 +234,8 @@ export default {
status: status,
pageName: "flightAllocConfig",
dataStatus: name,
querySpecifyData: this.queryParams.querySpecifyData
querySpecifyData: this.queryParams.querySpecifyData,
disable: true,
},
});
},
......@@ -161,25 +243,25 @@ export default {
toRouteOrder(val) {
this.colData = {
fltNo: val.purposeOfFlightNo,
fltDate: val.ruleDate
}
this.open = true
fltDate: val.ruleDate,
};
this.open = true;
},
//开关改变
switchChange(val) {
if (val == '2') {
this.queryParams.flightDate = undefined
if (val == "2") {
this.queryParams.flightDate = undefined;
}
},
close() {
this.open = false
this.open = false;
},
//翻页
currentChange(val) {
this.curPage = val.page
this.curPage = val.page;
this.queryParams.start = val.start;
this.getList();
}
},
},
computed: {
purposeOfFlightNo: {
......@@ -193,5 +275,3 @@ export default {
},
};
</script>
......
export const routeData1 = {
code: 200,
msg: "操作成功",
data: {
list: [
{
id: 3337,
createTime: "2023-09-21 09:50:01",
createUserId: "5749",
createUserName: "wjh",
updateTime: null,
updateUserName: null,
purposeOfFlightNo: "JC001",
location: null,
includeUrsa: "P_",
notIncludeUrsa: null,
minNumOfPieces: null,
maxNumOfPieces: null,
minWeight: null,
maxWeight: null,
serviceCode: null,
declarationCategory: null,
typeOfGoods: null,
subCategory: null,
status: "1",
whetherHistory: "0",
historyId: null,
updateUserId: null,
notLocation: null,
handlingCode: null,
portName: "PVG",
puporpuxCode: null,
flightRoute: "USA",
routePriority: "1",
ruleDate: "2023-09-21",
routeSpecifyDateSeq: "USA;SEYB",
destinationSite: null,
notDestinationSite: null,
},
{
id: 3338,
createTime: "2023-09-21 09:50:03",
createUserId: "5749",
createUserName: "wjh",
updateTime: null,
updateUserName: null,
purposeOfFlightNo: "JC001",
location: null,
includeUrsa: "P_",
notIncludeUrsa: null,
minNumOfPieces: null,
maxNumOfPieces: null,
minWeight: null,
maxWeight: null,
serviceCode: null,
declarationCategory: null,
typeOfGoods: null,
subCategory: null,
status: "1",
whetherHistory: "0",
historyId: null,
updateUserId: null,
notLocation: null,
handlingCode: null,
portName: "PVG",
puporpuxCode: null,
flightRoute: "SEYB",
routePriority: "2",
ruleDate: "2023-09-21",
routeSpecifyDateSeq: "USA;SEYB",
destinationSite: null,
notDestinationSite: null,
},
],
routeList: [
{
fltNo: "JC001",
route: "USA",
routePriority: "1",
},
{
fltNo: "JC001",
route: "SEYB",
routePriority: "2",
},
],
},
};
export const routeData2 = {
code: 200,
msg: "操作成功",
data: {
list: [
{
id: 3335,
createTime: "2023-09-21 09:49:40",
createUserId: "5749",
createUserName: "wjh",
updateTime: "2023-09-21 09:56:12",
updateUserName: "wjh",
purposeOfFlightNo: "JC001",
location: null,
includeUrsa: "P_",
notIncludeUrsa: null,
minNumOfPieces: null,
maxNumOfPieces: null,
minWeight: null,
maxWeight: null,
serviceCode: null,
declarationCategory: null,
typeOfGoods: null,
subCategory: null,
status: "1",
whetherHistory: "0",
historyId: null,
updateUserId: 5749,
notLocation: null,
handlingCode: null,
portName: "PVG",
puporpuxCode: null,
flightRoute: "USA",
routePriority: "1",
ruleDate: null,
routeSpecifyDateSeq: "USA;SEYB;LKE",
destinationSite: null,
notDestinationSite: null,
},
{
id: 3336,
createTime: "2023-09-21 09:49:46",
createUserId: "5749",
createUserName: "wjh",
updateTime: "2023-09-21 09:56:12",
updateUserName: "wjh",
purposeOfFlightNo: "JC001",
location: null,
includeUrsa: "P_",
notIncludeUrsa: null,
minNumOfPieces: null,
maxNumOfPieces: null,
minWeight: null,
maxWeight: null,
serviceCode: null,
declarationCategory: null,
typeOfGoods: null,
subCategory: null,
status: "1",
whetherHistory: "0",
historyId: null,
updateUserId: 5749,
notLocation: null,
handlingCode: null,
portName: "PVG",
puporpuxCode: null,
flightRoute: "SEYB",
routePriority: "2",
ruleDate: null,
routeSpecifyDateSeq: "USA;SEYB;LKE",
destinationSite: null,
notDestinationSite: null,
},
],
routeList: [
{
fltNo: "JC001",
route: "USA",
routePriority: "1",
},
{
fltNo: "JC001",
route: "SEYB",
routePriority: "2",
},
{
fltNo: "JC001",
route: "LKE",
routePriority: "3",
},
],
},
};
......@@ -285,6 +285,7 @@ export default {
flightRouteListStr: route,
status: "",
pageName: "flightRandConfig",
disable: true,
},
});
},
......
......@@ -803,10 +803,7 @@ export default {
if (latestView) {
this.$router.push(latestView.fullPath);
} else {
// now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs.
if (view.name === "Dashboard") {
// to reload home page
this.$router.replace({ path: "/redirect" + view.fullPath });
} else {
this.$router.push("/");
......
<template>
<div>
<el-form ref="dmLogForm" class="form-header" :model="selectForm" label-width="auto" size="small"
@submit.native.prevent>
<el-form
ref="dmLogForm"
class="form-header"
:model="selectForm"
label-width="auto"
size="small"
@submit.native.prevent
>
<el-row type="flex" style="flex-wrap: wrap !important">
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input v-model.trim="fltNo" class="formItem" placeholder="请输入航班号" clearable></el-input>
<el-input
v-model.trim="fltNo"
class="formItem"
placeholder="请输入航班号"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="数据接收日期" prop="createTime">
<el-date-picker v-model="selectForm.createTime" class="formItem" type="date" placeholder="选择日期"
:value-format="valueFormat" clearable>
<el-date-picker
v-model="selectForm.createTime"
class="formItem"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
clearable
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input v-model="selectForm.awbNbr" class="formItem" placeholder="请输入运单号" clearable></el-input>
<el-input
v-model="selectForm.awbNbr"
class="formItem"
placeholder="请输入运单号"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="处理状态级别">
<el-select v-model="selectForm.status" class="formItem" placeholder="不限" clearable>
<el-select
v-model="selectForm.status"
class="formItem"
placeholder="不限"
clearable
>
<el-option label="未处理" value="0"></el-option>
<el-option label="处理成功" value="1"></el-option>
<el-option label="无需处理" value="2"></el-option>
......@@ -34,52 +61,85 @@
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker v-model="selectForm.fltDate" class="formItem" type="date" placeholder="选择日期"
:value-format="valueFormat" clearable>
<el-date-picker
v-model="selectForm.fltDate"
class="formItem"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
clearable
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="回推ACCS结果">
<el-select v-model="selectForm.sendLogSendResult" class="formItem" placeholder="不限" clearable>
<el-option label="未推" value="0">
</el-option>
<el-option label="推送成功" value="1">
</el-option>
<el-option label="推送失败" value="2">
</el-option>
<el-select
v-model="selectForm.sendLogSendResult"
class="formItem"
placeholder="不限"
clearable
>
<el-option label="未推" value="0"> </el-option>
<el-option label="推送成功" value="1"> </el-option>
<el-option label="推送失败" value="2"> </el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div class="ml20" style="display: flex">
<el-button type="primary" size="mini" icon="el-icon-search" :loading="loading" @click="selectDMData(0)">查询
<el-button
type="primary"
size="mini"
icon="el-icon-search"
:loading="loading"
@click="selectDMData(0)"
>查询
</el-button>
</div>
</el-form>
<Tables ref="dmLogTables" ductName="logDmData" :order="true" :data="data" :headerData="tableHeader"
tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectForm.page"
:limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total" :loading="loading"
@currentChange="currentChange">
<Tables
ref="dmLogTables"
ductName="logDmData"
:order="true"
:data="data"
:headerData="tableHeader"
tableAlign="center"
:showOverflowTooltip="false"
:height="tableHeight"
:page="selectForm.page"
:limitSize="selectForm.size"
:pageSizes="[100]"
:totalCount="total"
:loading="loading"
@currentChange="currentChange"
>
<template v-slot:awbNbr="scope">
<el-link type="primary" @click="gotoWeatherTable(scope.row)">
{{
scope.row.awbNbr
}}<i class="el-icon-link"></i> </el-link>
{{ scope.row.awbNbr }}<i class="el-icon-link"></i>
</el-link>
</template>
<template v-slot:flightFltNo="scope">
<el-link v-if="scope.row.allocDimId" type="primary"
@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, } })">
{{
scope.row.flightFltNo
}}<i class="el-icon-link"></i> </el-link>
<el-link
v-if="scope.row.allocDimId"
type="primary"
@click="viewRouteConfig(scope.row)"
>
{{ scope.row.flightFltNo }}<i class="el-icon-link"></i>
</el-link>
<span v-else>{{ scope.row.flightFltNo }}</span>
</template>
<template v-slot:remarksDetail="scope">
<span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail
}}</span>
<span
v-if="
scope.row.remarksDetail == null || scope.row.remarksDetail == ''
"
>{{ scope.row.remarksDetail }}</span
>
<div v-else>
<div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div>
<div v-for="item in scope.row.remarksDetail.split('\\r\\n')">
{{ item }}
</div>
</div>
</template>
</Tables>
......@@ -100,7 +160,7 @@ export default {
size: 100,
},
data: [],
tableHeader: this.tableHeaders['DM'],
tableHeader: this.tableHeaders["DM"],
portList: [],
rules: {
createTime: [
......@@ -122,14 +182,14 @@ export default {
},
created() {
this.selectForm.createTime = this.nowDate();
// this.$nextTick(()=>{
// let height = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
// if(height < 300){
// this.tableHeight = 300;
// }else{
// this.tableHeight = height;
// }
// })
// this.$nextTick(()=>{
// let height = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
// if(height < 300){
// this.tableHeight = 300;
// }else{
// this.tableHeight = height;
// }
// })
},
activated() {
this.selectDMData();
......@@ -138,7 +198,8 @@ export default {
this.data = [];
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
this.tableHeight =
window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
},
methods: {
//数据查询
......@@ -151,32 +212,37 @@ export default {
getDmDataList(this.selectForm).then((res) => {
this.loading = false;
if (res.code === 200) {
this.total = res.data.total
this.total = res.data.total;
if (res.data.total === 0) {
this.msgWarning('未查询到数据')
this.msgWarning("未查询到数据");
} else {
this.data = res.data.list;
}
} else {
this.msgWarning(res.msg)
this.msgWarning(res.msg);
}
});
},
//跳转流水
gotoWeatherTable(val) {
getDmFlowInformation('accsId=' + val.dmAccsId).then(res => {
if (res.code === 200) {
if (res.data.list.length > 0) {
this.$router.push({ name: 'weatherTable', params: { data: res.data.list, awbNbr: val.awbNbr } })
getDmFlowInformation("accsId=" + val.dmAccsId)
.then((res) => {
if (res.code === 200) {
if (res.data.list.length > 0) {
this.$router.push({
name: "weatherTable",
params: { data: res.data.list, awbNbr: val.awbNbr },
});
} else {
this.msgWarning("未查询到该条数据的流水");
}
} else {
this.msgWarning('未查询到该条数据的流水')
this.msgWarning(res.msg);
}
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
})
.catch((err) => {
console.log(err);
});
},
//分页
currentChange(val) {
......@@ -204,6 +270,20 @@ export default {
item.index = index;
});
},
// 当前配载航班号跳转查看航线配置详情
viewRouteConfig(row) {
this.$router.push({
path: "/routeInfo",
query: {
id: row.allocDimId,
purposeOfFlightNo: row.flightFltNo,
flightDate: row.flightFltDate,
flightRouteListStr: row.currentFlightRoute,
pageName: "dmLog",
disable: true,
},
});
},
},
computed: {
fltNo: {
......