| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | card: null, |
| | | ismob: sessionStorage.getItem('appType') === 'mob', |
| | | back: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { card } = this.props |
| | | const { ismob } = this.state |
| | | |
| | | if (card.isNew) { |
| | | let ismob = sessionStorage.getItem('appType') === 'mob' |
| | | let _card = { |
| | | uuid: card.uuid, |
| | | type: card.type, |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | const { card, ismob } = this.state |
| | | |
| | | let offset = 0 |
| | | if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') { |
| | |
| | | <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> |
| | | {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | | <CopyComponent type="datacard" card={card}/> |
| | |
| | | } |
| | | |
| | | state = { |
| | | roleList: [] |
| | | roleList: [], |
| | | MenuType: '' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | roleList = [] |
| | | } |
| | | |
| | | this.setState({roleList}) |
| | | let MenuType = '' |
| | | |
| | | if (window.GLOB.customMenu && window.GLOB.customMenu.parentId === 'BillPrintTemp') { |
| | | MenuType = 'billPrint' |
| | | } |
| | | |
| | | this.setState({roleList, MenuType}) |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | |
| | | render() { |
| | | const { wrap, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { roleList } = this.state |
| | | const { roleList, MenuType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.subtype === 'propcard' ? <Col span={12}> |
| | | {config.subtype === 'propcard' && MenuType === 'billPrint' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="选择类型为《页眉/页脚》时,打印的每页里都会带有该组件。"> |
| | | <Icon type="question-circle" /> |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | card: null, |
| | | ismob: sessionStorage.getItem('appType') === 'mob', |
| | | back: false |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | const { card, ismob } = this.state |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" /> |
| | | <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> |
| | | {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | | <CopyComponent type="tablecard" card={card}/> |
| | | <PasteComponent config={card} options={['cardcell', 'search', 'form']} updateConfig={this.updateComponent} /> |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | card: null, |
| | | ismob: sessionStorage.getItem('appType') === 'mob', |
| | | eventListener: null |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | const { card, ismob } = this.state |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> |
| | | {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="line" card={card}/> |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | card: null, |
| | | ismob: sessionStorage.getItem('appType') === 'mob', |
| | | eventListener: null |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | const { card, ismob } = this.state |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> |
| | | {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/> |
| | | <CopyComponent type="pie" card={card}/> |
| | | <PasteComponent config={card} options={['search', 'form']} updateConfig={this.updateComponent} /> |
| | |
| | | } else if (card.type === 'code') { |
| | | return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } else if (card.type === 'login') { |
| | | return (<NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | | } |
| | | } |
| | | |
| | | if (card.type === 'login') { |
| | | let height = '' |
| | | if (card.wrap && card.wrap.height) { |
| | | // scaleview |
| | | height = card.wrap.height.replace(/\d+vw/ig, (word) => { |
| | | return parseFloat(word) * 350 / 100 + 'px' |
| | | return parseFloat(word) * 420 / 100 + 'px' |
| | | // return parseFloat(word) * 350 / 100 + 'px' |
| | | }).replace(/\d+vh/ig, (word) => { |
| | | return parseFloat(word) * 615 / 100 + 'px' |
| | | return parseFloat(word) * 738 / 100 + 'px' |
| | | // return parseFloat(word) * 615 / 100 + 'px' |
| | | }) |
| | | } |
| | | |
| | | return (<> |
| | | <NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/> |
| | | <div style={{float: 'right', height}}></div> |
| | | </>) |
| | | style.minHeight = height |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div className={'ant-col mk-component-card ant-col-' + (card.width || 24)} ref={node => drag(drop(node))} style={style}> |
| | | {getCardComponent()} |
| | |
| | | .mob-shell-inner { |
| | | // scaleview |
| | | width: 120%; |
| | | height: 120%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | background: #ffffff; |
| | | box-shadow: 0px 0px 2px #000000; |
| | | transform: scale(0.8333333333333334, 0.8333333333333334); |
| | | transform-origin: left top; |
| | | .mk-component-card { |
| | | position: relative; |
| | | } |
| | |
| | | padding-top: 150px; |
| | | } |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar { |
| | | width: 2px; |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar-thumb { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.23); |
| | | border-radius: 5px; |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | border-radius: 3px; |
| | | } |
| | |
| | | border-bottom: 1px solid #d9d9d9; |
| | | box-shadow: none!important; |
| | | } |
| | | .ant-input-group-addon { |
| | | border: 0; |
| | | border-radius: 0; |
| | | } |
| | | } |
| | |
| | | if (sessionStorage.getItem('appType') === 'mob' && style) { |
| | | let _style = JSON.stringify(style) |
| | | |
| | | // scaleview |
| | | _style = _style.replace(/\d+vw/ig, (word) => { |
| | | return parseFloat(word) * 350 / 100 + 'px' |
| | | return parseFloat(word) * 420 / 100 + 'px' |
| | | // return parseFloat(word) * 350 / 100 + 'px' |
| | | }).replace(/\d+vh/ig, (word) => { |
| | | return parseFloat(word) * 615 / 100 + 'px' |
| | | return parseFloat(word) * 738 / 100 + 'px' |
| | | // return parseFloat(word) * 615 / 100 + 'px' |
| | | }) |
| | | |
| | | return JSON.parse(_style) |
| | |
| | | let datavars = {} // 声明的变量,表单及显示列 |
| | | let _actionType = null |
| | | let _callbacksql = '' |
| | | let foreignKey = tab && tab.foreignKey ? tab.foreignKey.toLowerCase() : '' |
| | | |
| | | if (verify.default !== 'false') { // 判断是否使用默认sql |
| | | _actionType = btn.sqlType |
| | |
| | | if (_key === 'bid' && !datavars.bid) { // 表单中没有bid则使用系统bid变量 |
| | | _fval = '@BID@' |
| | | } |
| | | if (_key === 'bid' && tab && tab.foreignKey) { |
| | | arr.push(tab.foreignKey.toLowerCase()) |
| | | _fieldValue.push(`${tab.foreignKey}=${_fval}`) |
| | | if (_key === 'bid' && foreignKey) { |
| | | arr.push(foreignKey) |
| | | _fieldValue.push(`${foreignKey}=${_fval}`) |
| | | } else { |
| | | arr.push(_key) |
| | | _fieldValue.push(`${_key}=${_fval}`) |
| | |
| | | values.push('@fullname') |
| | | } |
| | | if (!keys.includes('bid')) { |
| | | if (tab && tab.foreignKey && !keys.includes(tab.foreignKey.toLowerCase())) { |
| | | keys.push(tab.foreignKey.toLowerCase()) |
| | | if (foreignKey && !keys.includes(foreignKey)) { |
| | | keys.push(foreignKey) |
| | | } else { |
| | | keys.push('bid') |
| | | } |
| | | values.push('@BID@') |
| | | } else if (tab && tab.foreignKey && !keys.includes(tab.foreignKey.toLowerCase())) { |
| | | keys.push(tab.foreignKey.toLowerCase()) |
| | | } else if (foreignKey && !keys.includes(foreignKey)) { |
| | | keys.push(foreignKey) |
| | | values.push('@BID@') |
| | | } |
| | | |
| | |
| | | setTimeout(() => { |
| | | this.updateCustomComponent() |
| | | this.getAppPictures() |
| | | this.getSmStemp() |
| | | }, 1000) |
| | | } |
| | | |
| | |
| | | MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) |
| | | } |
| | | |
| | | getSmStemp = () => { |
| | | let _sql = `select ID,TemplateCode,SignName from bd_msn_sms_temp where deleted=0 and appkey='${window.GLOB.appkey}'` |
| | | |
| | | _sql = Utils.formatOptions(_sql) |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _sql, |
| | | obj_name: 'data', |
| | | arr_field: 'ID,TemplateCode,SignName' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | let msgs = [] |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | } else if (res.data) { |
| | | msgs = res.data |
| | | } |
| | | sessionStorage.setItem('msgTemplate', JSON.stringify(msgs)) |
| | | }) |
| | | } |
| | | |
| | | changeEditMenu = (menu) => { |
| | | const { oriConfig, config } = this.state |
| | | |
| | |
| | | background-size: 100% 100%; |
| | | padding: 25px 13px 40px; |
| | | border-radius: 30px; |
| | | |
| | | .mob-shell-inner { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | background: #ffffff; |
| | | box-shadow: 0px 0px 2px #000000; |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar { |
| | | width: 2px; |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar-thumb { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.23); |
| | | border-radius: 5px; |
| | | } |
| | | .mob-shell-inner::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | border-radius: 3px; |
| | | } |
| | | } |
| | | .menu-control { |
| | | position: fixed; |