feat(web): 增加授权相关界面
This commit is contained in:
@@ -59,9 +59,9 @@ useAmis(information => {
|
||||
tabs: [
|
||||
// tabOverview(),
|
||||
// tabMarket(),
|
||||
tabPermissions(),
|
||||
tabCheck(),
|
||||
tabData(),
|
||||
tabPermissions(),
|
||||
tabUser(),
|
||||
tabSettings(),
|
||||
]
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
stringField,
|
||||
timeField,
|
||||
} from "../../components/constants.js";
|
||||
import {permissionDetailDialog} from "../../components/permission/dialog-permission.js";
|
||||
import {confirmationDetailDialog} from "../../components/permission/dialog-permission.js";
|
||||
|
||||
export function tabCheck() {
|
||||
return {
|
||||
@@ -40,7 +40,7 @@ export function tabCheck() {
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...permissionDetailDialog(
|
||||
...confirmationDetailDialog(
|
||||
'parameters.confirmationId',
|
||||
[
|
||||
{
|
||||
@@ -67,7 +67,7 @@ export function tabCheck() {
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...permissionDetailDialog('parameters.confirmationId'),
|
||||
...confirmationDetailDialog('parameters.confirmationId'),
|
||||
},
|
||||
]),
|
||||
],
|
||||
|
||||
@@ -8,10 +8,10 @@ import {
|
||||
arrayInCheck,
|
||||
arrayOutCheck,
|
||||
confirmationState,
|
||||
confirmationStateMapping,
|
||||
crudCommonOptions,
|
||||
mappingField,
|
||||
operationField,
|
||||
permissionStateMapping,
|
||||
timeField,
|
||||
userOnly
|
||||
} from "../../components/constants.js";
|
||||
@@ -40,7 +40,7 @@ export function resourceList() {
|
||||
label: '描述',
|
||||
name: 'description',
|
||||
},
|
||||
mappingField('confirmationState', '确权状态', confirmationStateMapping),
|
||||
mappingField('confirmationState', '确权状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import {
|
||||
apiGet,
|
||||
confirmationStateMapping,
|
||||
crudCommonOptions,
|
||||
customerOnly,
|
||||
mappingField,
|
||||
operationField,
|
||||
permissionStateMapping,
|
||||
providerOnly,
|
||||
stringField,
|
||||
stringWrapField,
|
||||
@@ -11,9 +12,12 @@ import {
|
||||
userOnly,
|
||||
} from "../../components/constants.js";
|
||||
import {
|
||||
permissionAddDialog,
|
||||
permissionDetailDialog,
|
||||
permissionEditeDialog,
|
||||
authenticationAddDialog,
|
||||
authenticationDetailDialog,
|
||||
authenticationEditeDialog,
|
||||
confirmationAddDialog,
|
||||
confirmationDetailDialog,
|
||||
confirmationEditeDialog,
|
||||
} from "../../components/permission/dialog-permission.js";
|
||||
|
||||
export function tabPermissions() {
|
||||
@@ -25,6 +29,85 @@ export function tabPermissions() {
|
||||
body: {
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
visibleOn: customerOnly,
|
||||
title: '授权管理',
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/authentication/list')
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...authenticationAddDialog()
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
stringField('name', '名称', 200),
|
||||
stringWrapField('description', '描述'),
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog(),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/retract/${id}'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'DRAFT' || state === 'REJECT'}",
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: "${state !== 'DRAFT'}",
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...authenticationEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
visibleOn: providerOnly,
|
||||
title: '确权管理',
|
||||
@@ -40,20 +123,20 @@ export function tabPermissions() {
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...permissionAddDialog()
|
||||
...confirmationAddDialog()
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
stringField('name', '名称', 200),
|
||||
stringWrapField('description', '描述'),
|
||||
mappingField('state', '状态', confirmationStateMapping),
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...permissionDetailDialog(),
|
||||
...confirmationDetailDialog(),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
@@ -87,7 +170,7 @@ export function tabPermissions() {
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...permissionEditeDialog(),
|
||||
...confirmationEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: "${state === 'CHECKING'}",
|
||||
@@ -104,10 +187,6 @@ export function tabPermissions() {
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '授权管理',
|
||||
body: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user