1730532197@qq.com

lwj

...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
136 import { 136 import {
137 findSourceFlightRulesApi, 137 findSourceFlightRulesApi,
138 sourceFlightRulesSaveApi, 138 sourceFlightRulesSaveApi,
139 + delOrEnableORDisableApi,
139 findSourceFlightAndFlightDateApi 140 findSourceFlightAndFlightDateApi
140 } from "@/api/sourceFlightRules"; 141 } from "@/api/sourceFlightRules";
141 export default { 142 export default {
...@@ -221,7 +222,7 @@ ...@@ -221,7 +222,7 @@
221 }, 222 },
222 /** 新增按钮操作 */ 223 /** 新增按钮操作 */
223 handleAdd() { 224 handleAdd() {
224 - this.reset(); 225 + this.form={ dayOfWeek: []};
225 this.open = true; 226 this.open = true;
226 this.title = "添加原航班顺位规则"; 227 this.title = "添加原航班顺位规则";
227 this.form.id = -1; 228 this.form.id = -1;
...@@ -230,7 +231,8 @@ ...@@ -230,7 +231,8 @@
230 }, 231 },
231 /** 修改按钮操作 */ 232 /** 修改按钮操作 */
232 handleUpdate(row) { 233 handleUpdate(row) {
233 - //this.reset(); 234 + this.form={ dayOfWeek: []};
235 + this.dayOfWeek=[];
234 this.open = true; 236 this.open = true;
235 this.title = "修改原航班顺位规则"; 237 this.title = "修改原航班顺位规则";
236 this.form =row; 238 this.form =row;
...@@ -240,18 +242,21 @@ ...@@ -240,18 +242,21 @@
240 }, 242 },
241 /** 删除 启用 停用按钮操作 */ 243 /** 删除 启用 停用按钮操作 */
242 handleDeleteorPlayorpause(rowid,status,statusText) { 244 handleDeleteorPlayorpause(rowid,status,statusText) {
245 +
243 this.$confirm('是否确认' + statusText + '此数据项?', "警告", { 246 this.$confirm('是否确认' + statusText + '此数据项?', "警告", {
244 confirmButtonText: "确定", 247 confirmButtonText: "确定",
245 cancelButtonText: "取消", 248 cancelButtonText: "取消",
246 type: "warning" 249 type: "warning"
247 }).then(function() { 250 }).then(function() {
251 +
248 let disable={ 252 let disable={
249 - id:row.id, 253 + id:rowid,
250 - status:0 254 + status:status
251 }; 255 };
252 - return delOrEnableORDisableApi(ids); 256 +
257 + return delOrEnableORDisableApi(disable);
253 }).then(() => { 258 }).then(() => {
254 - this.getList(); 259 + this.findSourceFlightRules();
255 this.msgSuccess(statusText+"成功"); 260 this.msgSuccess(statusText+"成功");
256 }).catch(function() {}); 261 }).catch(function() {});
257 }, 262 },
...@@ -277,23 +282,9 @@ ...@@ -277,23 +282,9 @@
277 // 表单重置 282 // 表单重置
278 reset() { 283 reset() {
279 this.form = { 284 this.form = {
280 - id: undefined, 285 +
281 - createTime: undefined, 286 + dayOfWeek: []
282 - createUserId: undefined, 287 +
283 - createUserName: undefined,
284 - updateTime: undefined,
285 - updateUserId: undefined,
286 - updateUserName: undefined,
287 - startDate: undefined,
288 - endDate: undefined,
289 - flightRank: undefined,
290 - sourceFlightNo: undefined,
291 - status: undefined,
292 - whetherHistory: undefined,
293 - historyId: undefined,
294 - dayOfWeek: [],
295 - type: undefined,
296 - priority: undefined
297 }; 288 };
298 this.resetForm("form"); 289 this.resetForm("form");
299 }, 290 },
...@@ -327,7 +318,7 @@ ...@@ -327,7 +318,7 @@
327 // 取消按钮 318 // 取消按钮
328 cancel() { 319 cancel() {
329 this.open = false; 320 this.open = false;
330 - this.reset(); 321 + // this.reset();
331 }, 322 },
332 // 状态字典翻译 323 // 状态字典翻译
333 statusFormat(row) { 324 statusFormat(row) {
......