优化组织创建
This commit is contained in:
@@ -17,10 +17,11 @@ onMounted(() => {
|
||||
type: 'crud',
|
||||
syncLocation: false,
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
label: '新增组织',
|
||||
level: 'primary',
|
||||
icon: 'fa fa-plus',
|
||||
label: '',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '新增组织',
|
||||
@@ -30,10 +31,17 @@ onMounted(() => {
|
||||
method: 'post',
|
||||
url: `${information.baseUrl}/organization/save`,
|
||||
data: {
|
||||
name: '${name}',
|
||||
code: '${code|default:undefined}',
|
||||
name: '${name|default:undefined}',
|
||||
},
|
||||
},
|
||||
body: [
|
||||
{
|
||||
type: 'input-text',
|
||||
name: 'code',
|
||||
label: '组织编号',
|
||||
placeholder: '不填则自动生成',
|
||||
},
|
||||
{
|
||||
type: 'input-text',
|
||||
name: 'name',
|
||||
@@ -65,14 +73,37 @@ onMounted(() => {
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
width: 150,
|
||||
name: 'code',
|
||||
label: '组织编号',
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
label: '组织名称',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
width: 100,
|
||||
label: '操作',
|
||||
type: 'operation',
|
||||
buttons: [
|
||||
{
|
||||
type: 'action',
|
||||
icon: 'fa fa-trash',
|
||||
label: '删除',
|
||||
level: 'danger',
|
||||
size: 'xs',
|
||||
actionType: 'ajax',
|
||||
api: {
|
||||
method: 'delete',
|
||||
url: `${information.baseUrl}/jsonapi/organization/\${id}`,
|
||||
},
|
||||
messages: {
|
||||
success: '删除成功',
|
||||
failed: '删除失败',
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user