|
|
|
@ -1,16 +1,6 @@
|
|
|
|
|
import { BasicColumn, FormSchema } from '/@/components/Table'
|
|
|
|
|
import { Tag } from 'ant-design-vue'
|
|
|
|
|
import { GetTables } from './api'
|
|
|
|
|
const columnViewData = []
|
|
|
|
|
const res: API.DataResult = await GetTables()
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
columnViewData.push({
|
|
|
|
|
label: item.description,
|
|
|
|
|
value: item.name,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
import { GetTablesByClient } from './api'
|
|
|
|
|
|
|
|
|
|
export const columns: BasicColumn[] = [
|
|
|
|
|
// {
|
|
|
|
@ -84,21 +74,21 @@ export const formSchema: FormSchema[] = [
|
|
|
|
|
field: 'name',
|
|
|
|
|
label: '模板名称',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 7, offset: 2 },
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'orderNo',
|
|
|
|
|
label: '排序号',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
defaultValue: 0,
|
|
|
|
|
colProps: { span: 7 },
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'status',
|
|
|
|
|
label: '是否启用',
|
|
|
|
|
component: 'RadioButtonGroup',
|
|
|
|
|
defaultValue: 1,
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
options: [
|
|
|
|
|
{ label: '是', value: 0 },
|
|
|
|
@ -110,19 +100,28 @@ export const formSchema: FormSchema[] = [
|
|
|
|
|
{
|
|
|
|
|
field: 'columnView',
|
|
|
|
|
label: '关联表',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: true,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
options: columnViewData,
|
|
|
|
|
},
|
|
|
|
|
show: false,
|
|
|
|
|
componentProps: () => {
|
|
|
|
|
return {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: GetTablesByClient,
|
|
|
|
|
labelField: 'description',
|
|
|
|
|
valueField: 'name',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'note',
|
|
|
|
|
label: '备注',
|
|
|
|
|
component: 'InputTextArea',
|
|
|
|
|
colProps: { span: 20, offset: 2 },
|
|
|
|
|
colProps: { span: 20 },
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
export const permissionFormSchema: FormSchema[] = [
|
|
|
|
|