From a6b8918569eaae5cafa89b7db61b2ab8e406590e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 22 一月 2022 14:29:07 +0800 Subject: [PATCH] 2022-01-22 --- src/mob/components/formdragelement/card.jsx | 2 src/tabviews/custom/components/card/table-card/index.jsx | 1 src/tabviews/custom/components/carousel/data-card/index.jsx | 1 src/tabviews/custom/components/card/prop-card/index.jsx | 14 +++---- src/tabviews/custom/components/carousel/prop-card/index.jsx | 22 ++++------ src/templates/sharecomponent/tablecomponent/index.jsx | 9 ++-- src/tabviews/custom/components/share/normalTable/index.jsx | 1 src/templates/zshare/formconfig.jsx | 3 + src/utils/option.js | 2 src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 1 src/mob/modalconfig/source.jsx | 5 ++ src/tabviews/custom/components/card/data-card/index.jsx | 2 12 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx index 4bfe3dd..ada2ae7 100644 --- a/src/mob/components/formdragelement/card.jsx +++ b/src/mob/components/formdragelement/card.jsx @@ -59,7 +59,7 @@ } let formItem = null - if (card.type === 'text' || card.type === 'number') { + if (card.type === 'text' || card.type === 'number' || card.type === 'linkMain') { formItem = (<div className={'am-list-item ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || ''}</span> }</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><ScanOutlined /></div> : null}</div></div>) } else if (card.type === 'number') { formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval}</div></div></div>) diff --git a/src/mob/modalconfig/source.jsx b/src/mob/modalconfig/source.jsx index 190030d..6fafc89 100644 --- a/src/mob/modalconfig/source.jsx +++ b/src/mob/modalconfig/source.jsx @@ -105,6 +105,11 @@ label: '鍒嗗壊绾�', subType: 'split', url: '' + }, + { + type: 'form', + label: '鍏宠仈涓昏〃', + subType: 'linkMain', } ] diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 7f5f993..5d2157e 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -587,7 +587,7 @@ _data.key = item.key _data.$$uuid = _data[config.setting.primaryKey] || '' _data.$$BID = BID || '' - item.$$BData = BData || '' + _data.$$BData = BData || '' _data.$Index = item.$Index return _data } else { diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index cb439f0..72391ee 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -48,25 +48,23 @@ if (_sync && data) { _data = data[_config.dataName] || {} - if (_data && Array.isArray(_data)) { + if (Array.isArray(_data)) { _data = _data[0] || {} } _sync = false } else if (_sync && initdata) { _data = initdata || {} - if (_data && Array.isArray(_data)) { + if (Array.isArray(_data)) { _data = _data[0] || {} } _sync = false } } - if (_data) { - _data.$$BID = BID || '' - _data.$$BData = BData || '' - if (_config.setting.primaryKey) { - _data.$$uuid = _data[_config.setting.primaryKey] || '' - } + _data.$$BID = BID || '' + _data.$$BData = BData || '' + if (_config.setting.primaryKey) { + _data.$$uuid = _data[_config.setting.primaryKey] || '' } _config.columns.forEach(item => { diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index 998bb1b..13a46b9 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -60,6 +60,7 @@ item.key = index item.$$uuid = item[_config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx index 41caced..63607bf 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.jsx +++ b/src/tabviews/custom/components/carousel/data-card/index.jsx @@ -52,6 +52,7 @@ item.key = index item.$$uuid = item[_config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 return item }) diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index 04a76d7..45bcc40 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -42,23 +42,21 @@ if (_sync && data) { _data = data[_config.dataName] || {} - if (_data && Array.isArray(_data)) { + if (Array.isArray(_data)) { _data = _data[0] || {} } _sync = false } else if (_sync && initdata) { _data = initdata || {} - if (_data && Array.isArray(_data)) { + if (Array.isArray(_data)) { _data = _data[0] || {} } _sync = false } } - if (_data) { - _data.$$BID = BID || '' - _data.$$BData = BData || '' - } + _data.$$BID = BID || '' + _data.$$BData = BData || '' _config.columns.forEach(item => { if (item.type !== 'number') return @@ -122,16 +120,14 @@ if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = {$$empty: true} if (nextProps.data && nextProps.data[config.dataName]) { - _data = nextProps.data[config.dataName] - if (_data && Array.isArray(_data)) { - _data = _data[0] + _data = nextProps.data[config.dataName] || {} + if (Array.isArray(_data)) { + _data = _data[0] || {} } } - if (_data) { - _data.$$BID = BID || '' - _data.$$BData = BData || '' - } + _data.$$BID = BID || '' + _data.$$BData = BData || '' this.setState({sync: false, data: _data}) } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 4a50717..fe54374 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -382,7 +382,6 @@ lineMarks: PropTypes.array, // 琛屾爣璁� fields: PropTypes.array, // 缁勪欢瀛楁闆� ContainerId: PropTypes.any, // 鏍囩椤靛灞侷d - BData: PropTypes.any, // 涓昏〃鏁版嵁 data: PropTypes.any, // 琛ㄦ牸鏁版嵁 total: PropTypes.any, // 鎬绘暟 loading: PropTypes.bool, // 琛ㄦ牸鍔犺浇涓� diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index 98098fe..56538e6 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -58,6 +58,7 @@ item.key = index item.$$uuid = item[_config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index 77ed37a..f2da2b6 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -287,16 +287,17 @@ style={{ width: '100%' }} optionFilterProp="children" value="璇烽�夋嫨琛ㄥ悕" - onChange={this.onTableChange} + onSelect={this.onTableChange} + dropdownClassName="mk-tables" showArrow={false} getPopupContainer={() => containerId ? document.getElementById(containerId) : document.body} filterOption={(input, option) => { - return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || - option.props.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 + return option.props.children[0].toLowerCase().indexOf(input.toLowerCase()) >= 0 || + option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0 }} > {tables.map((table, index) => ( - <Option key={index} title={table.TbName} value={table.TbName}>{table.Remark}</Option> + <Option key={index} title={table.TbName} value={table.TbName}>{table.Remark}<br/>{table.TbName}</Option> ))} </Select> {selectedTables.length > 0 && <List diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index dfcd692..809ca9b 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -2343,6 +2343,9 @@ }, { value: 'split', text: '鍒嗛殧绾�' + }, { + value: 'linkMain', + text: '鍏宠仈涓昏〃' }] } diff --git a/src/utils/option.js b/src/utils/option.js index b8b73e7..0d59ac9 100644 --- a/src/utils/option.js +++ b/src/utils/option.js @@ -923,4 +923,4 @@ ] } -export const queryTableSql = 'select TbName,Remark from (select TbName,Remark from sDataDictb where appkey= @appkey@ and Deleted=0 union select a.TbName,Remark from (select TbName,Remark from sDataDictb where appkey= \'\' and Deleted=0 ) a left join (select TbName from sDataDictb where appkey= @appkey@ and Deleted=0 ) b on a.TbName=b.TbName where b.TbName is null ) t' +export const queryTableSql = 'select top 999999 TbName,Remark from (select TbName,Remark from sDataDictb where appkey= @appkey@ and Deleted=0 union select a.TbName,Remark from (select TbName,Remark from sDataDictb where appkey= \'\' and Deleted=0 ) a left join (select TbName from sDataDictb where appkey= @appkey@ and Deleted=0 ) b on a.TbName=b.TbName where b.TbName is null ) t order by TbName' -- Gitblit v1.8.0