|
|
@ -546,6 +546,7 @@ const Apply = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
fromDatasetControl : {
|
|
|
|
fromDatasetControl : {
|
|
|
|
load : async function(control, pageNum){
|
|
|
|
load : async function(control, pageNum){
|
|
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
control.query.pageNum = pageNum;
|
|
|
|
control.query.pageNum = pageNum;
|
|
|
|
if (!control.query.pageNum){
|
|
|
|
if (!control.query.pageNum){
|
|
|
|
control.query.pageNum = 1;
|
|
|
|
control.query.pageNum = 1;
|
|
|
@ -557,40 +558,6 @@ const Apply = {
|
|
|
|
resolve(resp);
|
|
|
|
resolve(resp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
save : async function(control, info){
|
|
|
|
|
|
|
|
if (!info) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var item = control.getCurrent("item");
|
|
|
|
|
|
|
|
var create = "added" == item.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
|
|
|
url:!create ? control.urls.update : control.urls.create,
|
|
|
|
|
|
|
|
data:info,
|
|
|
|
|
|
|
|
success:(resp) => {
|
|
|
|
|
|
|
|
resolve(resp);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
remove : async function(control, params){
|
|
|
|
|
|
|
|
var selected = control.dataset.getKeys("selected");
|
|
|
|
|
|
|
|
if(selected.length < 1) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!params) {
|
|
|
|
|
|
|
|
params = {};
|
|
|
|
|
|
|
|
params[control.prefixed("IDs")] = selected.join(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
|
|
|
url:control.urls.remove,
|
|
|
|
|
|
|
|
data:params,
|
|
|
|
|
|
|
|
success:(resp) => {
|
|
|
|
|
|
|
|
resolve(resp);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|