| | |
| | | lineColor -- 登录页分割线颜色 |
| | | filter -- 页面滤镜,值为'true'时,页面显示为黑白色 |
| | | defaultApp -- 默认应用,系统需默认打开某个子应用时需填写应用编码,空值时跳转到管理后台 |
| | | defaultLang -- 默认打开的子应用语言类型,填入defaultApp时有效 |
| | | defaultLang -- 默认打开的子应用语言类型,填入defaultApp时有效 |
| | | WXAppID -- 使用公众号时,绑定的公众号ID |
| | | debugger -- debugger模式是否开启,开启后移动端子应用中会有控制台 |
| | | licenseKey -- 许可密钥,在内部网络中使用系统时,会跳过epc验证 |
| | |
| | | btn.eleType = 'button' |
| | | |
| | | let _elements = [...this.state.elements, btn] |
| | | let _action = cards.action.filter(item => item.uuid !== id) |
| | | |
| | | this.setState({ |
| | | elements: _elements |
| | | }, () => { |
| | | this.props.updateElement(_elements, _action) |
| | | this.props.updateElement(_elements, btn) |
| | | }) |
| | | } |
| | | |
| | |
| | | this.props.updateElement(_card) |
| | | } |
| | | |
| | | updateCard = (elements) => { |
| | | updateCard = (elements, btn) => { |
| | | const { card, side } = this.state |
| | | |
| | | let _card = {} |
| | |
| | | card: _card |
| | | }) |
| | | |
| | | this.props.updateElement(_card) |
| | | this.props.updateElement(_card, btn) |
| | | } |
| | | |
| | | changeSide = () => { |
| | |
| | | /** |
| | | * @description 单个卡片信息更新 |
| | | */ |
| | | updateCard = (cell) => { |
| | | updateCard = (cell, btn) => { |
| | | let card = fromJS(this.state.card).toJS() |
| | | |
| | | card.subcards = card.subcards.map(item => { |
| | |
| | | return item |
| | | }) |
| | | |
| | | if (btn) { |
| | | card.action = card.action.filter(item => item.uuid !== btn.uuid) |
| | | } |
| | | |
| | | this.setState({card}) |
| | | |
| | | this.props.updateConfig(card) |
| | |
| | | {value: 'checkbox', label: '多选', forbid: subtype === 'propcard'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'checkAll', values: ['checkbox']} |
| | | {field: 'checkAll', values: ['checkbox']}, |
| | | {field: 'selected', values: ['radio', 'checkbox']}, |
| | | ], |
| | | forbid: subtype === 'tablecard' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'selected', |
| | | label: '首行选中', |
| | | initval: wrap.selected || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载', forbid: subtype === 'propcard'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | ] |
| | | |
| | | return cardWrapForm.map(item => { |
| | | if (['pagestyle', 'cardType'].includes(item.field)) { |
| | | if (['pagestyle', 'cardType', 'selected'].includes(item.field)) { |
| | | item.options = item.options.filter(option => !option.forbid) |
| | | } |
| | | |
| | |
| | | button { |
| | | cursor: move; |
| | | height: auto; |
| | | min-height: 32px; |
| | | min-height: 28px; |
| | | .anticon-table { |
| | | font-size: 10px; |
| | | position: absolute; |
| | |
| | | ) |
| | | |
| | | class EditableColumnCell extends Component { |
| | | updateCard = (vals, action) => { |
| | | updateCard = (vals, btn) => { |
| | | const { column } = this.props |
| | | this.props.upComponent({...column, elements: vals}, action) |
| | | this.props.upComponent({...column, elements: vals}, btn) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | }) |
| | | } |
| | | |
| | | updateCol = (col, action) => { |
| | | updateCol = (col, btn) => { |
| | | let _columns = fromJS(this.state.columns).toJS() |
| | | _columns = this.loopCol(_columns, col) |
| | | |
| | | this.setState({ |
| | | columns: _columns, |
| | | }, () => { |
| | | if (action) { |
| | | this.props.updatecolumn({...this.props.config, cols: _columns, action}) |
| | | } else { |
| | | this.props.updatecolumn({...this.props.config, cols: _columns}) |
| | | let config = {...this.props.config, cols: _columns} |
| | | if (btn) { |
| | | config.action = config.action.filter(item => item.uuid !== btn.uuid) |
| | | } |
| | | |
| | | this.props.updatecolumn(config) |
| | | }) |
| | | } |
| | | |
| | |
| | | { origin: true, uuid: Utils.getuuid(), label: 'label', type: 'select', match: 'equal' } |
| | | ], |
| | | action: [ |
| | | { origin: true, uuid: Utils.getuuid(), label: '添加', intertype: 'system', OpenType: 'pop', icon: 'plus', class: 'green', style: {color: 'rgb(255, 255, 255)', background: 'rgb(38, 194, 129)', marginRight: '15px'} }, |
| | | { origin: true, uuid: Utils.getuuid(), label: '修改', intertype: 'system', OpenType: 'pop', icon: 'form', class: 'purple', style: {color: 'rgb(255, 255, 255)', background: 'rgb(142, 68, 173)', marginRight: '15px'} }, |
| | | { origin: true, uuid: Utils.getuuid(), label: '删除', intertype: 'system', OpenType: 'prompt', icon: 'delete', class: 'danger', style: {color: 'rgb(255, 255, 255)', background: 'rgb(255, 77, 79)', marginRight: '15px'} } |
| | | { origin: true, uuid: Utils.getuuid(), label: '添加', intertype: 'system', OpenType: 'pop', execSuccess: 'grid', icon: 'plus', class: 'green', style: {color: 'rgb(255, 255, 255)', background: 'rgb(38, 194, 129)', marginRight: '15px'} }, |
| | | { origin: true, uuid: Utils.getuuid(), label: '修改', intertype: 'system', OpenType: 'pop', execSuccess: 'grid', icon: 'form', class: 'purple', style: {color: 'rgb(255, 255, 255)', background: 'rgb(142, 68, 173)', marginRight: '15px'} }, |
| | | { origin: true, uuid: Utils.getuuid(), label: '删除', intertype: 'system', OpenType: 'prompt', execSuccess: 'grid', Ot: 'required', icon: 'delete', class: 'danger', style: {color: 'rgb(255, 255, 255)', background: 'rgb(255, 77, 79)', marginRight: '15px'} } |
| | | ], |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | |
| | | {value: '', label: '不可选'}, |
| | | {value: 'radio', label: '单选'}, |
| | | {value: 'checkbox', label: '多选'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'selected', values: ['radio', 'checkbox']}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'selected', |
| | | label: '首行选中', |
| | | initval: wrap.selected || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'borderColor', |
| | | label: '边框颜色', |
| | |
| | | <Form {...formItemLayout} className="verify-form" id="verifycard1"> |
| | | <Row gutter={24}> |
| | | <Col span={6}> |
| | | <Form.Item label={'字段'}> |
| | | {getFieldDecorator('field', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + '字段!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={6}> |
| | | <Form.Item label={'名称'}> |
| | | {getFieldDecorator('label', { |
| | | initialValue: '', |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={6}> |
| | | <Form.Item label={'字段'}> |
| | | {getFieldDecorator('field', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + '字段!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={6}> |
| | | <Form.Item label={'数据类型'}> |
| | | {getFieldDecorator('datatype', { |
| | | initialValue: '', |
| | |
| | | total: null, |
| | | precards: [], |
| | | nextcards: [], |
| | | selected: 'false' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | _config.wrap.cardFloat = null |
| | | } |
| | | |
| | | let selected = 'false' |
| | | if (_config.wrap.selected === 'always' || _config.wrap.selected === 'init') { |
| | | selected = _config.wrap.selected |
| | | } |
| | | |
| | | if (_data) { |
| | | _data = _data.map((item, index) => { |
| | | item.key = index |
| | |
| | | item.$Index = index + 1 + '' |
| | | return item |
| | | }) |
| | | |
| | | if (selected !== 'false') { |
| | | setTimeout(() => { |
| | | this.checkTopLine() |
| | | }, 200) |
| | | if (selected === 'init') { |
| | | selected = 'false' |
| | | } |
| | | } |
| | | } |
| | | |
| | | _config.columns.forEach(item => { |
| | |
| | | }) |
| | | |
| | | this.setState({ |
| | | selected, |
| | | precards, |
| | | nextcards, |
| | | sync: _sync, |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | const { sync, config, BID } = this.state |
| | | const { sync, config, BID, selected } = this.state |
| | | |
| | | if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { |
| | | let _data = [] |
| | | if (nextProps.data && nextProps.data[config.dataName]) { |
| | | _data = nextProps.data[config.dataName] || [] |
| | | } |
| | | _data = _data.map((item, index) => { |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 + '' |
| | | return item |
| | | }) |
| | | |
| | | _data = _data.map((item, index) => { |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 + '' |
| | | return item |
| | | }) |
| | | if (selected !== 'false') { |
| | | setTimeout(() => { |
| | | this.checkTopLine() |
| | | }, 200) |
| | | if (selected === 'init') { |
| | | this.setState({selected: 'false'}) |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.setState({sync: false, data: _data}) |
| | | } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | |
| | | } else if (position === 'popclose') { // 标签关闭刷新 |
| | | config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) |
| | | btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) |
| | | } |
| | | } |
| | | |
| | | checkTopLine = () => { |
| | | const { config, data } = this.state |
| | | |
| | | if (!data || data.length === 0) return |
| | | |
| | | this.setState({ |
| | | activeKey: 0, |
| | | selectKeys: [0], |
| | | selectedData: [data[0]] |
| | | }) |
| | | |
| | | MKEmitter.emit('resetSelectLine', config.uuid, data[0].$$uuid, data[0]) |
| | | if (config.setting.$hasSyncModule) { |
| | | MKEmitter.emit('syncBalconyData', config.uuid, [data[0]], data.length === 1) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { config, arr_field, pageIndex, search, BID, BData } = this.state |
| | | const { config, arr_field, pageIndex, search, BID, BData, selected } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | | this.setState({ |
| | |
| | | start = config.setting.pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | if (selected !== 'false') { |
| | | setTimeout(() => { |
| | | this.checkTopLine() |
| | | }, 200) |
| | | if (selected === 'init') { |
| | | this.setState({selected: 'false'}) |
| | | } |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') |
| | | } |
| | | if (config.setting.$hasSyncModule) { |
| | | MKEmitter.emit('syncBalconyData', config.uuid, [], false) |
| | | } |
| | | |
| | | this.setState({ |
| | | activeKey: '', |
| | | selectKeys: [], |
| | |
| | | total: result.total, |
| | | loading: false |
| | | }) |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') |
| | | if (config.setting.$hasSyncModule) { |
| | | MKEmitter.emit('syncBalconyData', config.uuid, [], false) |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | |
| | | _config.subcards[0].offset = offset |
| | | } |
| | | |
| | | if (_config.subcards[0] && (_config.wrap.selected === 'always' || _config.wrap.selected === 'init')) { |
| | | setTimeout(() => { |
| | | this.checkTopLine() |
| | | }, 200) |
| | | } |
| | | |
| | | this.setState({ |
| | | sync: _sync, |
| | | data: _data, |
| | |
| | | this.loadData() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | checkTopLine = () => { |
| | | const { config, data } = this.state |
| | | |
| | | this.setState({ |
| | | activeKey: 0 |
| | | }) |
| | | |
| | | MKEmitter.emit('resetSelectLine', config.uuid, (config.subcards[0].setting.primaryId || ''), data) |
| | | } |
| | | |
| | | handleTimer = () => { |
| | |
| | | _data.$$BData = BData |
| | | |
| | | this.setState({ |
| | | activeKey: '', |
| | | data: _data, |
| | | loading: false |
| | | }) |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('mkCheckTopLine', this.mkCheckTopLine) |
| | | MKEmitter.addListener('mkCheckAll', this.mkCheckAll) |
| | | MKEmitter.addListener('resetTable', this.resetTable) |
| | | } |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('mkCheckTopLine', this.mkCheckTopLine) |
| | | MKEmitter.removeListener('mkCheckAll', this.mkCheckAll) |
| | | MKEmitter.removeListener('resetTable', this.resetTable) |
| | | } |
| | | |
| | | mkCheckTopLine = (menuId) => { |
| | | const { MenuID, data, setting } = this.props |
| | | |
| | | if (MenuID !== menuId || !data || data.length === 0) return |
| | | |
| | | this.changedata(0) |
| | | this.setState({ selectedRowKeys: [0], activeIndex: 0 }) |
| | | this.props.chgSelectData([data[0]]) |
| | | |
| | | if (setting.$hasSyncModule) { |
| | | MKEmitter.emit('syncBalconyData', MenuID, [data[0]], data.length === 1) |
| | | } |
| | | } |
| | | |
| | | mkCheckAll = (menuId, checked) => { |
| | | const { MenuID, data } = this.props |
| | | |
| | |
| | | let _cols = new Map() |
| | | let _data = null |
| | | let _sync = _config.setting.sync === 'true' |
| | | let setting = {..._config.setting, ..._config.wrap, style: {}} |
| | | |
| | | if (setting.selected !== 'always' && setting.selected !== 'init') { |
| | | setting.selected = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && data) { |
| | | _data = data[_config.dataName] || [] |
| | |
| | | item.$Index = index + 1 + '' |
| | | return item |
| | | }) |
| | | |
| | | if (setting.selected !== 'false') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', _config.uuid) |
| | | }, 200) |
| | | if (setting.selected === 'init') { |
| | | setting.selected = 'false' |
| | | } |
| | | } |
| | | } |
| | | |
| | | _config.columns.forEach(item => { |
| | |
| | | } |
| | | }) |
| | | |
| | | let setting = {..._config.setting, ..._config.wrap, style: {}} |
| | | if (setting.color) { |
| | | setting.style.color = setting.color |
| | | } |
| | |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |
| | | if (setting.selected !== 'false') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid) |
| | | }, 200) |
| | | if (setting.selected === 'init') { |
| | | this.setState({setting: {...setting, selected: 'false'}}) |
| | | } |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |
| | | } |
| | | |
| | | reset && MKEmitter.emit('resetTable', config.uuid, repage) // 列表重置 |
| | | |
| | | let start = 1 |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | const { sync, config, BID } = this.state |
| | | const { sync, config, setting, BID } = this.state |
| | | |
| | | if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { |
| | | let _data = [] |
| | | if (nextProps.data && nextProps.data[config.dataName]) { |
| | | _data = nextProps.data[config.dataName] || [] |
| | | _data = _data.map((item, index) => { |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 + '' |
| | | return item |
| | | }) |
| | | |
| | | if (setting.selected !== 'false') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid) |
| | | }, 200) |
| | | if (setting.selected === 'init') { |
| | | this.setState({setting: {...setting, selected: 'false'}}) |
| | | } |
| | | } |
| | | } |
| | | _data = _data.map((item, index) => { |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 + '' |
| | | return item |
| | | }) |
| | | |
| | | this.setState({sync: false, data: _data}) |
| | | } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | |
| | | // 自定义打印示例 |
| | | // let defaultPrinter = printer.defaultPrinter || 'lackprinter' |
| | | // let printers = {} |
| | | // let getuuid = () => { |
| | | // let uuid = [] |
| | | // let _options = '0123456789abcdefghigklmnopqrstuv' |
| | | // for (let i = 0; i < 32; i++) { |
| | | // uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1)) |
| | | // } |
| | | // uuid = uuid.join('') |
| | | // return uuid |
| | | // } |
| | | // if (printer.printerTypeList && printer.printerTypeList.length > 0) { |
| | | // printer.printerTypeList.forEach(cell => { |
| | | // if (cell.printer) { |
| | |
| | | // let _documents = [] |
| | | // printdata[printer].forEach(item => { |
| | | // let _cell = { |
| | | // documentID: new Date().getTime().toString(), |
| | | // documentID: getuuid(), |
| | | // contents: [] |
| | | // } |
| | | |
| | |
| | | // requestID: '', |
| | | // version: '', |
| | | // task: { |
| | | // taskID: new Date().getTime().toString(), |
| | | // taskID: getuuid(), |
| | | // preview: false, |
| | | // printer: printer, |
| | | // documents: _documents |
| | |
| | | render() { |
| | | const { card } = this.props |
| | | return ( |
| | | <div className={'check-card-form-box' + (card.readonly ? ' readonly' : '')}> |
| | | <div className={'check-card-search-box' + (card.readonly ? ' readonly' : '')}> |
| | | <Row gutter={12}>{this.getCards()}</Row> |
| | | </div> |
| | | ) |
| | |
| | | .check-card-form-box { |
| | | .check-card-search-box { |
| | | margin-top: 10px; |
| | | margin-bottom: -10px; |
| | | .card-cell { |
| | |
| | | transform: rotate(45deg) scale(1) translate(-50%, -50%); |
| | | } |
| | | } |
| | | .check-card-form-box:not(.readonly) { |
| | | .check-card-search-box:not(.readonly) { |
| | | .card-cell:not(.bg-control):hover { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | } |
| | | .check-card-form-box.readonly { |
| | | .check-card-search-box.readonly { |
| | | .card-cell, .card-pic-cell { |
| | | cursor: not-allowed; |
| | | } |
| | |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-cell' + (_active ? ' active' : '') + (_style ? ' bg-control' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className={'card-cell' + (_active ? ' active' : '') + (_style ? ' bg-control' : '') + (item.$disabled ? ' disabled' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-pic-cell ' + (_active ? 'active' : '')} onClick={() => this.changeCard(item)} style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}> |
| | | <div className={'card-pic-cell ' + (_active ? 'active' : '') + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)} style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}> |
| | | </div> |
| | | </Col> |
| | | }) |
| | |
| | | height: 12px; |
| | | transform: rotate(45deg) scale(1) translate(-50%, -50%); |
| | | } |
| | | .card-cell.disabled { |
| | | cursor: not-allowed; |
| | | } |
| | | .card-pic-cell.disabled { |
| | | cursor: not-allowed; |
| | | } |
| | | } |
| | | |
| | | .check-card-form-box:not(.readonly) { |
| | | .card-cell:not(.bg-control):hover { |
| | | .card-cell:not(.bg-control):not(.disabled):hover { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | span { |
| | | color: #ffffff!important; |
| | | } |
| | | } |
| | | .card-cell.bg-control:not(.active):hover { |
| | | .card-cell.bg-control:not(.active):not(.disabled):hover { |
| | | .bg-mask { |
| | | opacity: 0.7; |
| | | } |
| | | } |
| | | .card-pic-cell:hover { |
| | | .card-pic-cell:not(.disabled):hover { |
| | | border-color: #1890ff; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | |
| | | <Menu.Item key="logout" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item> |
| | | </Menu> |
| | | }> |
| | | <div> |
| | | <div style={{zIndex: 1, position: 'relative'}}> |
| | | <img src={this.state.avatar || avatar} alt=""/> |
| | | <span> |
| | | <span className="username">{this.state.userName}</span> <Icon type="down" /> |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, notification, Timeline, Icon, Button, Typography } from 'antd' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | |
| | | return |
| | | } |
| | | |
| | | let _rduri = window.atob('aHR0cHM6Ly9lcGMubWs5aC5$mkjbi93ZWJhcGkvZG9zdGFycw=='.replace(/\$mk/ig, '')) |
| | | let _id = window.atob('YmgwYmFwYWJ0ZDQ1ZXBz$mkZ3JhNzlzZWdiY2g2YzFpYms='.replace(/\$mk/ig, '')) |
| | | let sysType = options.sysType.toLowerCase() |
| | | |
| | | if (window.GLOB.systemType === 'production') { |
| | | if (window.GLOB.systemType === 'production' || sysType !== 'local') { |
| | | sysType = '' |
| | | } |
| | | |
| | | let param = { |
| | | func: 's_get_sversions_sys_epc', |
| | | appkey: window.GLOB.appkey, |
| | | userid: _id, |
| | | LoginUID: _id, |
| | | edition_int: edition_int, |
| | | sys_type: sysType, |
| | | nonc: Utils.getuuid() |
| | | sys_type: sysType |
| | | } |
| | | |
| | | let keys = Object.keys(param).sort() |
| | | let values = '' |
| | | keys.forEach(key => { |
| | | values += key + param[key] |
| | | }) |
| | | param.sign = md5(values) |
| | | param.t = new Date().getTime() |
| | | |
| | | Api.directRequest(_rduri + '/s_get_sversions_sys_epc', 'post', param, 'true').then(res => { |
| | | Api.getCloudConfig(param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | this.timer && clearTimeout(this.timer) |
| | | } |
| | | |
| | | render() { |
| | |
| | | /> : null} |
| | | {/* 表名添加 */} |
| | | {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header={dict['mob.component']} key="component"> |
| | |
| | | {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null} |
| | | {/* 表名添加 */} |
| | | {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header={dict['mob.component']} key="component"> |
| | |
| | | {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null} |
| | | {/* 表名添加 */} |
| | | {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header={dict['mob.component']} key="component"> |