From f267d04e0561a0a20d1f2a9f558a273558ece90d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 24 五月 2021 17:50:19 +0800 Subject: [PATCH] 2021-05-24 --- src/templates/zshare/modalform/index.jsx | 7 +++++-- src/menu/components/share/normalheader/index.scss | 6 ++++++ src/menu/components/card/cardcellcomponent/index.jsx | 2 +- src/menu/components/share/normalheader/index.jsx | 2 +- src/templates/zshare/formconfig.jsx | 2 +- src/components/editor/index.jsx | 2 +- src/mob/components/formdragelement/card.jsx | 4 +++- src/tabviews/zshare/mutilform/index.jsx | 8 +++++--- src/menu/components/card/cardcellcomponent/formconfig.jsx | 4 ++-- src/tabviews/custom/components/share/normalheader/index.scss | 4 ++++ src/tabviews/zshare/fileupload/index.jsx | 2 +- src/menu/components/table/normal-table/columns/index.jsx | 2 +- src/templates/modalconfig/dragelement/card.jsx | 2 +- src/tabviews/custom/components/share/normalheader/index.jsx | 2 +- 14 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/components/editor/index.jsx b/src/components/editor/index.jsx index da053ae..f4d856c 100644 --- a/src/components/editor/index.jsx +++ b/src/components/editor/index.jsx @@ -92,7 +92,7 @@ form.append('fileExt', params.file.fileType) form.append('shardingCnt', _param.chunks) form.append('shardingNo', _param.chunk) - // form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') + form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') Api.getLargeFileUpload(form).then(res => { if (res.status) { diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index f3bfb6d..50b7ea0 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -8,7 +8,7 @@ * @param {*} card 缂栬緫鎸夐挳 * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getCardCellForm (card, type) { +export function getCardCellForm (card, type, subtype) { let _options = [ { value: 'text', text: '鏂囨湰'}, { value: 'number', text: '鏁板��'}, @@ -22,7 +22,7 @@ { value: 'currentDate', text: '褰撳墠鏃堕棿'}, ] - if (type === 'table') { + if (type === 'table' || (type === 'card' && subtype === 'datacard')) { _options.push({value: 'sequence', text: '搴忓彿'}) } let appMenus = [] diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index ceed38c..cfa8777 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -234,7 +234,7 @@ this.setState({ visible: true, card: card, - formlist: getCardCellForm(card, cards.type) + formlist: getCardCellForm(card, cards.type, cards.subtype) }) } } diff --git a/src/menu/components/share/normalheader/index.jsx b/src/menu/components/share/normalheader/index.jsx index bfcc29b..f2274ba 100644 --- a/src/menu/components/share/normalheader/index.jsx +++ b/src/menu/components/share/normalheader/index.jsx @@ -65,7 +65,7 @@ let _style = resetStyle(config.headerStyle) return ( - <div className={'normal-header' + (!show ? ' hidden' : '')} style={_style}> + <div className={'normal-header' + (!show ? ' hidden' : '') + (config.wrap && config.wrap.searchable === 'true' ? ' tree-search' : '')} style={_style}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> diff --git a/src/menu/components/share/normalheader/index.scss b/src/menu/components/share/normalheader/index.scss index ca438ed..6f01a79 100644 --- a/src/menu/components/share/normalheader/index.scss +++ b/src/menu/components/share/normalheader/index.scss @@ -16,6 +16,9 @@ min-height: 45px; min-width: 30px; } + .model-custom-header-search-list { + flex: 1; + } .ant-input-search.ant-input-affix-wrapper { width: calc(100% - 140px); max-width: 130px; @@ -28,6 +31,9 @@ opacity: 0.6; } } +.normal-header:not(.tree-search) { + display: flex; +} .normal-header.hidden { display: none; } \ No newline at end of file diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index 0ddcf33..eefeb09 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -156,7 +156,7 @@ } else if (column) { return ( <td style={{...style, minWidth: column.Width || 100}} className={className}> - {column.field} + {column.field || (column.type === 'index' ? '$Index' : '')} {column.marks && column.marks.length ? <Icon className="profile" type="ant-design"/> : null} </td> ) diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx index 888976c..cd0b26d 100644 --- a/src/mob/components/formdragelement/card.jsx +++ b/src/mob/components/formdragelement/card.jsx @@ -60,6 +60,8 @@ let formItem = null if (card.type === 'text' || 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>{card.scan === 'true' ? <div className="am-list-extra"><Icon type="scan" /></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>) } else if (card.type === 'select' || card.type === 'link') { formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{selectval || '璇烽�夋嫨'}</div><div className="am-list-extra"><Icon type="right" /></div></div></div>) @@ -165,7 +167,7 @@ className={'ant-form-item ' + (card.required === 'true' ? 'required' : '')} > {formItem} - {showField ? <div className="field-name">{card.field}</div> : ''} + {showField ? <div className="field-name">{card.field}{card.hidden === 'true' ? '(闅愯棌)' : ''}</div> : ''} </Form.Item>} </div> </div> diff --git a/src/tabviews/custom/components/share/normalheader/index.jsx b/src/tabviews/custom/components/share/normalheader/index.jsx index 9643142..570a190 100644 --- a/src/tabviews/custom/components/share/normalheader/index.jsx +++ b/src/tabviews/custom/components/share/normalheader/index.jsx @@ -46,7 +46,7 @@ if (!title && !show) return null return ( - <div className="normal-header" style={config.headerStyle}> + <div className={'normal-header' + (show ? ' header-search' : '')} style={config.headerStyle}> <span className="title">{title}</span> {show ? <SearchComponent config={config} BID={BID} menuType={menuType} refreshdata={this.props.refresh}/> : null} </div> diff --git a/src/tabviews/custom/components/share/normalheader/index.scss b/src/tabviews/custom/components/share/normalheader/index.scss index c58253d..3321603 100644 --- a/src/tabviews/custom/components/share/normalheader/index.scss +++ b/src/tabviews/custom/components/share/normalheader/index.scss @@ -22,6 +22,7 @@ font-weight: normal; font-style: normal; letter-spacing: 0px; + flex: 1; >.ant-row { >.ant-col { height: 45px; @@ -36,6 +37,9 @@ } } } +.header-search.normal-header { + display: flex; +} .normal-header.hidden { display: none; } \ No newline at end of file diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx index 615bc83..41910b9 100644 --- a/src/tabviews/zshare/fileupload/index.jsx +++ b/src/tabviews/zshare/fileupload/index.jsx @@ -97,7 +97,7 @@ form.append('fileExt', params.file.fileType) form.append('shardingCnt', param.chunks) form.append('shardingNo', param.chunk) - // form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') + form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') Api.getLargeFileUpload(form).then(res => { if (res.status) { diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 9698394..ec87ae6 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -91,10 +91,12 @@ item.oriOptions = item.options ? fromJS(item.options).toJS() : null // 淇濆瓨鍒濆鍒楄〃锛岀敤浜庤仈鍔ㄨ彍鍗曟帶鍒� // 涓嬬骇琛ㄥ崟鎺у埗-瀛楁鍐欏叆 - if ((item.type === 'select' || item.type === 'radio') && item.linkSubField && item.linkSubField.length > 0) { + if ((['select', 'radio'].includes(item.type) || (item.type === 'checkcard' && item.multiple !== 'true')) && item.linkSubField && item.linkSubField.length > 0) { item.linkSubField = item.linkSubField.filter(_item => _inputfields.includes(_item)) - } - if (item.linkSubField && item.linkSubField.length === 0) { + if (item.linkSubField.length === 0) { + item.linkSubField = null + } + } else { item.linkSubField = null } diff --git a/src/templates/modalconfig/dragelement/card.jsx b/src/templates/modalconfig/dragelement/card.jsx index bfb0c5b..847e429 100644 --- a/src/templates/modalconfig/dragelement/card.jsx +++ b/src/templates/modalconfig/dragelement/card.jsx @@ -145,7 +145,7 @@ wrapperCol={card.labelwidth ? {style: {width: (100 - card.labelwidth) + '%'}} : null} > {formItem} - {showField ? <div className="field-name">{card.field}</div> : ''} + {showField ? <div className="field-name">{card.field}{card.hidden === 'true' ? '(闅愯棌)' : ''}</div> : ''} </Form.Item>} </div> </div> diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 1a91cb1..4dd9521 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -2653,7 +2653,7 @@ type: 'multiselect', key: 'linkSubField', label: Formdict['model.form.linkform'], - tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑琛ㄥ崟锛堟枃鏈垨鏁板瓧琛ㄥ崟锛変腑銆�', + tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑琛ㄥ崟锛堟枃鏈垨鏁板瓧琛ㄥ崟锛変腑銆傛敞锛氫娇鐢ㄩ�夐」鍗′笖璁句负鍙閫夋椂鏃犳晥銆�', initVal: card.linkSubField || [], options: inputfields }, diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 8a0e445..733cfb2 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -14,7 +14,7 @@ const { TextArea } = Input const modalTypeOptions = { - text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor'], + text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan'], number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor'], select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter'], checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra'], @@ -203,7 +203,6 @@ let _options = this.getOptions(value, this.state.resourceType, this.state.supField, this.state.display, enter) - this.setState({ openType: value, enter: enter, @@ -265,6 +264,10 @@ if (value === 'brafteditor') { fieldValue.encryption = 'true' } + } else if (form.key === 'hidden') { + if (value === 'linkMain') { + fieldValue.hidden = 'true' + } } return form -- Gitblit v1.8.0