优化代码

This commit is contained in:
java110 2022-09-15 19:38:42 +08:00
parent 420eccbc32
commit ebac7be531
3 changed files with 42 additions and 15 deletions

4
app.js
View File

@ -32,8 +32,8 @@ let opts = {
}
app.use('/callComponent', proxy('http://192.168.100.108:8008', opts));
app.use('/app', proxy('http://192.168.100.108:8008', opts));
app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
app.use('/app', proxy('http://192.168.100.108:8088', opts));
app.use('/ws', createProxyMiddleware({
target: 'http://192.168.100.108:8008',
changeOrigin: true,

View File

@ -16,6 +16,33 @@
},
methods: {
_doReplenishCheckIn: function() {
let _data = {
detailId: $that.staffAttendanceReplenishCheckInInfo.detailId,
remark: $that.staffAttendanceReplenishCheckInInfo.remark
}
vc.http.apiPost(
'/attendanceClasses.attendanceReplenishCheckIn',
JSON.stringify(_data), {
emulateJSON: true
},
function(json, res) {
let _json = JSON.parse(json)
if (_json.code == 0) {
//关闭model
$('#staffAttendanceReplenishCheckInModel').modal('hide');
vc.emit('staffAttendanceManage', 'listMonthAttendance', {});
vc.toast("添加成功");
return;
}
},
function(errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
}
}
});

View File

@ -25,10 +25,10 @@
},
_initEvent: function() {
vc.on('staffAttendanceManage', 'listMonthAttendance', function(_param) {
vc.component._listMonthAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
vc.component._loadStaffAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function(_currentPage) {
vc.component._listMonthAttendances(_currentPage, DEFAULT_ROWS);
vc.component._loadStaffAttendances(_currentPage, DEFAULT_ROWS);
});
vc.on('staffAttendanceManage', 'switchOrg', function(_org) {
$that.staffAttendanceManageInfo.orgId = _org.orgId;