From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 四月 2022 19:23:18 +0800 Subject: [PATCH] 2022-04-26 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 55ca27b..ac2b71c 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -60,7 +60,7 @@ if (btn.controlField && selectedData && selectedData.length > 0) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒� selectedData.forEach(item => { - let s = item[btn.controlField] + '' + let s = item[btn.controlField] !== undefined ? item[btn.controlField] + '' : '' if (s === btn.controlVal || (btn.controlVal && btn.controlVal.split(',').includes(s))) { disabled = true } @@ -117,7 +117,7 @@ if (btn.controlField && !is(fromJS(nextProps.selectedData || []), fromJS(selectedData || []))) { if (nextProps.selectedData && nextProps.selectedData.length > 0) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒� nextProps.selectedData.forEach(item => { - let s = item[btn.controlField] + '' + let s = item[btn.controlField] !== undefined ? item[btn.controlField] + '' : '' if (s === btn.controlVal || (btn.controlVal && btn.controlVal.split(',').includes(s))) { disabled = true } @@ -1214,7 +1214,7 @@ sql = _prevCustomScript + sql sql = sql + _backCustomScript - if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { + if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { console.info(sql.replace(/\n\s{8}/ig, '\n')) } @@ -1251,7 +1251,7 @@ Sort: index + 1 })) - if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { + if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { let sql = [...lineMap.values()].map(item => (` ${item.insert} ${item.selects.join(` union all @@ -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} className={btn.size === 'large' ? 'ant-switch-large' : ''} 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} -- Gitblit v1.8.0