mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
b590b19ccc
commit
93b186f948
@ -83,8 +83,8 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_openNewOaWorkflowFinishDetail: function (_notice) {
|
||||
vc.jumpToPage("/admin.html#/pages/common/noticeDetail?noticeId=" + _notice.noticeId);
|
||||
_openNewOaWorkflowFinishDetail: function (_undo) {
|
||||
vc.jumpToPage("/admin.html#/pages/property/newOaWorkflowDetail?id=" + _undo.id + "&flowId=" + $that.newOaWorkflowFinishInfo.conditions.flowId);
|
||||
},
|
||||
_queryOaWorkflowFinishMethod: function () {
|
||||
vc.component._listOaWorkflowFinishs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
@ -75,6 +75,11 @@
|
||||
v-on:click="_openNewOaWorkflowPoolDetail(pool)">详情
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openNewOaWorkflowPoolImg(pool)">流程图
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -92,4 +97,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="common/viewImage"></vc:create>
|
||||
</div>
|
||||
@ -89,6 +89,30 @@
|
||||
_queryOaWorkflowPoolMethod: function () {
|
||||
vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_openNewOaWorkflowPoolImg: function (_pool) { //展示流程图
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
businessKey: _pool.id
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('workflow.listRunWorkflowImage',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _workflowManageInfo = JSON.parse(json);
|
||||
if (_workflowManageInfo.code != '0') {
|
||||
vc.toast(_workflowManageInfo.msg);
|
||||
return;
|
||||
}
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: 'data:image/png;base64,' + _workflowManageInfo.data
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_getNewOaWorkflowPoolState: function (_pool) {
|
||||
/**
|
||||
* 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结
|
||||
|
||||
@ -60,6 +60,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">序号</th>
|
||||
<th scope="col" class="text-center">部门</th>
|
||||
<th scope="col" class="text-center">处理人</th>
|
||||
<th scope="col" class="text-center">状态</th>
|
||||
<th scope="col" class="text-center">耗时</th>
|
||||
@ -69,7 +70,10 @@
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in newOaWorkflowDetailInfo.comments">
|
||||
<td scope="row" class="text-center">{{index+1}}</td>
|
||||
<td class="text-center">{{item.auditName}}</td>
|
||||
<td scope="row" class="text-center" v-if="item.orgName">{{item.orgName}}</td>
|
||||
<td scope="row" class="text-center" v-else>管理员</td>
|
||||
<td class="text-center" v-if="item.userName">{{item.userName}}</td>
|
||||
<td class="text-center" v-else>{{item.auditName}}</td>
|
||||
<td class="text-center">{{item.stateName}}</td>
|
||||
<td class="text-center">{{item.duration}}</td>
|
||||
<td class="text-center">{{item.message}}</td>
|
||||
@ -97,7 +101,8 @@
|
||||
<select class="custom-select" v-model="newOaWorkflowDetailInfo.audit.auditCode">
|
||||
<option selected disabled value="">请选择</option>
|
||||
<option value="1100">办理</option>
|
||||
<option value="1200">退回</option>
|
||||
<option value="1200" v-if="newOaWorkflowDetailInfo.nextAudit.back">退回</option>
|
||||
<option value="1400" v-if="newOaWorkflowDetailInfo.nextAudit.backIndex">退回至提交者</option>
|
||||
<option value="1300">转单</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -110,7 +115,8 @@
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="newOaWorkflowDetailInfo.audit.auditCode != '1200'">
|
||||
<div class="form-group row"
|
||||
v-if="newOaWorkflowDetailInfo.audit.auditCode != '1200' && newOaWorkflowDetailInfo.audit.auditCode != '1400'">
|
||||
<label class="col-sm-2 col-form-label text-right">下一处理人</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" placeholder="必填,请选择下一处理人" disabled
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
staffId: '',
|
||||
staffName: '',
|
||||
taskId: ''
|
||||
}
|
||||
},
|
||||
nextAudit:{}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -29,6 +30,7 @@
|
||||
$that.newOaWorkflowDetailInfo.audit.taskId = vc.getParam('taskId');
|
||||
$that._listOaWorkflowDetails();
|
||||
$that._loadComments();
|
||||
$that._loadNextAuditPerson();
|
||||
},
|
||||
_initEvent: function () {
|
||||
},
|
||||
@ -102,7 +104,6 @@
|
||||
vc.emit('selectStaff', 'openStaff', $that.newOaWorkflowDetailInfo.audit);
|
||||
},
|
||||
_auditSubmit: function () {
|
||||
|
||||
let _audit = $that.newOaWorkflowDetailInfo.audit;
|
||||
_audit.flowId = $that.newOaWorkflowDetailInfo.flowId;
|
||||
_audit.id = $that.newOaWorkflowDetailInfo.id;
|
||||
@ -114,7 +115,7 @@
|
||||
vc.toast('请填写说明');
|
||||
return;
|
||||
}
|
||||
if (_audit.auditCode != '1200' && !_audit.staffId) {
|
||||
if (_audit.auditCode != '1200' && _audit.auditCode != '1400' && !_audit.staffId) {
|
||||
vc.toast('请选择下一节点处理人');
|
||||
return;
|
||||
}
|
||||
@ -130,7 +131,7 @@
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
vc.toast('提交成功');
|
||||
vc.emit('newOaWorkflow', 'switch', 'newOaWorkflowPool')
|
||||
$that._goBack();
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
@ -143,6 +144,27 @@
|
||||
});
|
||||
|
||||
},
|
||||
_loadNextAuditPerson: function () {
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
taskId: $that.newOaWorkflowDetailInfo.audit.taskId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/oaWorkflow/getNextTask',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _nextAudit = JSON.parse(json);
|
||||
if (_nextAudit.code != '0') {
|
||||
return;
|
||||
}
|
||||
$that.newOaWorkflowDetailInfo.nextAudit = _nextAudit.data[0];
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_getNewOaWorkflowDetailState: function (_pool) {
|
||||
/**
|
||||
* 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结
|
||||
|
||||
Loading…
Reference in New Issue
Block a user