| | |
| | | import { resetStyle } from '@/utils/utils-custom.js' |
| | | import './index.scss' |
| | | |
| | | const Card = ({ id, card, moveCard, findCard, editCard, delCard, profileCard, changeStyle, doubleClickCard }) => { |
| | | const Card = ({ id, card, moveCard, findCard, editCard, copyCard, delCard, profileCard, changeStyle, doubleClickCard }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: 'action', id, originalIndex }, |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={() => editCard(id)} /> |
| | | <Icon className="copy" title="复制" type="copy" onClick={() => copyCard(id)} /> |
| | | <Icon className="close" title="删除" type="close" onClick={() => delCard(id)} /> |
| | | <Icon className="style" title="调整样式" onClick={() => changeStyle(id)} type="font-colors" /> |
| | | {hasProfile ? <Icon className="profile" title="setting" type="profile" onClick={() => profileCard(id)} /> : null} |
| | |
| | | let copycard = fromJS(card).toJS() |
| | | let _cards = fromJS(cards).toJS() |
| | | |
| | | copycard.copyType = 'customCardElement' |
| | | if (card.eleType === 'button') { |
| | | copycard.copyType = 'action' |
| | | } else { |
| | | copycard.copyType = 'customCardElement' |
| | | } |
| | | copycard.focus = true |
| | | |
| | | let _val = fromJS(copycard).toJS() |
| | |
| | | key={card.uuid} |
| | | card={card} |
| | | parent={parent} |
| | | copyCard={copyCard} |
| | | moveCard={moveCard} |
| | | editCard={editCard} |
| | | changeStyle={changeStyle} |
| | |
| | | if (!err) { |
| | | values.uuid = card.uuid |
| | | values.verify = card.verify || null |
| | | values.modal = card.modal || null |
| | | |
| | | if (values.show === 'icon' && !values.icon) { |
| | | notification.warning({ |
| | |
| | | let _param = { |
| | | funcName: btn.innerFunc, |
| | | name: _config.setting.tableName || '', |
| | | fields: btn.fields, |
| | | fields: btn.modal ? btn.modal.fields : [], |
| | | menuNo: menu.MenuNo |
| | | } |
| | | newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config)) |
| | |
| | | import '@/assets/css/table.scss' |
| | | |
| | | const EditTable = asyncComponent(() => import('@/templates/zshare/editTable')) |
| | | const { confirm } = Modal |
| | | |
| | | class MarkColumn extends Component { |
| | | static propTpyes = { |
| | |
| | | } |
| | | |
| | | markSubmit = () => { |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | | let save = false |
| | | let input = document.getElementById('contrastValue') |
| | | let val = input && input.value ? input.value : '' |
| | | |
| | | if (!val) { |
| | | save = true |
| | | } |
| | | |
| | | let marks = this.state.marks.map(item => { |
| | | if (item.signType && item.signType[0] === 'background') { |
| | |
| | | item.fontColor = '' |
| | | } |
| | | } |
| | | if (val && item.contrastValue === val) { |
| | | save = true |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | this.props.onSubmit(marks) |
| | | if (save) { |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | | this.props.onSubmit(marks) |
| | | } else { |
| | | const _this = this |
| | | confirm({ |
| | | title: '存在未保存标记,确定忽略吗?', |
| | | onOk() { |
| | | _this.setState({ visible: false }) |
| | | _this.props.onSubmit(marks) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | |
| | | return ( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | | </Col> |
| | | ) |
| | |
| | | return ( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <div style={_style}> |
| | | <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | | </Col> |
| | | ) |
| | |
| | | } |
| | | }) |
| | | delete component.scripts |
| | | |
| | | component.setting.$name = component.name || '' |
| | | component.setting.execute = component.setting.execute !== 'false' // 默认sql是否执行,转为boolean 统一格式 |
| | | component.setting.laypage = component.setting.laypage === 'true' // 是否分页,转为boolean 统一格式 |
| | | |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) { |
| | | _customScript && console.info(`${_dataresource ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | _dataresource && console.info(_dataresource) |
| | | _customScript && console.info(`${setting.$name ? `/*组件-${setting.$name} 自定义脚本*/\n` : ''}${_dataresource ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | _dataresource && console.info(`${setting.$name ? `/*组件-${setting.$name} 数据源*/\n` : ''}` + _dataresource) |
| | | } |
| | | |
| | | return { |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) { |
| | | _customScript && console.info(`${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(LText) |
| | | _customScript && console.info(`${setting.$name ? `/*组件-${setting.$name} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${setting.$name ? `/*组件-${setting.$name} 数据源*/\n` : ''}` + LText) |
| | | } |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) { |
| | | _customScript && console.info(`${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(LText) |
| | | _customScript && console.info(`${setting.$name ? `/*组件-${setting.$name} 自定义脚本 统计查询*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${setting.$name ? `/*组件-${setting.$name} 数据源 统计查询*/\n` : ''}` + LText) |
| | | } |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |