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
1730532197@qq.com
2021-12-06 11:21:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
985edbabfff7024c75acd31c8dfe6041cb264202
985edbab
1 parent
3a16eb8d
lwj
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
31 deletions
src/views/allocationConfig/flightRandConfig/index.vue
src/views/allocationConfig/flightRandConfig/index.vue
View file @
985edba
...
...
@@ -50,9 +50,12 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete"@click="handleDeleteorPlayorpause(scope.row.id,0,'删除')">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play"@click="handleDeleteorPlayorpause(scope.row.id,1,'启用')">启用</el-button>
<el-button size="mini" type="text" icon="el-icon-video-pause"@click="handleDeleteorPlayorpause(scope.row.id,3,'停用')">停用</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteorPlayorpause(scope.row,0,'删除')">
删除</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play"
@click="handleDeleteorPlayorpause(scope.row,1,'启用')">启用</el-button>
<el-button size="mini" type="text" icon="el-icon-video-pause"
@click="handleDeleteorPlayorpause(scope.row,3,'停用')">停用</el-button>
</template>
</el-table-column>
</el-table>
...
...
@@ -93,15 +96,15 @@
<el-row>
<el-col :span="12">
<el-form-item label="有效开始时间" prop="startDate">
<el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate"
type="date" value-format="yyyy-MM-dd"
placeholder="选择开始时间">
<el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate"
type="date" value-format="yyyy-MM-dd"
placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="有效结束时间" prop="endDate">
<el-date-picker clearable size="small" :picker-options="pickerOptionsEnd" v-model="form.endDate"
type="date" value-format="yyyy-MM-dd"
placeholder="选择结束时间">
<el-date-picker clearable size="small" :picker-options="pickerOptionsEnd" v-model="form.endDate"
type="date" value-format="yyyy-MM-dd"
placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
...
...
@@ -148,9 +151,10 @@
disabledDate: time => {
let endDateVal = this.form.endDate;
if (endDateVal) {
return time.getTime() > new Date(endDateVal).getTime() ||time.getTime() < new Date().getTime()- 24 * 60 * 60 * 1000;
}else{
return time.getTime() < new Date().getTime()- 24 * 60 * 60 * 1000;
return time.getTime() > new Date(endDateVal).getTime() || time.getTime() < new Date().getTime() - 24 *
60 * 60 * 1000;
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
}
},
...
...
@@ -159,8 +163,8 @@
let beginDateVal = this.form.startDate;
if (beginDateVal) {
return time.getTime() < new Date(beginDateVal).getTime();
}
else
{
return time.getTime() < new Date().getTime()
- 24 * 60 * 60 * 1000;
}
else
{
return time.getTime() < new Date().getTime()
- 24 * 60 * 60 * 1000;
}
}
},
...
...
@@ -202,7 +206,7 @@
status: undefined, //状态
flightDate: undefined //日期
},
dayOfWeek:[],
dayOfWeek:
[],
// 表单参数
form: {
dayOfWeek: []
...
...
@@ -235,11 +239,11 @@
this.queryParams.start = 0;
}
findSourceFlightRulesApi(this.queryParams).then(response => {
if(response.code==200)
{
if (response.code == 200)
{
this.sourceFlightRulesList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
}else
{
} else
{
this.msgError(response.msg);
}
...
...
@@ -248,27 +252,36 @@
},
/** 新增按钮操作 */
handleAdd() {
this.form
={
};
this.form
= {
};
this.open = true;
this.title = "添加原航班顺位规则";
this.form.id = -1;
this.dayOfWeek
=
[];
this.dayOfWeek
=
[];
},
/** 修改按钮操作 */
handleUpdate(row) {
this.form={
};
this.dayOfWeek
=
[];
this.form = {
};
this.dayOfWeek
=
[];
this.open = true;
this.title = "修改原航班顺位规则";
this.form =
row;
this.dayOfWeek= this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
this.form =
row;
this.dayOfWeek
= this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
//this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(rowid,status,statusText) {
handleDeleteorPlayorpause(row, status, statusText) {
debugger
//删除前需要停用
if (status === 0 && row.status != '3') {
this.$message({
message: '请停用后删除',
type: 'warning'
});
return;
}
this.$confirm('是否确认' + statusText + '此数据项?', "警告", {
confirmButtonText: "确定",
...
...
@@ -276,17 +289,17 @@
type: "warning"
}).then(function() {
let disable
=
{
id:
row
id,
status:status
let disable
=
{
id:
row.
id,
status:
status
};
return delOrEnableORDisableApi(disable);
}).then(response => {
if(response.code==200)
{
if (response.code == 200)
{
this.findSourceFlightRules();
this.msgSuccess(statusText+
"成功");
}else
{
this.msgSuccess(statusText +
"成功");
} else
{
this.msgError(response.msg);
}
...
...
@@ -296,7 +309,7 @@
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.dayOfWeek
=
this.dayOfWeek.sort();
this.form.dayOfWeek
=
this.dayOfWeek.sort();
//处理数据
sourceFlightRulesSaveApi(this.form).then(response => {
if (response.code === 200) {
...
...
@@ -337,10 +350,10 @@
this.loadingFlightDate = true;
this.sourceFlightAndFlightDate = [];
findSourceFlightAndFlightDateApi(this.queryParams).then(response => {
if
(response.code === 200)
{
if
(response.code === 200)
{
this.sourceFlightAndFlightDate = response.data;
this.loadingFlightDate = false;
}
else
{
}
else
{
this.msgError(response.msg);
}
...
...
Please
register
or
login
to post a comment