This commit is contained in:
2019-04-11 23:04:13 +08:00
parent 6e7388ddf4
commit 14795814e3
24 changed files with 384 additions and 66 deletions

View File

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

15
root/api/table.js Normal file
View File

@@ -0,0 +1,15 @@
const table = {
_sheets({cate, filePath, dbAccount, dbPlatId, catalogs}) {
return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbPlatId, catalogs})
},
sheetsExcel({filePath}) {
return table._sheets({cate: "excel", filePath})
},
sheetMySql({dbPlatId, catalogs}) {
return table._sheets({cate: "mysql", dbPlatId, catalogs: JSON.stringify(catalogs)})
},
saveTable({dbPlatId, catalog, tableArr}) {
return red.postX('/_table/table_save', {dbPlatId, catalog, tableArr: JSON.stringify(tableArr)})
}
}