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
shanyunduo.cheng
2021-12-02 14:31:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1d67db2f1e6284f8dbe0fdf161ed988c67c57489
1d67db2f
1 parent
3c7b830b
删除规则
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
44 deletions
src/api/destinationFlight.js
src/views/allocationConfig/flightAllocConfig/index.vue
src/api/destinationFlight.js
View file @
1d67db2
...
...
@@ -35,8 +35,18 @@ export function updateOrAddFlight(form){
method
:
'post'
,
data
:
form
})
}
//删除规则
export
function
delFlightId
(
id
){
const
data
=
{
id
}
return
request
({
url
:
'/destinationFlight/delFlightId'
,
method
:
'post'
,
data
:
data
})
}
//申报类别
...
...
src/views/allocationConfig/flightAllocConfig/index.vue
View file @
1d67db2
<template>
<div style="margin:40px" class="app-container">
<el-form :inline="true" :model="queryParams" class="demo-form-inline" size="small">
<div style="margin: 40px" class="app-container">
<el-form
:inline="true"
:model="queryParams"
class="demo-form-inline"
size="small"
>
<el-form-item label="航班号">
<el-input v-model="queryParams.purposeOfFlightNo" placeholder="航班号"></el-input>
<el-input
v-model="queryParams.purposeOfFlightNo"
placeholder="航班号"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getList" size="mini">查询</el-button>
<el-button
type="primary"
icon="el-icon-search"
@click="getList"
size="mini"
>查询</el-button
>
</el-form-item>
</el-form>
<el-button style="margin-bottom:20px" type="primary" icon="el-icon-plus" size="mini" @click="$router.push({ name: 'Add', params: {handle: 'add'}});">添加</el-button>
<el-button
style="margin-bottom: 20px"
type="primary"
icon="el-icon-plus"
size="mini"
@click="$router.push({ name: 'Add', params: { handle: 'add' } })"
>添加</el-button
>
<el-table
:data="flyList"
style="width: 800px"
v-loading="loading" size="small"
v-loading="loading"
size="small"
>
<el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column>
<el-table-column
prop="purposeOfFlightNo"
label="航班号"
align="center"
></el-table-column>
<el-table-column prop="status" label="状态" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status===
'0'">无效</span>
<span v-if="scope.row.status===
'1'">有效</span>
<span v-if="scope.row.status===
'2'">配置中</span>
<span v-if="scope.row.status===
'3'">停用</span>
<span v-if="scope.row.status ===
'0'">无效</span>
<span v-if="scope.row.status ===
'1'">有效</span>
<span v-if="scope.row.status ===
'2'">配置中</span>
<span v-if="scope.row.status ===
'3'">停用</span>
</template>
</el-table-column>
<el-table-column label="操作" prop="id" align="center">
<template slot-scope="scope" >
<el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleClick(scope.row.id, 'update')">修改</el-button>
<el-button type="text" size="mini" icon="el-icon-delete">删除</el-button>
<el-button type="text" size="mini" icon="el-icon-video-play">启用</el-button>
<el-button type="text" size="mini" icon="el-icon-video-pause">停用</el-button>
<template slot-scope="scope">
<el-button
type="text"
size="mini"
icon="el-icon-view"
@click="handleClick(scope.row.id, 'detail')"
>查看</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
@click="handleClick(scope.row.id, 'update')"
>修改</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
@click="del(scope.row.id)"
>删除</el-button
>
<el-button type="text" size="mini" icon="el-icon-video-play"
>启用</el-button
>
<el-button type="text" size="mini" icon="el-icon-video-pause"
>停用</el-button
>
</template>
</el-table-column>
</el-table>
...
...
@@ -45,59 +93,74 @@
:total="total"
background
:hide-on-single-page="true"
style="margin-top:40px; text-align:right">
style="margin-top: 40px; text-align: right"
>
</el-pagination>
</div>
</div>
</template>
<script>
import {
findFlightNo
} from "@/api/destinationFlight";
import { findFlightNo, delFlightId } from "@/api/destinationFlight";
export default {
export default {
data() {
return {
queryParams: {
purposeOfFlightNo: ''
,
start:
0,
limit:10
purposeOfFlightNo: ""
,
start:
0,
limit: 10,
},
flyList:
[],
curPage:
1,
limit:
10,
total:
0,
loading:
false,
}
flyList:
[],
curPage:
1,
limit:
10,
total:
0,
loading:
false,
};
},
methods: {
getList()
{
getList()
{
this.queryParams.limit = this.limit;
if (this.curPage > 1) {
this.queryParams.start = (this.curPage - 1) * this.queryParams.limit
}
else {
this.queryParams.start = (this.curPage - 1) * this.queryParams.limit;
}
else {
this.queryParams.start = 0;
}
this.loading = true;
findFlightNo(this.queryParams).then(response
=> {
findFlightNo(this.queryParams).then((response)
=> {
this.flyList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
});
},
//跳转到查看,修改页面
handleClick(flightiId, handle){
this.$router.push({ name: 'Info', params: { handle: handle, id:flightiId }});
handleClick(flightiId, handle) {
this.$router.push({
name: "Info",
params: { handle: handle, id: flightiId },
});
},
//删除规则
del(id) {
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(function () {
return delFlightId(id);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
//删除,启用,停用
changeStatus(id, handle){
}
changeStatus(id, handle) {},
},
created() {
this.getList();
}
}
},
};
</script>
...
...
Please
register
or
login
to post a comment