a27503f7 by lxs

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents 6f90b49e 14338655
......@@ -129,7 +129,7 @@ export const getTenantAttach = (params) => request({
/** 获取cron表达式最近五次执行时间 */
export const getCronExecTime = (cronExpress) => request({
url: `${import.meta.env.VITE_APP_API_BASEURL}/common/get-recently-time?cronExpress=${cronExpress}`,
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/common/get-recently-time?cronExpress=${cronExpress}`,
method: 'get'
})
......
......@@ -31,6 +31,7 @@ import { TableColumnWidth } from "@/utils/enum";
import router from "@/router";
import { download } from "@/utils/common";
import { getLabelList } from "@/api/modules/dataLabel";
import { de } from "element-plus/es/locale";
const currentPath = ref<string[]>([]);
const currentDatabasePath = ref<string[]>([]);
......@@ -531,7 +532,7 @@ const dataBaseTableInfo = ref({
},
{
label: "编辑表结构", value: "edit", click: (scope) => {
console.log('复制', scope);
console.log('编辑表结构', scope);
// foundMode 1 已有表新建 2 根据文件新建
if (scope.row.foundMode === 1) {
// 已有表新建编辑 editOpt 代表时编辑
......
......@@ -156,13 +156,15 @@ const batchDelete = () => {
};
// 暂存编辑的行数据
const tempRowData = ref<any>();
const tempRowData = ref<any>([]);
// 编辑行
const editRow = (row) => {
console.log('编辑:', row);
// 暂存编辑前的数据
tempRowData.value = { ...row };
// 暂存编辑前的数据 用于取消编辑时恢复原始数据,先判断是否已经暂存过tempRowData通过fieldGuid
if (!tempRowData.value.find((item) => item.fieldGuid === row.fieldGuid)) {
tempRowData.value.push({ ...row });
}
if (row.fieldLengthCondition) {
const arr = row.fieldLengthCondition.split('#')
row.lengthSymbol = arr[0]
......@@ -280,13 +282,13 @@ const saveData = async () => {
fieldPrecision: item.fieldPrecision,
dictionaryGuid: item.dictionaryGuid,
isUnique: item.isUnique,
isNotNull: item.isRequired,
notNull: item.notNull,
fieldValueRange: item.fieldValueRange
}
inParams.push(obj)
})
console.log('finalParams', inParams)
// console.log('finalParams', inParams)
const res: any = await saveBizRuleConfig(inParams)
if (res.code === proxy.$passCode) {
loading.value = false
......@@ -316,8 +318,9 @@ const cancel = () => {
// 点击取消
const cancelEdit = (row) => {
console.log('取消编辑:', row);
// 可在此恢复原始数据逻辑,如果需要
Object.assign(row, tempRowData.value);
// 可在此恢复原始数据逻辑,要查找暂存的数据 tempRowData 中 fieldGuid 与当前行的 fieldGuid 相同的数据
const tempRow = tempRowData.value.find((item) => item.fieldGuid === row.fieldGuid);
Object.assign(row, tempRow);
row.isEdit = false; // 退出编辑状态
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!