|
@@ -557,6 +557,7 @@ export default {
|
|
|
},
|
|
|
loading: false, //表格加载
|
|
|
tableDataList: [], //数据
|
|
|
+ editData: {},
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -1065,7 +1066,7 @@ export default {
|
|
|
tableFieldData: this.tableFieldList,
|
|
|
formData: this.formData,
|
|
|
};
|
|
|
- let isAsc = this.formData.isAsc == "ASC" ? 1 : 0;
|
|
|
+ // let isAsc = this.formData.isAsc == "ASC" ? 0 : 1;
|
|
|
let data = {
|
|
|
tId: this.tId,
|
|
|
dtName: this.formData.menuName,
|
|
@@ -1074,7 +1075,7 @@ export default {
|
|
|
dtTableName: this.tableName,
|
|
|
primaryKey: this.formData.primaryKey,
|
|
|
orderByColumn: this.formData.orderByColumn,
|
|
|
- isAsc,
|
|
|
+ sortOrder: this.formData.isAsc,
|
|
|
sqlKey: uuid,
|
|
|
dtColumnName: columns, //列字段标题名称(存储显示字段信息
|
|
|
timeFormat: this.formData.timeFormate,
|
|
@@ -1109,7 +1110,7 @@ export default {
|
|
|
}
|
|
|
let res;
|
|
|
if (this.tId) {
|
|
|
- delete data.sqlKey;
|
|
|
+ data.sqlKey = this.editData.sqlKey;
|
|
|
res = await editTable(data);
|
|
|
} else {
|
|
|
res = await addDragTable(data);
|
|
@@ -1163,6 +1164,9 @@ export default {
|
|
|
// 关闭当前页面
|
|
|
if (this.tId) {
|
|
|
this.$tab.closePage();
|
|
|
+ this.$router.push({
|
|
|
+ path: "/system/fromModel/index/tablelist",
|
|
|
+ });
|
|
|
}
|
|
|
this.isShowPreview = false;
|
|
|
}
|
|
@@ -1180,6 +1184,7 @@ export default {
|
|
|
this.tableName = echoData.tableName;
|
|
|
this.tableFieldList = echoData.tableFieldData;
|
|
|
this.formData = echoData.formData;
|
|
|
+ this.editData = res.data;
|
|
|
let val = await getParticMenu(res.data.sqlKey);
|
|
|
if (val.code == 200) {
|
|
|
this.menuId = val.data.menuId;
|