| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | type: subtype === 'propcard' ? 'select' : 'radio', |
| | | field: 'selStyle', |
| | | label: '选中风格', |
| | | initval: wrap.selStyle || 'active', |
| | | tooltip: '存在边框时,边框会使用系统色。', |
| | | required: false, |
| | | options: [ |
| | | options: subtype === 'propcard' ? [ |
| | | {value: 'none', label: '无'}, |
| | | {value: 'active', label: '外阴影'}, |
| | | {value: 'backFont', label: '背景+文字'}, |
| | | {value: 'font', label: '文字'}, |
| | | ], |
| | | forbid: subtype !== 'propcard' |
| | | ] : [ |
| | | {value: 'none', label: '无'}, |
| | | {value: 'active', label: '外阴影'}, |
| | | ] |
| | | // forbid: subtype !== 'propcard' |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width'] |
| | |
| | | if (viewType === 'popview') { // 弹窗标签 |
| | | opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') |
| | | refresh.push({ |
| | | value: 'popclose', |
| | | value: 'closepoptab', // 关闭弹窗标签 |
| | | text: '关闭弹窗' |
| | | }) |
| | | refresh.push({ |
| | | value: 'popclose', // 执行弹窗关闭时的刷新 |
| | | text: '刷新源组件' |
| | | }) |
| | | } |
| | |
| | | text: '刷新上级组件 - 行' |
| | | }, { |
| | | value: !appType ? 'closetab' : 'goback', |
| | | text: !appType ? '关闭弹窗' : '返回(上一个页面)' |
| | | text: !appType ? '关闭标签' : '返回(上一个页面)' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'clickouter', |
| | | label: '点击蒙层', |
| | | initVal: card.clickouter || 'unclose', |
| | | required: false, |
| | | options: [{ |
| | | value: 'unclose', |
| | | text: '不关闭' |
| | | }, { |
| | | value: 'close', |
| | | text: '关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'reload', |
| | | label: '返回后', |
| | | initVal: card.reload || 'false', |
| | |
| | | selectedData={selectedData} |
| | | /> : null |
| | | } |
| | | <div className={`data-zoom ${config.wrap.cardType || ''} ${config.wrap.scale || ''}`}> |
| | | <div className={`data-zoom ${config.wrap.selStyle !== 'none' ? (config.wrap.cardType || '') : ''} ${config.wrap.scale || ''}`}> |
| | | {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null} |
| | | <Row className="card-row-list"> |
| | | {offset ? <Col span={offset} style={{height: '10px'}}> </Col> : null} |
| | |
| | | </Col> |
| | | ))} |
| | | {data && data.map((item, index) => ( |
| | | <Col className={(activeKey === index ? ' active' : (selectKeys.indexOf(index) > -1 ? ' selected' : '')) + (card.setting.click ? ' pointer' : '')} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}> |
| | | <Col className={(config.wrap.selStyle !== 'none' ? (activeKey === index ? ' active' : (selectKeys.indexOf(index) > -1 ? ' selected' : '')) : '') + (card.setting.click ? ' pointer' : '')} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={card} cards={config} data={item}/> |
| | | </Col> |
| | | ))} |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | if (btn.execSuccess !== 'never') { |
| | | if (btn.execSuccess === 'closepoptab') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execSuccess !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, '', this.state.selines) |
| | | } |
| | | if (btn.switchTab && btn.switchTab.length > 0) { |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | if (btn.execError !== 'never') { |
| | | if (btn.execError === 'closepoptab') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) |
| | | } |
| | | } |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | if (btn.execSuccess !== 'never') { |
| | | if (btn.execSuccess === 'closepoptab') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execSuccess !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, '', []) |
| | | } |
| | | if (btn.switchTab && btn.switchTab.length > 0) { |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | if (btn.execError !== 'never') { |
| | | if (btn.execError === 'closepoptab') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', []) |
| | | } |
| | | } |
| | |
| | | |
| | | if (btn.execSuccess === 'closetab') { |
| | | MKEmitter.emit('closeTabView', btn.$MenuID) |
| | | } else if (btn.execSuccess === 'closepoptab') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execSuccess !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id, this.state.selines) |
| | | } |
| | |
| | | MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus) |
| | | } |
| | | |
| | | if (btn.execError !== 'never') { |
| | | if (btn.execError === 'closepoptab') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('popclose', this.popclose) |
| | | MKEmitter.addListener('popclose', this.syspopclose) |
| | | MKEmitter.addListener('triggerBtnId', this.actionTrigger) |
| | | MKEmitter.addListener('openNewTab', this.openNewTab) |
| | | MKEmitter.addListener('refreshPopButton', this.refreshPopButton) |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('popclose', this.popclose) |
| | | MKEmitter.removeListener('popclose', this.syspopclose) |
| | | MKEmitter.removeListener('openNewTab', this.openNewTab) |
| | | MKEmitter.removeListener('triggerBtnId', this.actionTrigger) |
| | | MKEmitter.removeListener('refreshPopButton', this.refreshPopButton) |
| | |
| | | } |
| | | } |
| | | |
| | | syspopclose = () => { |
| | | if (!this.state.visible) return |
| | | |
| | | this.popclose() |
| | | } |
| | | |
| | | /** |
| | | * @description 弹窗关闭 |
| | | */ |
| | |
| | | className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')} |
| | | title={btn.label} |
| | | width={ratio} |
| | | maskClosable={false} |
| | | maskClosable={btn.clickouter === 'close'} |
| | | visible={visible} |
| | | onCancel={this.popclose} |
| | | footer={[ |
| | |
| | | className={btn.$view === 'CustomPage' ? 'custom-drawer-popview' : ''} |
| | | width={width} |
| | | height={height} |
| | | maskClosable={false} |
| | | maskClosable={btn.clickouter === 'close'} |
| | | onClose={this.popclose} |
| | | visible={visible} |
| | | placement={btn.placement || 'right'} |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="点击空白处"> |
| | | <Form.Item label="点击蒙层"> |
| | | {getFieldDecorator('clickouter', { |
| | | initialValue: config.setting.clickouter || 'unclose' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="close">关闭</Radio> |
| | | <Radio value="unclose">不关闭</Radio> |
| | | <Radio value="close">关闭</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | |
| | | exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'], |
| | | popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'placement'], |
| | | popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'placement', 'clickouter'], |
| | | tab: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class'] |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'clickouter', |
| | | label: '点击蒙层', |
| | | initVal: card.clickouter || 'unclose', |
| | | required: false, |
| | | options: [{ |
| | | value: 'unclose', |
| | | text: '不关闭' |
| | | }, { |
| | | value: 'close', |
| | | text: '关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'preFunc', |
| | | label: '前置函数', |
| | |
| | | // res.indexlogo = res.indexlogo ? res.indexlogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : '' |
| | | // res.loginlogo = res.loginlogo ? res.loginlogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : '' |
| | | |
| | | // if (/^https/.test(window.location.protocol)) { // https转换 |
| | | // res.Banner = res.Banner ? res.Banner.replace(/http:/ig, 'https:') : '' |
| | | // res.doclogo = res.doclogo ? res.doclogo.replace(/http:/ig, 'https:') : '' |
| | | // res.indexlogo = res.indexlogo ? res.indexlogo.replace(/http:/ig, 'https:') : '' |
| | | // res.loginlogo = res.loginlogo ? res.loginlogo.replace(/http:/ig, 'https:') : '' |
| | | // } |
| | | |
| | | let _url = window.location.href.split('#')[0] + 'system' |
| | | let systemMsg = { |
| | | favicon: res.titlelogo || '', |
| | |
| | | upMinus: 1, |
| | | leftPlus: 1, |
| | | leftMinus: 1, |
| | | debug: false |
| | | debug: true |
| | | } |
| | | |
| | | getclickpoint = (e) => { |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { debug } = this.state |
| | | |
| | | return ( |
| | | <div className="print-template"> |
| | | <DndProvider backend={HTML5Backend}> |
| | |
| | | <Input addonBefore={<Icon title="距左" type="arrow-left" />} addonAfter={<Icon onClick={() => this.updatePosition('leftPlus')} type="plus" />} onChange={(e) => this.change(e, 'leftPlus')} value={this.state.leftPlus} /> |
| | | <Input addonBefore={<Icon title="距左" type="arrow-left" />} addonAfter={<Icon onClick={() => this.updatePosition('leftMinus')} type="minus" />} onChange={(e) => this.change(e, 'leftMinus')} value={this.state.leftMinus} /> |
| | | <div style={{marginTop: '10px'}}> |
| | | <span>调试模式:</span><Switch onChange={this.changeDebug} /> |
| | | <span>调试模式:</span><Switch checked={debug} onChange={this.changeDebug} /> |
| | | </div> |
| | | </Card> |
| | | </aside> |
| | |
| | | element.fontSize = element.fontSize * sizeradio |
| | | } else if (element.type === 'qrcode') { |
| | | element.qrcodeWidth = element.qrcodeWidth * ratio |
| | | |
| | | if (element.qrcodeWidth > element.height) { |
| | | element.qrcodeWidth = element.height |
| | | } |
| | | if (element.qrcodeWidth > element.width) { |
| | | element.qrcodeWidth = element.width |
| | | } |
| | | } else if (element.type === 'image') { |
| | | element.imgWidth = element.imgWidth * ratio |
| | | element.imgHeight = element.imgHeight * ratio |
| | |
| | | context.translate(-_cx, -_cy) // 恢复原点 |
| | | } |
| | | |
| | | if (debug || selectId === element.uuid) { // 选中元素,设置外部阴影 |
| | | if (selectId === element.uuid) { // 选中元素,设置外部阴影 |
| | | context.shadowBlur = 5 |
| | | context.shadowColor = '#1890ff' |
| | | context.fillStyle = 'white' |
| | | context.fillRect(element.left, element.top, element.width || 1, element.height || 1) |
| | | context.shadowBlur = 0 |
| | | } else if (debug) { |
| | | context.shadowBlur = 3 |
| | | context.shadowColor = 'orange' |
| | | context.fillStyle = 'white' |
| | | context.fillRect(element.left, element.top, element.width || 1, element.height || 1) |
| | | context.shadowBlur = 0 |
| | |
| | | context.fillRect(element.left, element.top, element.width, element.height) |
| | | } |
| | | |
| | | if ((debug || selectId === element.uuid) && element.width > 3 * ratio && element.height > 3 * ratio) { // 选中元素,设置外部阴影 |
| | | if (selectId === element.uuid && element.width > 3 * ratio && element.height > 3 * ratio) { // 选中元素,设置外部阴影 |
| | | context.strokeStyle = '#1890ff' |
| | | context.beginPath() |
| | | context.moveTo(element.left + element.width - 7, element.top + element.height - 2) |
| | |
| | | context.fillStyle = element.fontColor |
| | | |
| | | let lines = element.value.split('\n') |
| | | |
| | | if (!element.value && element.field) { |
| | | if (element.field === 'other_field') { |
| | | lines = [element.cusfield || ''] |
| | | } else { |
| | | lines = [element.field] |
| | | } |
| | | } |
| | | let _y = element.top + element.padding + element.fontSize + element.borderSize |
| | | let _left = element.left + element.borderSize + element.padding |
| | | let _right = element.left + element.width - element.padding - element.borderSize |