修改:1、arangodb -> mysql,去除arangodb

2、部分字段逻辑重构
This commit is contained in:
2024-04-01 15:53:48 +08:00
parent 81e1a59e65
commit 9973ad18ca
59 changed files with 926 additions and 660 deletions

View File

@@ -1,12 +1,12 @@
const db = {
catalogList({dbAccount, dbPlatId}) { // database列表
catalogList({dbAccount, dbid}) { // database列表
console.log(JSON.stringify(dbAccount))
return red.postX('/_db/catalog_list', {dbAccount: escape(JSON.stringify(dbAccount)), dbPlatId})
return red.postX('/_db/catalog_list', {dbAccount: escape(JSON.stringify(dbAccount)), dbid})
},
tableList({dbPlatId, catalog}) { // 数据库表列表
return red.postX('/_db/table_list', {dbPlatId, catalog})
tableList({dbid, catalog}) { // 数据库表列表
return red.postX('/_db/table_list', {dbid, catalog})
},
tableInfo({dbPlatId, catalog, tableName}) {
return red.postX('/_db/table_info', {dbPlatId, catalog, tableName})
tableInfo({dbid, catalog, tableName}) {
return red.postX('/_db/table_info', {dbid, catalog, tableName})
}
}

View File

@@ -19,9 +19,9 @@ const meta = {
getServiceInfo({name}, callback) {
red.getJSON("/meta/service_info",{name}, res => {
let {name, comment, table, edits, imports, shows, exports, filters, details, dels} = red.replacePoint(res)
let {name, comment, tablealias, edits, imports, shows, exports, filters, details, dels} = red.replacePoint(res)
callback({name, comment, table, edits, imports, shows, exports, filters, details, dels});
callback({name, comment, tablealias, edits, imports, shows, exports, filters, details, dels});
});
},
getServiceDetail({name}, callback) {
@@ -97,7 +97,7 @@ const meta = {
//client
exportData({fbean, cate}) {
if (cate == 'excel') {
location.href = "/data/export?fBean=" + JSON.stringify(fbean) + "&platToken=" + red.getPlatToken() + "&cate=excel";
location.href = "/data/export?fBean=" + JSON.stringify(fbean) + "&plattoken=" + red.getPlatToken() + "&cate=excel";
} else if (cate == 'cvs') {
} else if (cate == 'json') {

View File

@@ -2,7 +2,7 @@
const plat = {
platList(params = {}) { // 平台列表
params['platToken'] = 'xx'
params['plattoken'] = 'xx'
return red.getX('/plat/list', params)
},
platSave({plat}) {

View File

@@ -1,19 +1,19 @@
const table = {
_sheets({cate, filePath, dbAccount, dbPlatId, catalog}) {
return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbPlatId, catalog})
_sheets({cate, filePath, dbAccount, dbid, catalog}) {
return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbid, catalog})
},
sheetsExcel({filePath}) {
return table._sheets({cate: "excel", filePath})
},
sheetMySql({dbPlatId, catalog}) {
return table._sheets({cate: "mysql", dbPlatId, catalog})
sheetMySql({dbid, catalog}) {
return table._sheets({cate: "mysql", dbid, catalog})
},
sheetInfo({filePath, sheetName}) {
return red.postX('/_table/sheet_info', {cate: 'excel', filePath, sheetName})
},
saveTable({dbPlatId, catalog, tableArr}) { //
return red.postX('/_table/table_save', {cate: 'mysql', dbPlatId, catalog, tableArr: JSON.stringify(tableArr)})
saveTable({dbid, catalog, tableArr}) { //
return red.postX('/_table/table_save', {cate: 'mysql', dbid, catalog, tableArr: JSON.stringify(tableArr)})
},
saveSheet({filePath, sheetNames}) {
return red.postX('/_table/table_save', {cate: 'excel', filePath, sheetNames: JSON.stringify(sheetNames)})

View File

@@ -1,7 +1,7 @@
//import red from '../res/js/red'
const login = ({username, pwd}) => {
return red.postX("/user/login", {username, pwd, platToken: 'xx'})
return red.postX("/user/login", {username, pwd, plattoken: 'xx'})
}
const logout = () => {