Elements-SY

modify

...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
200 // 拖拽行更新排序 200 // 拖拽行更新排序
201 rowDrop() { 201 rowDrop() {
202 const wrapperTr = document.querySelector(".el-table__header-wrapper tr"); 202 const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
203 - console.log("wrapperTr:", wrapperTr); 203 + // console.log("wrapperTr:", wrapperTr);
204 this.sortable = Sortable.create(wrapperTr, { 204 this.sortable = Sortable.create(wrapperTr, {
205 sort: this.attrs.isDragSort, 205 sort: this.attrs.isDragSort,
206 animation: 100, 206 animation: 100,
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
226 animation: 100, 226 animation: 100,
227 delay: 0, 227 delay: 0,
228 onEnd({ newIndex, oldIndex }) { 228 onEnd({ newIndex, oldIndex }) {
229 - console.log("onEnd:", newIndex, oldIndex); 229 + // console.log("onEnd:", newIndex, oldIndex);
230 const currRow = _this.tableData.splice(oldIndex, 1)[0]; 230 const currRow = _this.tableData.splice(oldIndex, 1)[0];
231 _this.tableData.splice(newIndex, 0, currRow); 231 _this.tableData.splice(newIndex, 0, currRow);
232 }, 232 },
......
...@@ -396,10 +396,22 @@ export default { ...@@ -396,10 +396,22 @@ export default {
396 tableEmptyText: "请添加配舱航班", 396 tableEmptyText: "请添加配舱航班",
397 tableData: [], 397 tableData: [],
398 currentIndex: 0, // 记录当前table 列的索引位置 398 currentIndex: 0, // 记录当前table 列的索引位置
399 + id: 0,
399 }; 400 };
400 }, 401 },
401 computed: {}, 402 computed: {},
402 created() { 403 created() {
404 + this.tableData = [
405 + {
406 + id: this.id++,
407 + fltNo: "",
408 + fltNoDate: "",
409 + fltRoute: "",
410 + routeList: [],
411 + isOn: "0" ? false : true,
412 + sort: "0", // 排序字段
413 + },
414 + ];
403 this.getAllDictData(); 415 this.getAllDictData();
404 this.getEdit(); 416 this.getEdit();
405 this.PostFindDestinationFltRuleByFlightNo(); 417 this.PostFindDestinationFltRuleByFlightNo();
...@@ -488,11 +500,11 @@ export default { ...@@ -488,11 +500,11 @@ export default {
488 this.tableData[this.currentIndex].routeList = []; 500 this.tableData[this.currentIndex].routeList = [];
489 this.msgError("请输入航班号"); 501 this.msgError("请输入航班号");
490 } 502 }
491 - }, 800), 503 + }, 1000),
492 // 添加 504 // 添加
493 addBtn(item) { 505 addBtn(item) {
494 - console.log("add:", item);
495 this.tableData.unshift({ 506 this.tableData.unshift({
507 + id: this.id++,
496 fltNo: "", 508 fltNo: "",
497 fltNoDate: "", 509 fltNoDate: "",
498 fltRoute: "", 510 fltRoute: "",
...@@ -500,6 +512,7 @@ export default { ...@@ -500,6 +512,7 @@ export default {
500 isOn: "0" ? false : true, 512 isOn: "0" ? false : true,
501 sort: "0", // 排序字段 513 sort: "0", // 排序字段
502 }); 514 });
515 + console.log("add:", this.tableData);
503 }, 516 },
504 // 是否爆仓 517 // 是否爆仓
505 changeCheck({ $index, row }) { 518 changeCheck({ $index, row }) {
......
...@@ -22,7 +22,6 @@ export const formConfig = [ ...@@ -22,7 +22,6 @@ export const formConfig = [
22 prop: "status", 22 prop: "status",
23 width: "140px", 23 width: "140px",
24 placeholder: "请选择状态", 24 placeholder: "请选择状态",
25 - rules: { required: true, message: "请选择状态", trigger: "blur" },
26 options: { 25 options: {
27 data: [ 26 data: [
28 { 27 {
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
55 }, 55 },
56 }, 56 },
57 tableAttr: tableAttr, // table配置项 57 tableAttr: tableAttr, // table配置项
58 - columns: columnHeader(this.editRow, this.deleteRow, this.viewRow), // 表头 58 + columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
59 tableData: tableData, // 表格数据 59 tableData: tableData, // 表格数据
60 selectionList: [], // table复选框筛选集合 60 selectionList: [], // table复选框筛选集合
61 }; 61 };
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
144 }, 144 },
145 // 删除 145 // 删除
146 deleteRow(item) { 146 deleteRow(item) {
147 - this.$confirm("是否允许删除?", "提示", { 147 + this.$confirm("是否确认删除?", "提示", {
148 confirmButtonText: "确定", 148 confirmButtonText: "确定",
149 cancelButtonText: "取消", 149 cancelButtonText: "取消",
150 type: "warning", 150 type: "warning",
...@@ -157,12 +157,7 @@ export default { ...@@ -157,12 +157,7 @@ export default {
157 message: "删除成功!", 157 message: "删除成功!",
158 }); 158 });
159 }) 159 })
160 - .catch(() => { 160 + .catch(() => {});
161 - this.$message({
162 - type: "info",
163 - message: "已取消删除",
164 - });
165 - });
166 }, 161 },
167 // 查看 162 // 查看
168 viewRow({ row }) { 163 viewRow({ row }) {
......