This commit is contained in:
ival 2019-09-03 13:04:30 +08:00
commit a29bce2751
3 changed files with 39 additions and 32 deletions

View File

@ -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'),

View File

@ -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>

View File

@ -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 = '';
}