优化代码

This commit is contained in:
java110 2021-09-08 18:55:38 +08:00
parent 7bb363203d
commit 3a77f72e6a
4 changed files with 25 additions and 17 deletions

View File

@ -4,7 +4,8 @@
data: {
bpmnjsInfo: {
condition: '',
staffId: ''
staffId: '',
from: 'bpmn'
}
},
_initMethod: function () {

View File

@ -12,7 +12,8 @@
<div class=" staff padding padding-top-xs">
<div class=" padding overflow-hidden"
:class="{'select':selectStaffInfo.curCompanyId == item.orgId}"
v-for="(item,index) in selectStaffInfo.companys" @click="_changeCompany(item)" style="cursor:pointer">
v-for="(item,index) in selectStaffInfo.companys" @click="_changeCompany(item)"
style="cursor:pointer">
<span>
<i class="fa fa-building-o margin-right-xs" aria-hidden="true"></i>
{{item.orgName}}
@ -25,7 +26,8 @@
<div class="padding-left staff padding padding-top-xs">
<div class=" padding overflow-hidden"
:class="{'select':selectStaffInfo.curDepartmentId == item.orgId}"
v-for="(item,index) in selectStaffInfo.departments" @click="_changeDepartment(item)" style="cursor:pointer">
v-for="(item,index) in selectStaffInfo.departments" @click="_changeDepartment(item)"
style="cursor:pointer">
<span>
<i class="fa fa-sitemap margin-right-xs" aria-hidden="true"></i>
{{item.orgName}}
@ -38,9 +40,8 @@
<div class="padding-left staff padding padding-top-xs">
<div class=" padding overflow-hidden"
:class="{'select':selectStaffInfo.curStaffId == item.staffId}"
v-for="(item,index) in selectStaffInfo.staffs"
@click="_changeStaff(item)" style="cursor:pointer"
>
v-for="(item,index) in selectStaffInfo.staffs" @click="_changeStaff(item)"
style="cursor:pointer">
<span>
<i class="fa fa-user margin-right-xs" aria-hidden="true"></i>
{{item.name}}
@ -48,11 +49,11 @@
</div>
</div>
</div>
</div>
<div class="text-right" v-if="selectStaffInfo.staff.from == 'bpmn'">
<button type="button" class="btn btn-primary btn-sm" @click="_firstUser()">提交者</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -24,6 +24,7 @@
//查询公司信息
$that._initOrg(2, '');
$('#selectStaffModel').modal('show');
$that.selectStaffInfo.staff = _staff;
$that.staff = _staff;
});
@ -44,11 +45,11 @@
$that.loadStaff();
},
_changeStaff: function (item) {
console.log('selectStaff',item);
console.log('selectStaff', item);
$that.staff.staffId = item.userId;
$that.staff.staffName = item.userName;
$('#selectStaffModel').modal('hide');
if($that.staff.hasOwnProperty('call')){
if ($that.staff.hasOwnProperty('call')) {
$that.staff.call($that.staff);
}
},
@ -119,10 +120,15 @@
console.log('请求失败处理');
}
);
},
_firstUser: function () {
$that.staff.staffId = '${startUserId}';
$that.staff.staffName = '开始人';
$('#selectStaffModel').modal('hide');
if ($that.staff.hasOwnProperty('call')) {
$that.staff.call($that.staff);
}
}
}
});

View File

@ -88,8 +88,6 @@
row: 10
}
};
//发送get请求
//vc.http.apiGet('workflow.listWorkflowAuditInfo',
vc.http.apiGet('/oaWorkflow/queryOaWorkflowUser',
param,
function (json, res) {
@ -154,7 +152,9 @@
var param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
taskId: $that.newOaWorkflowDetailInfo.audit.taskId
taskId: $that.newOaWorkflowDetailInfo.audit.taskId,
flowId: $that.newOaWorkflowDetailInfo.flowId,
id: $that.newOaWorkflowDetailInfo.id
}
};
//发送get请求