feat(web): 优化统一的Controller和Service接口
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import './dialog-permission.css'
|
||||
import {horizontalFormOptions} from "../constants.js";
|
||||
import {apiPost, horizontalFormOptions} from "../constants.js";
|
||||
|
||||
function detailForm() {
|
||||
return {
|
||||
@@ -14,6 +14,11 @@ function detailForm() {
|
||||
type: 'hidden',
|
||||
name: 'id',
|
||||
},
|
||||
{
|
||||
type: 'textarea',
|
||||
label: '确权说明',
|
||||
name: 'description',
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -38,7 +43,7 @@ export function permissionAddDialog() {
|
||||
body: {
|
||||
debug: true,
|
||||
...detailForm(),
|
||||
// api: apiPost('${base}/data_resource/save'),
|
||||
api: apiPost('${base}/confirmation/save'),
|
||||
data: {
|
||||
add: true,
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
resourceDetailDialog,
|
||||
resourceEditeDialog
|
||||
} from "../../components/resource/dialog-resource.js";
|
||||
import {apiGet, apiPost, crudCommonOptions, userOnly} from "../../components/constants.js";
|
||||
import {apiGet, crudCommonOptions, userOnly} from "../../components/constants.js";
|
||||
|
||||
export function tabData() {
|
||||
return {
|
||||
@@ -14,7 +14,7 @@ export function tabData() {
|
||||
{
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiPost('${base}/data_resource/list')
|
||||
...apiGet('${base}/data_resource/list')
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {providerOnly, userOnly} from "../../components/constants.js";
|
||||
import {apiGet, crudCommonOptions, providerOnly, userOnly} from "../../components/constants.js";
|
||||
import {permissionAddDialog} from "../../components/permission/dialog-permission.js";
|
||||
|
||||
export function tabPermissions() {
|
||||
@@ -12,14 +12,59 @@ export function tabPermissions() {
|
||||
{
|
||||
visibleOn: providerOnly,
|
||||
title: '确权管理',
|
||||
body: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...permissionAddDialog()
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/confirmation/list')
|
||||
},
|
||||
]
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...permissionAddDialog()
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
label: '名称',
|
||||
name: 'name',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
name: 'description',
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
type: 'tpl',
|
||||
tpl: "${IF(createdTime, DATETOSTR(createdTime), '-')}"
|
||||
},
|
||||
{
|
||||
label: '操作',
|
||||
width: 100,
|
||||
type: 'operation',
|
||||
fixed: 'right',
|
||||
className: 'nowrap',
|
||||
buttons: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '授权管理',
|
||||
|
||||
Reference in New Issue
Block a user