From f9730906ff42d4d2a57a999050dd10b17fe9ee53 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 07 三月 2024 21:05:55 +0800 Subject: [PATCH] 2024-03-07 --- src/menu/components/search/main-search/index.jsx | 28 +++++++------ src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 6 +++ src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 30 +++++++++++++- 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx index cd9612d..1f3669c 100644 --- a/src/menu/components/search/main-search/index.jsx +++ b/src/menu/components/search/main-search/index.jsx @@ -120,19 +120,19 @@ this.props.updateConfig(component) } - checkComponent = (component) => { - this.updateComponent(component) + // checkComponent = (component) => { + // this.updateComponent(component) - let _item = null - component.search.forEach(item => { - if (!_item && item.focus) { - _item = item - } - }) - if (_item) { - this.handleSearch(_item) - } - } + // let _item = null + // component.search.forEach(item => { + // if (!_item && item.focus) { + // _item = item + // } + // }) + // if (_item) { + // this.handleSearch(_item) + // } + // } /** * @description 鎼滅储鏉′欢椤哄簭璋冩暣锛屾垨鎷栨嫿娣诲姞 @@ -345,6 +345,7 @@ _card.search.push(item) this.updateComponent(_card) + this.handleSearch(item) } else if (type === 'multil') { _card.search.push(...item) @@ -396,7 +397,8 @@ <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="mainsearch" card={card}/> - <PasteComponent config={card} options={['search', 'form']} updateConfig={this.checkComponent} /> + {/* <PasteComponent config={card} options={['search', 'form']} updateConfig={this.checkComponent} /> */} + <PasteComponent config={card} options={['search', 'form']} /> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> <DeleteOutlined className="close" onClick={() => this.props.deletecomponent(card.uuid)} /> </div> diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 59c62e1..5db6635 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -529,6 +529,9 @@ val = Math.round(val * col.round) / col.round // val = val.toFixed(col.decimal) } + if (col.noValue === 'false' && val === 0) { + val = '' + } } _row[col.Column] = val @@ -620,6 +623,9 @@ val = Math.round(val * col.round) / col.round // val = val.toFixed(col.decimal) } + if (col.noValue === 'false' && val === 0) { + val = '' + } } _row[col.Column] = val diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index 11c9431..21d53fe 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -68,7 +68,7 @@ editable: true, required: false, keyCol: true, - width: '12%', + width: '8%', render: (text) => { if (text === 'image') { return '鍥剧墖' @@ -90,7 +90,7 @@ inputType: 'radio', editable: true, required: false, - width: '12%', + width: '10%', render: (text) => { if (text !== 'false') { return '鏄�' @@ -122,11 +122,33 @@ editable: true, required: false, keyVals: ['number'], - width: '12%', + width: '10%', render: (text, record) => { if (record.type !== 'number') return '' if (text === 'true') { + return '鏄�' + } else { + return '鍚�' + } + }, + options: [ + {value: 'true', text: '鏄�'}, + {value: 'false', text: '鍚�'} + ] + }, + { + title: '0鍊煎鍑�', + dataIndex: 'noValue', + inputType: 'radio', + editable: true, + required: false, + keyVals: ['number'], + width: '10%', + render: (text, record) => { + if (record.type !== 'number') return '' + + if (text !== 'false') { return '鏄�' } else { return '鍚�' @@ -235,6 +257,7 @@ col.type = col.type || 'text' col.output = col.output || 'true' col.required = col.required || 'false' + col.noValue = col.noValue || 'true' if (!['text', 'image', 'number'].includes(col.type)) { if (/^Decimal/ig.test(col.type)) { @@ -779,6 +802,7 @@ col.type = col.type || 'text' col.output = col.output || 'true' col.required = col.required || 'false' + col.noValue = col.noValue || 'true' col.Width = col.Width || 20 if (!['text', 'image', 'number'].includes(col.type)) { -- Gitblit v1.8.0