接入系统公司、部门、角色接口
This commit is contained in:
+20
-7
@@ -1,6 +1,6 @@
|
||||
//数据表格配置
|
||||
|
||||
import tool from '@/utils/tool'
|
||||
import http from "@/utils/request";
|
||||
|
||||
export default {
|
||||
successCode: 200, //请求完成代码
|
||||
@@ -28,13 +28,26 @@ export default {
|
||||
* @tableName scTable组件的props->tableName
|
||||
* @column 用户配置好的列
|
||||
*/
|
||||
columnSettingSave: function (tableName, column) {
|
||||
columnSettingSave: function (tableName, column,params) {
|
||||
column.forEach((item,index)=>{
|
||||
item.sort = index+1;
|
||||
})
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(()=>{
|
||||
//这里为了演示使用了session和setTimeout演示,开发时应用数据请求
|
||||
tool.session.set(tableName, column)
|
||||
resolve(true)
|
||||
},1000)
|
||||
if(!params.url || params.url==''){
|
||||
resolve(false)
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
column_config:column,
|
||||
save_column:true
|
||||
}
|
||||
http.post(params.url, data).then(res=>{
|
||||
if(res.code == 200 && res.data.column){
|
||||
resolve(true)
|
||||
}else{
|
||||
resolve(false)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user