完成扩展字段菜单
parent
85eda80c13
commit
8eff8f1952
|
@ -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 (
|
||||
|
|
|
@ -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: '字段名',
|
||||
|
|
Loading…
Reference in New Issue