From bd9dfa6b6ff25dbab21ba9a249fc9d9f4d03dce2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 20 二月 2024 14:08:39 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 72 ++++++++++++++++++++---------------- 1 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 6c4548b..30a56a1 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -3,7 +3,7 @@ import moment from 'moment' import qs from 'qs' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd' +import { Button, Modal, notification, message, Popover, Drawer, Switch, Checkbox, Progress } from 'antd' import md5 from 'md5' import Api from '@/api' @@ -497,7 +497,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -508,7 +508,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else if (btn.OpenType === 'pop' || btn.OpenType === 'formSubmit' || btn.OpenType === 'form') { // 琛ㄥ崟 if (btn.sqlType === 'insert') { // 绯荤粺鍑芥暟娣诲姞鏃讹紝鐢熸垚uuid primaryId = '' @@ -533,7 +533,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -544,7 +544,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else { param.ID = primaryId @@ -559,7 +559,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -570,7 +570,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } } @@ -590,7 +590,7 @@ if (param.$unCheckParam) { param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') - param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) + param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText, param.exec_type) param.$unCheckParam.menuname = btn.logLabel if (window.GLOB.probation) { @@ -625,7 +625,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -636,7 +636,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else if (btn.OpenType === 'pop') { // 琛ㄥ崟 if (index !== 0) { let _cell = {} @@ -665,7 +665,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -676,7 +676,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else { param.ID = primaryId @@ -691,7 +691,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -702,7 +702,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } } @@ -721,7 +721,7 @@ if (param.$unCheckParam) { param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') - param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) + param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText, param.exec_type) param.$unCheckParam.menuname = btn.logLabel if (window.GLOB.probation) { @@ -1732,10 +1732,10 @@ } param.LText = sql - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.menuname = btn.logLabel if (window.GLOB.probation) { @@ -2494,7 +2494,7 @@ upid: id } - param.LText = Utils.formatOptions(Utils.getuuid()) + param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -2588,7 +2588,7 @@ msg_result: msg } - _p.LText = Utils.formatOptions(Utils.getuuid()) + _p.LText = Utils.getuuid() _p.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') _p.secretkey = Utils.encrypt(_p.LText, _p.timestamp) @@ -2636,7 +2636,7 @@ upid: id } - param.LText = Utils.formatOptions(Utils.getuuid()) + param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -2767,7 +2767,7 @@ upid: id } - param.LText = Utils.formatOptions(Utils.getuuid()) + param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -3526,18 +3526,26 @@ label = (loadingNumber ? `(${loadingNumber})` : '') + btn.label } + let BTN = <Button + type={type} + icon={icon} + id={'button' + btn.uuid} + title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} + loading={loading} + disabled={disabled} + style={btn.style} + className={className} + onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} + >{label}</Button> + + if (btn.hoverTitle) { + BTN = <Popover mouseLeaveDelay={0.3} mouseEnterDelay={0.3} content={btn.hoverTitle} trigger="hover"> + {BTN} + </Popover> + } + return <> - <Button - type={type} - icon={icon} - id={'button' + btn.uuid} - title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} - loading={loading} - disabled={disabled} - style={btn.style} - className={className} - onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} - >{label}</Button> + {BTN} <span onClick={(e) => {e.stopPropagation()}}>{this.getModels()}</span> {loadingTotal ? <Progress className="mk-button-progress" percent={(loadingTotal - loadingNumber) / loadingTotal * 100} size="small" showInfo={false} /> : null} </> -- Gitblit v1.8.0