Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
a29bce2751
@ -73,12 +73,8 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '创建时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '创建者',
|
||||
prop: 'creatorUserName'
|
||||
title: '权限名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '是否包权限',
|
||||
@ -87,10 +83,6 @@ export default {
|
||||
columnValue: (row) => { return this.$convertField(row.isPackage, this.ruleLists, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '权限名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'type',
|
||||
@ -98,6 +90,14 @@ export default {
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '创建者',
|
||||
prop: 'creatorUserName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog title="修改权限内容" :visible.sync="dialogShow" width="800px" :before-close="close">
|
||||
<el-dialog title="打包详情" :visible.sync="dialogShow" width="800px" :before-close="close">
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</div>
|
||||
|
@ -162,29 +162,36 @@ export default {
|
||||
validator[PermissionType.SCREEN] = () => { return true; };
|
||||
|
||||
if (endTime && startTime && this.formModel.permissionType && validator[this.formModel.permissionType]()) {
|
||||
const model = {
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
permissionType: this.formModel.permissionType,
|
||||
ownerId: this.formModel.ownerId
|
||||
};
|
||||
if (endTime > startTime) {
|
||||
const model = {
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
permissionType: this.formModel.permissionType,
|
||||
ownerId: this.formModel.ownerId
|
||||
};
|
||||
|
||||
if (this.formModel.permissionType == PermissionType.LESSON || this.formModel.permissionType == PermissionType.EXAM) {
|
||||
model['lessonId'] = this.formModel.lessonId;
|
||||
model['mapId'] = this.formModel.mapId;
|
||||
model['prdCode'] = this.formModel.mapProductCode;
|
||||
} else if (this.formModel.permissionType == PermissionType.SIMULATION) {
|
||||
model['mapId'] = this.formModel.mapId;
|
||||
model['prdCode'] = this.formModel.mapProductCode;
|
||||
if (this.formModel.permissionType == PermissionType.LESSON || this.formModel.permissionType == PermissionType.EXAM) {
|
||||
model['lessonId'] = this.formModel.lessonId;
|
||||
model['mapId'] = this.formModel.mapId;
|
||||
model['prdCode'] = this.formModel.mapProductCode;
|
||||
} else if (this.formModel.permissionType == PermissionType.SIMULATION) {
|
||||
model['mapId'] = this.formModel.mapId;
|
||||
model['prdCode'] = this.formModel.mapProductCode;
|
||||
}
|
||||
|
||||
getTotalRemains(model).then(response => {
|
||||
this.maxTotal = response.data;
|
||||
if (this.maxTotal == 0) {
|
||||
this.numberMessage = '可用权限数量为0';
|
||||
} else {
|
||||
this.numberMessage = `(${this.$t('global.remainPermissionNumber')}:${this.maxTotal})`;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainMaxNumberFailed'));
|
||||
});
|
||||
} else {
|
||||
this.numberMessage = '结束时间必须大于开始时间';
|
||||
}
|
||||
|
||||
getTotalRemains(model).then(response => {
|
||||
this.maxTotal = response.data;
|
||||
this.numberMessage = this.$t('permission.restPermissionMaxNumber').replace('{0}', this.maxTotal);
|
||||
}).catch(() => {
|
||||
this.numberMessage = '';
|
||||
});
|
||||
|
||||
} else {
|
||||
this.numberMessage = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user