10 changed files with 500 additions and 556 deletions
@ -0,0 +1,13 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: kicc系统相关变量定义 |
||||||
|
* 在kicc系统中全局调用的变量全部在这里配置 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/7 |
||||||
|
*/ |
||||||
|
|
||||||
|
// 基础表格变量 |
||||||
|
@basic-table-prefix-cls: ~'@{namespace}-basic-table'; |
||||||
|
@basic-table-header-prefix-cls: ~'@{namespace}-basic-table-header'; |
||||||
|
@basic-table-action-prefix-cls: ~'@{namespace}-basic-table-action'; |
||||||
|
@basic-column-setting-prefix-cls: ~'@{namespace}-basic-column-setting'; |
@ -1,143 +1,43 @@ |
|||||||
/** |
/** |
||||||
* @program: kicc-ui |
* @program: kicc-ui |
||||||
* @description: 角色模块动态渲染配置 |
* @description: 配置参数模块动态渲染配置 |
||||||
* @author: entfrm开发团队-王翔 |
* @author: entfrm开发团队-王翔 |
||||||
* @create: 2022/4/21 |
* @create: 2022/4/21 |
||||||
*/ |
*/ |
||||||
|
import { h } from 'vue'; |
||||||
|
import { Tag } from 'ant-design-vue'; |
||||||
|
import { ColumnProps } from "ant-design-vue/lib/table/interface"; |
||||||
|
|
||||||
import {BasicColumn} from '/@/components/Table'; |
/** 表格列配置 */ |
||||||
import {FormSchema} from '/@/components/Table'; |
export const columns: ColumnProps[] = [ |
||||||
import {h} from 'vue'; |
{ |
||||||
import {Tag} from 'ant-design-vue'; |
title: '参数名称', |
||||||
|
dataIndex: 'name' |
||||||
export const columns: BasicColumn[] = [ |
}, |
||||||
{ |
{ |
||||||
title: '参数名称', |
title: '参数键名', |
||||||
dataIndex: 'name', |
dataIndex: 'key' |
||||||
width: 200 |
}, |
||||||
}, |
{ |
||||||
{ |
title: '参数键值', |
||||||
title: '参数键名', |
dataIndex: 'value' |
||||||
dataIndex: 'key', |
}, |
||||||
width: 200 |
{ |
||||||
}, |
title: '系统内置', |
||||||
{ |
dataIndex: 'isSys', |
||||||
title: '参数键值', |
customRender: ({record}) => { |
||||||
dataIndex: 'value', |
return record.isSys == '0' ? h(Tag, { color: 'success' }, '是') : h(Tag, { color: 'red' }, '否'); |
||||||
width: 200 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '系统内置', |
|
||||||
dataIndex: 'isSys', |
|
||||||
width: 120, |
|
||||||
customRender: ({record}) => { |
|
||||||
let text = ''; |
|
||||||
if (record.isSys === '0'){ |
|
||||||
text = '是'; |
|
||||||
}else { |
|
||||||
text = '否'; |
|
||||||
} |
|
||||||
return h(Tag, ()=> text); |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '备注', |
|
||||||
dataIndex: 'remarks', |
|
||||||
customRender: ({record}) => { |
|
||||||
return record.remarks || h(Tag, {color: 'red'}, () => '暂无数据'); |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建时间', |
|
||||||
dataIndex: 'createTime' |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'name', |
|
||||||
label: '参数名称', |
|
||||||
component: 'Input', |
|
||||||
componentProps: { |
|
||||||
placeholder: '请输入角色名称', |
|
||||||
}, |
|
||||||
colProps: {span: 8} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'key', |
|
||||||
label: '参数键名', |
|
||||||
component: 'Input', |
|
||||||
componentProps: { |
|
||||||
placeholder: '请输入参数键名', |
|
||||||
}, |
|
||||||
colProps: {span: 8} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'isSys', |
|
||||||
label: '系统内置', |
|
||||||
component: 'Select', |
|
||||||
componentProps: { |
|
||||||
options: [ |
|
||||||
{label: '是', value: '0'}, |
|
||||||
{label: '否', value: '1'} |
|
||||||
] |
|
||||||
}, |
|
||||||
colProps: {span: 7} |
|
||||||
} |
} |
||||||
]; |
}, |
||||||
|
{ |
||||||
export const formSchema: FormSchema[] = [ |
title: '备注', |
||||||
{ |
dataIndex: 'remarks', |
||||||
field: 'id', |
customRender: ({record}) => { |
||||||
label: 'ID', |
return record.remarks || h(Tag, {color: 'red'},'暂无数据'); |
||||||
component: 'Input', |
|
||||||
show: false |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'name', |
|
||||||
label: '参数名称', |
|
||||||
required: true, |
|
||||||
component: 'Input', |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'key', |
|
||||||
label: '参数键名', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'value', |
|
||||||
label: '参数键值', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'isSys', |
|
||||||
label: '系统内置', |
|
||||||
component: 'RadioButtonGroup', |
|
||||||
defaultValue: '0', |
|
||||||
componentProps: { |
|
||||||
options: [ |
|
||||||
{label: '是', value: '0'}, |
|
||||||
{label: '否', value: '1'} |
|
||||||
], |
|
||||||
}, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
label: '备注', |
|
||||||
field: 'remarks', |
|
||||||
component: 'InputTextArea', |
|
||||||
} |
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '创建时间', |
||||||
|
dataIndex: 'createTime' |
||||||
|
} |
||||||
]; |
]; |
||||||
|
Loading…
Reference in new issue