| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Popover } from 'antd' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Popover, message } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import { formRule } from '@/utils/option.js' |
| | |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'number') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item help={item.help || null} label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [{ |
| | | required: item.readonly ? false : !!item.required, |
| | | message: '请输入' + item.label + '!' |
| | | }] |
| | | })(<InputNumber min={item.min || 0} max={item.max || 10000} precision={item.precision || 0} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | if (item.help) { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item help={item.help} label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [{ |
| | | required: item.readonly ? false : !!item.required, |
| | | message: '请输入' + item.label + '!' |
| | | }] |
| | | })(<InputNumber min={item.min || 0} max={item.max || 10000} precision={item.precision || 0} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [{ |
| | | required: item.readonly ? false : !!item.required, |
| | | message: '请输入' + item.label + '!' |
| | | }] |
| | | })(<InputNumber min={item.min || 0} max={item.max || 10000} precision={item.precision || 0} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } |
| | | } else if (item.type === 'select') { // 下拉搜索 |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | |
| | | }) |
| | | } |
| | | |
| | | if (values.width === 0) { |
| | | let utype = {picture: '图片', video: '视频', slider: '进度条', splitline: '分割线', barcode: '条形码', qrcode: '二维码'} |
| | | |
| | | if (utype[values.eleType]) { |
| | | message.warning(utype[values.eleType] + '元素宽度不可为0!') |
| | | return |
| | | } |
| | | } |
| | | |
| | | resolve(values) |
| | | } else { |
| | | reject(err) |
| | |
| | | _options = [{ value: 'text', text: '文本'}] |
| | | } |
| | | |
| | | let width = card.width || 12 |
| | | let width = card.width === undefined ? 12 : card.width |
| | | if (/x/.test(card.width)) { |
| | | width = +width.replace(/x/, '.5') |
| | | } |
| | |
| | | { |
| | | type: 'number', |
| | | key: 'width', |
| | | min: 0.5, |
| | | min: 0, |
| | | max: 24, |
| | | precision: 1, |
| | | label: '元素宽度', |
| | | initVal: width, |
| | | tooltip: '栅格布局,每行等分为24列,可设置半列即.5。', |
| | | tooltip: '栅格布局,每行等分为24列,可设置半列即.5。注:为0时宽度依据内容自适应(文本、数值、提示(图标)、当前时间、公式)。', |
| | | required: true |
| | | }, |
| | | { |
| | |
| | | border-radius: 15px; |
| | | } |
| | | } |
| | | .card-cell.ant-col-0 { |
| | | display: block; |
| | | float: left; |
| | | } |
| | | .card-cell:hover, .card-button-cell:hover { |
| | | box-shadow: 0px 0px 2px #1890ff; |
| | | } |
| | |
| | | if (options.length === 0) { |
| | | options = [{Value: '1', Text: '选项1'}, {Value: '2', Text: '选项2'}] |
| | | } |
| | | formItem = (<Radio.Group value={card.initval} style={{lineHeight: '36px'}}> |
| | | formItem = (<Radio.Group value={card.initval} style={{lineHeight: '40px', whiteSpace: 'nowrap'}}> |
| | | {options.map((item, i) => (<Radio key={i} value={item.Value}> {item.Text} </Radio>))} |
| | | </Radio.Group>) |
| | | } else if (card.type === 'check') { |
| | | formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | formItem = <Checkbox style={{lineHeight: '36px', whiteSpace: 'nowrap'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | } else if (card.type === 'range') { |
| | | let vals = card.initval.split(',') |
| | | formItem = (<> |
| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap, action } = this.state.card |
| | | const { card } = this.state |
| | | |
| | | return getWrapForm(wrap, action) |
| | | return getWrapForm(card.wrap, card.uuid) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap, action = []) { |
| | | export default function (wrap, uuid) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | let appType = sessionStorage.getItem('appType') |
| | | |
| | |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | let menu = window.GLOB.customMenu |
| | | let modules = MenuUtils.getSupModules(menu.components, uuid, menu.interfaces) |
| | | |
| | | const wrapForm = [ |
| | | { |
| | |
| | | forbid: !!appType |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | field: 'supModule', |
| | | label: '上级组件', |
| | | initval: wrap.supModule || [], |
| | | required: false, |
| | | options: modules, |
| | | forbid: sessionStorage.getItem('editMenuType') === 'popview' |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | import { Select, DatePicker, Input, Popover, Form, Switch, Checkbox } from 'antd' |
| | | import { Select, DatePicker, Input, Popover, Form, Switch, Checkbox, Radio } from 'antd' |
| | | import { EditOutlined, CopyOutlined, CloseOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | format={format} |
| | | className="data-range" |
| | | placeholder={['BeginTime', 'EndTime']} |
| | | renderExtraFooter={() => 'extra footer'} |
| | | renderExtraFooter={() => 'extra footer'} |
| | | value={_defaultValue} |
| | | /> |
| | | } else if (card.type === 'group') { |
| | | formItem = <DateGroup card={card} /> |
| | | } else if (card.type === 'switch') { |
| | | formItem = (<Switch checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''} style={{marginTop: '8px'}} checked={card.initval === card.openVal}/>) |
| | | } else if (card.type === 'radio') { |
| | | let options = card.options |
| | | if (options.length === 0) { |
| | | options = [{Value: '1', Text: '选项1'}, {Value: '2', Text: '选项2'}] |
| | | } |
| | | formItem = (<Radio.Group value={card.initval} style={{lineHeight: '40px', whiteSpace: 'nowrap'}}> |
| | | {options.map((item, i) => (<Radio key={i} value={item.Value}> {item.Text} </Radio>))} |
| | | </Radio.Group>) |
| | | } else if (card.type === 'check') { |
| | | formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | formItem = <Checkbox style={{lineHeight: '36px', whiteSpace: 'nowrap'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | } else if (card.type === 'range') { |
| | | type = 'range-wrap' |
| | | let vals = card.initval.split(',') |
| | |
| | | onCloseDrawer = () => { |
| | | let card = fromJS(this.state.card).toJS() |
| | | |
| | | let check = false |
| | | if (card.borderWidth === '0px') { |
| | | if (card.borderWidth === '0px' || !card.borderWidth) { |
| | | delete card.borderWidth |
| | | delete card.borderColor |
| | | check = true |
| | | } else if (card.borderLeftWidth === '0px') { |
| | | delete card.borderLeftWidth |
| | | delete card.borderLeftColor |
| | | check = true |
| | | } else if (card.borderRightWidth === '0px') { |
| | | delete card.borderRightWidth |
| | | delete card.borderRightColor |
| | | check = true |
| | | } else if (card.borderTopWidth === '0px') { |
| | | delete card.borderTopWidth |
| | | delete card.borderTopColor |
| | | check = true |
| | | } else if (card.borderBottomWidth === '0px') { |
| | | delete card.borderBottomWidth |
| | | delete card.borderBottomColor |
| | | check = true |
| | | } |
| | | |
| | | if (check) { |
| | | if (card.borderLeftWidth === '0px' || !card.borderLeftWidth) { |
| | | delete card.borderLeftWidth |
| | | delete card.borderLeftColor |
| | | } |
| | | if (card.borderRightWidth === '0px' || !card.borderRightWidth) { |
| | | delete card.borderRightWidth |
| | | delete card.borderRightColor |
| | | } |
| | | if (card.borderTopWidth === '0px' || !card.borderTopWidth) { |
| | | delete card.borderTopWidth |
| | | delete card.borderTopColor |
| | | } |
| | | if (card.borderBottomWidth === '0px' || !card.borderBottomWidth) { |
| | | delete card.borderBottomWidth |
| | | delete card.borderBottomColor |
| | | } |
| | | |
| | | if (/0px 0px 0px | transparent/.test(card.boxShadow)) { |
| | | delete card.hShadow |
| | | delete card.vShadow |
| | | delete card.shadowBlur |
| | | delete card.shadowColor |
| | | delete card.boxShadow |
| | | } |
| | | |
| | | if (!is(fromJS(this.state.card), fromJS(card))) { |
| | | this.callback && this.callback(card) |
| | | } |
| | | |
| | |
| | | changeShadowColor = (val) => { |
| | | const { card } = this.state |
| | | |
| | | let boxShadow = `${card.hShadow || '0px'} ${card.vShadow || '0px'} ${card.shadowBlur || '0px'} ${val}` |
| | | let boxShadow = `${card.hShadow || '0px'} ${card.vShadow || '0px'} ${card.shadowBlur || '0px'} ${val || 'transparent'}` |
| | | |
| | | this.updateStyle({shadowColor: val, boxShadow}) |
| | | } |
| | |
| | | label={<ColumnWidthOutlined title="边框宽度"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <StyleInput defaultValue={card.borderWidth || '0px'} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'left' ? <StyleInput defaultValue={card.borderLeftWidth || '0px'} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'right' ? <StyleInput defaultValue={card.borderRightWidth || '0px'} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'top' ? <StyleInput defaultValue={card.borderTopWidth || '0px'} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'bottom' ? <StyleInput defaultValue={card.borderBottomWidth || '0px'} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'outer' ? <StyleInput defaultValue={card.borderWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'left' ? <StyleInput defaultValue={card.borderLeftWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'right' ? <StyleInput defaultValue={card.borderRightWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'top' ? <StyleInput defaultValue={card.borderTopWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'bottom' ? <StyleInput defaultValue={card.borderBottomWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | |
| | | label={<BgColorsOutlined title="阴影颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch value={card.shadowColor || ''} onChange={this.changeShadowColor} /> |
| | | <ColorSketch allowClear={true} value={card.shadowColor || ''} onChange={this.changeShadowColor} /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | |
| | | position: relative; |
| | | line-height: 1.5; |
| | | |
| | | .ant-col-0:not(.mk-cell-btn) { |
| | | display: block; |
| | | float: left; |
| | | } |
| | | .ant-btn { |
| | | padding: 0; |
| | | } |
| | |
| | | } else { |
| | | item.setting.supModule = '' |
| | | } |
| | | } else if (item.type === 'search') { |
| | | if (item.wrap.supModule) { |
| | | item.wrap.supModule = item.wrap.supModule.pop() |
| | | } |
| | | } |
| | | |
| | | // 搜索条件初始化 |
| | |
| | | Utils.initSearchVal(item) |
| | | |
| | | item.$searches = Utils.initMainSearch(item.search) |
| | | |
| | | if (item.type === 'search' && item.wrap.supModule) { |
| | | if (!item.checkBid) { |
| | | item.wrap.supModule = '' |
| | | } else { |
| | | window.GLOB.SearchBox.set(item.$searchId + 'checkBid', true) |
| | | } |
| | | } |
| | | } |
| | | |
| | | let pass = skip |
| | |
| | | if (component.setting.useMSearch) { |
| | | if (!window.GLOB.SearchBox.has(component.$searchId)) { |
| | | component.setting.useMSearch = false |
| | | } else if (window.GLOB.SearchBox.has(component.$searchId + 'required')) { |
| | | component.$s_req = true |
| | | } else { |
| | | if (window.GLOB.SearchBox.has(component.$searchId + 'required')) { |
| | | component.$s_req = true |
| | | } |
| | | if (window.GLOB.SearchBox.has(component.$searchId + 'checkBid')) { |
| | | component.checkBid = true |
| | | component.setting.checkBid = true |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | .ant-select-dropdown { |
| | | z-index: 10 !important; |
| | | } |
| | | .ant-radio-group { |
| | | white-space: nowrap; |
| | | } |
| | | .ant-calendar-picker-container { |
| | | z-index: 10 !important; |
| | | } |
| | |
| | | sign = '' |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config, BID } = this.props |
| | | const { config } = this.props |
| | | |
| | | let _searchlist = [] |
| | | let fieldMap = new Map() |
| | |
| | | let record = {} |
| | | let forbid = false // header中不设置高级搜索 |
| | | let _setting = {showAdv: false, show: false, style: null} |
| | | let BID = this.props.BID |
| | | |
| | | if (config.wrap) { |
| | | _setting.show = config.wrap.show !== 'false' |
| | |
| | | |
| | | if (config.wrap.searchBtn === 'show') { |
| | | _setting.showBtn = true |
| | | } |
| | | |
| | | if (config.wrap.supModule) { |
| | | let BData = window.GLOB.CacheData.get(config.wrap.supModule) |
| | | BID = BData ? (BData.$BID || '') : '' |
| | | } |
| | | } |
| | | |
| | |
| | | searchlist: _list |
| | | }, () => { |
| | | if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | this.improveSimpleSearch(deForms, false) |
| | | this.improveSimpleSearch(deForms, false, null, BID) |
| | | } else if (mainItems.length > 0 || localItems.length > 0) { |
| | | this.improveSearch(mainItems, localItems) |
| | | this.improveSearch(mainItems, localItems, BID) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { config } = this.props |
| | | |
| | | if (config.type === 'search' && config.wrap.supModule) { |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | | } |
| | | } |
| | | |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('resetSelectLine', this.resetParentParam) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | const { config, BID } = this.props |
| | | |
| | | if (config.checkBid && nextProps.BID !== BID) { |
| | | if (config.checkBid && config.type !== 'search' && nextProps.BID !== BID) { |
| | | this.resetOptions(nextProps.BID) |
| | | } |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id) => { |
| | | const { config } = this.props |
| | | |
| | | if (config.wrap.supModule !== MenuID) return |
| | | |
| | | this.resetOptions(id) |
| | | } |
| | | |
| | | resetOptions = (BID) => { |
| | |
| | | }) |
| | | |
| | | if (deForms.length > 0) { |
| | | this.improveSimpleSearch(deForms, true, searchlist) |
| | | this.improveSimpleSearch(deForms, true, searchlist, BID) |
| | | } else { |
| | | this.setState({ |
| | | searchlist: searchlist |
| | |
| | | } |
| | | |
| | | // 查询下拉菜单 |
| | | improveSearch = (mainItems, localItems) => { |
| | | const { BID } = this.props |
| | | improveSearch = (mainItems, localItems, BID) => { |
| | | let deffers = [] |
| | | |
| | | // 本地请求 |
| | |
| | | } |
| | | |
| | | // 测试系统单个请求下拉选项 |
| | | improveSimpleSearch = (deForms, trigger, searchlist) => { |
| | | improveSimpleSearch = (deForms, trigger, searchlist, BID) => { |
| | | if (deForms.length === 0) return |
| | | |
| | | let deffers = deForms.map((item, index) => { |
| | |
| | | arr_field: item.arr_field |
| | | } |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | if (BID) { |
| | | param.BID = BID |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | |
| | | .ant-select-dropdown { |
| | | z-index: 10 !important; |
| | | } |
| | | .ant-radio-group { |
| | | white-space: nowrap; |
| | | } |
| | | .ant-calendar-picker-container { |
| | | z-index: 10 !important; |
| | | } |
| | |
| | | const { config } = this.props |
| | | |
| | | if (config.checkShift && nextProps.config.initval && nextProps.config.initval !== config.initval) { |
| | | let val = nextProps.config.initval.split(',') |
| | | let value = nextProps.config.initval || null |
| | | |
| | | if (this.state.mode === 'daterange') { |
| | | if (value) { |
| | | let val = value.split(',') |
| | | value = [moment(val[0], this.state.format), moment(val[1], this.state.format)] |
| | | } else { |
| | | value = [null, null] |
| | | } |
| | | } else if (value) { |
| | | value = moment(value, this.state.format) |
| | | } |
| | | |
| | | this.setState({ |
| | | value: [moment(val[0], config.format), moment(val[1], config.format)] |
| | | value: value |
| | | }) |
| | | |
| | | this.props.onChange(nextProps.config.initval, true) |
| | |
| | | dataIndex: 'operation', |
| | | render: (text, record) => |
| | | (<div style={{textAlign: 'center'}}> |
| | | <span className="operation-btn" title="编辑" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> |
| | | <span className="operation-btn" title="状态切换" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> |
| | | <span className="operation-btn" title="编辑" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> |
| | | <span className="operation-btn" title="状态切换" onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title="确定删除吗?" |
| | | onConfirm={() => this.handleDelete(record, 'scripts') |
| | | onConfirm={() => this.handleDelete(record) |
| | | }> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> |
| | | </Popconfirm> |
| | |
| | | }) |
| | | } |
| | | |
| | | handleEdit = (record, type) => { |
| | | let node = null |
| | | |
| | | if (type === 'scripts') { |
| | | this.scriptsForm.edit(record) |
| | | node = document.getElementById('mk-exout-script') |
| | | } |
| | | |
| | | handleEdit = (record) => { |
| | | this.scriptsForm.edit(record) |
| | | let node = document.getElementById('mk-exout-script') |
| | | |
| | | if (node && node.scrollTop) { |
| | | let inter = Math.ceil(node.scrollTop / 10) |
| | |
| | | } |
| | | } |
| | | |
| | | handleStatus = (record) => { |
| | | let verify = fromJS(this.state.verify).toJS() |
| | | record.status = record.status === 'false' ? 'true' : 'false' |
| | | |
| | | verify.scripts = verify.scripts.map(item => { |
| | | if (item.uuid === record.uuid) { |
| | | return record |
| | | } else { |
| | | return item |
| | | } |
| | | }) |
| | | |
| | | this.setState({ |
| | | verify: verify |
| | | }) |
| | | } |
| | | |
| | | handleDelete = (record) => { |
| | | let verify = fromJS(this.state.verify).toJS() |
| | | |
| | | verify.scripts = verify.scripts.filter(item => item.uuid !== record.uuid) |
| | | |
| | | this.setState({ verify: verify }) |
| | | |
| | | this.scriptsForm.check(record) |
| | | } |
| | | |
| | | showError = (errorType) => { |
| | | if (errorType === 'S') { |
| | | notification.success({ |
| | |
| | | if (options.length === 0) { |
| | | options = [{Value: '1', Text: '选项1'}, {Value: '2', Text: '选项2'}] |
| | | } |
| | | formItem = (<Radio.Group value={card.initval} style={{lineHeight: '36px'}}> |
| | | formItem = (<Radio.Group value={card.initval} style={{lineHeight: '36px', whiteSpace: 'nowrap'}}> |
| | | {options.map((item, i) => (<Radio key={i} value={item.Value}> {item.Text} </Radio>))} |
| | | </Radio.Group>) |
| | | } else if (card.type === 'check') { |
| | | formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | formItem = <Checkbox style={{lineHeight: '36px', whiteSpace: 'nowrap'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | } else if (card.type === 'range') { |
| | | type = 'range-wrap' |
| | | let vals = card.initval.split(',') |
| | |
| | | values = window.GLOB.SearchBox.get(config.$searchId + 'cache') |
| | | } |
| | | |
| | | let supModule = '' |
| | | if (config.setting && config.setting.supModule) { |
| | | supModule = config.setting.supModule |
| | | } else if (config.wrap && config.wrap.supModule) { |
| | | supModule = config.wrap.supModule |
| | | } |
| | | |
| | | config.search = config.search.map(item => { |
| | | item.hidden = item.Hide === 'true' |
| | | item.required = !item.hidden && item.required === 'true' |
| | |
| | | } else { |
| | | item.$initval = item.initval |
| | | item.$supId = config.$pageId |
| | | if (config.setting && config.setting.supModule) { |
| | | item.$supId = config.setting.supModule |
| | | if (supModule) { |
| | | item.$supId = supModule |
| | | |
| | | config.checkBid = true |
| | | config.setting.checkBid = true |
| | | item.checkShift = true |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | } |
| | | |
| | | item.initval = '' |
| | |
| | | } else { |
| | | item.$initval = item.initval |
| | | item.$supId = config.$pageId |
| | | if (config.setting && config.setting.supModule) { |
| | | item.$supId = config.setting.supModule |
| | | if (supModule) { |
| | | item.$supId = supModule |
| | | |
| | | config.checkBid = true |
| | | config.setting.checkBid = true |
| | | item.checkShift = true |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | } |
| | | |
| | | item.initval = '' |
| | |
| | | item.initType = '' |
| | | } |
| | | } else if ((item.type === 'select' || item.type === 'link') && item.resourceType === '1') { |
| | | if (/@BID@/ig.test(item.dataSource) && config.setting && config.setting.supModule) { |
| | | if (/@BID@/ig.test(item.dataSource) && supModule) { |
| | | config.checkBid = true |
| | | config.setting.checkBid = true |
| | | item.checkBid = true |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | } |
| | | if (item.initval === '$first') { |
| | | item.initval = '' |