| | |
| | | } |
| | | } |
| | | } |
| | | .mk-button-progress { |
| | | position: fixed!important; |
| | | top: 0px; |
| | | left: 0px; |
| | | z-index: 1100; |
| | | width: 100vw!important; |
| | | .ant-progress-outer { |
| | | .ant-progress-inner { |
| | | vertical-align: top; |
| | | background-color: transparent; |
| | | .ant-progress-bg { |
| | | height: 4px!important; |
| | | background-color: var(--antd-wave-shadow-color); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | shows.push('sql', 'sqlType', 'output') |
| | | } |
| | | |
| | | if (Ot === 'required') { |
| | | shows.push('progress') |
| | | } |
| | | |
| | | if (this.record.sqlType === 'insert') { |
| | | reOptions.Ot = requireOptions.filter(op => op.value === 'notRequired') |
| | | } else { |
| | |
| | | } else if (_funcType === 'goBack') { |
| | | shows.push('reload') |
| | | } else if (_funcType === 'megvii') { |
| | | shows.push('subFunc') |
| | | shows.push('subFunc', 'progress') |
| | | } |
| | | } |
| | | |
| | |
| | | value: 'true', |
| | | text: '是' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'progress', |
| | | label: '进度提示', |
| | | initVal: card.progress || 'number', |
| | | required: false, |
| | | forbid: appType === 'mob', |
| | | options: [{ |
| | | value: 'number', |
| | | text: '剩余数' |
| | | }, { |
| | | value: 'progressbar', |
| | | text: '进度条' |
| | | }] |
| | | } |
| | | ] |
| | | |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <NormalButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | columns={cards.columns} |
| | | selectedData={_data} |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <ExcelInButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <ExcelOutButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <PopupButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <TabButton |
| | | btn={card} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <NewPageButton |
| | | btn={card} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <ChangeUserButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <PrintButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <FuncMegvii |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | {group.sort !== 1 && group.prevButton.enable !== 'false' ? <Button type="link" className="prev" onClick={this.prevStep} style={group.prevButton.style}>{group.prevButton.label}</Button> : null} |
| | | <NormalButton |
| | | BID={BID} |
| | | position="form" |
| | | btn={group.subButton} |
| | | setting={config.setting} |
| | | columns={config.columns} |
| | |
| | | {group && data ? <div className={'mk-form-action ' + (group.$button || '')}> |
| | | <NormalButton |
| | | BID={BID} |
| | | position="form" |
| | | btn={group.subButton} |
| | | setting={config.setting} |
| | | columns={config.columns} |
| | |
| | | execAction: null, |
| | | loadingUuid: '', |
| | | configMap: {}, |
| | | loadingNumber: '' |
| | | loadingNumber: '', |
| | | } |
| | | |
| | | refreshdata = (item, type) => { |
| | |
| | | _resolve() |
| | | }) |
| | | } else { // 超出20个请求时循环执行 |
| | | if (btn.progress === 'progressbar') { |
| | | this.setState({ |
| | | loadingTotal: _params.length |
| | | }) |
| | | } |
| | | this.innerLoopRequest(_params, btn, _resolve) |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | if (_params.length > 1 && btn.progress === 'progressbar') { |
| | | this.setState({ |
| | | loadingTotal: _params.length |
| | | }) |
| | | } |
| | | |
| | | // 循环调用外部接口(包括内部及回调函数) |
| | | this.outerLoopRequest(_params, btn, _resolve, _params.length > 20) |
| | | this.outerLoopRequest(_params, btn, _resolve) |
| | | } |
| | | } |
| | | |
| | |
| | | let param = params.shift() |
| | | |
| | | this.setState({ |
| | | loadingNumber: params.length || '' |
| | | loadingNumber: params.length |
| | | }) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | |
| | | /** |
| | | * @description 外部请求循环执行 |
| | | */ |
| | | outerLoopRequest = (params, btn, _resolve, widthNumber) => { |
| | | outerLoopRequest = (params, btn, _resolve) => { |
| | | if (!params && params.length === 0) return |
| | | |
| | | let param = params.shift() |
| | |
| | | let _localParam = null |
| | | let errRes = null |
| | | |
| | | if (widthNumber) { |
| | | this.setState({ |
| | | loadingNumber: params.length || '' |
| | | loadingNumber: params.length |
| | | }) |
| | | } |
| | | |
| | | new Promise(resolve => { |
| | | // 内部请求 |
| | |
| | | this.execSuccess(btn, response) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, btn, _resolve, widthNumber) |
| | | this.outerLoopRequest(params, btn, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(response, btn) |
| | |
| | | this.execSuccess(btn, res) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, btn, _resolve, widthNumber) |
| | | this.outerLoopRequest(params, btn, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(res, btn) |
| | |
| | | this.execSuccess(btn, res) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, btn, _resolve, widthNumber) |
| | | this.outerLoopRequest(params, btn, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(errRes || res, btn) |
| | |
| | | <div className="verup-button-list verup-toolbar-button"> |
| | | {this.props.actions.map((item, index) => { |
| | | let label = item.label |
| | | if (loadingUuid === item.uuid && loadingNumber !== '') { |
| | | if (loadingUuid === item.uuid && loadingNumber) { |
| | | label = label + '(' + loadingNumber + ')' |
| | | } |
| | | return ( |
| | |
| | | {label:'综合查询',field:'Remark,KeyWords,TypeName',type:'text',initval:'', oriInitval: '', required: false,match:'like','ratio':6,uuid:'1583983588787acl55md59fu9kpb52db'} |
| | | ], |
| | | action:[ |
| | | {label:'执行',OpenType:'pop',intertype:'outer',innerFunc:'',sysInterface:'true',outerFunc:'s_get_sVersionDetail_Ltext',interface:'http://cloud.mk9h.cn/webapi/dostars',callbackFunc:'s_sDataDictb_TBBack',position:'toolbar',$toolbtn: true,execSuccess:'grid',execError:'never',icon:'',class:'primary',Ot:'required',uuid:'1583983849299g1qfd28g3c9n9e0e57a',verify:null}, |
| | | {label:'关闭',OpenType:'prompt',intertype:'inner',innerFunc:'',position:'toolbar',$toolbtn: true,Ot:'required',execSuccess:'grid',execError:'never',icon:'',class:'border-danger',sql:'sVersionDetail_Local',sqlType:'LogicDelete',uuid:'1583984089282i4i140hacimbki9s5gh', |
| | | {label:'执行',OpenType:'pop',intertype:'outer',innerFunc:'',sysInterface:'true',outerFunc:'s_get_sVersionDetail_Ltext',interface:'http://cloud.mk9h.cn/webapi/dostars',callbackFunc:'s_sDataDictb_TBBack',position:'toolbar',$toolbtn: true,execSuccess:'grid',execError:'never',icon:'',class:'primary',Ot:'required',progress: 'progressbar',uuid:'1583983849299g1qfd28g3c9n9e0e57a',verify:null}, |
| | | {label:'关闭',OpenType:'prompt',intertype:'inner',innerFunc:'',position:'toolbar',$toolbtn: true,Ot:'required',progress: 'progressbar',execSuccess:'grid',execError:'never',icon:'',class:'border-danger',sql:'sVersionDetail_Local',sqlType:'LogicDelete',uuid:'1583984089282i4i140hacimbki9s5gh', |
| | | verify:{ |
| | | default: 'true', |
| | | invalid: 'true', |
| | |
| | | if (buttonConfig[item.uuid]) { |
| | | item = {...buttonConfig[item.uuid], ...item} |
| | | } |
| | | item.$toolbtn = true |
| | | |
| | | return item |
| | | }), |
| | | columns: _columns, |
| | |
| | | if (buttonConfig[item.uuid]) { |
| | | item = {...buttonConfig[item.uuid], ...item} |
| | | } |
| | | item.$toolbtn = true |
| | | return item |
| | | }), |
| | | columns: _columns, |
| | |
| | | |
| | | class NewPageButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | MenuID: PropTypes.any, // 菜单ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | BID: PropTypes.string, // 主表ID |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn } = this.props |
| | | const { loading, disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | | <Button |
| | | 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> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | class ExcelInButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 显示样式 |
| | | BID: PropTypes.string, // 主表ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn } = this.props |
| | | const { loading, disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | icon={btn.icon} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | title={disabled ? (btn.reason || '') : ''} |
| | | className={'mk-btn mk-' + btn.class} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{btn.label}</Button> |
| | | <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" /> |
| | | </div> |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || 'upload' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{label}</Button> |
| | | <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" /> |
| | | </div> |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | static propTpyes = { |
| | | BID: PropTypes.string, // 主表ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | show: PropTypes.any, // 显示样式 |
| | | Tab: PropTypes.any, // 如果当前元素为标签时,tab为标签信息 |
| | | btn: PropTypes.object, // 按钮 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn } = this.props |
| | | const { loading, hidden, disabled } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | | <Button |
| | | 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> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || 'download' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | style={btn.style || null} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { withRouter } from 'react-router' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | import { Button, Modal, notification, message, Progress } from 'antd' |
| | | import CryptoJS from 'crypto-js' |
| | | import moment from 'moment' |
| | | |
| | |
| | | loading: false, |
| | | disabled: false, |
| | | loadingNumber: '', |
| | | loadingTotal: '', |
| | | hidden: false, |
| | | IpList: [], |
| | | lines: [], |
| | |
| | | } |
| | | |
| | | loginDevice = () => { |
| | | const { btn } = this.props |
| | | const { lines, selectIp } = this.state |
| | | |
| | | // 上报接口设置:工程模式-场景模式-开放接口设置-数据上报设置-数据上报服务器地址(开启服务器二次鉴权) |
| | |
| | | } |
| | | }) |
| | | |
| | | if (data.length > 1 && btn.progress === 'progressbar') { |
| | | this.setState({ |
| | | loadingTotal: data.length |
| | | }) |
| | | } |
| | | |
| | | this.addUser(ip, data, result.session_id) |
| | | }) |
| | | }, err => { |
| | |
| | | let data = datas.shift() |
| | | |
| | | this.setState({ |
| | | loadingNumber: datas.length || '' |
| | | loadingNumber: datas.length |
| | | }) |
| | | |
| | | let error = '' |
| | |
| | | |
| | | this.setState({ |
| | | loading: false, |
| | | loadingNumber: '' |
| | | loadingNumber: '', |
| | | loadingTotal: '' |
| | | }) |
| | | |
| | | // if (btn.execSuccess !== 'never') { |
| | |
| | | |
| | | this.setState({ |
| | | loading: false, |
| | | loadingNumber: '' |
| | | loadingNumber: '', |
| | | loadingTotal: '' |
| | | }) |
| | | |
| | | // if (btn.execError !== 'never') { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { loading, disabled, hidden, loadingNumber } = this.state |
| | | const { btn } = this.props |
| | | const { loading, disabled, hidden, loadingNumber, loadingTotal } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | | <> |
| | | <Button |
| | | icon={btn.icon} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | title={disabled ? (btn.reason || '') : ''} |
| | | className={'mk-btn mk-' + btn.class} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{(loadingNumber ? `(${loadingNumber})` : '') + btn.label}</Button> |
| | | {this.getModels()} |
| | | </> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | {this.getModels()} |
| | | {loadingTotal ? <Progress className="mk-button-progress" percent={(loadingTotal - loadingNumber) / loadingTotal * 100} size="small" showInfo={false} /> : null} |
| | | </> |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | class NewPageButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | BData: PropTypes.any, // 主表数据 |
| | | btn: PropTypes.object, // 按钮 |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn } = this.props |
| | | const { disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | | <Button |
| | | className={'mk-btn mk-' + btn.class} |
| | | icon={btn.icon} |
| | | disabled={disabled} |
| | | title={disabled ? (btn.reason || '') : ''} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{btn.label}</Button> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | style={btn.style} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | style={btn.style || null} |
| | | disabled={disabled} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message, Drawer, Switch, Checkbox } from 'antd' |
| | | import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import Utils, { getSysDefaultSql } from '@/utils/utils.js' |
| | |
| | | |
| | | class NormalButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | position: PropTypes.any, // 按钮位置,工具栏为toolbar |
| | | BID: PropTypes.string, // 主表ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | style: PropTypes.any, // 按钮样式 |
| | |
| | | btnconfig: null, |
| | | loading: false, |
| | | loadingNumber: '', |
| | | loadingTotal: '', |
| | | disabled: false, |
| | | hidden: false, |
| | | checkParam: null, |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { position, btn } = this.props |
| | | const { btn } = this.props |
| | | |
| | | MKEmitter.addListener('triggerBtnId', this.actionTrigger) |
| | | if (position === 'form') { |
| | | if (btn.OpenType === 'formSubmit') { |
| | | MKEmitter.addListener('triggerFormSubmit', this.actionSubmit) |
| | | } |
| | | MKEmitter.addListener('returnModuleParam', this.resetModuleParam) |
| | |
| | | _resolve() |
| | | }) |
| | | } else { // 超出20个请求时循环执行 |
| | | if (btn.progress === 'progressbar') { |
| | | this.setState({ |
| | | loadingTotal: params.length |
| | | }) |
| | | } |
| | | this.innerLoopRequest(params, btn, _resolve) |
| | | } |
| | | } else if (btn.intertype === 'outer') { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (_params.length > 1 && btn.progress === 'progressbar') { |
| | | this.setState({ |
| | | loadingTotal: _params.length |
| | | }) |
| | | } |
| | | |
| | | // 循环调用外部接口(包括内部及回调函数) |
| | | this.outerLoopRequest(_params, btn, _resolve, _params.length > 20) |
| | | this.outerLoopRequest(_params, btn, _resolve) |
| | | } else if (btn.intertype === 'custom') { // 系统接口 |
| | | let params = [] |
| | | |
| | |
| | | params = this.getInnerParam(data, formdata) |
| | | } |
| | | |
| | | if (params.length > 1 && btn.progress === 'progressbar') { |
| | | this.setState({ |
| | | loadingTotal: params.length |
| | | }) |
| | | } |
| | | |
| | | this.customLoopRequest(params, _resolve) |
| | | } |
| | | } |
| | |
| | | let param = params.shift() |
| | | |
| | | this.setState({ |
| | | loadingNumber: params.length || '' |
| | | loadingNumber: params.length |
| | | }) |
| | | |
| | | let record = { |
| | |
| | | let param = params.shift() |
| | | |
| | | this.setState({ |
| | | loadingNumber: params.length || '' |
| | | loadingNumber: params.length |
| | | }) |
| | | |
| | | let _param = null |
| | |
| | | /** |
| | | * @description 外部请求循环执行 |
| | | */ |
| | | outerLoopRequest = (params, btn, _resolve, widthNumber) => { |
| | | outerLoopRequest = (params, btn, _resolve) => { |
| | | if (!params && params.length === 0) return |
| | | |
| | | let param = params.shift() |
| | | let _outParam = null |
| | | |
| | | if (widthNumber) { |
| | | this.setState({ |
| | | loadingNumber: params.length || '' |
| | | loadingNumber: params.length |
| | | }) |
| | | } |
| | | |
| | | new Promise(resolve => { |
| | | // 内部请求 |
| | |
| | | this.execSuccess(response) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, btn, _resolve, widthNumber) |
| | | this.outerLoopRequest(params, btn, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(response) |
| | |
| | | this.execSuccess(res) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, btn, _resolve, widthNumber) |
| | | this.outerLoopRequest(params, btn, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(res) |
| | |
| | | } else if (res && res.ErrCode === '-1') { // 完成后不提示 |
| | | |
| | | } |
| | | |
| | | this.setState({ |
| | | loadingNumber: '', |
| | | loadingTotal: '', |
| | | }) |
| | | |
| | | if (autoMatic) { |
| | | this.setState({ |
| | |
| | | this.setState({ |
| | | loading: false, |
| | | loadingNumber: '', |
| | | loadingTotal: '', |
| | | visible: false |
| | | }) |
| | | MKEmitter.emit('autoExecOver', btn.uuid, 'error') |
| | |
| | | |
| | | this.setState({ |
| | | loading: false, |
| | | loadingNumber: '' |
| | | loadingNumber: '', |
| | | loadingTotal: '', |
| | | }) |
| | | |
| | | if (res.ErrCode === 'C') { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show, style } = this.props |
| | | const { loadingNumber, loading, disabled, hidden, check } = this.state |
| | | const { btn } = this.props |
| | | const { loadingNumber, loadingTotal, loading, disabled, hidden, check } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (btn.OpenType === 'form') { |
| | | if (btn.formType === 'switch') { |
| | | 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 || ''}/> |
| | | return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style} className={btn.size === 'large' ? 'ant-switch-large' : ''} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/> |
| | | } else { |
| | | return <Checkbox disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} 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={btn.style}></Checkbox> |
| | | } |
| | | } else if (show === 'actionList') { |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | style={style} |
| | | 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> |
| | | {this.getModels()} |
| | | </div> |
| | | } else if (show && show.indexOf('plus') > -1) { |
| | | return <div style={{display: 'inline-block'}}> |
| | | <Button |
| | | type="link" |
| | | loading={loading} |
| | | icon={btn.icon || 'plus'} |
| | | style={{fontSize: show.substring(4) + 'px'}} |
| | | onClick={() => {this.actionTrigger()}} |
| | | ></Button> |
| | | {this.getModels()} |
| | | </div> |
| | | } else { // icon、text、 all 卡片 |
| | | } |
| | | |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | type={type} |
| | | icon={icon} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style || style} |
| | | icon={icon} |
| | | style={btn.style || null} |
| | | className={className} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{label}</Button> |
| | | {this.getModels()} |
| | | {loadingTotal ? <Progress className="mk-button-progress" percent={(loadingTotal - loadingNumber) / loadingTotal * 100} size="small" showInfo={false} /> : null} |
| | | </div> |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | class PopupButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | BID: PropTypes.string, // 主表ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn } = this.props |
| | | const { loading, disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return ( |
| | | <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | {show === 'actionList' ? <Button |
| | | 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={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | <Button |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{label}</Button> : null} |
| | | >{label}</Button> |
| | | {this.getPop()} |
| | | </div> |
| | | ) |
| | |
| | | |
| | | class PrintButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | BID: PropTypes.string, // 主表ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | |
| | | loading: false, |
| | | disabled: false, |
| | | hidden: false, |
| | | loadingNumber: '', |
| | | autoMatic: false |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { loadingNumber, loading, disabled, hidden } = this.state |
| | | const { btn } = this.props |
| | | const { loading, disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | 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> |
| | | {this.getModels()} |
| | | </div> |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | style={btn.style || null} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{label}</Button> |
| | | {this.getModels()} |
| | | </div> |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | class TabButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | BData: PropTypes.any, // 主表数据 |
| | | MenuID: PropTypes.string, // 菜单ID |
| | | btn: PropTypes.object, // 按钮 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn } = this.props |
| | | const { disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | | <Button |
| | | className={'mk-btn mk-' + btn.class} |
| | | icon={btn.icon} |
| | | disabled={disabled} |
| | | title={disabled ? (btn.reason || '') : ''} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{btn.label}</Button> |
| | | ) |
| | | } else { // icon、text、 all 卡片 |
| | | let label = '' |
| | | let icon = '' |
| | | let type = 'link' |
| | | let className = '' |
| | | |
| | | if (show === 'button') { |
| | | if (btn.show === 'button') { |
| | | label = btn.label |
| | | icon = btn.icon || '' |
| | | } else if (show === 'link') { |
| | | } else if (btn.show === 'link') { |
| | | label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | } else if (btn.show === 'icon') { |
| | | icon = btn.icon || '' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | } else if (!btn.$toolbtn) { |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | type="link" |
| | | title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')} |
| | | style={btn.style} |
| | | type={type} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | style={btn.style || null} |
| | | disabled={disabled} |
| | | icon={icon} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | let extra = null |
| | | if (card.header && card.header.actions) { |
| | | let actions = this.getActionList(card.header.actions, card.header.show) |
| | | let actions = card.header.actions.map(item => { |
| | | if (card.header.show === 'icon') { |
| | | item.show = 'icon' |
| | | } else { |
| | | item.show = 'button' |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | actions = this.getActionList(actions) |
| | | extra = actions[0] |
| | | } |
| | | |
| | | let _actions = null |
| | | if (card.bottom && card.bottom.actions) { |
| | | _actions = this.getActionList(card.bottom.actions, card.bottom.show) |
| | | _actions = card.bottom.actions.map(item => { |
| | | if (card.bottom.show === 'icon') { |
| | | item.show = 'icon' |
| | | } else { |
| | | item.show = 'button' |
| | | } |
| | | return item |
| | | }) |
| | | _actions = this.getActionList(_actions) |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | /** |
| | | * @description 获取按钮元素 |
| | | */ |
| | | getActionList = (actions, show) => { |
| | | getActionList = (actions) => { |
| | | const { BData, Tab, setting, columns, ContainerId, data, MenuID } = this.props |
| | | |
| | | return actions.map(item => { |
| | |
| | | BID={data.$$BID} |
| | | Tab={Tab} |
| | | btn={item} |
| | | show={show} |
| | | BData={BData} |
| | | setting={setting} |
| | | columns={columns} |
| | |
| | | BID={data.$$BID} |
| | | Tab={Tab} |
| | | btn={item} |
| | | show={show} |
| | | BData={BData} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | |
| | | <TabButton |
| | | key={item.uuid} |
| | | btn={item} |
| | | show={show} |
| | | MenuID={MenuID} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | |
| | | <NewPageButton |
| | | key={item.uuid} |
| | | btn={item} |
| | | show={show} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | | /> |
| | |
| | | key={item.uuid} |
| | | BID={data.$$BID} |
| | | btn={item} |
| | | show={show} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | | /> |
| | |
| | | BID={data.$$BID} |
| | | Tab={Tab} |
| | | btn={item} |
| | | show={show} |
| | | BData={BData} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | |
| | | title = card.header.content |
| | | } |
| | | } |
| | | let style = {fontSize: plusSize + 'px'} |
| | | |
| | | return ( |
| | | <div className={'chart-card-box ' + card.outclass}> |
| | |
| | | <NormalButton |
| | | BID={this.props.BID} |
| | | Tab={this.props.Tab} |
| | | btn={card.insertAction} |
| | | show={'plus' + plusSize} |
| | | btn={{...card.insertAction, style}} |
| | | BData={this.props.BData} |
| | | setting={this.props.setting} |
| | | columns={this.props.columns} |
| | |
| | | if ((item.Ot && item.Ot !== 'notRequired' && !['excelIn', 'excelOut'].includes(item.OpenType)) || item.funcType === 'changeuser') { |
| | | actionMap.set(item.uuid, item) |
| | | } else if (plot.extraAction && plot.extraAction === item.uuid && ['pop', 'prompt', 'exec'].includes(item.OpenType) && item.Ot === 'notRequired') { |
| | | item.show = 'icon' |
| | | insertAction = item |
| | | } else if (plot.actions && plot.actions.length > 0 && plot.actions.includes(item.uuid) && (item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))) { |
| | | item.show = 'icon' |
| | | actionList.push(item) |
| | | } |
| | | }) |
| | |
| | | key={action.uuid} |
| | | BID={BID} |
| | | Tab={Tab} |
| | | show="icon" |
| | | btn={action} |
| | | setting={config.setting} |
| | | /> |
| | |
| | | key={action.uuid} |
| | | BID={BID} |
| | | Tab={Tab} |
| | | show="icon" |
| | | btn={action} |
| | | setting={config.setting} |
| | | /> |
| | |
| | | shows.push('sql', 'sqlType', 'output') |
| | | } |
| | | |
| | | if (Ot === 'required') { |
| | | shows.push('progress') |
| | | } |
| | | |
| | | if (this.record.sqlType === 'insert') { |
| | | reOptions.Ot = requireOptions.filter(op => op.value === 'notRequired') |
| | | } else { |
| | |
| | | } else if (_funcType === 'closetab') { |
| | | shows.push('refreshTab') |
| | | } else if (_funcType === 'megvii') { |
| | | shows.push('subFunc') |
| | | shows.push('subFunc', 'progress') |
| | | } |
| | | } |
| | | |
| | |
| | | width: unset; |
| | | margin-right: 3px; |
| | | color: rgba(0, 0, 0, 0.45); |
| | | vertical-align: middle; |
| | | } |
| | | } |
| | | li:hover { |
| | |
| | | value: 'true', |
| | | text: '是' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'progress', |
| | | label: '进度提示', |
| | | initVal: card.progress || 'number', |
| | | required: false, |
| | | options: [{ |
| | | value: 'number', |
| | | text: '剩余数' |
| | | }, { |
| | | value: 'progressbar', |
| | | text: '进度条' |
| | | }] |
| | | } |
| | | ] |
| | | } |