| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Switch, Col, Modal, Button } from 'antd' |
| | | import { Popover, Switch, Col, Modal, Button, notification } from 'antd' |
| | | import { PlusOutlined, PlusSquareOutlined, EditOutlined, ArrowLeftOutlined, ArrowRightOutlined, SwapOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | const { card, appType } = this.state |
| | | |
| | | if (card.setting.click === 'menu' && card.setting.menu) { |
| | | if (['IM'].includes(card.setting.menu)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '系统页面不可编辑!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | MKEmitter.emit('changeEditMenu', {MenuID: card.setting.menu}) |
| | | } else if (card.setting.click === 'menus' && card.menus && card.menus.length > 0 && cards.subtype === 'datacard' && card.$cardType !== 'extendCard' && (appType === 'mob' || appType === 'pc')) { |
| | | this.setState({visible: true}) |
| | |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | if (appType === 'mob') { |
| | | menulist.push({ |
| | | value: 'IM', label: '即时通信(系统页)' |
| | | }) |
| | | } |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | |
| | | } else { |
| | | appmenulist = [] |
| | | } |
| | | if (appType === 'mob' && hasMenus) { // 数据卡可打开即时通信 |
| | | if (appType === 'mob' && (subtype === 'datacard' || subtype === 'propcard') && cardType !== 'extendCard') { // 数据卡可打开即时通信 |
| | | appmenulist.push({ |
| | | value: 'IM', label: '即时通信(系统页)' |
| | | }) |
| | |
| | | {field: 'checkAll', values: ['checkbox']}, |
| | | {field: 'selected', values: ['radio', 'checkbox']}, |
| | | {field: 'selStyle', values: ['radio', 'checkbox']}, |
| | | {field: 'priKeyType', values: ['radio', 'checkbox']}, |
| | | // {field: 'priKeyType', values: ['radio', 'checkbox']}, |
| | | ], |
| | | forbid: subtype === 'tablecard' |
| | | }, |
| | |
| | | let _data = { $$empty: true } |
| | | let _sync = false |
| | | |
| | | if (_config.setting && _config.wrap.datatype !== 'static') { |
| | | if (_config.wrap.datatype !== 'static') { |
| | | _sync = _config.setting.sync === 'true' |
| | | |
| | | if (_sync && data) { |
| | |
| | | if (_data) { |
| | | _data.$$BID = BID || '' |
| | | _data.$$BData = BData || '' |
| | | if (_config.setting && _config.setting.primaryKey) { |
| | | if (_config.setting.primaryKey) { |
| | | _data.$$uuid = _data[_config.setting.primaryKey] || '' |
| | | } |
| | | } |
| | |
| | | }) |
| | | |
| | | let offset = 0 |
| | | if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left' && _config.subcards[0] && _width < 24) { |
| | | if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left' && _width < 24) { |
| | | offset = 24 - _width |
| | | if (_config.wrap.cardFloat === 'center') { |
| | | offset = Math.floor(offset / 2) |
| | |
| | | config: _config, |
| | | arr_field: _config.columns.map(col => col.field).join(','), |
| | | }, () => { |
| | | if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') { |
| | | if (_config.wrap.datatype !== 'static' && _config.setting.sync !== 'true' && _config.setting.onload === 'true') { |
| | | this.loadData() |
| | | } else if ((!_sync || _config.wrap.priKeyType === 'static') && selected !== 'false') { |
| | | setTimeout(() => { |
| | |
| | | |
| | | checkTopLine = () => { |
| | | const { config, data, selected } = this.state |
| | | |
| | | if (!config.subcards[0]) return |
| | | |
| | | this.setState({ |
| | | activeKey: 0, |
| | |
| | | resetParentParam = (MenuID, id, data) => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.setting || !config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (!config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | |
| | | revertLoading: false, // 恢复默认设置 |
| | | expandedKeys: [], // 展开的树节点 |
| | | selectedKeys: [], // 选中的树节点 |
| | | shortcuts: null // 快捷键 |
| | | shortcuts: null, // 快捷键 |
| | | searchKey: '' |
| | | } |
| | | |
| | | /** |
| | |
| | | BIDs: {}, |
| | | shortcuts: null, |
| | | expandedKeys: [], |
| | | selectedKeys: [] |
| | | selectedKeys: [], |
| | | searchKey: '' |
| | | }, () => { |
| | | this.loadconfig() |
| | | }) |
| | |
| | | } else if (item.type === 'group') { |
| | | check(item.components) |
| | | return |
| | | } else if (item.subtype === 'propcard' && item.subcards.length === 0) { |
| | | error = `组件《${item.name}》中卡片不可为空!` |
| | | return |
| | | } |
| | | |
| | | if (['propcard', 'brafteditor', 'sandbox', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | if (['balcony'].includes(item.type) && item.wrap.datatype === 'static') return |
| | | |
| | |
| | | if (!item.wrap.field) { |
| | | error = `搜索条件《${item.name}》未设置搜索字段!` |
| | | } |
| | | } else if (item.subtype === 'propcard' && item.subcards.length === 0) { |
| | | error = `组件《${item.name}》中卡片不可为空!` |
| | | return |
| | | } |
| | | if (item.wrap && item.wrap.pagestyle === 'slide') { |
| | | swipes.push(item.name) |
| | |
| | | } else if (item.type === 'group') { |
| | | check(item.components) |
| | | return |
| | | } else if (item.subtype === 'propcard' && item.subcards.length === 0) { |
| | | error = `组件《${item.name}》中卡片不可为空!` |
| | | return |
| | | } |
| | | |
| | | if (['propcard', 'brafteditor', 'sandbox', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return |
| | | if (['balcony'].includes(item.type) && item.wrap.datatype === 'static') return |
| | | |