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-07 11:22:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d55a1de839d98ee2bca9313fb4efa70db20f8f49
d55a1de8
1 parent
275535c5
modify
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
26 deletions
src/api/destinationFlight.js
src/views/allocationConfig/flightAllocConfig/components/routeInfo.vue
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/api/destinationFlight.js
View file @
d55a1de
...
...
@@ -74,17 +74,13 @@ export function delFlightId(id) {
}
//启用/停止规则
export
function
enableOrDisable
(
id
,
status
)
{
export
function
enableOrDisable
(
data
)
{
//statsu 1-有效 3-停用
const
data
=
{
id
,
status
}
return
request
({
url
:
'/destinationFlight/enableOrDisable'
,
method
:
'post'
,
data
:
data
})
url
:
"/destinationFlight/enableOrDisable"
,
method
:
"post"
,
data
:
data
,
})
;
}
//获取全部字典
...
...
src/views/allocationConfig/flightAllocConfig/components/routeInfo.vue
View file @
d55a1de
...
...
@@ -28,7 +28,7 @@
size="mini"
:disabled="pageName || item.status == '3' || status"
:loading="item.loading"
@click="saveSubmit(item)"
@click="saveSubmit(item
, index
)"
>保 存</el-button
>
<el-button
...
...
@@ -38,7 +38,7 @@
icon="el-icon-video-pause"
:loading="item.loading"
:disabled="pageName || status"
@click="onOffSubmit(item)"
@click="onOffSubmit(item
, index
)"
>{{ item.status | statusBtn }}</el-button
>
<el-button
...
...
@@ -48,7 +48,7 @@
icon="el-icon-delete"
:disabled="pageName || item.status !== '3' || status"
:loading="item.loading"
@click="deleteSubmit(item)"
@click="deleteSubmit(item
, index
)"
>删 除</el-button
>
<span class="flight-route-title">
...
...
@@ -593,16 +593,16 @@ export default {
this.$emit("addRlue", index);
},
// 保存
saveSubmit(item) {
this.$emit("save", item);
saveSubmit(item
, index
) {
this.$emit("save", item
, index
);
},
// 开启/暂停
onOffSubmit(item) {
this.$emit("onOff", item);
onOffSubmit(item
, index
) {
this.$emit("onOff", item
, index
);
},
// 删除
deleteSubmit(item) {
this.$emit("delete", item);
deleteSubmit(item
, index
) {
this.$emit("delete", item
, index
);
},
},
};
...
...
@@ -626,7 +626,6 @@ export default {
border-bottom: 1px solid #ccc;
}
.el-collapse-item:last-child {
}
.route-container {
strong {
...
...
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
View file @
d55a1de
...
...
@@ -337,7 +337,7 @@ export default {
this.loading = true;
updateOrAddFlight(parmas)
.then((res) => {
const { code, msg } = res;
const { code, msg
, data
} = res;
if (code == 200) {
this.$forceUpdate();
this.msgSuccess("保存成功!");
...
...
@@ -349,22 +349,29 @@ export default {
.catch(() => {
this.loading = false;
});
}
else
{
this.msgWarning('未添加规则信息,请添加后再保存!')
}
else
{
this.msgWarning("未添加规则信息,请添加后再保存!");
}
},
// 开启/暂停
onOffSubmit(item) {
onOffSubmit(item
, index
) {
this.loading = true;
let tip = item.status == "1" ? "停用" : "启用";
let parmas = {
id: item.id,
status: item.status == "1" ? "3" : "1",
};
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
enableOrDisable(
{ id: item.id, status: item.status == "1" ? "3" : "1" }
)
enableOrDisable(
parmas
)
.then((res) => {
const { code, msg } = res;
const { code, msg, data } = res;
console.log(this.routesInfo);
console.log(index);
console.log(data);
if (code == 200) {
this.$forceUpdate();
this.msgSuccess(tip + "成功");
...
...
@@ -389,8 +396,11 @@ export default {
}).then(() => {
delFlightId({ id: item.id })
.then((res) => {
const { code, msg } = res;
const { code, msg
, data
} = res;
if (code == 200) {
console.log(this.routesInfo);
console.log(index);
console.log(data);
this.$forceUpdate();
this.msgSuccess(msg);
} else {
...
...
Please
register
or
login
to post a comment