mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 04:23:57 +00:00
fix
This commit is contained in:
@@ -16,7 +16,7 @@ const getMacroFunction = {
|
|||||||
${code}
|
${code}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
transformData: (code) => `
|
transformData: (code) => `
|
||||||
(rows, args, modules, selectedCells, cols, columns) => {
|
(rows, args, modules, selectedCells, cols, columns) => {
|
||||||
${code}
|
${code}
|
||||||
}
|
}
|
||||||
@@ -142,6 +142,7 @@ function runTramsformData(
|
|||||||
if (cols && !columns) {
|
if (cols && !columns) {
|
||||||
columns = cols.map((columnName) => ({ columnName }));
|
columns = cols.map((columnName) => ({ columnName }));
|
||||||
}
|
}
|
||||||
|
columns = _.uniqBy(columns, 'columnName');
|
||||||
if (!preview) {
|
if (!preview) {
|
||||||
rows = removePreviewRowFlags(rows);
|
rows = removePreviewRowFlags(rows);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,12 +206,12 @@ const resultRows = rows.map((row, rowIndex) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const fields = {
|
const fields = {
|
||||||
year: mom.year(),
|
[args.year]: mom.year(),
|
||||||
month: mom.month() + 1,
|
[args.month]: mom.month() + 1,
|
||||||
day: mom.day(),
|
[args.day]: mom.day(),
|
||||||
hour: mom.hour(),
|
[args.hour]: mom.hour(),
|
||||||
minute: mom.minute(),
|
[args.minute]: mom.minute(),
|
||||||
second: mom.second(),
|
[args.second]: mom.second(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user