From 2a03640349b948f656451a84f205a0972abd8b95 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 27 三月 2024 17:06:03 +0800 Subject: [PATCH] 2024-03-27 --- src/index.js | 7 ++- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 3 + src/tabviews/custom/components/card/cardcellList/index.jsx | 54 ++++++++++++++++++++++---- src/menu/components/card/cardcellcomponent/elementform/index.jsx | 11 ++++- src/assets/css/main.scss | 5 ++ 5 files changed, 65 insertions(+), 15 deletions(-) diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 7349bc5..41db689 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -768,4 +768,9 @@ .ant-radio-button-wrapper:not(.ant-radio-button-wrapper-checked):not(.ant-radio-button-wrapper-disabled):hover { color: var(--mk-sys-color); } +} + +// 榧犳爣鎮诞澧炲姞涓嬪垝绾� +.mk-hover-underline:hover { + text-decoration: underline!important; } \ No newline at end of file diff --git a/src/index.js b/src/index.js index f80e527..deb6444 100644 --- a/src/index.js +++ b/src/index.js @@ -75,6 +75,10 @@ GLOB.externalDatabase = null } + if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) { + GLOB.probation = true + } + // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 if (GLOB.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { if (!config.mainSystemApi) { @@ -89,9 +93,6 @@ } GLOB.systemType = 'production' - if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) { - GLOB.probation = true - } if (config.forcedUpdate && /^20\d{2}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) { GLOB.forcedUpdate = true } diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index f4f8214..38e819d 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -26,7 +26,7 @@ barcode: ['eleType', 'datatype', 'width', 'barHeight', 'displayValue', 'interval', 'noValue'], qrcode: ['eleType', 'datatype', 'width', 'qrWidth', 'color', 'url', 'noValue'], currentDate: ['eleType', 'width', 'dateFormat', 'prefix', 'postfix', 'fixStyle'], - formula: ['eleType', 'width', 'height', 'prefix', 'postfix', 'eval', 'formula', 'noValue', 'fixStyle', 'alignItems'], + formula: ['eleType', 'width', 'height', 'eval', 'formula', 'noValue'], color: ['eleType', 'datatype', 'width', 'lenWidRadio', 'noValue', 'copyable'], } @@ -211,8 +211,13 @@ if (this.record.tipType === 'text') { _options.push('height') } - } else if (this.record.eleType === 'formula' && this.record.eval === 'true') { - _options.push('decimal') + } else if (this.record.eleType === 'formula') { + if (this.record.eval !== 'func') { + _options.push('prefix', 'postfix', 'fixStyle', 'alignItems') + } + if (this.record.eval === 'true') { + _options.push('decimal') + } } if (_options.includes('fixStyle') && this.record.fixStyle === 'alone') { _options.push('fixSize', 'fixColor', 'fixLeft', 'fixRight') diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 8a38647..d30162f 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -880,6 +880,51 @@ console.warn(e) val = '' } + + if (!val && card.noValue === 'hide') { // 绌哄�奸殣钘� + return null + } else if (typeof(val) === 'object' && val.type === 'linkmenu') { + // type: 'linkmenu', linkThdMenu: null, menuId: '', value: ``, defaultValue: '', onclick: 'inner' + let item = {linkType: 'linkmenu', linkThdMenu: val.linkThdMenu} + let _val_ = val.value || '' + + if (!item.linkThdMenu && val.menuId) { + item.linkThdMenu = window.GLOB.mkThdMenus.get(val.menuId) || '' + } + if (!item.linkThdMenu && val.defaultValue) { + _val_ = val.defaultValue + } + + if (val.onclick === 'inner') { + contents.push( + <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> + <div style={_style}> + <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}}> + <span onClick={(e) => {this.openNewView(e, item)}} dangerouslySetInnerHTML={{__html: _val_}}></span> + </div> + </div> + </div> + ) + } else { + _style.cursor = 'pointer' + contents.push( + <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> + <div style={_style} onClick={(e) => {this.openNewView(e, item)}}> + <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}} dangerouslySetInnerHTML={{__html: _val_}}></div> + </div> + </div> + ) + } + } else { + contents.push( + <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> + <div style={_style}> + <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}} dangerouslySetInnerHTML={{__html: val}}></div> + </div> + </div> + ) + } + return } else if (card.$sync) { if (card.eval === 'false') { val = '' @@ -933,15 +978,6 @@ if (!val && card.noValue === 'hide') { // 绌哄�奸殣钘� return null - } else if (card.eval === 'func') { - contents.push( - <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> - <div style={_style}> - <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}} dangerouslySetInnerHTML={{__html: val}}></div> - </div> - </div> - ) - return } if (card.round && typeof(val) === 'number') { diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index b800aa8..b279673 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -665,6 +665,9 @@ ws[col + '2'].s = {alignment: { horizontal: 'center', vertical: 'center' }} }) } + // ws['A3'].s = {font: { sz: 10 , bold: true }, alignment: { horizontal: 'center', vertical: 'center' }, border: {top: {style: 'thin', color: '000000'}, left: {style: 'thin', color: '000000'}, bottom: {style: 'thin', color: '000000'}, right: {style: 'thin', color: '000000'}}}; + // ws['A3'].z = '#,##0.00'; + // ws['A3'].z = '#,##0.00;[Red]-#,##0.00;'; if (btn.verify.wrapText === 'true' && data) { let lines = data.length + 1 -- Gitblit v1.8.0