| | |
| | | let style = {...card.style} |
| | | |
| | | return ( |
| | | <div className="menu-normal-editor-box" style={style} onClick={this.clickComponent} id={card.uuid}> |
| | | <div className={'menu-normal-editor-box ' + (card.wrap.firstTr || '')} style={style} onClick={this.clickComponent} id={card.uuid}> |
| | | <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="富文本设置" width={750} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="normaltable" card={card}/> |
| | | <CopyComponent type="editor" card={card}/> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <UserComponent config={card}/> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | |
| | | color: #bcbcbc; |
| | | } |
| | | } |
| | | .menu-normal-editor-box.light { |
| | | .braft-content { |
| | | table { |
| | | tr:first-child { |
| | | background-color:#ffffff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .menu-normal-editor-box::after { |
| | | display: block; |
| | | content: ' '; |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'firstTr', |
| | | label: '表格首行', |
| | | initval: wrap.firstTr || 'deep', |
| | | tooltip: '富文本中table的首行背景颜色。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'deep', label: '深色'}, |
| | | {value: 'light', label: '浅色'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'permission', |
| | | label: '权限验证', |
| | | initval: wrap.permission || 'false', |
| | |
| | | |
| | | pasteSubmit = () => { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'normaltable', 'tablecard', 'editor', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let types = { |
| | | login: '登录', |
| | | navbar: '导航栏', |
| | |
| | | |
| | | const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform')) |
| | | |
| | | class PasteController extends Component { |
| | | class PasteForms extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, // 组件配置 |
| | | update: PropTypes.func |
| | |
| | | const { config } = this.props |
| | | |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | | if (res.copyType === 'search' && ['text', 'select', 'multiselect', 'link', 'checkcard', 'date', 'datemonth'].includes(res.type)) { |
| | | res.copyType = 'form' |
| | | } |
| | | |
| | | if (!['form', 'forms', 'formgroup', 'simpleform'].includes(res.copyType)) { |
| | | notification.warning({ top: 92, message: '配置信息格式错误!', duration: 5 }) |
| | | return |
| | |
| | | } |
| | | } |
| | | |
| | | export default PasteController |
| | | export default PasteForms |
| | |
| | | pasteSubmit = () => { |
| | | const { Tab } = this.props |
| | | let appType = sessionStorage.getItem('appType') |
| | | let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let types = { |
| | | login: '登录', |
| | | navbar: '导航栏', |
| | |
| | | |
| | | pasteSubmit = () => { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let options = ['tabs', 'timeline', 'datacard', 'propcard', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'iframe', 'sandbox'] |
| | | let options = ['tabs', 'timeline', 'datacard', 'propcard', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'editor', 'pie', 'scatter', 'iframe', 'sandbox'] |
| | | |
| | | if (appType === 'mob') { |
| | | if (sessionStorage.getItem('editMenuType') !== 'popview') { |
| | |
| | | if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null |
| | | |
| | | return ( |
| | | <div className="custom-braft-editor-box" id={'anchor' + config.uuid} style={config.style}> |
| | | <div className={'custom-braft-editor-box ' + (config.wrap.firstTr || '')} id={'anchor' + config.uuid} style={config.style}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="ant-spin-blur"></div> |
| | |
| | | } |
| | | } |
| | | |
| | | .custom-braft-editor-box.light { |
| | | .braft-content { |
| | | table { |
| | | tr:first-child { |
| | | background-color:#ffffff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .custom-braft-editor-box::after { |
| | | content: ' '; |
| | | display: block; |
| | |
| | | menuname: btn.logLabel |
| | | } |
| | | |
| | | if (btn.verify.dataType !== 'custom' && setting.sub_field) { |
| | | arr_field = arr_field + ',' + setting.sub_field |
| | | param.arr_field = arr_field |
| | | } |
| | | |
| | | // 数据管理权限 |
| | | if (sessionStorage.getItem('dataM') === 'true') { |
| | | param.dataM = 'Y' |
| | |
| | | } else if (item.type === 'datetime') { |
| | | _item.type = 'date' |
| | | _format = 'YYYY-MM-DD HH:mm:ss' |
| | | } else if (['select', 'link', 'radio'].includes(item.type)) { // 选中第一项 |
| | | if (typeof(_initval) === 'string' && _initval.indexOf('$first') > -1) { |
| | | _initval = '' |
| | | |
| | | if (item.resourceType === '0' && item.options[0] && item.options[0].Value) { |
| | | _initval = item.options[0].Value |
| | | } |
| | | } |
| | | } |
| | | |
| | | let key = item.field.toLowerCase() |
| | |
| | | |
| | | if (item.type === 'linkMain' || item.type === 'funcvar') { |
| | | _readin = false |
| | | } else if (['select', 'link', 'radio'].includes(item.type)) { // 选中第一项 |
| | | if (typeof(_initval) === 'string' && _initval.indexOf('$first') > -1) { |
| | | _initval = '' |
| | | |
| | | if (item.resourceType === '0' && item.options[0] && item.options[0].Value) { |
| | | _initval = item.options[0].Value |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (item.type === 'linkMain' && BData.hasOwnProperty(item.field.toLowerCase())) { |
| | |
| | | } |
| | | } |
| | | } catch (e) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '解析错误', |
| | | duration: 5 |
| | | }) |
| | | _config = '' |
| | | // 通过sql语句添加字段集 |
| | | if (/[a-zA-Z0-9_]+\s+(nvarchar\(\d+\)|Decimal\(18,\d+\)|Int)/ig.test(values.config)) { |
| | | _config = { |
| | | key: 'datasourcefield', |
| | | type: 'array', |
| | | data: [] |
| | | } |
| | | |
| | | let list = values.config.match(/[a-zA-Z0-9_]+\s+(nvarchar\(\d+\)|Decimal\(18,\d+\)|Int)/ig) |
| | | |
| | | list.forEach(item => { |
| | | _config.data.push({ |
| | | datatype: item.split(/\s+/)[1], |
| | | field: item.split(/\s+/)[0], |
| | | label: item.split(/\s+/)[0], |
| | | }) |
| | | }) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '解析错误', |
| | | duration: 5 |
| | | }) |
| | | _config = '' |
| | | } |
| | | } |
| | | |
| | | if (_config) { |