Commit 0fdcb3aa by 乔延琦

Merge branch 'basedataapi' into 'develop'

basedata api

See merge request GFP/RBC/rbc-frontend!110
parents 53930fc8 4c7a83fe
/**
* 请求基础数据
* @param {string} tableName 基础数据表名
* @param {object} param 其他请求参数,如分页、检索等
*/
export const getBaseData = (tableName, param = {}) => {
let defaultParam = {
tableName: tableName,
pagination: false,
queryDataStructure: 'ALL_WITH_REF',
stopflag: -1,
authType: 'NONE',
}
defaultParam = {
...defaultParam,
...param,
}
if (param.limit || param.offset) {
defaultParam = {
limit: 10,
offset: 0,
...defaultParam,
pagination: true,
}
}
return window.GMS.$http.post(
'/baseData/data/list',
defaultParam
).then((res) => {
const result = res && res.data || {}
return result
})
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment