mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化组织和员工岗位不一致问题
Signed-off-by: java110 <928255095@qq.com>
This commit is contained in:
parent
099ce05556
commit
b6d38eac71
@ -9,6 +9,7 @@
|
||||
data: {
|
||||
orgManageInfo: {
|
||||
staffs: [],
|
||||
relCds:[],
|
||||
orgName: '',
|
||||
conditions: {
|
||||
orgId: '',
|
||||
@ -16,18 +17,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function() {},
|
||||
_initMethod: function() {
|
||||
vc.getDict('u_org_staff_rel', "rel_cd", function (_data) {
|
||||
$that.orgManageInfo.relCds = _data;
|
||||
});
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('org', 'switchOrg', function(_param) {
|
||||
$that.orgManageInfo.conditions.orgId = _param.orgId;
|
||||
$that.orgManageInfo.orgName = _param.orgName;
|
||||
vc.component._listStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('orgManage', 'notice', function() {
|
||||
vc.component._listStaffs(1, DEFAULT_ROWS);
|
||||
$that._listStaffs(1, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listStaffs(_currentPage, DEFAULT_ROWS);
|
||||
$that._listStaffs(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@ -44,13 +49,22 @@
|
||||
vc.http.apiGet('/query.staff.infos',
|
||||
param,
|
||||
function(json, res) {
|
||||
var _orgManageInfo = JSON.parse(json);
|
||||
vc.component.orgManageInfo.total = _orgManageInfo.total;
|
||||
vc.component.orgManageInfo.records = _orgManageInfo.records;
|
||||
vc.component.orgManageInfo.staffs = _orgManageInfo.staffs;
|
||||
let _json = JSON.parse(json);
|
||||
$that.orgManageInfo.total = _json.total;
|
||||
$that.orgManageInfo.records = _json.records;
|
||||
let staffList = _json.staffs;
|
||||
let relCdsList = $that.orgManageInfo.relCds;
|
||||
staffList.forEach((staff) => {
|
||||
relCdsList.forEach((rel) => {
|
||||
if (staff.relCd == rel.statusCd) {
|
||||
staff.relCdName = rel.name;
|
||||
}
|
||||
})
|
||||
})
|
||||
$that.orgManageInfo.staffs = staffList;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.orgManageInfo.records,
|
||||
dataCount: vc.component.orgManageInfo.total,
|
||||
total: $that.orgManageInfo.records,
|
||||
dataCount: $that.orgManageInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
@ -61,18 +75,18 @@
|
||||
},
|
||||
//查询
|
||||
_queryOrgMethod: function() {
|
||||
vc.component._listStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetOrgMethod: function() {
|
||||
vc.component.orgManageInfo.conditions.staffName = "";
|
||||
vc.component._listStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that.orgManageInfo.conditions.staffName = "";
|
||||
$that._listStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function() {
|
||||
if (vc.component.orgManageInfo.moreCondition) {
|
||||
vc.component.orgManageInfo.moreCondition = false;
|
||||
if ($that.orgManageInfo.moreCondition) {
|
||||
$that.orgManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.orgManageInfo.moreCondition = true;
|
||||
$that.orgManageInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_openOrgRelStaff: function() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user