|
|
|
@ -1,10 +1,14 @@ |
|
|
|
import { FormSchema } from '/@/components/Form'; |
|
|
|
const colProps = { |
|
|
|
span: 8, |
|
|
|
}; |
|
|
|
|
|
|
|
export const schemas: FormSchema[] = [ |
|
|
|
{ |
|
|
|
field: 'title', |
|
|
|
component: 'Input', |
|
|
|
label: '标题', |
|
|
|
colProps, |
|
|
|
componentProps: { |
|
|
|
placeholder: '给目标起个名字', |
|
|
|
}, |
|
|
|
@ -14,12 +18,37 @@ export const schemas: FormSchema[] = [ |
|
|
|
field: 'time', |
|
|
|
component: 'RangePicker', |
|
|
|
label: '起止日期', |
|
|
|
colProps, |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'client', |
|
|
|
component: 'Input', |
|
|
|
colProps, |
|
|
|
label: '客户', |
|
|
|
helpMessage: '目标的服务对象', |
|
|
|
subLabel: '( 选填 )', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请描述你服务的客户,内部客户直接 @姓名/工号', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'weights', |
|
|
|
component: 'InputNumber', |
|
|
|
label: '权重', |
|
|
|
colProps, |
|
|
|
subLabel: '( 选填 )', |
|
|
|
componentProps: { |
|
|
|
formatter: (value: string) => (value ? `${value}%` : ''), |
|
|
|
parser: (value: string) => value.replace('%', ''), |
|
|
|
placeholder: '请输入', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'target', |
|
|
|
component: 'InputTextArea', |
|
|
|
label: '目标描述', |
|
|
|
colProps, |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入你的阶段性工作目标', |
|
|
|
rows: 4, |
|
|
|
@ -30,46 +59,33 @@ export const schemas: FormSchema[] = [ |
|
|
|
field: 'metrics', |
|
|
|
component: 'InputTextArea', |
|
|
|
label: '衡量标准', |
|
|
|
colProps, |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入衡量标准', |
|
|
|
rows: 4, |
|
|
|
}, |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'client', |
|
|
|
component: 'Input', |
|
|
|
label: '客户', |
|
|
|
helpMessage: '目标的服务对象', |
|
|
|
subLabel: '( 选填 )', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请描述你服务的客户,内部客户直接 @姓名/工号', |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
field: 'inviteer', |
|
|
|
component: 'Input', |
|
|
|
label: '邀评人', |
|
|
|
subLabel: '( 选填 )', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请直接 @姓名/工号,最多可邀请 5 人', |
|
|
|
colProps: { |
|
|
|
span: 8, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'weights', |
|
|
|
component: 'InputNumber', |
|
|
|
label: '权重', |
|
|
|
subLabel: '( 选填 )', |
|
|
|
componentProps: { |
|
|
|
formatter: (value: string) => (value ? `${value}%` : ''), |
|
|
|
parser: (value: string) => value.replace('%', ''), |
|
|
|
placeholder: '请输入', |
|
|
|
placeholder: '请直接 @姓名/工号,最多可邀请 5 人', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'disclosure', |
|
|
|
component: 'RadioGroup', |
|
|
|
label: '目标公开', |
|
|
|
colProps: { |
|
|
|
span: 16, |
|
|
|
}, |
|
|
|
itemProps: { |
|
|
|
extra: '客户、邀评人默认被分享', |
|
|
|
}, |
|
|
|
@ -91,9 +107,12 @@ export const schemas: FormSchema[] = [ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'disclosurer', |
|
|
|
field: 'disclosure', |
|
|
|
component: 'Select', |
|
|
|
label: ' ', |
|
|
|
colProps: { |
|
|
|
span: 8, |
|
|
|
}, |
|
|
|
show: ({ model }) => { |
|
|
|
return model.disclosure === '2'; |
|
|
|
}, |
|
|
|
|