| | |
| | | .ant-btn.ant-btn-link { |
| | | border-width: 1px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // .ant-table.ant-table-mini .ant-table-thead > tr > th { |
| | | // padding: 8px 4px; |
| | | // } |
| | | // .ant-table.ant-table-mini .ant-table-tbody > tr > td { |
| | | // padding: 4px 4px; |
| | | // } |
| | |
| | | } else if (item.type === 'fileupload') { |
| | | content = (<MKFileUpload config={item} onChange={(val) => this.recordChange({[item.field]: val})} />) |
| | | } else if (item.type === 'cascader') { |
| | | content = (<Cascader options={item.options} expandTrigger="hover" placeholder="" />) |
| | | content = (<Cascader allowClear={!!item.allowClear} options={item.options} expandTrigger="hover" placeholder="" />) |
| | | } else if (item.type === 'textarea') { |
| | | content = (<TextArea rows={item.rows || 2} placeholder=""/>) |
| | | } else if (item.type === 'mkicon') { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style) |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['background', 'height', 'border', 'padding', 'margin', 'shadow'], card.style) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | overflow-y: auto; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .menu-data-card-edit-box::-webkit-scrollbar { |
| | | width: 7px; |
| | | height: 7px; |
| | | } |
| | | .menu-data-card-edit-box::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.13); |
| | | } |
| | | .menu-data-card-edit-box::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | .menu-data-card-edit-box::after { |
| | | display: block; |
| | | content: ' '; |
| | |
| | | import { fromJS } from 'immutable' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap, subtype, columns) { |
| | | export default function (wrap, subtype, columns, id) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let MenuType = '' |
| | | let menu = fromJS(window.GLOB.customMenu).toJS() |
| | | |
| | | if (window.GLOB.customMenu.parentId === 'BillPrintTemp') { |
| | | if (menu.parentId === 'BillPrintTemp') { |
| | | MenuType = 'billPrint' |
| | | } |
| | | let modules = [] |
| | | if (subtype === 'propcard') { |
| | | modules = MenuUtils.getSupModules(menu.components, id) || [] |
| | | } |
| | | |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | |
| | | ], |
| | | controlFields: [ |
| | | {field: 'goback', values: ['dynamic']}, |
| | | {field: 'supModule', values: ['static']}, |
| | | ], |
| | | forbid: subtype !== 'propcard' |
| | | }, |
| | |
| | | forbid: subtype !== 'propcard' || appType !== 'mob' |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | field: 'supModule', |
| | | label: '上级组件', |
| | | initval: wrap.supModule || [], |
| | | required: false, |
| | | options: modules, |
| | | allowClear: true, |
| | | forbid: subtype !== 'propcard' |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | |
| | | getWrapForms = () => { |
| | | const { card } = this.state |
| | | return getWrapForm(card.wrap, card.subtype, card.columns) |
| | | return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | this.updateComponent({...this.state.card, wrap: res}) |
| | | let _card = {...this.state.card, wrap: res} |
| | | |
| | | if (res.supModule && res.supModule.length > 0) { |
| | | _card.setting.supModule = res.supModule |
| | | } |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | |
| | | field: 'size', |
| | | label: '表格大小', |
| | | initval: wrap.size || 'middle', |
| | | tooltip: '表格的内边距,从大到小依次递减。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'default', label: '大'}, |
| | | {value: 'middle', label: '中'}, |
| | | {value: 'small', label: '小'}, |
| | | // {value: 'mini', label: '微'}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24, forbid: ['billPrint'] }, |
| | | { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24, forbid: ['billPrint'] }, |
| | | { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 }, |
| | | { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 12 }, |
| | | { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格(卡片)', width: 12 }, |
| | | { type: 'menu', url: tree, component: 'tree', subtype: 'normaltree', title: '树形列表', width: 12 }, |
| | | { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图', width: 24 }, |
| | | { type: 'menu', url: line1, component: 'line', subtype: 'line1', title: '阶梯折线图', width: 24 }, |
| | |
| | | { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 }, |
| | | { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24 }, |
| | | { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 }, |
| | | { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 24 }, |
| | | { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格(卡片)', width: 24 }, |
| | | { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图', width: 24 }, |
| | | { type: 'menu', url: line1, component: 'line', subtype: 'line1', title: '阶梯折线图', width: 24 }, |
| | | { type: 'menu', url: bar, component: 'bar', subtype: 'bar', title: '柱状图', width: 24 }, |
| | |
| | | { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 }, |
| | | { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24 }, |
| | | { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 }, |
| | | { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 12 }, |
| | | { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格(卡片)', width: 12 }, |
| | | { type: 'menu', url: tree, component: 'tree', subtype: 'normaltree', title: '树形列表', width: 12 }, |
| | | { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图', width: 24 }, |
| | | { type: 'menu', url: line1, component: 'line', subtype: 'line1', title: '阶梯折线图', width: 24 }, |
| | |
| | | {offset ? <Col span={offset} style={{height: '10px'}}> </Col> : null} |
| | | {precards.map((item, index) => ( |
| | | <Col key={'pre' + index} className="extend-card" span={item.setting.width || 6}> |
| | | <CardItem card={item} cards={config} data={{$$BID: BID, $$type: 'extendCard'}}/> |
| | | <CardItem card={item} cards={config} data={{$$BID: BID, $$BData: BData, $$type: 'extendCard'}}/> |
| | | </Col> |
| | | ))} |
| | | {data && data.map((item, index) => ( |
| | |
| | | ))} |
| | | {nextcards.map((item, index) => ( |
| | | <Col key={'next' + index} className="extend-card" span={item.setting.width || 6}> |
| | | <CardItem card={item} cards={config} data={{$$BID: BID, $$type: 'extendCard'}}/> |
| | | <CardItem card={item} cards={config} data={{$$BID: BID, $$BData: BData, $$type: 'extendCard'}}/> |
| | | </Col> |
| | | ))} |
| | | </Row> |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | overflow-y: auto; |
| | | |
| | | >.button-list.toolbar-button { |
| | | padding: 0; |
| | |
| | | text-align: right; |
| | | } |
| | | } |
| | | |
| | | .custom-data-card-box::-webkit-scrollbar { |
| | | width: 7px; |
| | | height: 7px; |
| | | } |
| | | .custom-data-card-box::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.13); |
| | | } |
| | | .custom-data-card-box::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | .custom-card-box::after { |
| | | content: ' '; |
| | | display: block; |
| | |
| | | resetParentParam = (MenuID, id, data) => { |
| | | const { config } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (!config.setting || !config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (id !== this.state.BID) { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | |
| | | if (config.enter === 'tab') { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | } else { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | this.props.onSubmit() |
| | | } |
| | | } |
| | |
| | | this.props.onChange(val) |
| | | } |
| | | |
| | | handleSubmit = () => { |
| | | const { config } = this.props |
| | | |
| | | if (config.enter === 'false') return |
| | | if (config.enter === 'tab') { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | } else { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | this.props.onSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { config, onSubmit } = this.props |
| | | const { config } = this.props |
| | | const { value, precision } = this.state |
| | | |
| | | if (precision === null) { |
| | | return (<InputNumber id={config.uuid} value={value} disabled={config.readonly} onChange={this.handleChange} onPressEnter={onSubmit}/>) |
| | | return (<InputNumber id={config.uuid} value={value} disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleSubmit}/>) |
| | | } else { |
| | | return (<InputNumber id={config.uuid} value={value} precision={precision} disabled={config.readonly} onChange={this.handleChange} onPressEnter={onSubmit} />) |
| | | return (<InputNumber id={config.uuid} value={value} precision={precision} disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleSubmit} />) |
| | | } |
| | | } |
| | | } |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="表格大小"> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'表格的内边距,从大到小依次递减。'}> |
| | | <Icon type="question-circle" /> |
| | | 表格大小 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('size', { |
| | | initialValue: setting.size || 'middle' |
| | | })( |
| | |
| | | <Radio value="default">大</Radio> |
| | | <Radio value="middle">中</Radio> |
| | | <Radio value="small">小</Radio> |
| | | {/* <Radio value="mini">微</Radio> */} |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | children: [] |
| | | } |
| | | |
| | | if (item.type === 'topbar' || item.type === 'login') { |
| | | if (item.type === 'topbar' || item.type === 'login' || item.type === 'navbar') { |
| | | return null |
| | | } else if (item.type === 'tabs') { |
| | | let tabs = [] |
| | |
| | | } |
| | | |
| | | .menu-control.hidden { |
| | | right: -130px; |
| | | right: -145px; |
| | | } |
| | | |
| | | .menu-body { |
| | |
| | | title: item.name, |
| | | children: [] |
| | | } |
| | | if (item.type === 'login') { |
| | | if (item.type === 'login' || item.type === 'navbar') { |
| | | return null |
| | | } else if (item.type === 'tabs') { |
| | | let tabs = [] |
| | |
| | | } |
| | | } |
| | | .menu-control.hidden { |
| | | right: -130px; |
| | | right: -145px; |
| | | } |
| | | |
| | | .menu-body { |