From 41239717c4446af79268b968557274f88a0afaeb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 15 八月 2020 10:16:07 +0800 Subject: [PATCH] 2020-08-15 --- src/tabviews/zshare/mutilform/index.jsx | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 3926e06..5046aa5 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -5,7 +5,7 @@ import moment from 'moment' import Api from '@/api' -import { formRule } from '@/utils/option.js' +import { formRule, calendarColors } from '@/utils/option.js' import Utils from '@/utils/utils.js' import FileUpload from '../fileupload' import './index.scss' @@ -564,6 +564,28 @@ </Form.Item> </Col> ) + } else if (item.type === 'color') { // 棰滆壊閫夋嫨 + fields.push( + <Col span={24 / cols} key={index}> + <Form.Item label={item.label}> + {getFieldDecorator(item.field, { + initialValue: item.initval, + rules: [ + { + required: item.required === 'true', + message: this.props.dict['form.required.select'] + item.label + '!' + } + ] + })( + <Select onChange={(value, option) => {this.selectChange(item, value, option)}} disabled={item.readonly === 'true'}> + {calendarColors.map(option => + <Select.Option key={option.name} style={{background: option.name, color: option.value}} value={option.name}>{option.name}</Select.Option> + )} + </Select> + )} + </Form.Item> + </Col> + ) } else if (item.type === 'select' || item.type === 'link') { // 涓嬫媺鎼滅储 let hasSubField = false if (item.linkSubField && item.linkSubField.length > 0) { // 瀛樺湪鍏宠仈瀛楁锛屾暟鎹瓨鍌� -- Gitblit v1.8.0