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, indexShow: true,
columns: [ columns: [
{ {
title: '创建时间', title: '权限名称',
prop: 'createTime' prop: 'name'
},
{
title: '创建者',
prop: 'creatorUserName'
}, },
{ {
title: '是否包权限', title: '是否包权限',
@ -87,10 +83,6 @@ export default {
columnValue: (row) => { return this.$convertField(row.isPackage, this.ruleLists, ['value', 'label']); }, columnValue: (row) => { return this.$convertField(row.isPackage, this.ruleLists, ['value', 'label']); },
tagType: (row) => { return ''; } tagType: (row) => { return ''; }
}, },
{
title: '权限名称',
prop: 'name'
},
{ {
title: this.$t('orderAuthor.permissionType'), title: this.$t('orderAuthor.permissionType'),
prop: 'type', prop: 'type',
@ -98,6 +90,14 @@ export default {
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); }, columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
tagType: (row) => { return ''; } tagType: (row) => { return ''; }
}, },
{
title: '创建时间',
prop: 'createTime'
},
{
title: '创建者',
prop: 'creatorUserName'
},
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog title="修改权限内容" :visible.sync="dialogShow" width="800px" :before-close="close"> <el-dialog title="打包详情" :visible.sync="dialogShow" width="800px" :before-close="close">
<div> <div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div> </div>

View File

@ -162,6 +162,7 @@ export default {
validator[PermissionType.SCREEN] = () => { return true; }; validator[PermissionType.SCREEN] = () => { return true; };
if (endTime && startTime && this.formModel.permissionType && validator[this.formModel.permissionType]()) { if (endTime && startTime && this.formModel.permissionType && validator[this.formModel.permissionType]()) {
if (endTime > startTime) {
const model = { const model = {
startTime: startTime, startTime: startTime,
endTime: endTime, endTime: endTime,
@ -180,11 +181,17 @@ export default {
getTotalRemains(model).then(response => { getTotalRemains(model).then(response => {
this.maxTotal = response.data; this.maxTotal = response.data;
this.numberMessage = this.$t('permission.restPermissionMaxNumber').replace('{0}', this.maxTotal); if (this.maxTotal == 0) {
this.numberMessage = '可用权限数量为0';
} else {
this.numberMessage = `${this.$t('global.remainPermissionNumber')}${this.maxTotal}`;
}
}).catch(() => { }).catch(() => {
this.numberMessage = ''; this.$messageBox(this.$t('error.obtainMaxNumberFailed'));
}); });
} else {
this.numberMessage = '结束时间必须大于开始时间';
}
} else { } else {
this.numberMessage = ''; this.numberMessage = '';
} }