From b6cbfb08b51e87e6eac995be8e7751815715e6a1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 29 三月 2022 15:36:21 +0800 Subject: [PATCH] 2022-03-29 --- src/tabviews/zshare/actionList/tabbutton/index.jsx | 3 + src/tabviews/zshare/actionList/popupbutton/index.jsx | 3 + src/templates/zshare/formconfig.jsx | 7 +++ src/menu/components/share/actioncomponent/formconfig.jsx | 7 +++ src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 3 + src/tabviews/verupmanage/config.jsx | 12 +++--- src/tabviews/zshare/actionList/excelInbutton/index.jsx | 3 + src/tabviews/zshare/actionList/printbutton/index.jsx | 3 + src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 3 + src/menu/components/share/actioncomponent/actionform/index.jsx | 6 +++ src/tabviews/zshare/actionList/newpagebutton/index.jsx | 3 + src/tabviews/zshare/actionList/normalbutton/index.jsx | 7 ++- src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 3 + 13 files changed, 47 insertions(+), 16 deletions(-) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 8eaa6b3..55184da 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -358,6 +358,9 @@ if (this.record.control) { shows.push('controlField', 'controlVal') } + if (this.record.control === 'disabled') { + shows.push('reason') + } } } else { if (Ot !== 'notRequired') { @@ -382,6 +385,9 @@ if (this.record.control) { shows.push('controlField', 'controlVal') } + if (this.record.control === 'disabled') { + shows.push('reason') + } } if (this.record.show === 'icon') { diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 23e93bf..97dac96 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -814,6 +814,13 @@ required: false }, { + type: 'text', + key: 'reason', + label: '绂佺敤鍘熷洜', + initVal: card.reason || '', + required: false + }, + { type: 'splitLine', key: 'title', label: '琛ㄥ崟', diff --git a/src/tabviews/verupmanage/config.jsx b/src/tabviews/verupmanage/config.jsx index 32add62..e6ee268 100644 --- a/src/tabviews/verupmanage/config.jsx +++ b/src/tabviews/verupmanage/config.jsx @@ -118,12 +118,12 @@ } ], columns:[ - {label:'ID',field:'ID',type:'text',Align:'left',Hide:'true',IsSort:'true',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1583983669503v35f3e7f52iosklnomg'}, - {label:'鍏抽敭瀛�',field:'KeyWords',type:'text',Align:'left',Hide:'false',IsSort:'true',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'15839836784475gl5v26qgual768ab8u'}, - {label:'鎻忚堪',field:'Remark',type:'text',Align:'left',Hide:'false',IsSort:'true',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'15839837044624m3k41m7omhs6q8f9fo'}, - {label:'绫诲瀷',field:'TypeName',type:'text',Align:'left',Hide:'false',IsSort:'true',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1583983717421ts67iu14hmmeqivel5e'}, - {label:'鎺掑簭',field:'Sort',type:'text',Align:'left',Hide:'false',IsSort:'true',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1583983728654ks05hor8mgiqbp61ivl'}, - {label:'SrcID',field:'SrcID',type:'text',Align:'left',Hide:'true',IsSort:'true',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1584001165784gu23d35b43i860n0a19'} + {label:'ID',field:'ID',type:'text',Align:'left',Hide:'true',IsSort:'false',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1583983669503v35f3e7f52iosklnomg'}, + {label:'鍏抽敭瀛�',field:'KeyWords',type:'text',Align:'left',Hide:'false',IsSort:'false',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'15839836784475gl5v26qgual768ab8u'}, + {label:'鎻忚堪',field:'Remark',type:'text',Align:'left',Hide:'false',IsSort:'false',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'15839837044624m3k41m7omhs6q8f9fo'}, + {label:'绫诲瀷',field:'TypeName',type:'text',Align:'left',Hide:'false',IsSort:'false',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1583983717421ts67iu14hmmeqivel5e'}, + {label:'鎺掑簭',field:'Sort',type:'text',Align:'left',Hide:'false',IsSort:'false',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1583983728654ks05hor8mgiqbp61ivl'}, + {label:'SrcID',field:'SrcID',type:'text',Align:'left',Hide:'true',IsSort:'false',Width:120,prefix:'',postfix:'',matchVal:'',color:'',fieldlength:50,uuid:'1584001165784gu23d35b43i860n0a19'} ], gridBtn: {display: false} }, diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index efe644b..5f0839b 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -246,6 +246,7 @@ icon={btn.icon} loading={loading} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} className={'mk-btn mk-' + btn.class} onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} >{btn.label}</Button> @@ -270,7 +271,7 @@ return ( <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style} diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 2fb5f25..15dbb8b 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -493,6 +493,7 @@ icon={btn.icon} loading={loading} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} className={'mk-btn mk-' + btn.class} onClick={() => {this.actionTrigger()}} >{btn.label}</Button> @@ -518,7 +519,7 @@ return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style} diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 3db61f6..cbc490b 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -941,6 +941,7 @@ className={'mk-btn mk-' + btn.class} icon={btn.icon} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} loading={loading} >{btn.label}</Button> @@ -965,7 +966,7 @@ return ( <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style} diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index 2d7ccac..cb1f797 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -244,6 +244,7 @@ className={'mk-btn mk-' + btn.class} icon={btn.icon} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} >{btn.label}</Button> ) @@ -267,7 +268,7 @@ return ( <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} style={btn.style} disabled={disabled} icon={icon} diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index de43359..23ace02 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2093,9 +2093,9 @@ if (btn.OpenType === 'form') { if (btn.formType === 'switch') { - return <Switch loading={loading} checked={check} disabled={disabled || loading} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={style} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/> + return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={style} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/> } else { - return <Checkbox disabled={disabled || loading} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={style}></Checkbox> + return <Checkbox disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={style}></Checkbox> } } else if (show === 'actionList') { return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> @@ -2104,6 +2104,7 @@ icon={btn.icon} loading={loading} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} className={'mk-btn mk-' + btn.class} onClick={() => {this.actionTrigger()}} >{(loadingNumber ? `(${loadingNumber})` : '') + btn.label}</Button> @@ -2139,7 +2140,7 @@ return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style || style} diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index b1721bd..0d95d4c 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -350,12 +350,13 @@ className={'mk-btn mk-' + btn.class} icon={btn.icon} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} onClick={() => {this.actionTrigger()}} loading={loading} >{btn.label}</Button> : null} {show !== 'actionList' ? <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style} diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 329aa84..6c14dd2 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -1618,6 +1618,7 @@ icon={btn.icon} loading={loading} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} className={'mk-btn mk-' + btn.class} onClick={() => {this.actionTrigger()}} >{loadingNumber ? `(${loadingNumber})` : '' + btn.label}</Button> @@ -1643,7 +1644,7 @@ return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style} diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 5050452..353a566 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -218,6 +218,7 @@ className={'mk-btn mk-' + btn.class} icon={btn.icon} disabled={disabled} + title={disabled ? (btn.reason || '') : ''} onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} >{btn.label}</Button> ) @@ -241,7 +242,7 @@ return ( <Button type="link" - title={show === 'icon' ? btn.label : ''} + title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} style={btn.style} disabled={disabled} icon={icon} diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 53f2162..d45b22d 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -295,6 +295,9 @@ if (this.record.control) { shows.push('controlField', 'controlVal') } + if (this.record.control === 'disabled') { + shows.push('reason') + } return { shows, diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 1cb6393..007fdca 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1452,6 +1452,13 @@ initVal: card.controlVal || '', required: false }, + { + type: 'text', + key: 'reason', + label: '绂佺敤鍘熷洜', + initVal: card.reason || '', + required: false + }, ] } -- Gitblit v1.8.0