| | |
| | | this.props.form.setFieldsValue({width: 24, color: '#1890ff'}) |
| | | } else if (value === 'splitline') { |
| | | this.props.form.setFieldsValue({width: 24, color: '#e8e8e8'}) |
| | | } else if (value === 'qrcode') { |
| | | this.props.form.setFieldsValue({color: '#000000'}) |
| | | } else if (value === 'text' || value === 'number') { |
| | | this.props.form.setFieldsValue({format: ''}) |
| | | } |
| | |
| | | { |
| | | type: 'color', |
| | | key: 'color', |
| | | label: '进度条颜色', |
| | | label: '颜色', |
| | | tooltip: '进度条完成区域、分割线或二维码的颜色。', |
| | | initVal: card.color || '#1890ff', |
| | | required: true |
| | | }, |
| | |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="page-card" style={{ opacity: opacity}}> |
| | | <div ref={node => drag(drop(node))} style={{ border: '0.5px solid transparent'}}> |
| | | <div ref={node => drag(drop(node))} style={{ border: '0.5px solid transparent'}} onDoubleClick={edit}> |
| | | {card.type === 'split' ? formItem : <Form.Item |
| | | style={{marginTop: card.marginTop || 0, marginBottom: card.marginBottom || 0}} |
| | | className={'ant-form-item' + (card.required === 'true' ? ' required' : '') + (card.splitline === 'false' ? ' no-boder' : '')} |
| | | > |
| | | {formItem} |
| | | {showField ? <div className="field-name">{card.field}{card.hidden === 'true' ? '(隐藏)' : ''}</div> : ''} |
| | | {showField ? <div className="field-name" style={card.writein === 'false' ? {color: 'orange'} : {}}> |
| | | {card.field}{card.hidden === 'true' ? '(隐藏)' : ''}{card.readonly === 'true' ? '(只读)' : ''} |
| | | </div> : ''} |
| | | </Form.Item>} |
| | | </div> |
| | | </div> |
| | |
| | | <Modal |
| | | title={this.state.dict['model.edit']} |
| | | visible={this.state.settingVisible} |
| | | width={850} |
| | | width={900} |
| | | maskClosable={false} |
| | | onOk={this.settingSave} |
| | | onCancel={() => { this.setState({ settingVisible: false }) }} |
| | |
| | | const { btnconfig, autoMatic } = this.state |
| | | |
| | | if (btnconfig) { |
| | | if (!autoMatic && btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示 |
| | | if (!autoMatic && (btnconfig.setting.display === 'prompt' || btnconfig.setting.display === 'exec')) { // 如果表单以是否框展示 |
| | | this.modelconfirm() |
| | | } else { |
| | | this.setState({ |
| | |
| | | this.setState({ |
| | | btnconfig: _LongParam |
| | | }, () => { |
| | | if (!autoMatic && _LongParam.setting.display === 'prompt') { // 如果表单以是否框展示 |
| | | if (!autoMatic && (_LongParam.setting.display === 'prompt' || _LongParam.setting.display === 'exec')) { // 如果表单以是否框展示 |
| | | this.modelconfirm() |
| | | } else { |
| | | this.setState({ |
| | |
| | | }) |
| | | }) |
| | | |
| | | confirm({ |
| | | title: this.state.dict['main.action.confirm.tip'], |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSubmit(selines, resolve, result) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | _this.setState({ loading: false }) |
| | | } |
| | | }) |
| | | if (btnconfig.setting.display === 'exec') { |
| | | this.execSubmit(selines, () => {}, result) |
| | | } else { |
| | | confirm({ |
| | | title: this.state.dict['main.action.confirm.tip'], |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSubmit(selines, resolve, result) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | _this.setState({ loading: false }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | const { btnconfig, autoMatic } = this.state |
| | | |
| | | if (btnconfig) { |
| | | if (!autoMatic && btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示 |
| | | if (!autoMatic && (btnconfig.setting.display === 'prompt' || btnconfig.setting.display === 'exec')) { // 如果表单以是否框展示 |
| | | this.modelconfirm() |
| | | } else { |
| | | this.setState({ |
| | |
| | | this.setState({ |
| | | btnconfig: _LongParam |
| | | }, () => { |
| | | if (!autoMatic && _LongParam.setting.display === 'prompt') { // 如果表单以是否框展示 |
| | | if (!autoMatic && (_LongParam.setting.display === 'prompt' || _LongParam.setting.display === 'exec')) { // 如果表单以是否框展示 |
| | | this.modelconfirm() |
| | | } else { |
| | | this.setState({ |
| | |
| | | }) |
| | | }) |
| | | |
| | | confirm({ |
| | | title: this.state.dict['main.action.confirm.tip'], |
| | | onOk() { |
| | | _this.triggerPrint(selines, result) |
| | | }, |
| | | onCancel() { |
| | | _this.setState({ loading: false }) |
| | | } |
| | | }) |
| | | if (btnconfig.setting.display === 'exec') { |
| | | this.execSubmit(selines, () => {}, result) |
| | | } else { |
| | | confirm({ |
| | | title: this.state.dict['main.action.confirm.tip'], |
| | | onOk() { |
| | | _this.triggerPrint(selines, result) |
| | | }, |
| | | onCancel() { |
| | | _this.setState({ loading: false }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | > |
| | | {formItem} |
| | | {showField ? <div className="field-name" style={card.writein === 'false' ? {color: 'orange'} : {}}> |
| | | {card.field}{card.hidden === 'true' ? '(隐藏)' : ''} |
| | | {card.field}{card.hidden === 'true' ? '(隐藏)' : ''}{card.readonly === 'true' ? '(只读)' : ''} |
| | | </div> : ''} |
| | | </Form.Item>} |
| | | </div> |
| | |
| | | <Modal |
| | | title={dict['model.edit']} |
| | | visible={this.state.settingVisible} |
| | | width={850} |
| | | width={900} |
| | | maskClosable={false} |
| | | onOk={this.settingSave} |
| | | onCancel={() => { this.setState({ settingVisible: false }) }} |
| | |
| | | })( |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({display: e.target.value})}> |
| | | {appType !== 'mob' ? <Radio value="modal">模态框</Radio> : null} |
| | | <Radio value="prompt">是否框</Radio> |
| | | <Radio value="drawer">抽屉</Radio> |
| | | <Radio value="prompt">是否框</Radio> |
| | | <Radio value="exec">直接执行</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | |
| | | required: 'true' |
| | | } |
| | | |
| | | if (item.type === 'text' && item.length >= 256) { |
| | | newcard.type = 'textarea' |
| | | newcard.fieldlength = item.length |
| | | if (lastItem && lastItem.type === newcard.type) { |
| | | newcard.span = lastItem.span |
| | | newcard.labelwidth = lastItem.labelwidth |
| | | } else if (lastItem) { |
| | | newcard.span = 24 |
| | | if (lastItem.span === 12) { |
| | | newcard.labelwidth = 16.2 |
| | | } else if (lastItem.span === 8) { |
| | | newcard.labelwidth = 10.5 |
| | | } else if (lastItem.span === 8) { |
| | | newcard.labelwidth = 7.7 |
| | | } |
| | | } else { |
| | | newcard.span = 24 |
| | | newcard.labelwidth = 16.2 |
| | | } |
| | | } |
| | | |
| | | items.push(newcard) |
| | | keys.push(item.field.toLowerCase()) |
| | | }) |
| | |
| | | {value: 3, label: '前三天'}, |
| | | {value: 7, label: '前七天'}, |
| | | {value: 30, label: '前30天'}, |
| | | {value: -1, label: '明天'}, |
| | | {value: -2, label: '后天'} |
| | | {value: 90, text: '前90天'}, |
| | | {value: -1, text: '明天'}, |
| | | {value: -2, text: '后天'}, |
| | | {value: -3, text: '后三天'}, |
| | | {value: -7, text: '后七天'}, |
| | | {value: -30, text: '后30天'}, |
| | | {value: -90, text: '后90天'}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | {value: 3, text: '前三天'}, |
| | | {value: 7, text: '前七天'}, |
| | | {value: 30, text: '前30天'}, |
| | | {value: 90, text: '前90天'}, |
| | | {value: -1, text: '明天'}, |
| | | {value: -2, text: '后天'} |
| | | {value: -2, text: '后天'}, |
| | | {value: -3, text: '后三天'}, |
| | | {value: -7, text: '后七天'}, |
| | | {value: -30, text: '后30天'}, |
| | | {value: -90, text: '后90天'}, |
| | | ], |
| | | dateweek: [ |
| | | {value: '', text: _dict['model.empty']}, |
| | |
| | | {value: 3, text: '前三天'}, |
| | | {value: 7, text: '前七天'}, |
| | | {value: 30, text: '前30天'}, |
| | | {value: 90, text: '前90天'}, |
| | | {value: -1, text: '明天'}, |
| | | {value: -2, text: '后天'} |
| | | {value: -2, text: '后天'}, |
| | | {value: -3, text: '后三天'}, |
| | | {value: -7, text: '后七天'}, |
| | | {value: -30, text: '后30天'}, |
| | | {value: -90, text: '后90天'}, |
| | | ] |
| | | } |
| | | |
| | |
| | | cell.apptype = _param.apptype || '' |
| | | cell.delay = _param.delay || 0 |
| | | cell.statusBarColor = _param.statusBarColor || 'black' |
| | | cell.adapter = _param.adapter || 'false' |
| | | cell.adapter = _param.adapter || '' |
| | | if (cell.adapter && (cell.adapter === 'true' || cell.adapter === 'false')) { |
| | | cell.adapter = '' |
| | | } |
| | | } |
| | | |
| | | if (!cell.adapter && (cell.user_binding || cell.apptype)) { |
| | | cell.adapter = 'app,weixin' |
| | | } |
| | | |
| | | return cell |
| | |
| | | sublist = sublist.filter(item => item.ID !== record.ID) |
| | | |
| | | // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || 'false'})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | |
| | | if (visible === 'edit') { |
| | | // param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || 'false'})))}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | |
| | | } |
| | | |
| | | // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || 'false'})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', adapter: item.adapter || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | inputSubmit: PropTypes.func // input回车提交 |
| | | } |
| | | |
| | | state = {msgs: [], typename: 'mob', user_binding: []} |
| | | state = {msgs: [], typename: 'mob', user_binding: [], adapters: []} |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { card } = this.props |
| | | let msgs = sessionStorage.getItem('msgTemplate') |
| | | let user_binding = [] |
| | | let adapters = [] |
| | | let typename = 'mob' |
| | | |
| | | if (card) { |
| | | typename = card.typename || 'mob' |
| | | user_binding = card.user_binding ? card.user_binding.split(',') : [] |
| | | adapters = card.adapter ? card.adapter.split(',') : [] |
| | | |
| | | if (!adapters.includes('weixin') && !adapters.includes('wxmini')) { |
| | | user_binding = [] |
| | | } |
| | | } |
| | | |
| | | this.setState({msgs: JSON.parse(msgs), typename, user_binding}) |
| | | this.setState({msgs: JSON.parse(msgs), typename, user_binding, adapters}) |
| | | } |
| | | |
| | | /** |
| | |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | values.user_binding = values.user_binding ? values.user_binding.join(',') : '' |
| | | values.adapter = values.adapter ? values.adapter.join(',') : '' |
| | | if (values.user_binding.indexOf('sms_vcode') > -1 && !values.sms_id) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | this.setState({user_binding: vals}) |
| | | } |
| | | |
| | | onAdapterChange = (vals) => { |
| | | this.setState({adapters: vals}) |
| | | if (!vals.includes('weixin') && !vals.includes('wxmini')) { |
| | | this.setState({user_binding: []}) |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 回车提交 |
| | | */ |
| | |
| | | render() { |
| | | const { card, type } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { msgs, typename, user_binding } = this.state |
| | | const { msgs, typename, user_binding, adapters } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | initialValue: typename |
| | | })( |
| | | <Select disabled={type === 'edit'} onChange={(val) => this.setState({typename: val})}> |
| | | <Select.Option value="mob">移动端(包括android、ios)</Select.Option> |
| | | <Select.Option value="mob">移动端</Select.Option> |
| | | <Select.Option value="pad">Pad端</Select.Option> |
| | | <Select.Option value="pc">PC端</Select.Option> |
| | | </Select> |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {/* <Col span={12}> |
| | | <Form.Item label="登录"> |
| | | {getFieldDecorator('login_types', { |
| | | initialValue: card ? card.login_types || 'true' : 'true' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">需要</Radio> |
| | | <Radio value="false">不需要</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> */} |
| | | <Col span={12}> |
| | | <Form.Item label="权限管理"> |
| | | {getFieldDecorator('role_type', { |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | {typename !== 'pc' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="使用公众号授权登录或使用小程序时,是否需要绑定用户。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 用户绑定 |
| | | </Tooltip> |
| | | }> |
| | | <Form.Item label="适配"> |
| | | {getFieldDecorator('adapter', { |
| | | initialValue: adapters |
| | | })( |
| | | <Checkbox.Group onChange={this.onAdapterChange}> |
| | | <Checkbox value="app">app</Checkbox> |
| | | <Checkbox value="weixin">公众号</Checkbox> |
| | | <Checkbox value="wxmini">小程序</Checkbox> |
| | | </Checkbox.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {typename !== 'pc' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={12}> |
| | | <Form.Item label="用户绑定"> |
| | | {getFieldDecorator('user_binding', { |
| | | initialValue: user_binding |
| | | })( |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {typename !== 'pc' ? <Col span={12}> |
| | | {typename !== 'pc' && adapters.includes('app') ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在使用明科云APP时,页面的切换模式"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | </Col> : null} |
| | | {typename !== 'pc' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在使用明科云APP时,且在app模式中无效"> |
| | | <Tooltip placement="topLeft" title="在使用小程序或明科云APP时(app模式中)无效"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 延迟加载(ms) |
| | | </Tooltip> |
| | |
| | | })(<InputNumber min={0} max={5000} precision={0} onPressEnter={this.handleSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {typename !== 'pc' ? <Col span={12}> |
| | | {typename !== 'pc' && adapters.includes('app') ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在使用明科云APP时,状态栏的字体颜色。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | <Radio.Group> |
| | | <Radio value="black">黑色</Radio> |
| | | <Radio value="white">白色</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {typename !== 'pc' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="请确认当前应用是否在小程序中使用。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 小程序 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('adapter', { |
| | | initialValue: card ? card.adapter || 'false' : 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="false">不适配</Radio> |
| | | <Radio value="true">适配</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | |
| | | direction: 'vertical', |
| | | settingshow: true, |
| | | controlshow: true, |
| | | comloading: false |
| | | comloading: false, |
| | | adapters: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | sessionStorage.setItem('role_type', param.role_type || 'true') |
| | | sessionStorage.setItem('login_types', param.login_types || 'false') |
| | | sessionStorage.setItem('typename', param.typename || 'mob') |
| | | sessionStorage.setItem('adapter', param.adapter || 'false') |
| | | sessionStorage.setItem('adapter', param.adapter || '') |
| | | |
| | | this.setState({ |
| | | localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, |
| | |
| | | window.GLOB.shellHeight = 853 |
| | | } |
| | | |
| | | let adapters = sessionStorage.getItem('adapter') |
| | | if (adapters) { |
| | | adapters = adapters.split(',') |
| | | } else { |
| | | adapters = [] |
| | | } |
| | | |
| | | this.setState({ |
| | | adapters, |
| | | MenuId: param.MenuID |
| | | }, () => { |
| | | this.getMenuParam(param) |
| | |
| | | } |
| | | |
| | | submitConfig = () => { |
| | | const { adapters } = this.state |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | if (!config.MenuName || !config.MenuNo || (config.cacheUseful === 'true' && !config.cacheTime)) { |
| | |
| | | config.loginview = false |
| | | } |
| | | |
| | | if (sessionStorage.getItem('adapter') === 'true') { |
| | | if (adapters.includes('wxmini')) { |
| | | config = this.getMiniStyle(config) |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | render () { |
| | | const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents } = this.state |
| | | const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={localedict}> |
| | |
| | | dict={dict} |
| | | config={config} |
| | | MenuId={MenuId} |
| | | adapters={adapters} |
| | | updateConfig={this.updateConfig} |
| | | /> : null} |
| | | {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null} |
| | |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object, |
| | | MenuId: PropTypes.string, |
| | | adapters: PropTypes.array, |
| | | updateConfig: PropTypes.func |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict, config } = this.props |
| | | const { dict, config, adapters } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label="下拉刷新"> |
| | | {getFieldDecorator('pullRefresh', { |
| | | initialValue: config.pullRefresh || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('pullRefresh', e.target.value)}}> |
| | | <Radio value="false">关闭</Radio> |
| | | <Radio value="true">开启</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {adapters.includes('app') || adapters.includes('wxmini') ? <Col span={24}> |
| | | <Form.Item className="status-bar" label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP或小程序中,状态栏的背景色。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 状态栏 |
| | | </Tooltip> |
| | | }> |
| | | <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} /> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {adapters.includes('app') ? <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP中有效。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('advertUrl', val)}}/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="下拉刷新"> |
| | | {getFieldDecorator('pullRefresh', { |
| | | initialValue: config.pullRefresh || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('pullRefresh', e.target.value)}}> |
| | | <Radio value="false">关闭</Radio> |
| | | <Radio value="true">开启</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item className="status-bar" label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP中,状态栏的背景色。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 状态栏 |
| | | </Tooltip> |
| | | }> |
| | | <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | {config.advertUrl ? <Col span={24}> |
| | | </Col> : null} |
| | | {adapters.includes('app') && config.advertUrl ? <Col span={24}> |
| | | <Form.Item label="停留(s)"> |
| | | {getFieldDecorator('advertTime', { |
| | | initialValue: config.advertTime || 3, |