const table = {
    _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({dbid, catalog}) {
        return table._sheets({cate: "mysql", dbid, catalog})
    },
    sheetInfo({filePath, sheetName}) {
        return red.postX('/_table/sheet_info', {cate: 'excel', filePath, sheetName})
    },

    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)})
    }
}