修改:1、arangodb -> mysql,去除arangodb
2、部分字段逻辑重构
This commit is contained in:
@@ -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})
|
||||
}
|
||||
}
|
||||
@@ -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') {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const plat = {
|
||||
|
||||
platList(params = {}) { // 平台列表
|
||||
params['platToken'] = 'xx'
|
||||
params['plattoken'] = 'xx'
|
||||
return red.getX('/plat/list', params)
|
||||
},
|
||||
platSave({plat}) {
|
||||
|
||||
@@ -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)})
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user