模块节点点击全部删除,不实时刷新问题处理

This commit is contained in:
yujh 2024-12-12 10:13:45 +08:00
parent 78d0db0a2c
commit 0389d98b4b
2 changed files with 21 additions and 3 deletions

View File

@ -1194,13 +1194,19 @@ public class CoEPALController {
// 附件-删除全部附件
@Mapping("com.actionsoft.apps.coe.pal_processlevel_upfile_del_all")
public String coePALProcessLevelUPFILEDELAll(UserContext me, RequestParams params) {
JSONArray array = new JSONArray();
String uuids = params.get("uuids");
UpfileWeb web = new UpfileWeb(me);
String[] split = uuids.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();
}
// 附件-在线预览

View File

@ -434,7 +434,7 @@ function delFileAll(callback) { //删除全部文件
var dataJson = msg.data;
if (msg.result == "ok") {
if(type == "shape"){
delUpFileOfShape(dataJson.uuid);
delUpFileOfShapeAll(dataJson.uuids);
callback();
}
$.simpleAlert("删除成功", "ok");
@ -578,6 +578,18 @@ function delUpFileOfShape(uuid){//
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(){
var shape = parent.Utils.getSelected()[0];
parent.Model.update(shape);