| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap } = this.state.card |
| | | const { card } = this.state |
| | | |
| | | return getWrapForm(wrap) |
| | | let buttons = [] |
| | | card.elements && card.elements.forEach(item => { |
| | | if (item.eleType === 'button') { |
| | | buttons.push({ |
| | | value: item.uuid, |
| | | label: item.label |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | return getWrapForm(card.wrap, buttons) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap) { |
| | | export default function (wrap, buttons) { |
| | | let menu = window.GLOB.customMenu |
| | | |
| | | let modules = MenuUtils.getLinkModules(menu.components) || [] |
| | |
| | | forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'linkbtn', |
| | | label: '关联按钮', |
| | | initval: wrap.linkbtn || '', |
| | | required: false, |
| | | options: buttons |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Button, notification, Spin, Input } from 'antd' |
| | | import { Modal, Button, notification, Spin, Input, message } from 'antd' |
| | | import { ForkOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | |
| | | id: 'par' + i, |
| | | direction: 'left', |
| | | color: '#5AD8A6', |
| | | node: 'table', |
| | | children: [] |
| | | } |
| | | |
| | |
| | | if (menu.direction !== 'right') return |
| | | |
| | | if (menu.depth === 1) { |
| | | sessionStorage.setItem('mk-table-node', menu.label) |
| | | window.open('#/hs') |
| | | |
| | | setTimeout(() => { |
| | | sessionStorage.removeItem('mk-table-node') |
| | | }, 50) |
| | | } else if (menu.param) { |
| | | if (menu.param.type === 'admin') { |
| | | if (menu.param.MenuType === 'custom') { |
| | |
| | | } |
| | | }) |
| | | |
| | | if (model.direction === 'left') { |
| | | if (model.node === 'table') { |
| | | model.fontcolor = '#1890ff' |
| | | this.graph.updateItem(item, model, false) |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = model.label |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | |
| | | message.success('表名复制成功。') |
| | | } |
| | | return |
| | | } |
| | | |
| | | model.fontcolor = '#1890ff' |
| | | this.graph.updateItem(item, model, false) |
| | | |
| | |
| | | MKEmitter.emit('mkCheckAll', syncConfig.uuid, e.target.checked) |
| | | } |
| | | |
| | | triggerButton = () => { |
| | | const { config, data } = this.state |
| | | |
| | | if (config.wrap.linkbtn) { |
| | | MKEmitter.emit('triggerBtnId', config.wrap.linkbtn, data.$$empty ? [] : [data]) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { config, loading, data, show, syncConfig, syncData, checked } = this.state |
| | | |
| | | if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null |
| | | |
| | | return ( |
| | | <div className={'custom-balcony-box' + (!show ? ' hidden' : '')} style={config.style}> |
| | | <div className={'custom-balcony-box' + (!show ? ' hidden' : '')} style={config.style} onClick={this.triggerButton}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="loading-mask" onClick={(e) => e.stopPropagation()}> |
| | | <div className="ant-spin-blur"></div> |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | {config.wrap.checkAll === 'show' ? <div className="check-all"><Checkbox checked={checked} onChange={this.checkAll}>全选</Checkbox></div> : null} |
| | | {config.wrap.checkAll === 'show' ? <div className="check-all" onClick={(e) => e.stopPropagation()}><Checkbox checked={checked} onChange={this.checkAll}>全选</Checkbox></div> : null} |
| | | <CardCellComponent data={data} syncData={syncData || []} cards={syncConfig || config} cardCell={config} elements={config.elements}/> |
| | | </div> |
| | | ) |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Button, notification, Spin, Input, Typography } from 'antd' |
| | | import { Modal, Button, notification, Spin, Input, Typography, message } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import G6 from "@antv/g6" |
| | |
| | | id: 'par' + i, |
| | | direction: 'left', |
| | | color: '#5AD8A6', |
| | | node: 'table', |
| | | children: [] |
| | | } |
| | | |
| | |
| | | ev.preventDefault(); |
| | | }, |
| | | }); |
| | | |
| | | G6.registerBehavior('dice-mindmap', { |
| | | getEvents() { |
| | | return { |
| | | 'node:dblclick': 'editNode', |
| | | }; |
| | | }, |
| | | editNode(evt) { |
| | | const item = evt.item; |
| | | const model = item.get('model'); |
| | | |
| | | // 选中节点 |
| | | this.graph.getNodes().forEach(node => { |
| | | let _model = node.get('model') |
| | | if (_model.fontcolor === '#1890ff') { |
| | | _model.fontcolor = '' |
| | | this.graph.updateItem(node, _model, false) |
| | | } |
| | | }) |
| | | |
| | | if (model.direction === 'left') { |
| | | if (model.node === 'table') { |
| | | model.fontcolor = '#1890ff' |
| | | this.graph.updateItem(item, model, false) |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = model.label |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | |
| | | message.success('表名复制成功。') |
| | | } |
| | | return |
| | | } |
| | | } |
| | | }); |
| | | |
| | | const dataTransform = (data) => { |
| | | const changeData = (d, level = 0, color) => { |
| | |
| | | }, |
| | | }, |
| | | 'drag-canvas', |
| | | 'zoom-canvas' |
| | | 'zoom-canvas', |
| | | 'dice-mindmap' |
| | | ], |
| | | }, |
| | | }); |
| | |
| | | cell.sysBgColor = _param.sysBgColor || '#ffffff' |
| | | cell.direction = _param.direction || 'vertical' |
| | | cell.adapter = _param.adapter || '' |
| | | cell.topHeight = _param.topHeight || '' |
| | | cell.share = _param.share || 'false' // 分享 |
| | | cell.share_des = _param.share_des || '' // 分享描述 |
| | | cell.share_url = _param.share_url || '' // 分享图片 |
| | |
| | | }) |
| | | |
| | | // 子应用ID、typename、应用ID、CloudUserID、appkey、login_types(是否需要登录,已弃用)、link_type(是否使用短连接,已弃用)、role_type(是否使用角色管理)、lang、css(皮肤)、title(标题)、favicon(图标)、user_binding(用户绑定)、sms_id(短信模板ID)、自定义 |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | return item |
| | | }) |
| | | |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | |
| | | return item |
| | | }) |
| | | |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {typename === 'pad' && adapters.includes('app') ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP中,状态栏的最大高度,空值时使用APP获取到的状态栏高度。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 状态栏高度 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('topHeight', { |
| | | initialValue: card ? card.topHeight || '' : '' |
| | | })(<InputNumber min={0} max={5000} precision={0} onPressEnter={this.handleSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item className="sys-bgcolor" label={ |
| | | <Tooltip placement="topLeft" title="子应用通用的背景色,子应用页面创建时会默认添加此背景色。"> |
| | |
| | | let sysMenu = { |
| | | MenuID: Utils.getuuid(), |
| | | MenuName: template.title, |
| | | MenuNo: template.MenuNo ? template.MenuNo + '_01' : '', |
| | | Template: template.type, |
| | | fstMenuId: mainMenu.MenuID, |
| | | ParentId: supMenu.MenuID, |
| | |
| | | PageParam: {Icon: 'folder'}, |
| | | children: [{ |
| | | src: '', |
| | | PageParam: {OpenType: 'newtab', Template: 'CommonTable'}, |
| | | type: 'CommonTable', |
| | | PageParam: {OpenType: 'newtab', Template: 'CustomPage'}, |
| | | type: 'CustomPage', |
| | | MenuID: '1581067625930haged11ieaivpavv77k', |
| | | MenuNo: 'sDatasM', |
| | | MenuName: '数据字典', |
| | |
| | | import React, {Component} from 'react' |
| | | import { Menu } from 'antd' |
| | | import { fromJS } from 'immutable' |
| | | import { FolderOutlined } from '@ant-design/icons' |
| | | |
| | | import { SySMenuList } from './config' |
| | |
| | | menulist = menulist.filter(menu => menu.children.length > 0) |
| | | } |
| | | |
| | | let tb = sessionStorage.getItem('mk-table-node') |
| | | |
| | | this.setState({ |
| | | subMenulist: menulist, |
| | | rootSubmenuKeys: menulist.map(item => item.MenuID), |
| | | openKeys: [menulist[0].MenuID] |
| | | }, () => { |
| | | if (tb && menulist[0] && menulist[0].children[0] && menulist[0].children[0].MenuNo === 'sDatasM') { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('modifyTabs', fromJS(menulist[0].children[0]).toJS()) |
| | | }, 500) |
| | | } |
| | | sessionStorage.removeItem('mk-table-node') |
| | | }) |
| | | } |
| | | |