| | |
| | | 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' |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | 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 = '' |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | 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 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | 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 = {} |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | 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 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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) { |
| | |
| | | return |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | Api.genericInterface(param, btn.$innerScript, 'inner').then(res => { |
| | | record.mk_api_key = res.mk_api_key || '' |
| | | |
| | | if (res.status) { |
| | |
| | | param.menuname = param.menuname + '(回调)' |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | |
| | |
| | | sql = sql.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | | sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, `'Y'`) |
| | | } else { |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`) |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | |
| | | } |
| | | |
| | | param.LText = sql |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | 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) { |
| | |
| | | return |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | Api.genericInterface(param, btn.$innerScript, 'inner').then(res => { |
| | | if (res.status) { |
| | | if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length === 0) { |
| | | this.execSuccess(res) |
| | |
| | | } |
| | | } |
| | | |
| | | Api.genericInterface(result).then(res => { |
| | | Api.genericInterface(result, btn.$outerScript, 'outer').then(res => { |
| | | if (!res) return // LoginError时中断请求 |
| | | if (ver_token && res.ErrCode === 'token_error') { |
| | | res.ErrCode = 'E' |
| | |
| | | param.menuname = param.menuname + '(回调)' |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | |
| | |
| | | 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) |
| | | |
| | |
| | | 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) |
| | | |
| | |
| | | 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) |
| | | |
| | |
| | | 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) |
| | | |
| | |
| | | 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} |
| | | </> |