Elements-SY

modify

......@@ -200,7 +200,7 @@ export default {
// 拖拽行更新排序
rowDrop() {
const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
console.log("wrapperTr:", wrapperTr);
// console.log("wrapperTr:", wrapperTr);
this.sortable = Sortable.create(wrapperTr, {
sort: this.attrs.isDragSort,
animation: 100,
......@@ -226,7 +226,7 @@ export default {
animation: 100,
delay: 0,
onEnd({ newIndex, oldIndex }) {
console.log("onEnd:", newIndex, oldIndex);
// console.log("onEnd:", newIndex, oldIndex);
const currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
},
......
......@@ -396,10 +396,22 @@ export default {
tableEmptyText: "请添加配舱航班",
tableData: [],
currentIndex: 0, // 记录当前table 列的索引位置
id: 0,
};
},
computed: {},
created() {
this.tableData = [
{
id: this.id++,
fltNo: "",
fltNoDate: "",
fltRoute: "",
routeList: [],
isOn: "0" ? false : true,
sort: "0", // 排序字段
},
];
this.getAllDictData();
this.getEdit();
this.PostFindDestinationFltRuleByFlightNo();
......@@ -488,11 +500,11 @@ export default {
this.tableData[this.currentIndex].routeList = [];
this.msgError("请输入航班号");
}
}, 800),
}, 1000),
// 添加
addBtn(item) {
console.log("add:", item);
this.tableData.unshift({
id: this.id++,
fltNo: "",
fltNoDate: "",
fltRoute: "",
......@@ -500,6 +512,7 @@ export default {
isOn: "0" ? false : true,
sort: "0", // 排序字段
});
console.log("add:", this.tableData);
},
// 是否爆仓
changeCheck({ $index, row }) {
......
......@@ -22,7 +22,6 @@ export const formConfig = [
prop: "status",
width: "140px",
placeholder: "请选择状态",
rules: { required: true, message: "请选择状态", trigger: "blur" },
options: {
data: [
{
......
......@@ -55,7 +55,7 @@ export default {
},
},
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.editRow, this.deleteRow, this.viewRow), // 表头
columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
tableData: tableData, // 表格数据
selectionList: [], // table复选框筛选集合
};
......@@ -144,7 +144,7 @@ export default {
},
// 删除
deleteRow(item) {
this.$confirm("是否允许删除?", "提示", {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
......@@ -157,12 +157,7 @@ export default {
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
.catch(() => {});
},
// 查看
viewRow({ row }) {
......