完成扩展字段菜单

main
GaoF 2024-08-01 17:09:44 +08:00
parent 85eda80c13
commit 8eff8f1952
2 changed files with 20 additions and 13 deletions

View File

@ -16,17 +16,13 @@
<a-col :span="12">
<a-form-item label="所属模块:" name="model">
<a-select
:disabled="Boolean(formData.id)"
v-model:value="formData.model"
placeholder="请选择所属模块"
:options="tool.dictList('EXTEND_FIELD_MODEL')"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="字段名:" name="fieldName">
<a-input v-model:value="formData.fieldName" placeholder="请输入字段名" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="字段类型:" name="fieldType">
<a-input v-model:value="formData.fieldType" placeholder="请输入字段名" allow-clear />
@ -50,7 +46,7 @@
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-item label="备注:" name="remarks">
<a-textarea v-model:value="formData.remarks" placeholder="请输入备注" allow-clear />
</a-form-item>
@ -102,13 +98,13 @@
//
let selectableData = ref([
{
name: '',
name: ''
}
])
const addSelectableData = () => {
selectableData.value.push({
name: '',
name: ''
})
}
@ -141,7 +137,11 @@
visible.value = false
}
//
const formRules = {}
const formRules = {
name: [required('请输入名称')],
fieldType: [required('请输入类型')],
model: [required('请输入模块')]
}
//
const onSubmit = () => {
if (

View File

@ -3,8 +3,12 @@
<a-form ref="searchFormRef" name="advanced_search" :model="searchFormState">
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="所属类型" name="type">
<a-input v-model:value="searchFormState.type" placeholder="请输入所属类型" />
<a-form-item label="所属模块" name="model">
<a-select
v-model:value="searchFormState.model"
placeholder="请选择所属模块"
:options="tool.dictList('EXTEND_FIELD_MODEL')"
/>
</a-form-item>
</a-col>
<a-col :span="6">
@ -52,6 +56,9 @@
<template v-if="column.dataIndex === 'enabledState'">
{{ $TOOL.dictTypeData('COMMON_STATUS', record.enabledState) }}
</template>
<template v-if="column.dataIndex === 'model'">
{{ $TOOL.dictTypeData('EXTEND_FIELD_MODEL', record.model) }}
</template>
<template v-if="column.dataIndex === 'action'">
<a-space>
<a @click="formRef.onOpen(record)" v-if="hasPerm('extendFieldEdit')"></a>
@ -83,8 +90,8 @@
dataIndex: 'name'
},
{
title: '所属类型',
dataIndex: 'type'
title: '所属模块',
dataIndex: 'model'
},
{
title: '字段名',