| | |
| | | "filter": "false", |
| | | "defaultApp": "", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "debugger": false, |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "mkwms/" |
| | |
| | | padding: 5px 20px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .ant-input[disabled] { |
| | | background-color: #fafafa!important; |
| | | } |
| | |
| | | group.fields = group.fields.filter(item => !item.focus) |
| | | |
| | | this.setState({group, visible: false, editform: null}) |
| | | this.updateGroup(group) |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | } |
| | | |
| | | pasteForm = (res) => { |
| | | let _config = fromJS(this.state.group).toJS() |
| | | let fieldrepet = false // 字段重复 |
| | | let labelrepet = false // 提示文字重复 |
| | | |
| | | _config.fields.forEach(item => { |
| | | if (res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) { |
| | | fieldrepet = true |
| | | } else if (res.label && item.label === res.label) { |
| | | labelrepet = true |
| | | } |
| | | }) |
| | | |
| | | if (fieldrepet) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '字段已存在!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } else if (labelrepet) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '名称已存在!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | _config.fields.push(res) |
| | | |
| | | this.updateGroup(_config) |
| | | |
| | | this.handleForm(res) |
| | | |
| | | notification.success({ |
| | | top: 92, |
| | | message: '粘贴成功!', |
| | | duration: 2 |
| | | }) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | | if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { |
| | | e.stopPropagation() |
| | |
| | | <Icon className="plus" title="添加分组" onClick={this.addCard} type="plus" /> |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | | <CopyComponent type="propcard" card={card}/> |
| | | <PasteComponent config={card} options={['cardcell']} updateConfig={this.updateComponent} /> |
| | | <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | |
| | | pasteSubmit = () => { |
| | | const { options } = this.props |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | | |
| | | if (!options.includes(res.copyType)) { |
| | | notification.warning({ top: 92, message: '配置信息格式错误!', duration: 5 }) |
| | | return |
| | |
| | | MKEmitter.emit('copyButtons', copyBtns) |
| | | } |
| | | |
| | | if (type === 'action') { |
| | | if (config.type === 'form' && config.subtype === 'stepform') { |
| | | this.props.updateConfig(res) |
| | | this.setState({visible: false}) |
| | | return |
| | | } else if (type === 'action') { |
| | | config.action = config.action || [] |
| | | config.action = config.action.filter(item => !item.origin) |
| | | |
| | |
| | | BID: '', // 上级ID |
| | | config: null, // 图表配置信息 |
| | | loading: false, // 数据加载状态 |
| | | activeKey: '', // 选中数据 |
| | | sync: false, // 是否统一请求数据 |
| | | data: null, // 数据 |
| | | group: null, |
| | |
| | | group.subButton.uuid = group.uuid |
| | | group.subButton.$menuId = group.uuid |
| | | group.subButton.Ot = 'requiredSgl' |
| | | group.subButton.$forbid = true |
| | | group.subButton.OpenType = 'formSubmit' |
| | | group.subButton.execError = 'never' |
| | | |
| | |
| | | MKEmitter.emit('reloadData', btn.syncComponentId) // 同级标签刷新 |
| | | } |
| | | |
| | | if (config.wrap.datatype !== 'static' && config.setting) { |
| | | this.loadData(btn) |
| | | } else { |
| | | this.execSuccess(btn) |
| | | } |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id) => { |
| | | const { config } = this.state |
| | | if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (id !== this.state.BID) { |
| | | this.setState({ BID: id }, () => { |
| | | this.loadData() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | execSuccess = (btn) => { |
| | | const { config, group } = this.state |
| | | |
| | | if (config.subcards.length > group.sort) { |
| | | let _group = config.subcards.filter(item => item.sort === (group.sort + 1))[0] |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id) => { |
| | | const { config } = this.state |
| | | if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (id !== this.state.BID) { |
| | | this.setState({ BID: id }, () => { |
| | | this.loadData() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | async loadData () { |
| | | async loadData (btn) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { config, arr_field, BID, group } = this.state |
| | | |
| | |
| | | data: {}, |
| | | loading: false |
| | | }) |
| | | btn && this.execSuccess(btn) |
| | | return |
| | | } |
| | | |
| | |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | btn && this.execSuccess(btn) |
| | | return |
| | | } |
| | | |
| | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | | let _data = result.data && result.data[0] ? result.data[0] : {} |
| | | let _group = group |
| | | if (config.wrap.statusControl && _data[config.wrap.statusControl]) { |
| | | let _status = _data[config.wrap.statusControl] |
| | | let _groups = config.subcards.filter(item => item.setting.status === _status)[0] |
| | | _group = _groups || _group |
| | | } |
| | | |
| | | this.setState({ |
| | | group: _group, |
| | | step: _group.sort - 1, |
| | | activeKey: '', |
| | | data: _data || {}, |
| | | loading: false |
| | | }) |
| | | if (btn) { |
| | | this.setState({ |
| | | data: _data || {}, |
| | | loading: false |
| | | }) |
| | | this.execSuccess(btn) |
| | | } else { |
| | | let _group = group |
| | | if (config.wrap.statusControl && _data[config.wrap.statusControl]) { |
| | | let _status = _data[config.wrap.statusControl] |
| | | let _groups = config.subcards.filter(item => item.setting.status === _status)[0] |
| | | _group = _groups || _group |
| | | } |
| | | this.setState({ |
| | | group: _group, |
| | | step: _group.sort - 1, |
| | | data: _data || {}, |
| | | loading: false |
| | | }) |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false, |
| | |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | btn && this.execSuccess(btn) |
| | | } |
| | | } |
| | | |
| | |
| | | return { |
| | | uuid: temp.MenuID, |
| | | value: temp.MenuID, |
| | | MenuName: temp.MenuName, |
| | | MenuName: temp.MenuName || '', |
| | | type: temp.Template, |
| | | MenuNo: temp.MenuNo, |
| | | MenuNo: temp.MenuNo || '', |
| | | Remark: temp.Remark |
| | | } |
| | | }) |
| | |
| | | |
| | | let _tabviews = [] |
| | | if (tabviews) { |
| | | _tabviews = tabviews.filter(tab => tab.MenuName.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0) |
| | | _tabviews = tabviews.filter(tab => tab.MenuName.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0 || tab.MenuNo.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0) |
| | | } |
| | | |
| | | return ( |
| | |
| | | } |
| | | |
| | | changeCard = (item) => { |
| | | const { multiple } = this.props.card |
| | | const { multiple, readonly } = this.props.card |
| | | const { selectKeys } = this.state |
| | | |
| | | if (readonly) return |
| | | |
| | | if (multiple === 'true') { |
| | | let keys = [] |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.props |
| | | return ( |
| | | <div className="check-card-form-box"> |
| | | <div className={'check-card-form-box' + (card.readonly ? ' readonly' : '')}> |
| | | <Row gutter={12}>{this.getCards()}</Row> |
| | | </div> |
| | | ) |
| | |
| | | margin-top: 10px; |
| | | margin-bottom: -10px; |
| | | .card-cell { |
| | | position: relative; |
| | | border: 1px solid #bcbcbc; |
| | | border-radius: 4px; |
| | | padding: 6px; |
| | |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | .card-cell:hover, .card-cell.active { |
| | | .card-cell.active { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | span { |
| | |
| | | } |
| | | } |
| | | .card-pic-cell { |
| | | position: relative; |
| | | border: 1px solid #bcbcbc; |
| | | border-radius: 4px; |
| | | background-size: cover; |
| | |
| | | line-height: 1.5; |
| | | cursor: pointer; |
| | | } |
| | | .card-pic-cell:hover, .card-pic-cell.active { |
| | | .card-pic-cell.active { |
| | | border-color: #1890ff; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | |
| | | .card-cell.active::after { |
| | | content: ' '; |
| | | position: absolute; |
| | | display: table; |
| | | border: 2px solid #ffffff; |
| | | border-top: 0; |
| | | border-left: 0; |
| | | bottom: 0; |
| | | right: 12px; |
| | | width: 6px; |
| | | height: 12px; |
| | | transform: rotate(45deg) scale(1) translate(-50%, -50%); |
| | | } |
| | | } |
| | | .check-card-form-box:not(.readonly) { |
| | | .card-cell:hover { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | span { |
| | | color: #ffffff!important; |
| | | } |
| | | } |
| | | .card-pic-cell:hover { |
| | | border-color: #1890ff; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | } |
| | | .check-card-form-box.readonly { |
| | | .card-cell, .card-pic-cell { |
| | | cursor: not-allowed; |
| | | } |
| | | } |
| | |
| | | const { value } = this.state |
| | | |
| | | return ( |
| | | <TextArea value={value} autoSize={{ minRows: 2, maxRows: Item.maxRows || 6 }} onChange={this.onChange} disabled={Item.readonly === 'true'} /> |
| | | <TextArea value={value} autoSize={{ minRows: 2, maxRows: Item.maxRows || 6 }} onChange={this.onChange} disabled={Item.readonly} /> |
| | | ) |
| | | } |
| | | } |
| | |
| | | _cell.Text = cell[item.valueText] |
| | | if ((!_cell.Value && _cell.Value !== 0) || (!_cell.Text && _cell.Text !== 0)) return |
| | | } else { |
| | | _cell.$value = cell[item.valueField] |
| | | _cell.$value = cell[item.cardValField] |
| | | _cell = {..._cell, ...cell} |
| | | if (!_cell.$value && _cell.$value !== 0) return |
| | | } |
| | |
| | | .check-card-edit-box { |
| | | line-height: 1.5; |
| | | .card-cell { |
| | | border: 1px solid #bcbcbc; |
| | | border-radius: 4px; |
| | |
| | | arrfield.push(...item.linkSubField) |
| | | } else if (item.type === 'checkcard') { |
| | | arrfield = item.fields.map(f => f.field) |
| | | arrfield.push(item.valueField) |
| | | arrfield.push(item.cardValField) |
| | | } |
| | | |
| | | arrfield = Array.from(new Set(arrfield)) |
| | |
| | | } |
| | | |
| | | // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过) |
| | | if (data && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') { |
| | | if (data && !btn.$forbid && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') { |
| | | datavars = {...data, ...datavars} |
| | | |
| | | const setField = (col) => { |
| | |
| | | import React, {Component} from 'react' |
| | | import { fromJS } from 'immutable' |
| | | import { Spin, notification, Button, Table, Modal, ConfigProvider } from 'antd' |
| | | import { Spin, notification, Button, Table, Modal, ConfigProvider, Typography } from 'antd' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | import enUS from 'antd/es/locale/en_US' |
| | |
| | | import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | | const { Paragraph } = Typography |
| | | |
| | | const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | const Header = asyncComponent(() => import('@/mob/header')) |
| | | const MutilForm = asyncComponent(() => import('./mutilform')) |
| | | const SubMutilForm = asyncComponent(() => import('./submutilform')) |
| | | |
| | | let base_url = '' |
| | | if (process.env.NODE_ENV === 'production') { |
| | | base_url = document.location.origin + '/' + window.GLOB.service |
| | | } else { |
| | | base_url = window.GLOB.location + '/' + window.GLOB.service |
| | | } |
| | | |
| | | class AppManage extends Component { |
| | | state = { |
| | |
| | | title: '操作', |
| | | key: 'action', |
| | | align: 'center', |
| | | width: '190px', |
| | | width: '250px', |
| | | render: (text, record) => ( |
| | | <div> |
| | | <Button type="link" onClick={() => this.deleteSubApp(record)} style={{color: '#ff4d4f'}}>删除</Button> |
| | | <Button type="link" onClick={() => this.jumpApp(record)}>编辑应用</Button> |
| | | <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${base_url}${record.typename}/index.html#/index/${this.state.selectApp.kei_no}/${record.lang}` }}></Paragraph> |
| | | </div> |
| | | ) |
| | | }, |
| | |
| | | |
| | | return item |
| | | }) |
| | | |
| | | |
| | | this.setState({ |
| | | loading: false, |
| | | applist: applist, |
| | |
| | | check(item.components) |
| | | return |
| | | } |
| | | if (['propcard', 'brafteditor', 'sandbox'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | if (['propcard', 'brafteditor', 'sandbox', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | |
| | | if (item.setting) { |
| | | if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) { |
| | |
| | | error = `导航栏《${item.name}》未设置菜单参数!` |
| | | } |
| | | |
| | | if (['propcard', 'brafteditor', 'sandbox', 'tabbar'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | if (['propcard', 'brafteditor', 'sandbox', 'tabbar', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | |
| | | if (item.setting) { |
| | | if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) { |
| | |
| | | check(item.components) |
| | | return |
| | | } |
| | | if (['propcard', 'brafteditor', 'sandbox'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | if (['propcard', 'brafteditor', 'sandbox', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | |
| | | if (item.setting) { |
| | | if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) { |