| | |
| | | { |
| | | "appId": "202108312122504607B107A83F55B40C98CCF", |
| | | "appkey": "20210831212235413F287EC3BF489424496C8", |
| | | "appId": "201912040924165801464FF1788654BC5AC73", |
| | | "appkey": "20191106103859640976D6E924E464D029CF0", |
| | | "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", |
| | | "systemType": "", |
| | | "externalDatabase": "false", |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "mkindustry", |
| | | "defaultApp": "mk", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "debugger": false, |
| | | "licenseKey": "7EFE13KIKLILIJB64C12", |
| | | "probation": "2021-12-31", |
| | | "licenseKey": "", |
| | | "probation": "", |
| | | "keepPassword": "true", |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | } |
| | |
| | | } else if (item.type === 'source') { |
| | | content = (<SourceComponent type="" placement="right"/>) |
| | | } else if (item.type === 'table') { |
| | | content = (<MKTable columns={item.columns || []} actions={item.actions || []}/>) |
| | | content = (<MKTable tip={item.tip || ''} columns={item.columns || []} actions={item.actions || []}/>) |
| | | } |
| | | |
| | | if (!content) return |
| | |
| | | })} |
| | | /> |
| | | </DndProvider> |
| | | {this.props.tip ? this.props.tip : null} |
| | | </div> |
| | | </EditableContext.Provider> |
| | | ) |
| | |
| | | this.updateComponent({...this.state.card, wrap: res}) |
| | | } |
| | | |
| | | clearGroup = () => { |
| | | let group = fromJS(this.state.group).toJS() |
| | | let card = fromJS(this.state.card).toJS() |
| | | let _this = this |
| | | |
| | | group.fields = [] |
| | | |
| | | card.subcards = card.subcards.map(item => { |
| | | if (item.uuid === group.uuid) { |
| | | return group |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | confirm({ |
| | | content: `确定清空表单吗?`, |
| | | onOk() { |
| | | _this.setState({card, group}) |
| | | _this.props.updateConfig(card) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | | if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { |
| | | e.stopPropagation() |
| | |
| | | {group ? <div className="form-area"> |
| | | <PlusOutlined className="plus" title="添加表单" onClick={this.addForm}/> |
| | | <FieldsComponent config={group} type="form" plusFields={this.plusFields} /> |
| | | <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>清空</span> |
| | | <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1列</Button> : null} |
| | | {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2列</Button> : null} |
| | |
| | | label: Formdict['header.form.blacklist'], |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList |
| | | options: roleList, |
| | | forbidden: appType === 'mob' |
| | | } |
| | | ] |
| | | } |
| | |
| | | field: 'title', |
| | | label: '标题', |
| | | initval: wrap.title || '', |
| | | tooltip: '使用搜索框时,标题用于搜索条件隐藏时(当启用黑名单,登录用户无权限时)显示。', |
| | | // tooltip: '使用搜索框时,标题用于搜索条件隐藏时(当启用黑名单,登录用户无权限时)显示。注:@username代表用户名,@fullname代表姓名。', |
| | | tooltip: '注:@username代表用户名,@fullname代表姓名。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | field: 'menuPosition', |
| | | label: '菜单位置', |
| | | initval: wrap.menuPosition || 'right', |
| | | tooltip: '自定义菜单的位置。', |
| | | tooltip: '自定义菜单的位置。注:菜单位于左侧时会显示头像,且返回功能被禁用。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'left', label: '左侧'}, |
| | |
| | | required: false, |
| | | span: 24, |
| | | actions: ['view'], |
| | | tip: <span style={{fontSize: '12px', color: '#959595', position: 'relative', top: '-8px'}}>当使用图标<MkIcon type="user"/>,且右侧只有一个菜单时,会显示用户头像。</span>, |
| | | columns: [ |
| | | { |
| | | title: '图标', |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Radio, Select, Tooltip } from 'antd' |
| | | import { Form, Row, Col, Input, Radio, Tooltip } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | } |
| | | |
| | | state = { |
| | | roleList: [], |
| | | // roleList: [], |
| | | type: this.props.config.setting.type || 'title' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch (e) { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | // let roleList = sessionStorage.getItem('sysRoles') |
| | | // if (roleList) { |
| | | // try { |
| | | // roleList = JSON.parse(roleList) |
| | | // } catch (e) { |
| | | // roleList = [] |
| | | // } |
| | | // } else { |
| | | // roleList = [] |
| | | // } |
| | | |
| | | this.setState({roleList}) |
| | | // this.setState({roleList}) |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | |
| | | render() { |
| | | const { config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { type, roleList } = this.state |
| | | const { type } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {type === 'search' ? <Col span={12}> |
| | | {/* 去除移动端字段权限 */} |
| | | {/* {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="黑名单"> |
| | | {getFieldDecorator('blacklist', { |
| | | initialValue: config.setting.blacklist || [] |
| | |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> : null} */} |
| | | </Row> |
| | | </Form> |
| | | ) |
| | |
| | | label: Formdict['header.form.blacklist'], |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList || [] |
| | | options: roleList || [], |
| | | forbid: appType === 'mob' |
| | | } |
| | | ] |
| | | } |
| | |
| | | label: Formdict['header.form.blacklist'], |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList |
| | | options: roleList, |
| | | forbid: appType === 'mob' |
| | | } |
| | | ] |
| | | } |