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({ ...@@ -129,7 +129,7 @@ export const getTenantAttach = (params) => request({
129 129
130 /** 获取cron表达式最近五次执行时间 */ 130 /** 获取cron表达式最近五次执行时间 */
131 export const getCronExecTime = (cronExpress) => request({ 131 export const getCronExecTime = (cronExpress) => request({
132 url: `${import.meta.env.VITE_APP_API_BASEURL}/common/get-recently-time?cronExpress=${cronExpress}`, 132 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/common/get-recently-time?cronExpress=${cronExpress}`,
133 method: 'get' 133 method: 'get'
134 }) 134 })
135 135
......
...@@ -31,6 +31,7 @@ import { TableColumnWidth } from "@/utils/enum"; ...@@ -31,6 +31,7 @@ import { TableColumnWidth } from "@/utils/enum";
31 import router from "@/router"; 31 import router from "@/router";
32 import { download } from "@/utils/common"; 32 import { download } from "@/utils/common";
33 import { getLabelList } from "@/api/modules/dataLabel"; 33 import { getLabelList } from "@/api/modules/dataLabel";
34 import { de } from "element-plus/es/locale";
34 35
35 const currentPath = ref<string[]>([]); 36 const currentPath = ref<string[]>([]);
36 const currentDatabasePath = ref<string[]>([]); 37 const currentDatabasePath = ref<string[]>([]);
...@@ -531,7 +532,7 @@ const dataBaseTableInfo = ref({ ...@@ -531,7 +532,7 @@ const dataBaseTableInfo = ref({
531 }, 532 },
532 { 533 {
533 label: "编辑表结构", value: "edit", click: (scope) => { 534 label: "编辑表结构", value: "edit", click: (scope) => {
534 console.log('复制', scope); 535 console.log('编辑表结构', scope);
535 // foundMode 1 已有表新建 2 根据文件新建 536 // foundMode 1 已有表新建 2 根据文件新建
536 if (scope.row.foundMode === 1) { 537 if (scope.row.foundMode === 1) {
537 // 已有表新建编辑 editOpt 代表时编辑 538 // 已有表新建编辑 editOpt 代表时编辑
......
...@@ -156,13 +156,15 @@ const batchDelete = () => { ...@@ -156,13 +156,15 @@ const batchDelete = () => {
156 }; 156 };
157 157
158 // 暂存编辑的行数据 158 // 暂存编辑的行数据
159 const tempRowData = ref<any>(); 159 const tempRowData = ref<any>([]);
160 160
161 // 编辑行 161 // 编辑行
162 const editRow = (row) => { 162 const editRow = (row) => {
163 console.log('编辑:', row); 163 console.log('编辑:', row);
164 // 暂存编辑前的数据 164 // 暂存编辑前的数据 用于取消编辑时恢复原始数据,先判断是否已经暂存过tempRowData通过fieldGuid
165 tempRowData.value = { ...row }; 165 if (!tempRowData.value.find((item) => item.fieldGuid === row.fieldGuid)) {
166 tempRowData.value.push({ ...row });
167 }
166 if (row.fieldLengthCondition) { 168 if (row.fieldLengthCondition) {
167 const arr = row.fieldLengthCondition.split('#') 169 const arr = row.fieldLengthCondition.split('#')
168 row.lengthSymbol = arr[0] 170 row.lengthSymbol = arr[0]
...@@ -280,13 +282,13 @@ const saveData = async () => { ...@@ -280,13 +282,13 @@ const saveData = async () => {
280 fieldPrecision: item.fieldPrecision, 282 fieldPrecision: item.fieldPrecision,
281 dictionaryGuid: item.dictionaryGuid, 283 dictionaryGuid: item.dictionaryGuid,
282 isUnique: item.isUnique, 284 isUnique: item.isUnique,
283 isNotNull: item.isRequired, 285 notNull: item.notNull,
284 fieldValueRange: item.fieldValueRange 286 fieldValueRange: item.fieldValueRange
285 } 287 }
286 inParams.push(obj) 288 inParams.push(obj)
287 }) 289 })
288 290
289 console.log('finalParams', inParams) 291 // console.log('finalParams', inParams)
290 const res: any = await saveBizRuleConfig(inParams) 292 const res: any = await saveBizRuleConfig(inParams)
291 if (res.code === proxy.$passCode) { 293 if (res.code === proxy.$passCode) {
292 loading.value = false 294 loading.value = false
...@@ -316,8 +318,9 @@ const cancel = () => { ...@@ -316,8 +318,9 @@ const cancel = () => {
316 // 点击取消 318 // 点击取消
317 const cancelEdit = (row) => { 319 const cancelEdit = (row) => {
318 console.log('取消编辑:', row); 320 console.log('取消编辑:', row);
319 // 可在此恢复原始数据逻辑,如果需要 321 // 可在此恢复原始数据逻辑,要查找暂存的数据 tempRowData 中 fieldGuid 与当前行的 fieldGuid 相同的数据
320 Object.assign(row, tempRowData.value); 322 const tempRow = tempRowData.value.find((item) => item.fieldGuid === row.fieldGuid);
323 Object.assign(row, tempRow);
321 324
322 row.isEdit = false; // 退出编辑状态 325 row.isEdit = false; // 退出编辑状态
323 } 326 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!