模块节点点击全部删除,不实时刷新问题处理
This commit is contained in:
parent
78d0db0a2c
commit
0389d98b4b
@ -1194,13 +1194,19 @@ public class CoEPALController {
|
|||||||
// 附件-删除全部附件
|
// 附件-删除全部附件
|
||||||
@Mapping("com.actionsoft.apps.coe.pal_processlevel_upfile_del_all")
|
@Mapping("com.actionsoft.apps.coe.pal_processlevel_upfile_del_all")
|
||||||
public String coePALProcessLevelUPFILEDELAll(UserContext me, RequestParams params) {
|
public String coePALProcessLevelUPFILEDELAll(UserContext me, RequestParams params) {
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
String uuids = params.get("uuids");
|
String uuids = params.get("uuids");
|
||||||
UpfileWeb web = new UpfileWeb(me);
|
UpfileWeb web = new UpfileWeb(me);
|
||||||
String[] split = uuids.split(",");
|
String[] split = uuids.split(",");
|
||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
web.delete(s);
|
String resultData = web.delete(s);
|
||||||
|
String uuid = JSONObject.parseObject(ResponseObject.parse(resultData).getData().toString()).getString("uuid");
|
||||||
|
if(UtilString.isNotEmpty(uuid)){
|
||||||
|
array.add(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return ResponseObject.newOkResponse().msg("").toString();
|
return ResponseObject.newOkResponse().msg("").put("uuids",array).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 附件-在线预览
|
// 附件-在线预览
|
||||||
|
|||||||
@ -434,7 +434,7 @@ function delFileAll(callback) { //删除全部文件
|
|||||||
var dataJson = msg.data;
|
var dataJson = msg.data;
|
||||||
if (msg.result == "ok") {
|
if (msg.result == "ok") {
|
||||||
if(type == "shape"){
|
if(type == "shape"){
|
||||||
delUpFileOfShape(dataJson.uuid);
|
delUpFileOfShapeAll(dataJson.uuids);
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
$.simpleAlert("删除成功", "ok");
|
$.simpleAlert("删除成功", "ok");
|
||||||
@ -578,6 +578,18 @@ function delUpFileOfShape(uuid){//
|
|||||||
updateShape();
|
updateShape();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function delUpFileOfShapeAll(uuids){//
|
||||||
|
var upfilesArray = getUpFileArrayOfShareShape();
|
||||||
|
for(var i =0,size = upfilesArray.length;i<size;i++){
|
||||||
|
for(var j =0,allSize = uuids.length;j<allSize;j++){
|
||||||
|
if(uuids[j] === upfilesArray[i]){
|
||||||
|
upfilesArray.remove(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateShape();
|
||||||
|
}
|
||||||
|
|
||||||
function updateShape(){
|
function updateShape(){
|
||||||
var shape = parent.Utils.getSelected()[0];
|
var shape = parent.Utils.getSelected()[0];
|
||||||
parent.Model.update(shape);
|
parent.Model.update(shape);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user