Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-10-23 15:34:19 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
d87af8a65fe9d0527ff0ccc43078fde082f42e1f
d87af8a6
2 parents
59bacccd
0cb645bb
Merge branch 'et86-black' into uat
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
87 deletions
src/utils/mixins.js
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/formConfig.js
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/views/allocationConfig/flightAllocConfig/mixins/index.js
src/views/allocationConfig/flightRandConfig/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/et86Config/et86RuleConfig/edit/index.vue
src/views/et86Config/et86RuleConfig/edit/mixins/index.js
src/views/systemLog/dmLog/index.vue
src/utils/mixins.js
View file @
d87af8a
This diff is collapsed. Click to expand it.
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/formConfig.js
View file @
d87af8a
...
...
@@ -25,8 +25,8 @@ export const formConfig = [
{
label
:
"航线"
,
type
:
"Input"
,
name
:
"
flightRouteList
Str"
,
prop
:
"
flightRouteList
Str"
,
name
:
"
routes
Str"
,
prop
:
"
routes
Str"
,
placeholder
:
""
,
span
:
6
,
labelWidth
:
"40px"
,
...
...
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
View file @
d87af8a
...
...
@@ -69,7 +69,7 @@ import {
enableOrDisable, // 开启/停用航线规则设置
batchUpdateOrAddFlight, // 航班航线优先级更新
queryRouteByFltNo, // 通过航班号查询航线
} from "@/api/destinationFlight"
;
} from "@/api/destinationFlight"
import indexMixins from "../mixins";
export default {
components: {
...
...
@@ -101,31 +101,45 @@ export default {
serviceCode: [], // Service Code
handlingCode: [], // Handling Code
subCategory: [], // Sub Category
flightRouteList: [], // 航班信息维护查询
};
},
/*
判断有日期的找到了就走有日期的,如果日期级别的没有找到再去走一次普通级别的接口
*/
created() {
this.getAllDictData();
// 获取全部字典
this.getAllDictData();
const parmas = {
querySpecifyData: this.$route.query.querySpecifyData || "", // 查询特殊数据字段 1、2
purposeOfFlightNo: this.$route.query.purposeOfFlightNo || "", // 航班号
flightDate: this.$route.query.flightDate || "", // 飞行日期
flightRouteListStr: this.$route.query.flightRouteListStr || "", // 飞行航线集合
routesStr: this.$route.query.routesStr || "", // 从航班信息维护查看维度过来作为接收回显
status: this.$route.query.status || "", // 状态:0 无效、1 有效、2 配置中、3 停用
dataStatus: this.$route.query.dataStatus || "", // add 、edit、view
flightKindName: this.$route.query.flightKindName || "", // 航班种类White Tail 、Purple Tail
pageName: this.$route.query.pageName || "", // flightAllocConfig、flightInformationMaintenance、flightRandConfig、dmLog
id: this.$route.query.id || "",
};
this.queryForm = this.$route.query;
// 指定隐藏或显示From表单域
this.hiddenFormItem(parmas);
//
queryCondition
只负责接收参数和接口调用
// 只负责接收参数和接口调用
this.queryCondition(parmas);
},
mounted() {},
methods: {
// 航班信息维护查询
queryFindAllFltDataApi(parmas) {
findAllFltDataApi(parmas)
.then((res) => {
const { code, data, msg } = res;
if(code == 200){
this.flightRouteList = data.list;
}
})
.catch((error) => {});
},
// 【通过航班号查询航线】
getQueryRouteByFltNo(parmas) {
queryRouteByFltNo(parmas)
...
...
@@ -211,6 +225,22 @@ export default {
return;
}
}
/*
日期级别:
处理routeSpecifyDateSeq
*/
if (item.createTime && this.queryForm.flightDate) {
let routeSpecifyDate = this.routeSpecifyDateSeq.filter(
(item) => item.etesRule == "N"
);
let routes = [];
if (routeSpecifyDate.length) {
routeSpecifyDate.map((item) => {
routes.push(item.route);
});
parmas.routeSpecifyDateSeq = routes.join(";");
}
}
// 校验表单域的选项
let validate = validateForm.some((key) => parmas[key]);
if (validate) {
...
...
src/views/allocationConfig/flightAllocConfig/mixins/index.js
View file @
d87af8a
...
...
@@ -12,6 +12,7 @@ export default {
queryForm
:
{
// 表单参数
},
routeSpecifyDateSeq
:
[],
// 日期级别航班顺位
};
},
computed
:
{
...
...
@@ -103,20 +104,19 @@ export default {
noDateParmas
:
this
.
noDateParmas
,
});
}
_this
.
queryForm
=
_this
.
$route
.
query
;
// 获取跳转过来的参数
},
},
// 航班信息维护
flightInformationMaintenance
:
{
noDateParmas
:
{
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
flightRouteListStr
:
parmas
.
flightRouteListStr
,
flightRouteListStr
:
this
.
$route
.
query
.
flightRouteListStr
,
status
:
""
,
},
dateParmas
:
{
purposeOfFlightNo
:
parmas
.
purposeOfFlightNo
,
flightDate
:
parmas
.
flightDate
,
flightRouteListStr
:
parmas
.
flightRouteListStr
,
flightRouteListStr
:
this
.
$route
.
query
.
flightRouteListStr
,
status
:
""
,
},
queryParmas
:
function
()
{
...
...
@@ -226,6 +226,18 @@ export default {
let
noDateRouteList
=
data
.
routeList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
);
// 航班信息维护从非日期级别拿数据时要删掉id 和 historyId
if
(
this
.
$route
.
query
.
flightKindName
==
"Purple Tail"
||
this
.
$route
.
query
.
flightKindName
==
"White Tail"
||
this
.
$route
.
query
.
querySpecifyData
==
"1"
)
{
data
.
list
.
map
((
item
)
=>
{
delete
item
.
id
;
delete
item
.
historyId
;
return
item
;
});
}
// 普通级别航班航线维度规则详情
const
noDateDataList
=
removeDuplicates
(
data
.
list
,
{
duplicate
:
"flightRoute"
,
// 去重字段
...
...
@@ -270,6 +282,7 @@ export default {
return
;
}
let
dateDataLists
=
data
.
routeList
;
// 只负责展示航线优先级
this
.
routeSpecifyDateSeq
=
data
.
routeList
;
// 日期级别航班顺位
// 航班航线基本信息(过滤ET86航线的)
let
dateRouteList
=
data
.
routeList
.
filter
(
(
item
)
=>
item
.
etesRule
==
"N"
...
...
@@ -422,9 +435,6 @@ export default {
);
});
this
.
routesInfo
=
mergeDateRouteInfo
;
// 航班航线配置信息列表
if
(
this
.
$route
.
query
.
flightKindName
==
"Purple Tail"
)
{
this
.
showFlightKind
(
dateDataLists
);
}
this
.
pageLoading
=
false
;
}
else
{
// 当前航线有缺省的航线配置
...
...
@@ -545,7 +555,6 @@ export default {
this
.
setattrVal
(
item
);
// 设置属性值
}
});
this
.
routeList
=
dateRouteList
;
// 航线优先级
// 查找包含的航线并且按照dateList航线排序
dateList
.
sort
((
a
,
b
)
=>
{
return
(
...
...
@@ -554,49 +563,12 @@ export default {
);
});
if
(
this
.
$route
.
query
.
flightKindName
==
"Purple Tail"
)
{
let
flightRouteListStr
=
this
.
$route
.
query
.
flightRouteListStr
.
split
(
";"
);
// 跳转传过来的航线
// 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
let
inRoutes
=
dateDataLists
.
filter
((
item
)
=>
flightRouteListStr
.
includes
(
item
.
route
))
.
sort
(
(
a
,
b
)
=>
flightRouteListStr
.
indexOf
(
a
.
route
)
-
flightRouteListStr
.
indexOf
(
b
.
route
)
);
// 处理航线优先级展示ET86
let
routes
=
[];
inRoutes
.
map
((
item
,
i
,
arr
)
=>
{
if
(
arr
[
i
].
etesRule
==
"Y"
)
{
routes
.
push
(
`
${
arr
[
i
].
route
}
(ET86)`
);
}
else
{
routes
.
push
(
arr
[
i
].
route
);
}
});
// 把处理ET86航线优先级展示
this
.
queryForm
.
flightRouteListStr
=
routes
.
join
(
";"
);
// 跳转传过来的对应的航线把ET86航线的过滤掉
let
noEtesRoutes
=
inRoutes
.
filter
((
item
)
=>
item
.
etesRule
==
"N"
);
let
noRoutes
=
dateList
.
filter
((
item
)
=>
{
return
noEtesRoutes
.
some
((
el
)
=>
el
.
route
===
item
.
route
);
});
const
result
=
noRoutes
.
filter
((
item2
)
=>
{
return
noEtesRoutes
.
some
((
item1
)
=>
{
return
item1
.
route
===
item2
.
route
;
});
})
.
sort
((
a
,
b
)
=>
{
return
(
noEtesRoutes
.
findIndex
((
item
)
=>
item
.
route
===
a
.
route
)
-
noEtesRoutes
.
findIndex
((
item
)
=>
item
.
route
===
b
.
route
)
);
});
// this.defaultRouteData(result) // 默认航线配置信息数据;
this
.
routesInfo
=
result
;
this
.
routeList
=
dateRouteList
;
// 航线优先级
this
.
routesInfo
=
dateList
;
this
.
pageLoading
=
false
;
}
else
{
this
.
queryForm
=
this
.
$route
.
query
;
// 获取跳转过来的参数
this
.
routeList
=
dateRouteList
;
// 航线优先级
this
.
routesInfo
=
dateList
;
this
.
pageLoading
=
false
;
}
...
...
@@ -618,29 +590,6 @@ export default {
});
return
routesInfo
;
},
// 处理跳转显示航线种类
showFlightKind
(
dateDataLists
)
{
let
flightRouteListStr
=
this
.
$route
.
query
.
flightRouteListStr
.
split
(
";"
);
// 跳转传过来的航线
// 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
let
inRoutes
=
dateDataLists
.
filter
((
item
)
=>
flightRouteListStr
.
includes
(
item
.
route
))
.
sort
(
(
a
,
b
)
=>
flightRouteListStr
.
indexOf
(
a
.
route
)
-
flightRouteListStr
.
indexOf
(
b
.
route
)
);
// 处理航线优先级展示ET86
let
routes
=
[];
inRoutes
.
map
((
item
,
i
,
arr
)
=>
{
if
(
arr
[
i
].
etesRule
==
"Y"
)
{
routes
.
push
(
`
${
arr
[
i
].
route
}
(ET86)`
);
}
else
{
routes
.
push
(
arr
[
i
].
route
);
}
});
// 把处理ET86航线优先级展示
this
.
queryForm
.
flightRouteListStr
=
routes
.
join
(
";"
);
},
// 整合飞行航线配置信息
mergeFlightRouteConfigObj
(
routeList
,
dataList
)
{
if
(
dataList
.
length
)
{
...
...
src/views/allocationConfig/flightRandConfig/index.vue
View file @
d87af8a
...
...
@@ -283,6 +283,7 @@ export default {
flightDate: flightDate,
purposeOfFlightNo: actualFlight,
flightRouteListStr: route,
routesStr: route,
status: "",
pageName: "flightRandConfig",
disable: true,
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
d87af8a
...
...
@@ -1341,12 +1341,29 @@ export default {
);
return;
}
queryRouteByFltNo({ fltNo: row.fltNo })
.then((res) => {
const { code, data, msg } = res;
if (code === 200) {
if (data.list.length) {
let include = data.list.filter((item) =>
row.route.split(";").some((val) => val == item.route)
); // 查询已被勾选的
let routes = [];
include.map((item, i, arr) => {
if (arr[i].isEtesRoute == "Y") {
routes.push(`${arr[i].route}(ET86)`);
} else {
routes.push(arr[i].route);
}
});
this.$router.push({
path: "/routeInfo",
query: {
flightDate: row.fltDate,
purposeOfFlightNo: row.fltNo,
flightRouteListStr: row.route,
routesStr: routes.join(";"),
status: row.status,
flightKindName: row.flightKindName,
pageName: "flightInformationMaintenance",
...
...
@@ -1354,6 +1371,17 @@ export default {
},
});
}
if (data.list.length == 0) {
this.msgError("该航班没有设置航线");
}
} else {
this.msgWarning(res.msg);
}
})
.catch((err) => {
console.log(err);
});
}
})
.catch(() => {});
},
...
...
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
d87af8a
...
...
@@ -716,6 +716,7 @@ export default {
this.id++;
this.tableData.unshift({
id: this.id,
statusMark: true, // 作为是否为新增
flightNo: "", // 航班号
calculateDay: "", // 航班日期//+1 -1
flightRoute: "", // 航线
...
...
@@ -735,7 +736,7 @@ export default {
},
// 删除
deleBtn(item, $index) {
console.log("删除:", item, $index);
//
console.log("删除:", item, $index);
this.tableData.splice($index, 1);
},
// 类别
...
...
@@ -752,22 +753,37 @@ export default {
this.queryForm.originOfFlightNo
);
},
/*
如果是编辑,那么添加航班顺位时
*/
// 表单提交
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid && this.validateForm) {
this.tableData.map((item, i) => {
item.priority = ++i;
});
// 爆仓是否继续配舱
const newtTableData = JSON.parse(JSON.stringify(this.tableData));
const tableData = newtTableData;
tableData.filter((item) => {
tableData.map((item, i) => {
// 爆仓是否继续配舱
if (item.permitOverweight == false) {
item.permitOverweight = "N";
} else {
item.permitOverweight = "Y";
}
// // 作为是否为新增
// if (item.hasOwnProperty("statusMark")) {
// delete item.id;
// }
if (item.hasOwnProperty("routeList")) {
delete item.routeList;
}
item.priority = ++i;
return item;
});
// 新增时没有id说明有statusMark字段,则删除statusMark属性
tableData.map((item) => {
if (!item.hasOwnProperty("id")) {
delete item.statusMark;
}
});
// 校验ET86配舱航班顺位维度
let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号
...
...
@@ -817,11 +833,6 @@ export default {
this.postAdd(queryParmas); // 新增
} else {
if (this.validateForm) {
queryParmas.flightRankDtoList.map((item) => {
if (item.hasOwnProperty("routeList")) {
delete item.routeList;
}
});
this.postUpdate(queryParmas); // 修改
}
}
...
...
src/views/et86Config/et86RuleConfig/edit/mixins/index.js
View file @
d87af8a
...
...
@@ -111,7 +111,7 @@ export default {
}
}
},
// Ursa校验
使用JavaScript写一个匹配字母的表达式
// Ursa校验
validateUrsa
(
ursaMark
,
ursa
)
{
// 分隔字符串并且转数组&去除数组空字符串
let
ursaList
=
ursa
.
split
(
";"
).
filter
((
str
)
=>
str
!==
""
);
...
...
src/views/systemLog/dmLog/index.vue
View file @
d87af8a
...
...
@@ -279,6 +279,7 @@ export default {
purposeOfFlightNo: row.flightFltNo,
flightDate: row.flightFltDate,
flightRouteListStr: row.currentFlightRoute,
routesStr: row.currentFlightRoute,
pageName: "dmLog",
disable: true,
},
...
...
Please
register
or
login
to post a comment