处理流程绘制时的问题
This commit is contained in:
parent
ddb26b8758
commit
f8f12e3d63
@ -2,12 +2,19 @@ package ink.wgink.module.activiti.controller.api.oa;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.activiti.pojo.dtos.oa.OaProcdefDTO;
|
||||
import ink.wgink.module.activiti.service.oa.IOaService;
|
||||
import io.swagger.annotations.Api;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: OaController
|
||||
* @Description: Oa管理
|
||||
@ -23,6 +30,26 @@ public class OaController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IOaService oaService;
|
||||
|
||||
@ApiOperation(value = "流程定义分页列表", notes = "流程定义分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list-procdef")
|
||||
public List<OaProcdefDTO> listProcdef() {
|
||||
return oaService.listProcdef();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "流程定义分页列表", notes = "流程定义分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage-procdef")
|
||||
public SuccessResultList<List<OaProcdefDTO>> listPageProcdef(ListPage page) {
|
||||
return oaService.listPageProcdef(page.getPage(), page.getRows());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ public class ActivitiServiceImpl extends DefaultBaseService implements IActiviti
|
||||
editorObject.put("resourceId", "canvas");
|
||||
|
||||
JSONObject stencilSetObject = new JSONObject();
|
||||
stencilSetObject.put("namespace", "wgink");
|
||||
stencilSetObject.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
|
||||
|
||||
editorObject.put("stencilset", stencilSetObject);
|
||||
repositoryService.addModelEditorSource(modelId, editorObject.toString().getBytes(ISystemConstant.CHARSET_UTF8));
|
||||
|
@ -89,7 +89,7 @@
|
||||
"id": "process_namespace",
|
||||
"type": "String",
|
||||
"title": "目标命名空间",
|
||||
"value": "www.wgink.ink",
|
||||
"value": "http://www.activiti.org/processdef",
|
||||
"description": "工作流目标命名空间",
|
||||
"popular": true
|
||||
}
|
||||
|
@ -24,12 +24,6 @@
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
@ -130,9 +124,13 @@
|
||||
return flowChatImg;
|
||||
}
|
||||
},
|
||||
{field: 'option2', width: 80, title: '操作', align:'center', fixed: 'right',
|
||||
{field: 'option2', width: 160, title: '操作', align:'center', fixed: 'right',
|
||||
templet: function(row) {
|
||||
return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deployEvent">部署</button>';
|
||||
return '<div class="layui-btn-group">' +
|
||||
'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deployEvent">部署</button>' +
|
||||
'<button class="layui-btn layui-btn-primary layui-btn-xs" lay-event="updateEvent">编辑</button>' +
|
||||
'<button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="removeEvent">删除</button>' +
|
||||
'</div>';
|
||||
}
|
||||
},
|
||||
]
|
||||
@ -208,30 +206,6 @@
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/activiti/update?modelId={modelId}', [checkDatas[0].id]),
|
||||
title: false,
|
||||
width: '90%',
|
||||
height: '90%',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
removeData(checkDatas[0].id);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -253,6 +227,18 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/activiti/update?modelId={modelId}', [data.id]),
|
||||
title: false,
|
||||
width: '90%',
|
||||
height: '90%',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
removeData(data.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user