Merge remote-tracking branch 'remotes/origin/dev' into test

This commit is contained in:
joylink_cuiweidong 2019-11-05 17:22:03 +08:00
commit 94120489a4
4 changed files with 41 additions and 33 deletions

View File

@ -10,6 +10,7 @@ export default {
deleteFailed: 'Failed to delete', deleteFailed: 'Failed to delete',
exportFailed: 'Export Execution Exceptions', exportFailed: 'Export Execution Exceptions',
getListFailed: 'Failed to retrieve list data', getListFailed: 'Failed to retrieve list data',
getPermissionListFailed: 'Failed to get permission list',
getDistributeQrcodeFailed: 'Failure to obtain permission to distribute two-dimensional code', getDistributeQrcodeFailed: 'Failure to obtain permission to distribute two-dimensional code',
obtainMaxNumberFailed: 'Failed to obtain the maximum number of user privileges', obtainMaxNumberFailed: 'Failed to obtain the maximum number of user privileges',
getTransferQrcodeFailed: 'Failure to obtain permission to transfer two-dimensional code', getTransferQrcodeFailed: 'Failure to obtain permission to transfer two-dimensional code',

View File

@ -10,6 +10,7 @@ export default {
deleteFailed: '删除失败', deleteFailed: '删除失败',
exportFailed: '导出执行异常', exportFailed: '导出执行异常',
getListFailed: '获取列表数据失败', getListFailed: '获取列表数据失败',
getPermissionListFailed: '获取权限列表数据失败',
getDistributeQrcodeFailed: '获取权限分发二维码失败', getDistributeQrcodeFailed: '获取权限分发二维码失败',
obtainMaxNumberFailed: '获取用户最大权限个数失败', obtainMaxNumberFailed: '获取用户最大权限个数失败',
getTransferQrcodeFailed: '获取权限转赠二维码失败', getTransferQrcodeFailed: '获取权限转赠二维码失败',

View File

@ -147,23 +147,26 @@ export default {
} }
}, },
changeSelectDate() { changeSelectDate() {
this.isLoading = true; if (this.formModel.date) {
const data = {mapId:this.mapId, proCode:this.prdCode, startTime:this.formModel.date[0], endTime:this.formModel.date[1]}; this.isLoading = true;
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) { const data = {mapId:this.mapId, proCode:this.prdCode, startTime:this.formModel.date[0], endTime:this.formModel.date[1]};
data.lessonId = this.formModel.lessonId; if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
data.type = this.PermissionType; data.lessonId = this.formModel.lessonId;
} data.type = this.PermissionType;
getAvailableUserPermission(data).then(res=>{
this.isLoading = false;
if (res.data && res.data.length > 0) {
this.isDisabled = false;
this.formModel.permissionList = res.data;
} else {
this.isDisabled = true;
} }
}).catch(error=>{ getAvailableUserPermission(data).then(res=>{
console.log(error); this.isLoading = false;
}); if (res.data && res.data.length > 0) {
this.isDisabled = false;
this.formModel.permissionList = res.data;
} else {
this.isDisabled = true;
}
}).catch(()=>{
this.$messageBox(this.$t('error.getPermissionListFailed'));
this.isLoading = false;
});
}
}, },
isShowPermission() { isShowPermission() {
return this.formModel.permissionList && this.formModel.permissionList.length > 0; return this.formModel.permissionList && this.formModel.permissionList.length > 0;

View File

@ -147,23 +147,26 @@ export default {
} }
}, },
changeSelectDate() { changeSelectDate() {
this.isLoading = true; if (this.formModel.date) {
const data = {mapId:this.mapId, proCode:this.prdCode, startTime:`${this.formModel.date[0]} 00:00:00`, endTime:`${this.formModel.date[1]} 23:59:59`}; this.isLoading = true;
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) { const data = {mapId:this.mapId, proCode:this.prdCode, startTime:`${this.formModel.date[0]} 00:00:00`, endTime:`${this.formModel.date[1]} 23:59:59`};
data.lessonId = this.formModel.lessonId; if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
data.type = this.PermissionType; data.lessonId = this.formModel.lessonId;
} data.type = this.PermissionType;
getAvailableUserPermission(data).then(res=>{
this.isLoading = false;
if (res.data && res.data.length > 0) {
this.isDisabled = false;
this.formModel.permissionList = res.data;
} else {
this.isDisabled = true;
} }
}).catch(error=>{ getAvailableUserPermission(data).then(res=>{
console.log(error); this.isLoading = false;
}); if (res.data && res.data.length > 0) {
this.isDisabled = false;
this.formModel.permissionList = res.data;
} else {
this.isDisabled = true;
}
}).catch(()=>{
this.$messageBox(this.$t('error.getPermissionListFailed'));
this.isLoading = false;
});
}
}, },
isShowPermission() { isShowPermission() {
return this.formModel.permissionList && this.formModel.permissionList.length > 0; return this.formModel.permissionList && this.formModel.permissionList.length > 0;
@ -204,8 +207,8 @@ export default {
this.$emit('initLoadPage'); this.$emit('initLoadPage');
this.handleClose(); this.handleClose();
}).catch(() => { }).catch(() => {
this.isLoading = false;
this.$messageBox(this.$t('error.getTransferQrcodeFailed')); this.$messageBox(this.$t('error.getTransferQrcodeFailed'));
this.isLoading = false;
}); });
} }
}); });