mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-02-25 06:45:20 +08:00
approval better
This commit is contained in:
parent
72159a676e
commit
483fde303f
6 changed files with 15 additions and 9 deletions
|
@ -301,7 +301,7 @@ public class ApprovalProcessor {
|
|||
*/
|
||||
public JSONArray getWorkedSteps() {
|
||||
Object[][] array = Application.createQueryNoFilter(
|
||||
"select approver,state,remark,approvedTime,createdOn,createdBy,node,prevNode from RobotApprovalStep" +
|
||||
"select approver,state,remark,approvedTime,createdOn,createdBy,node,prevNode,approvalId,approvalId.name from RobotApprovalStep" +
|
||||
" where recordId = ? and isCanceled = 'F' and isWaiting = 'F' order by createdOn")
|
||||
.setParameter(1, this.record)
|
||||
.array();
|
||||
|
@ -320,11 +320,11 @@ public class ApprovalProcessor {
|
|||
List<Object[]> stepGroup = stepGroupMap.computeIfAbsent(prevNode, k -> new ArrayList<>());
|
||||
stepGroup.add(o);
|
||||
}
|
||||
|
||||
|
||||
JSONArray steps = new JSONArray();
|
||||
JSONObject submitter = JSONUtils.toJSONObject(
|
||||
new String[] { "submitter", "submitterName", "createdOn" },
|
||||
new Object[] { firstStep[5], UserHelper.getName((ID) firstStep[5]), CalendarUtils.getUTCDateTimeFormat().format(firstStep[4]) });
|
||||
new String[] { "submitter", "submitterName", "createdOn", "approvalId", "approvalName" },
|
||||
new Object[] { firstStep[5], UserHelper.getName((ID) firstStep[5]), CalendarUtils.getUTCDateTimeFormat().format(firstStep[4]), firstStep[8], firstStep[9] });
|
||||
steps.add(submitter);
|
||||
|
||||
String next = FlowNode.ROOT;
|
||||
|
|
|
@ -187,7 +187,7 @@ public class ApprovalControll extends BasePageControll {
|
|||
.setParameter(1, approvalId)
|
||||
.unique();
|
||||
if (belongEntity == null) {
|
||||
writeFailure(response, "无效审批流程");
|
||||
writeFailure(response, "无效审批流程,可能已被删除");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -15678,7 +15678,7 @@ li.L9 {
|
|||
|
||||
.timeline-header {
|
||||
display: block;
|
||||
padding: 7px 0 0 46px
|
||||
padding: 6px 0 0 46px
|
||||
}
|
||||
|
||||
@media (max-width:767.98px) {
|
||||
|
|
|
@ -2143,6 +2143,7 @@ form {
|
|||
top: 16px;
|
||||
left: 100px;
|
||||
border-color: #f7b904;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.timeline.approved-steps .timeline-item.state0:before {
|
||||
|
|
|
@ -298,6 +298,9 @@ class ApprovalStepViewer extends React.Component {
|
|||
<div className="timeline-avatar"><img src={`${rb.baseUrl}/account/user-avatar/${s.submitter}`} /></div>
|
||||
<div className="timeline-header">
|
||||
<p className="timeline-activity">由 {s.submitter === rb.currentUser ? '你' : s.submitterName} 提交审批</p>
|
||||
<blockquote className="blockquote timeline-blockquote mb-0">
|
||||
<p><a target="_blank" href={`${rb.baseUrl}/app/RobotApprovalConfig/view/${s.approvalId}`}><i className="zmdi zmdi-usb zmdi-hc-rotate-180"></i> {s.approvalName}</a></p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -317,9 +320,7 @@ class ApprovalStepViewer extends React.Component {
|
|||
<div className="timeline-avatar"><img src={`${rb.baseUrl}/account/user-avatar/${item.approver}`} /></div>
|
||||
<div className="timeline-header">
|
||||
<p className="timeline-activity">{aMsg}</p>
|
||||
{item.remark && <blockquote className="blockquote timeline-blockquote mb-0">
|
||||
<p>{item.remark}</p>
|
||||
</blockquote>}
|
||||
{item.remark && <blockquote className="blockquote timeline-blockquote mb-0"><p>{item.remark}</p></blockquote>}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -34,6 +34,10 @@ $(document).ready(function() {
|
|||
else $('.J_close').remove()
|
||||
|
||||
$.get(rb.baseUrl + '/app/entity/approval/flow-definition?id=' + window.__PageConfig.id, function(res) {
|
||||
if (res.error_code !== 0) {
|
||||
RbHighbar.error(res.error_msg)
|
||||
return
|
||||
}
|
||||
wpc = { ...res.data, preview: true }
|
||||
renderRbcomp(<RbFlowCanvas />, 'rbflow', function() {
|
||||
ph && ph.hideLoading()
|
||||
|
|
Loading…
Reference in a new issue