10 changed files with 565 additions and 281 deletions
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
import type { GencodeCustomFieldParams, GencodeCustomField, GencodeCustomFieldResult } from '/@/api/platform/system/entity/gencodeCustomField'; |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
|
||||
enum Api { |
||||
list = '/system_proxy/system/devtools/gencodeCustomField/list', |
||||
add = '/system_proxy/system/devtools/gencodeCustomField/save', |
||||
get = '/system_proxy/system/devtools/gencodeCustomField', |
||||
edit = '/system_proxy/system/devtools/gencodeCustomField/update', |
||||
del = '/system_proxy/system/devtools/gencodeCustomField/remove', |
||||
} |
||||
|
||||
export const listGencodeCustomField = (params?: Partial<GencodeCustomFieldParams>) => defHttp.get<GencodeCustomFieldResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||
|
||||
export const addGencodeCustomField = (params: Partial<GencodeCustomField>) => defHttp.post({ url: Api.add, data: params }); |
||||
|
||||
export const editGencodeCustomField = (params: Partial<GencodeCustomField>) => defHttp.put({ url: Api.edit, data: params }); |
||||
|
||||
export const getGencodeCustomField = (id: string) => defHttp.get<GencodeCustomField>({ url: `${Api.get}/${id}` }); |
||||
|
||||
export const delGencodeCustomField = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
import type { GencodeCustomObjParams, GencodeCustomObj, GencodeCustomObjResult } from '/@/api/platform/system/entity/gencodeCustomObj'; |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
|
||||
enum Api { |
||||
list = '/system_proxy/system/devtools/gencodeCustomObj/list', |
||||
selectListByValue = '/system_proxy/system/devtools/gencodeCustomObj/selectListByValue', |
||||
add = '/system_proxy/system/devtools/gencodeCustomObj/save', |
||||
get = '/system_proxy/system/devtools/gencodeCustomObj', |
||||
edit = '/system_proxy/system/devtools/gencodeCustomObj/update', |
||||
saveAndGencodeCustomField = '/system_proxy/system/devtools/gencodeCustomObj/saveAndGencodeCustomField', |
||||
del = '/system_proxy/system/devtools/gencodeCustomObj/remove', |
||||
} |
||||
|
||||
export const listGencodeCustomObj = (params?: Partial<GencodeCustomObjParams>) => defHttp.get<GencodeCustomObjResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||
|
||||
export const selectListByValue = (type: string) => defHttp.get<GencodeCustomObj[]>({ url: `${Api.selectListByValue}/${type}` }); |
||||
|
||||
export const addGencodeCustomObj = (params: Partial<GencodeCustomObj>) => defHttp.post({ url: Api.add, data: params }); |
||||
|
||||
export const editGencodeCustomObj = (params: Partial<GencodeCustomObj>) => defHttp.put({ url: Api.edit, data: params }); |
||||
|
||||
export const saveAndGencodeCustomField = (params: Partial<GencodeCustomObj>) => defHttp.put({ url: Api.saveAndGencodeCustomField, data: params }); |
||||
|
||||
export const getGencodeCustomObj = (id: string) => defHttp.get<GencodeCustomObj>({ url: `${Api.get}/${id}` }); |
||||
|
||||
export const delGencodeCustomObj = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
import type { R } from '/#/axios'; |
||||
import type { Page } from '/@/api/common/data/entity'; |
||||
import type { BaseEntity } from '/@/api/common/base/entity'; |
||||
|
||||
export type GencodeCustomFieldParams = Page & GencodeCustomField; |
||||
|
||||
export interface GencodeCustomField extends BaseEntity { |
||||
id: string; |
||||
name: string; |
||||
objId: string; |
||||
sort: number; |
||||
remarks: string; |
||||
[key: string]: any; |
||||
} |
||||
|
||||
export type GencodeCustomFieldResult = R<GencodeCustomField[]>; |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
import type { R } from '/#/axios'; |
||||
import type { Page, CommonEntity } from '/@/api/common/data/entity'; |
||||
|
||||
export type GencodeCustomObjParams = Page & GencodeCustomObj; |
||||
|
||||
export interface GencodeCustomObj extends CommonEntity { |
||||
id: string; |
||||
label: string; |
||||
value: string; |
||||
dataUrl: string; |
||||
tableName: string; |
||||
sort: number; |
||||
type: string; |
||||
[key: string]: any; |
||||
} |
||||
|
||||
export type GencodeCustomObjResult = R<GencodeCustomObj[]>; |
@ -1,97 +0,0 @@
@@ -1,97 +0,0 @@
|
||||
<template> |
||||
<BasicModal |
||||
v-bind="$attrs" |
||||
width="720px" |
||||
@register="registerModal" |
||||
@ok="handleSubmit" |
||||
> |
||||
<BasicForm @register="registerForm"/> |
||||
</BasicModal> |
||||
</template> |
||||
<script lang="ts" setup> |
||||
import { ref, unref } from 'vue'; |
||||
import { BasicForm, useForm } from '/@/components/Form/index'; |
||||
import { formSchema } from './client.data'; |
||||
import { addClient, editClient, getClient, listClient } from '/@/api/platform/system/controller/client'; |
||||
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; |
||||
import { isEmpty } from '/@/utils/is'; |
||||
|
||||
/** 通用变量统一声明区域 */ |
||||
const tag = ref<Nullable<string>>(''); |
||||
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
||||
const emit = defineEmits(['success', 'register']); |
||||
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({ |
||||
labelWidth: 100, |
||||
schemas: formSchema, |
||||
showActionButtonGroup: false, |
||||
baseColProps: { span: 24 } |
||||
}); |
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: BoxPayload = { _tag: '' }) => { |
||||
// 处理清除脏数据 |
||||
await resetFields(); |
||||
await clearValidate(); |
||||
// 处理设置数据 |
||||
tag.value = data._tag; |
||||
const clientId = data.record?.clientId; |
||||
const props: Partial<ModalProps> = { confirmLoading: false }; |
||||
await updateSchema({ |
||||
field: 'clientId', |
||||
componentProps: { |
||||
disabled: unref(tag) != 'add' |
||||
}, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
whitespace: true, |
||||
message: '请输入客户端编码' |
||||
}, |
||||
{ |
||||
validator: async (rule, value) => { |
||||
if (!isEmpty(value)) { |
||||
const result = await listClient({ clientId: value }); |
||||
const list = result.data?.filter(item => item.clientId != clientId); |
||||
if(list?.length > 0) return Promise.reject('该客户端编码已存在'); |
||||
} |
||||
return Promise.resolve(); |
||||
}, |
||||
validateTrigger: 'blur' |
||||
}] |
||||
}); |
||||
// 采用tag标签区分操作 |
||||
switch (unref(tag)) { |
||||
case 'add': |
||||
props.title = '新增客户端'; |
||||
break; |
||||
case 'edit': |
||||
props.title = '编辑客户端'; |
||||
await setFieldsValue(await getClient(clientId)); |
||||
break; |
||||
} |
||||
// 尾部:设置处理后的最终配置数据 |
||||
setModalProps(props); |
||||
}); |
||||
|
||||
/** 处理弹出框提交 */ |
||||
async function handleSubmit() { |
||||
try { |
||||
// 提取验证数据 |
||||
const formData = await validate(); |
||||
// 处理提交之前逻辑 |
||||
setModalProps({ confirmLoading: true }); |
||||
// 采用tag标签区分操作 |
||||
switch (unref(tag)) { |
||||
case 'add': |
||||
await addClient(formData); |
||||
break; |
||||
case 'edit': |
||||
await editClient(formData); |
||||
break; |
||||
} |
||||
// 处理提交完成之后逻辑 |
||||
closeModal(); |
||||
emit('success'); |
||||
} finally { |
||||
setModalProps({ confirmLoading: false }); |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,196 @@
@@ -0,0 +1,196 @@
|
||||
<template> |
||||
<BasicModal |
||||
v-bind="$attrs" |
||||
width="820px" |
||||
@register="registerModal" |
||||
@ok="handleSubmit" |
||||
> |
||||
<BasicForm @register="registerForm"/> |
||||
<BasicTable @register="genTableFieldTypeRegisterTable"> |
||||
<template #toolbar> |
||||
<a-button |
||||
v-show="state.tag != 'view'" |
||||
type="primary" |
||||
@click="handleAdd()" |
||||
>新增</a-button> |
||||
</template> |
||||
<template #bodyCell="{ index, column, record }"> |
||||
<template v-if="column.key === 'action'"> |
||||
<TableAction |
||||
:actions="[ |
||||
{ |
||||
label: '查看', |
||||
icon: 'fa-regular:eye', |
||||
onClick: handleViewEdit.bind(null, record) |
||||
}, |
||||
{ |
||||
label: '编辑', |
||||
icon: 'fa6-regular:pen-to-square', |
||||
onClick: handleEdit.bind(null, record, index) |
||||
}, |
||||
{ |
||||
label: '删除', |
||||
icon: 'ant-design:delete-outlined', |
||||
color: 'error', |
||||
onClick: handleDel.bind(null, record, index) |
||||
}]" |
||||
/> |
||||
</template> |
||||
</template> |
||||
</BasicTable> |
||||
<GenTableFieldTypeModal @register="genTableFieldTypeRegisterModal" @success="handleGenTableFieldType"/> |
||||
</BasicModal> |
||||
</template> |
||||
<script lang="ts" setup> |
||||
import { reactive, computed } from 'vue'; |
||||
import { BasicForm, useForm } from '/@/components/Form/index'; |
||||
import { formSchema, genTableFieldTypeReloadColumns } from './genDataBaseType.data'; |
||||
import { saveAndGenTableFieldType, getGenDatabaseType, selectListByType } from '/@/api/platform/system/controller/genDatabaseType'; |
||||
import { BasicModal, ModalProps, useModal, useModalInner } from '/@/components/Modal'; |
||||
import { BasicTable, TableAction, useTable } from '/@/components/Table'; |
||||
import GenTableFieldTypeModal from './GenTableFieldTypeModal.vue'; |
||||
import { useMessage } from '/@/hooks/web/useMessage'; |
||||
import { isNil } from 'lodash-es'; |
||||
import { isEmpty } from '/@/utils/is'; |
||||
|
||||
/** 通用变量统一声明区域 */ |
||||
interface WindowState { |
||||
tag: string; |
||||
dataSource: Recordable[]; |
||||
} |
||||
const state = reactive<WindowState>({ |
||||
tag: '', |
||||
dataSource: [] |
||||
}); |
||||
const { createConfirm, createMessage } = useMessage(); |
||||
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
||||
const emit = defineEmits(['success', 'register']); |
||||
const [genTableFieldTypeRegisterModal, { openModal: genTableFieldTypeOpenModal }] = useModal(); |
||||
const getDataSource = computed(() => state.dataSource.filter(item => item._action != 'del')); |
||||
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, setProps, updateSchema }] = useForm({ |
||||
labelWidth: 100, |
||||
schemas: formSchema, |
||||
showActionButtonGroup: false, |
||||
baseColProps: { span: 24 } |
||||
}); |
||||
const [genTableFieldTypeRegisterTable] = useTable({ |
||||
dataSource: getDataSource, |
||||
rowKey: 'id', |
||||
columns: genTableFieldTypeReloadColumns, |
||||
useSearchForm: false, |
||||
showTableSetting: false, |
||||
bordered: true, |
||||
pagination: false, |
||||
clickToRowSelect: false, |
||||
showIndexColumn: false, |
||||
maxHeight: 380, |
||||
actionColumn: { |
||||
width: 220, |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
fixed: false, |
||||
ifShow: () => state.tag != 'view' |
||||
}, |
||||
}); |
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: BoxPayload = { _tag: '' }) => { |
||||
// 处理清除脏数据 |
||||
await resetFields(); |
||||
await clearValidate(); |
||||
// 处理设置数据 |
||||
state.tag = data._tag; |
||||
state.dataSource = []; |
||||
const id = data.record?.id; |
||||
const type = data.record?.type; |
||||
const props: Partial<ModalProps> = { confirmLoading: false, showOkBtn: true }; |
||||
await updateSchema({ |
||||
field: 'type', |
||||
componentProps: { |
||||
disabled: state.tag != 'add' |
||||
}, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择数据库类型' |
||||
}, |
||||
{ |
||||
validator: async (rule, value) => { |
||||
if (!isEmpty(value)) { |
||||
const result = await selectListByType(value); |
||||
const list = result.filter(item => item.type != type); |
||||
if(list?.length > 0) return Promise.reject('该数据库类型已存在'); |
||||
} |
||||
return Promise.resolve(); |
||||
}, |
||||
validateTrigger: 'blur' |
||||
}] |
||||
}); |
||||
// 采用tag标签区分操作 |
||||
switch (state.tag) { |
||||
case 'add': |
||||
props.title = '新建数据库字段类型'; |
||||
break; |
||||
case 'view': |
||||
props.title = '查看数据库字段类型'; |
||||
props.showOkBtn = false; |
||||
const genDatabaseTypeView = await getGenDatabaseType(id); |
||||
state.dataSource = genDatabaseTypeView?.genTableFieldTypeList || []; |
||||
await setFieldsValue(genDatabaseTypeView); |
||||
break; |
||||
case 'edit': |
||||
props.title = '编辑数据库字段类型'; |
||||
const genDatabaseTypeEdit = await getGenDatabaseType(id); |
||||
state.dataSource = genDatabaseTypeEdit?.genTableFieldTypeList || []; |
||||
await setFieldsValue(genDatabaseTypeEdit); |
||||
break; |
||||
} |
||||
// 尾部:设置处理后的最终配置数据 |
||||
setModalProps(props); |
||||
}); |
||||
|
||||
function handleAdd() { |
||||
genTableFieldTypeOpenModal(true,{ _tag: 'add' }); |
||||
} |
||||
|
||||
function handleEdit(record: Recordable, index: number) { |
||||
genTableFieldTypeOpenModal(true, { _tag: 'edit', record, index }); |
||||
} |
||||
|
||||
function handleViewEdit(record: Recordable) { |
||||
genTableFieldTypeOpenModal(true, { _tag: 'view', record }); |
||||
} |
||||
|
||||
async function handleDel(record: Recordable, index: number) { |
||||
createConfirm({ |
||||
iconType: 'warning', |
||||
title: '警告', |
||||
content: `是否确认删除标签为${record.label}的数据?`, |
||||
onOk: async () => { |
||||
if (record.id) { |
||||
record._action = 'del'; |
||||
} else state.dataSource.splice(index, 1); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
function handleGenTableFieldType(record: Recordable, index?: number) { |
||||
if (!isNil(index) && index !== -1) { |
||||
state.dataSource.splice(index, 1, record); |
||||
} else state.dataSource.push(record); |
||||
} |
||||
|
||||
async function handleSubmit() { |
||||
try { |
||||
// 提取验证数据 |
||||
const formData = await validate(); |
||||
formData.genTableFieldTypeList = state.dataSource; |
||||
// 处理提交之前逻辑 |
||||
setModalProps({ confirmLoading: true }); |
||||
await saveAndGenTableFieldType(formData); |
||||
// 处理提交完成之后逻辑 |
||||
closeModal(); |
||||
emit('success'); |
||||
} finally { |
||||
setModalProps({ confirmLoading: false }); |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,81 @@
@@ -0,0 +1,81 @@
|
||||
<template> |
||||
<BasicModal |
||||
v-bind="$attrs" |
||||
width="720px" |
||||
:bodyStyle="{ 'margin-top': '25px' }" |
||||
@register="registerModal" |
||||
@ok="handleSubmit" |
||||
> |
||||
<BasicForm @register="registerForm"/> |
||||
</BasicModal> |
||||
</template> |
||||
<script lang="ts" setup> |
||||
import { reactive } from 'vue'; |
||||
import { BasicForm, useForm } from '/@/components/Form/index'; |
||||
import { formSchemaGenTableFieldType } from './genDataBaseType.data'; |
||||
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; |
||||
import { cloneDeep } from 'lodash-es'; |
||||
|
||||
/** 通用变量统一声明区域 */ |
||||
interface WindowState { |
||||
tag: string; |
||||
index: number; |
||||
} |
||||
const state = reactive<WindowState>({ |
||||
tag: '', |
||||
index: undefined! |
||||
}); |
||||
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
||||
const emit = defineEmits(['success', 'register']); |
||||
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, setProps }] = useForm({ |
||||
labelWidth: 80, |
||||
schemas: formSchemaGenTableFieldType, |
||||
showActionButtonGroup: false, |
||||
baseColProps: { span: 24 } |
||||
}); |
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: BoxPayload = { _tag: '' }) => { |
||||
// 处理清除脏数据 |
||||
await resetFields(); |
||||
await clearValidate(); |
||||
await setProps({ disabled: false }); |
||||
// 处理设置数据 |
||||
state.tag = data._tag; |
||||
state.index = data?.index; |
||||
const genTableFieldType = cloneDeep(Object(data.record)); |
||||
const props: Partial<ModalProps> = { confirmLoading: false, showOkBtn: true }; |
||||
// 采用tag标签区分操作 |
||||
switch (state.tag) { |
||||
case 'add': |
||||
props.title = '新增表字段物理类型'; |
||||
genTableFieldType._action = state.tag; |
||||
break; |
||||
case 'view': |
||||
props.title = '查看表字段物理类型'; |
||||
await setProps({ disabled: true }); |
||||
props.showOkBtn = false; |
||||
break; |
||||
case 'edit': |
||||
props.title = '编辑表字段物理类型'; |
||||
genTableFieldType._action = state.tag; |
||||
break; |
||||
} |
||||
await setFieldsValue(genTableFieldType); |
||||
// 尾部:设置处理后的最终配置数据 |
||||
setModalProps(props); |
||||
}); |
||||
|
||||
/** 处理弹出框提交 */ |
||||
async function handleSubmit() { |
||||
try { |
||||
// 提取验证数据 |
||||
const formData = await validate(); |
||||
// 处理提交之前逻辑 |
||||
setModalProps({ confirmLoading: true }); |
||||
emit('success', formData, state.index); |
||||
// 处理提交完成之后逻辑 |
||||
closeModal(); |
||||
} finally { |
||||
setModalProps({ confirmLoading: false }); |
||||
} |
||||
} |
||||
</script> |
@ -1,154 +0,0 @@
@@ -1,154 +0,0 @@
|
||||
import { BasicColumn } from '/@/components/Table'; |
||||
import { FormSchema } from '/@/components/Table'; |
||||
|
||||
export const columns: BasicColumn[] = [ |
||||
{ |
||||
title: '客户端Id', |
||||
dataIndex: 'clientId', |
||||
width: 100 |
||||
}, |
||||
{ |
||||
title: '客户端密钥', |
||||
dataIndex: 'clientSecret', |
||||
width: 100 |
||||
}, |
||||
{ |
||||
title: '授权类型', |
||||
dataIndex: 'authorizedGrantTypes', |
||||
width: 130 |
||||
}, |
||||
{ |
||||
title: '授权范围', |
||||
dataIndex: 'scope', |
||||
width: 90 |
||||
}, |
||||
{ |
||||
title: '令牌过期秒数', |
||||
dataIndex: 'accessTokenValidity', |
||||
width: 130 |
||||
}, |
||||
{ |
||||
title: '令牌过期秒数', |
||||
dataIndex: 'refreshTokenValidity', |
||||
width: 130 |
||||
}, |
||||
{ |
||||
title: '创建时间', |
||||
dataIndex: 'createTime', |
||||
width: 100 |
||||
} |
||||
]; |
||||
|
||||
export const searchFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'clientId', |
||||
label: '客户端编码', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '请输入客户端编码', |
||||
}, |
||||
colProps: { span: 8 }, |
||||
}, |
||||
{ |
||||
field: 'dateRange', |
||||
label: '创建时间', |
||||
component: 'RangePicker', |
||||
componentProps: { |
||||
style: { width:'100%' }, |
||||
valueFormat: 'YYYY-MM-DD', |
||||
placeholder: ['开始日期','结束日期'] |
||||
}, |
||||
colProps: { span: 8 } |
||||
} |
||||
]; |
||||
|
||||
export const formSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'clientId', |
||||
label: '客户端Id', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'clientSecret', |
||||
label: '客户端密钥', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'authorizedGrantTypes', |
||||
label: '授权类型', |
||||
component: 'InputTextArea', |
||||
required:true, |
||||
componentProps: { |
||||
rows: 3 |
||||
}, |
||||
colProps: { |
||||
span: 24 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'scope', |
||||
label: '授权范围', |
||||
component: 'Input', |
||||
required:true, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'accessTokenValidity', |
||||
label: '过期秒数', |
||||
component: 'InputNumber', |
||||
componentProps: { |
||||
style: { width:'100%' }, |
||||
min: 0 |
||||
}, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'refreshTokenValidity', |
||||
label: '刷新秒数', |
||||
component: 'InputNumber', |
||||
componentProps: { |
||||
style: { width:'100%' }, |
||||
min: 0 |
||||
}, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'webServerRedirectUri', |
||||
label: '回调地址', |
||||
component: 'Input', |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'additionalInformation', |
||||
label: '附加说明', |
||||
component: 'InputTextArea', |
||||
componentProps: { |
||||
rows: 6 |
||||
}, |
||||
colProps: { |
||||
span: 24 |
||||
} |
||||
} |
||||
]; |
@ -0,0 +1,162 @@
@@ -0,0 +1,162 @@
|
||||
import { BasicColumn } from '/@/components/Table'; |
||||
import { FormSchema } from '/@/components/Table'; |
||||
|
||||
export const columns: BasicColumn[] = [ |
||||
{ |
||||
title: '标签', |
||||
dataIndex: 'label' |
||||
}, |
||||
{ |
||||
title: '完整类名', |
||||
dataIndex: 'value' |
||||
}, |
||||
{ |
||||
title: '数据接口', |
||||
dataIndex: 'dataUrl' |
||||
}, |
||||
{ |
||||
title: '物理表名', |
||||
dataIndex: 'tableName' |
||||
}, |
||||
{ |
||||
title: '排序', |
||||
dataIndex: 'sort' |
||||
} |
||||
]; |
||||
|
||||
export const searchFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'label', |
||||
label: '标签', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '请输入标签', |
||||
}, |
||||
colProps: { span: 6 } |
||||
}, |
||||
{ |
||||
field: 'value', |
||||
label: '完整类名', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '请输入完整类名', |
||||
}, |
||||
colProps: { span: 6 } |
||||
} |
||||
]; |
||||
|
||||
export const formSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'label', |
||||
label: '标签', |
||||
component: 'Input', |
||||
colProps: { span: 16 }, |
||||
required: true |
||||
}, |
||||
{ |
||||
field: 'value', |
||||
label: '完整类名', |
||||
component: 'Input', |
||||
colProps: { span: 16 }, |
||||
required: true |
||||
}, |
||||
{ |
||||
field: 'dataUrl', |
||||
label: '数据接口', |
||||
component: 'Input', |
||||
colProps: { span: 16 } |
||||
}, |
||||
{ |
||||
field: 'tableName', |
||||
label: '物理表名', |
||||
component: 'Input', |
||||
colProps: { span: 16 } |
||||
}, |
||||
{ |
||||
field: 'sort', |
||||
label: '排序', |
||||
component: 'InputNumber', |
||||
colProps: { span: 16 }, |
||||
defaultValue: 1, |
||||
required: true, |
||||
componentProps: { |
||||
style: { width:'100%' }, |
||||
min: 0 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'type', |
||||
label: '基本类型', |
||||
component: 'RadioGroup', |
||||
colProps: { span: 16 }, |
||||
required: true, |
||||
defaultValue: '0', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '是', value: '0' }, |
||||
{ label: '否', value: '1' } |
||||
] |
||||
} |
||||
} |
||||
]; |
||||
|
||||
export const formSchemaGencodeCustomField: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: '_action', |
||||
label: '操作标识字段', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'name', |
||||
label: 'java属性', |
||||
component: 'Input', |
||||
required: true |
||||
}, |
||||
{ |
||||
field: 'remarks', |
||||
label: '备注', |
||||
component: 'InputTextArea', |
||||
required: true, |
||||
componentProps: { |
||||
rows: 3 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'sort', |
||||
label: '排序', |
||||
component: 'InputNumber', |
||||
componentProps: { |
||||
style: { width:'100%' }, |
||||
min: 0 |
||||
}, |
||||
required: true |
||||
} |
||||
]; |
||||
|
||||
export const gencodeCustomFieldColumns: BasicColumn[] = [ |
||||
{ |
||||
title: 'java属性', |
||||
dataIndex: 'name' |
||||
}, |
||||
{ |
||||
title: '备注', |
||||
dataIndex: 'remarks' |
||||
}, |
||||
{ |
||||
title: '排序', |
||||
dataIndex: 'sort' |
||||
} |
||||
]; |
Loading…
Reference in new issue