| | |
| | | _imagestyle.paddingTop = '100%' |
| | | } |
| | | |
| | | if (card.backgroundSize) { |
| | | _imagestyle.backgroundSize = card.backgroundSize |
| | | } |
| | | |
| | | return ( |
| | | <div className="ant-mk-picture" style={_imagestyle}></div> |
| | | ) |
| | |
| | | sequence: ['eleType', 'width'], |
| | | text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle', 'copyable'], |
| | | number: ['eleType', 'datatype', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'backgroundSize', 'maxWidth', 'link', 'noValue'], |
| | | video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'], |
| | | icon: ['eleType', 'datatype', 'width', 'tooltip'], |
| | | slider: ['eleType', 'datatype', 'width', 'color', 'maxValue', 'showInfo', 'showType', 'strokeWidth', 'strokeLinecap', 'trailColor'], |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'backgroundSize', |
| | | label: '图像大小', |
| | | initVal: card.backgroundSize || 'cover', |
| | | required: false, |
| | | options: [ |
| | | { value: 'cover', text: '覆盖' }, |
| | | { value: 'contain', text: '包含' }, |
| | | { value: 'auto', text: '自适应' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'maxWidth', |
| | | min: 10, |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'backgroundSize', |
| | | label: '图像大小', |
| | | initVal: card.backgroundSize || 'cover', |
| | | required: false, |
| | | options: [ |
| | | { value: 'cover', text: '覆盖' }, |
| | | { value: 'contain', text: '包含' }, |
| | | { value: 'auto', text: '自适应' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'scale', |
| | | label: '点击缩放', |
| | | initVal: card.scale || 'true', |
| | |
| | | number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'], |
| | | link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist', 'nameField'], |
| | | textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'prefix', 'postfix', 'blacklist'], |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'lenWidRadio', 'span'], |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'], |
| | | video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'fieldlength', 'blacklist', 'aspectRatio'], |
| | | colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'], |
| | | custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'], |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'backgroundSize', |
| | | label: '图像大小', |
| | | initVal: card.backgroundSize || 'cover', |
| | | required: false, |
| | | options: [ |
| | | { value: 'cover', text: '覆盖' }, |
| | | { value: 'contain', text: '包含' }, |
| | | { value: 'auto', text: '自适应' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'scale', |
| | | label: '点击缩放', |
| | | initVal: card.scale || 'true', |
| | |
| | | number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'], |
| | | link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'blacklist', 'nameField'], |
| | | textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'blacklist'], |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'span'], |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'], |
| | | video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'blacklist', 'aspectRatio'], |
| | | colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'], |
| | | custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'], |
| | |
| | | } else { |
| | | _imagestyle.paddingTop = '100%' |
| | | } |
| | | |
| | | _imagestyle.backgroundSize = card.backgroundSize || 'cover' |
| | | |
| | | if (card.link) { |
| | | _style.cursor = 'pointer' |
| | |
| | | text-decoration: inherit; |
| | | font-weight: inherit; |
| | | font-style: inherit; |
| | | float: left; |
| | | line-height: inherit; |
| | | margin-left: 10px; |
| | | position: relative; |
| | | z-index: 1; |
| | | min-height: 45px; |
| | | min-width: 30px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | |
| | | <div> |
| | | {photos.map((url, i) => ( |
| | | <Col key={i} span={col.span || 24}> |
| | | <MkPicture style={{paddingTop}} scale={scale} url={url} urls={photos}/> |
| | | <MkPicture style={{paddingTop, backgroundSize: col.backgroundSize || 'cover'}} scale={scale} url={url} urls={photos}/> |
| | | </Col> |
| | | ))} |
| | | </div> |
| | |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TimeLine config={item} initdata={item.data}/> |
| | | <TimeLine config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'antvG6') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvG6 config={item} initdata={item.data}/> |
| | | <AntvG6 config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else { |
| | |
| | | |
| | | class Design extends Component { |
| | | componentDidMount() { |
| | | window.debugger = false |
| | | window.GLOB.breakpoint = false |
| | | sessionStorage.removeItem('breakpoint') |
| | | setGLOBFuncs() |
| | | } |
| | | |
| | |
| | | let { sysTemplates } = this.state |
| | | let memberLevel = Utils.getMemberLevel() |
| | | const illust = { // 模板图片,用于已使用模板 |
| | | CommonTable: mainsubtable, |
| | | BaseTable: mainsubtable, |
| | | TreePage: treepage, |
| | | CalendarPage: calendar, |
| | | CustomPage: customImg |
| | |
| | | let _templates = [] |
| | | |
| | | res.UserTemp.forEach(temp => { |
| | | if (!['CommonTable', 'TreePage', 'CalendarPage', 'CustomPage'].includes(temp.Template)) { |
| | | if (!['BaseTable', 'CustomPage'].includes(temp.Template)) { |
| | | return |
| | | } else if (temp.Template === 'CustomPage' && memberLevel < 20) { |
| | | temp.disabled = true |
| | |
| | | loading: true |
| | | }) |
| | | |
| | | if (sysMenu.Template === 'CustomPage' && sysMenu.copyId) { |
| | | if ((sysMenu.Template === 'CustomPage' || sysMenu.Template === 'BaseTable') && sysMenu.copyId) { |
| | | this.copyMenu(param, sysMenu.copyId) |
| | | } else { |
| | | Api.getSystemConfig(param).then(response => { |
| | |
| | | sessionStorage.setItem('isEditState', 'true') |
| | | window.GLOB.mkHS = true |
| | | |
| | | // HS下不可开启断点调试 |
| | | window.GLOB.breakpoint = false |
| | | sessionStorage.removeItem('breakpoint') |
| | | |
| | | Object.defineProperty(window, 'debugger', { |
| | | writable: false, |
| | | value: false |