| | |
| | | flex: 1; |
| | | } |
| | | .ant-input-search.ant-input-affix-wrapper { |
| | | width: calc(100% - 140px); |
| | | width: 50%; |
| | | max-width: 130px; |
| | | margin-top: 8px; |
| | | margin-right: 25px; |
| | |
| | | }) |
| | | this.updateCol(column) |
| | | } else if (column.type === 'custom') { |
| | | let newcard = {uuid: Utils.getuuid(), focus: true, eleType: 'text', datatype: 'dynamic'} |
| | | let newcard = {uuid: Utils.getuuid(), focus: true, eleType: 'text', datatype: 'dynamic', style: {paddingLeft: '4px'}} |
| | | |
| | | // 注册事件-添加元素 |
| | | MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard) |
| | |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'fontSize', |
| | | label: '字体大小', |
| | | initval: wrap.fontSize || 24, |
| | | min: 12, |
| | | max: 30, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: wrap.width || 24, |
| | |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'fontSize', |
| | | label: '字体大小', |
| | | initval: wrap.fontSize || 14, |
| | | min: 12, |
| | | max: 30, |
| | | precision: 0, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'height', |
| | | label: '高度', |
| | | initval: wrap.height || '', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'selected', |
| | | label: '首行选中', |
| | | initval: wrap.selected || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '否'}, |
| | | {value: 'true', label: '是'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | import Carousel from '@/assets/mobimg/carousel.png' |
| | | import Carousel1 from '@/assets/mobimg/carousel1.png' |
| | | import form from '@/assets/mobimg/form.png' |
| | | import tabForm from '@/assets/mobimg/tab-form.png' |
| | | import dashboard from '@/assets/mobimg/dashboard.png' |
| | | import ratioboard from '@/assets/mobimg/ratioboard.png' |
| | | import scatter from '@/assets/mobimg/scatter.png' |
| | |
| | | { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 }, |
| | | { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '可浮动卡', width: 24 }, |
| | | { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '表单(分步)', width: 24 }, |
| | | { type: 'menu', url: form, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 }, |
| | | { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 }, |
| | | { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24, forbid: ['billPrint'] }, |
| | | { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24, forbid: ['billPrint'] }, |
| | | { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 }, |
| | |
| | | import Carousel from '@/assets/mobimg/carousel.png' |
| | | import Carousel1 from '@/assets/mobimg/carousel1.png' |
| | | import form from '@/assets/mobimg/form.png' |
| | | import tabForm from '@/assets/mobimg/tab-form.png' |
| | | import Login from '@/assets/mobimg/login.png' |
| | | // import dashboard from '@/assets/mobimg/dashboard.png' |
| | | import NavTop from '@/assets/mobimg/navtop-mob.png' |
| | |
| | | { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 }, |
| | | { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '可浮动卡', width: 24 }, |
| | | { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '表单(分步)', width: 24 }, |
| | | { type: 'menu', url: form, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 }, |
| | | { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 }, |
| | | { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 }, |
| | | { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24 }, |
| | | { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 }, |
| | |
| | | import Carousel from '@/assets/mobimg/carousel.png' |
| | | import Carousel1 from '@/assets/mobimg/carousel1.png' |
| | | import form from '@/assets/mobimg/form.png' |
| | | import tabForm from '@/assets/mobimg/tab-form.png' |
| | | import Login from '@/assets/mobimg/login.png' |
| | | import dashboard from '@/assets/mobimg/dashboard.png' |
| | | import ratioboard from '@/assets/mobimg/ratioboard.png' |
| | |
| | | { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 }, |
| | | { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '可浮动卡', width: 24 }, |
| | | { type: 'menu', url: form, component: 'form', subtype: 'stepform', title: '表单(分步)', width: 24 }, |
| | | { type: 'menu', url: form, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 }, |
| | | { type: 'menu', url: tabForm, component: 'form', subtype: 'tabform', title: '表单(tab页)', width: 24 }, |
| | | { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 }, |
| | | { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24 }, |
| | | { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 }, |
| | |
| | | sync: _sync |
| | | }, () => { |
| | | if (config.setting.sync !== 'true' && config.setting.onload === 'true') { |
| | | this.loadData() |
| | | this.loadData(null, 'init') |
| | | } else if (config.setting.sync === 'true' && _data) { |
| | | this.handleData() |
| | | this.handleData('init') |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | this.setState({sync: false, data: _data}, () => { |
| | | this.handleData() |
| | | this.handleData('init') |
| | | }) |
| | | } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | this.setState({}, () => { |
| | |
| | | /** |
| | | * @description 数据加载 |
| | | */ |
| | | async loadData (hastimer) { |
| | | async loadData (hastimer, type) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | |
| | | data: result.data, |
| | | loading: false |
| | | }, () => { |
| | | this.handleData() |
| | | this.handleData(type) |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | |
| | | } |
| | | } |
| | | |
| | | handleData = () => { |
| | | handleData = (type) => { |
| | | const { data, searchkey, config } = this.state |
| | | if (!data || data.length === 0) { |
| | | this.setState({ |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | expandedKeys: _treeNodes[0] ? [_treeNodes[0].$key] : [], |
| | | treedata: _treedata, |
| | | treeNodes: _treeNodes, |
| | | }) |
| | | |
| | | if (type === 'init' && _treeNodes[0] && config.wrap.selected === 'true') { |
| | | this.setState({ |
| | | selectedKeys: [_treeNodes[0].$key] |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, _treeNodes[0].$key, '') |
| | | }, 200) |
| | | } |
| | | } |
| | | |
| | | treeFilter = (value) => { |
| | |
| | | z-index: 1; |
| | | } |
| | | .ant-input-search.ant-input-affix-wrapper { |
| | | width: calc(100% - 140px); |
| | | width: 50%; |
| | | max-width: 130px; |
| | | margin-top: 6px; |
| | | float: right; |
| | |
| | | accepts = ['.jpg', '.png', '.gif', '.jpeg'] |
| | | accept = accepts.join(',') |
| | | } else if (config.suffix) { |
| | | accepts = config.suffix.split(',') |
| | | accept = config.suffix |
| | | accepts = config.suffix.split(',').map(item => { |
| | | if (!/^\./ig.test(item)) { |
| | | item = '.' + item |
| | | } |
| | | return item |
| | | }) |
| | | accept = accepts.join(',') |
| | | } |
| | | let rduri = config.rduri || '' |
| | | |
| | |
| | | }) |
| | | |
| | | if (!pass) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '文件格式错误!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | setTimeout(() => { |
| | | this.onFail('文件格式错误!') |
| | | }, 10) |
| | | return false |
| | | } |
| | | } |
| | | |
| | |
| | | bottom: 0px; |
| | | } |
| | | } |
| | | |
| | | .ant-upload-list-picture-card-container { |
| | | width: 90px; |
| | | height: 90px; |
| | | } |
| | | .ant-upload-list-picture-card .ant-upload-list-item-undefined { |
| | | border-color: #f5222d; |
| | | .ant-upload-list-item-name { |
| | | color: #f5222d; |
| | | } |
| | | } |
| | | .ant-upload-list-picture-card .ant-upload-list-item { |
| | | width: 90px; |
| | | height: 90px; |
| | |
| | | content = (<MKDatePicker config={item} onChange={(val) => this.recordChange({[item.field]: val})} />) |
| | | } else if (item.type === 'fileupload') { |
| | | className = item.readonly ? 'readonly' : '' |
| | | className += item.fileType === 'picture-card' ? ' file-upload' : '' |
| | | content = (<MKFileUpload config={item} onChange={(val) => this.recordChange({[item.field]: val})} />) |
| | | } else if (item.type === 'textarea') { |
| | | content = (<MKTextArea config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val})}/>) |
| | |
| | | .ant-form-item { |
| | | display: flex; |
| | | } |
| | | .ant-form-item.checkcard { |
| | | .ant-form-item.checkcard, .ant-form-item.file-upload { |
| | | margin-bottom: 10px; |
| | | .ant-form-item-control { |
| | | line-height: 1.5; |
| | |
| | | overflow: hidden; |
| | | border: 1px solid #bfbfbf; |
| | | |
| | | .login-way-title { |
| | | font-size: 18px; |
| | | line-height: 45px; |
| | | display: flex; |
| | | } |
| | | .login-way-title::before, .login-way-title::after { |
| | | display: inline-block; |
| | | content: ' '; |
| | | height: 0.5px; |
| | | flex: 1; |
| | | background-color: red; |
| | | position: relative; |
| | | top: 22px; |
| | | } |
| | | .login-way-title::before { |
| | | margin: 0 10px 0 1.6vw; |
| | | } |
| | | .login-way-title::after { |
| | | margin: 0 1.6vw 0 10px; |
| | | } |
| | | .login-way-wrap { |
| | | height: 50px; |
| | | line-height: 50px; |
| | |
| | | <div className={'login-way' + (activeKey === item.type ? ' active' : '')} onClick={() => this.onChangeTab(item.type)} key={item.type}>{item.label}</div> |
| | | ))} |
| | | </div> |
| | | <div className="form-item-wrap"> |
| | | {activeKey === 'uname_pwd' ? <Form.Item> |
| | | {/* <div className="login-way-title">用户登录</div> */} |
| | | {activeKey === 'uname_pwd' ? <div className="form-item-wrap"> |
| | | <Form.Item> |
| | | {getFieldDecorator('username', { |
| | | rules: [{ required: true, message: this.props.dict['login.username.empty'] }], |
| | | initialValue: this.state.username || '', |
| | |
| | | autoComplete="off" |
| | | />, |
| | | )} |
| | | </Form.Item> : null} |
| | | {activeKey === 'uname_pwd' ? <Form.Item> |
| | | </Form.Item> |
| | | <Form.Item> |
| | | {getFieldDecorator('password', { |
| | | initialValue: this.state.password || '', |
| | | rules: [ |
| | |
| | | } |
| | | ] |
| | | })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | <Form.Item className="minline"> |
| | | {getFieldDecorator('remember', { |
| | | valuePropName: 'checked', |
| | | initialValue: remember, |
| | | })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} |
| | | </Form.Item> |
| | | {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> |
| | | {getFieldDecorator('lang', { |
| | | initialValue: this.props.lang, |
| | | })( |
| | | <Select |
| | | onChange={(value) => {this.changelang(value)}} |
| | | getPopupContainer={() => document.getElementById('login-form')} |
| | | > |
| | | {this.props.langList.map((item, index) => { |
| | | return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> |
| | | })} |
| | | </Select> |
| | | )} |
| | | </Form.Item> : null} |
| | | {activeKey === 'sms_vcode' ? <Form.Item> |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}> |
| | | {this.props.dict['login.submit']} |
| | | </Button> |
| | | </Form.Item> |
| | | {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">注册</a> |
| | | <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">忘记密码?</a> |
| | | </Form.Item> : null} |
| | | </div> : null} |
| | | {activeKey === 'sms_vcode' ? <div className="form-item-wrap"> |
| | | <Form.Item> |
| | | {getFieldDecorator('phone', { |
| | | rules: [{ required: true, message: this.props.dict['login.phone.empty'] }], |
| | | initialValue: '', |
| | |
| | | autoComplete="off" |
| | | /> |
| | | )} |
| | | </Form.Item> : null} |
| | | {activeKey === 'sms_vcode' ? <Form.Item className="vercode"> |
| | | </Form.Item> |
| | | <Form.Item className="vercode"> |
| | | {getFieldDecorator('vercode', { |
| | | initialValue: '', |
| | | rules: [ |
| | |
| | | autoComplete="off" |
| | | /> |
| | | )} |
| | | </Form.Item> : null} |
| | | {activeKey === 'uname_pwd' ? <Form.Item className="minline"> |
| | | {getFieldDecorator('remember', { |
| | | valuePropName: 'checked', |
| | | initialValue: remember, |
| | | })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} |
| | | </Form.Item> : null} |
| | | {activeKey !== 'app_scan' && this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> |
| | | </Form.Item> |
| | | {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> |
| | | {getFieldDecorator('lang', { |
| | | initialValue: this.props.lang, |
| | | })( |
| | |
| | | </Select> |
| | | )} |
| | | </Form.Item> : null} |
| | | {['uname_pwd', 'sms_vcode'].includes(activeKey) ? <Form.Item className="btn-login"> |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}> |
| | | {this.props.dict['login.submit']} |
| | | </Button> |
| | | </Form.Item> |
| | | {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">注册</a> |
| | | <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">忘记密码?</a> |
| | | </Form.Item> : null} |
| | | {activeKey === 'app_scan' ? <div className="form-scan-wrap"> |
| | | </div> : null} |
| | | {activeKey === 'app_scan' ? <div className="form-item-wrap"> |
| | | <div className="form-scan-wrap"> |
| | | <div className="qr-wrap"> |
| | | {scanId ? <QrCode card={{qrWidth: 500, color: '#000000'}} value={`mkpcscan,${window.GLOB.appkey},${scanId}`}/> : null} |
| | | {timeout ? <div className="qrcode-out"> |
| | |
| | | </div> : null} |
| | | </div> |
| | | 请使用客户端扫一扫登录 |
| | | </div> : null} |
| | | {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">注册</a> |
| | | <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">忘记密码?</a> |
| | | </Form.Item> : null} |
| | | </div> |
| | | </div> : null} |
| | | </Form> |
| | | ) |
| | | } |