2020-12-16 13:59:31 +08:00
|
|
|
<template>
|
2020-12-16 16:05:33 +08:00
|
|
|
<div>
|
|
|
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
|
|
|
</div>
|
2020-12-16 13:59:31 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-12-16 16:05:33 +08:00
|
|
|
export default {
|
|
|
|
name: 'Manage',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
pagerConfig: {
|
|
|
|
pageSize: 'pageSize',
|
|
|
|
pageIndex: 'pageNum'
|
|
|
|
},
|
|
|
|
queryForm: {
|
|
|
|
labelWidth: '140px',
|
|
|
|
reset: false,
|
|
|
|
queryObject: {
|
|
|
|
mapId: {
|
|
|
|
type: 'select',
|
|
|
|
label: this.$t('orderAuthor.mapName'),
|
|
|
|
config: {
|
|
|
|
data: []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
queryList: {
|
|
|
|
query: this.queryFunction,
|
|
|
|
selectCheckShow: false,
|
|
|
|
indexShow: true,
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
|
|
|
prop: 'organizationName'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.permissionName'),
|
|
|
|
prop: 'permissionName'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.founder'),
|
|
|
|
prop: 'userNickname'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.publicOrPrivate'),
|
|
|
|
prop: 'canDistribute',
|
|
|
|
type: 'tag',
|
|
|
|
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
|
|
|
tagType: (row) => {
|
|
|
|
switch (row.canDistribute) {
|
|
|
|
case true: return 'success';
|
|
|
|
case false: return 'danger';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.permanenceOrNot'),
|
|
|
|
prop: 'forever',
|
|
|
|
type: 'tag',
|
|
|
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
|
|
|
tagType: (row) => {
|
|
|
|
switch (row.forever) {
|
|
|
|
case true: return 'success';
|
|
|
|
case false: return 'danger';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('global.amount'),
|
|
|
|
prop: 'amount'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('global.remains'),
|
|
|
|
prop: 'remains'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.startTime'),
|
|
|
|
prop: 'startTime',
|
|
|
|
type: 'formatter',
|
|
|
|
formatter: this.formatterDate
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('orderAuthor.endTime'),
|
|
|
|
prop: 'endTime',
|
|
|
|
type: 'formatter',
|
|
|
|
formatter: this.formatterDate
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: this.$t('global.status'),
|
|
|
|
prop: 'status',
|
|
|
|
type: 'tag',
|
|
|
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
|
|
|
tagType: (row) => {
|
|
|
|
switch (row.status) {
|
|
|
|
case '1': return 'success';
|
|
|
|
default: return 'danger';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
title: this.$t('global.operate'),
|
|
|
|
width: this.$i18n.locale == 'en' ? '400' : '300',
|
|
|
|
buttons: [
|
|
|
|
{
|
|
|
|
name: this.$t('orderAuthor.obtainQrCode'),
|
|
|
|
handleClick: this.handleRtCodeShow,
|
|
|
|
type: '',
|
|
|
|
showControl: (row) => { return row.status == '1'; }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: this.$t('orderAuthor.setupFailure'),
|
|
|
|
handleClick: this.handleDelete,
|
|
|
|
type: '',
|
|
|
|
showControl: (row) => { return row.status == '1'; }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: this.$t('orderAuthor.authorityDetails'),
|
|
|
|
handleClick: this.handlePermissionDetail,
|
|
|
|
type: '',
|
|
|
|
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: this.$t('orderAuthor.distributionAttribution'),
|
|
|
|
handleClick: this.handleBelongs,
|
|
|
|
type: '',
|
|
|
|
showControl: (row) => { return row.amount !== row.remains; }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: this.$t('orderAuthor.recovery'),
|
|
|
|
handleClick: this.handleRestore,
|
|
|
|
type: 'danger',
|
|
|
|
showControl: (row) => { return row.status == '1' && row.canRestore; }
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
actions: [
|
|
|
|
{ text: this.$t('orderAuthor.createPackage'), handler: this.handleCreatePackage },
|
|
|
|
{ text: '创建项目权限包', handler: this.handleCreateProjectPackage },
|
|
|
|
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.loadInitData();
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
|
2020-12-16 13:59:31 +08:00
|
|
|
}
|
2020-12-16 16:05:33 +08:00
|
|
|
};
|
2020-12-16 13:59:31 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|