| | |
| | | { |
| | | "appId": "201912040924165801464FF1788654BC5AC73", |
| | | "appkey": "20191106103859640976D6E924E464D029CF0", |
| | | "appId": "202108312122504607B107A83F55B40C98CCF", |
| | | "appkey": "20210831212235413F287EC3BF489424496C8", |
| | | "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", |
| | | "systemType": "", |
| | | "externalDatabase": "false", |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "mk", |
| | | "defaultApp": "mkindustry", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "debugger": false, |
| | | "licenseKey": "", |
| | | "probation": "", |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | "licenseKey": "7EFE13KIKKILIJ7C8CFC", |
| | | "probation": "2021-12-31", |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Switch, Col, Modal, Button, notification } from 'antd' |
| | | import { Popover, Switch, Col, Modal, Button } from 'antd' |
| | | import { PlusOutlined, PlusSquareOutlined, EditOutlined, ArrowLeftOutlined, ArrowRightOutlined, SwapOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | |
| | | if (card.setting.click === 'menu' && card.setting.menu) { |
| | | if (['IM'].includes(card.setting.menu)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '系统页面不可编辑!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', {MenuID: card.setting.menu}) |
| | | } |
| | | } else if (card.setting.click === 'menus' && card.menus && card.menus.length > 0 && cards.subtype === 'datacard' && appType) { |
| | | this.setState({visible: true}) |
| | | } |
| | |
| | | if (plot.repeat === 'average') { |
| | | let _mdata = new Map() |
| | | _cdata.forEach(item => { |
| | | if (!item[plot.Xaxis]) return |
| | | if (!item[plot.Xaxis] && item[plot.Xaxis] !== 0) return |
| | | |
| | | vFields.forEach(col => { |
| | | if (typeof(item[col.field]) !== 'number') { |
| | |
| | | |
| | | // dodge is not support linear attribute, please use category attribute! 时间格式 |
| | | if (/^\d{4}-\d{2}-\d{2}(\s\d{2}:\d{2}:\d{2})?/.test(item[plot.Xaxis])) { |
| | | item[plot.Xaxis] = ' ' + item[plot.Xaxis] |
| | | } else { |
| | | item[plot.Xaxis] = ' ' + item[plot.Xaxis] |
| | | } |
| | | |
| | |
| | | } else if (plot.repeat === 'cumsum') { |
| | | let _mdata = new Map() |
| | | _cdata.forEach(item => { |
| | | if (!item[plot.Xaxis]) return |
| | | if (!item[plot.Xaxis] && item[plot.Xaxis] !== 0) return |
| | | |
| | | vFields.forEach(col => { |
| | | if (typeof(item[col.field]) !== 'number') { |
| | |
| | | }) |
| | | |
| | | if (/^\d{4}-\d{2}-\d{2}(\s\d{2}:\d{2}:\d{2})?/.test(item[plot.Xaxis])) { |
| | | item[plot.Xaxis] = ' ' + item[plot.Xaxis] |
| | | } else { |
| | | item[plot.Xaxis] = ' ' + item[plot.Xaxis] |
| | | } |
| | | |
| | |
| | | } else { // plot.repeat === 'unrepeat' |
| | | let _mdata = new Map() |
| | | _cdata.forEach(item => { |
| | | if (!item[plot.Xaxis]) return |
| | | if (!item[plot.Xaxis] && item[plot.Xaxis] !== 0) return |
| | | |
| | | if (/^\d{4}-\d{2}-\d{2}(\s\d{2}:\d{2}:\d{2})?/.test(item[plot.Xaxis])) { |
| | | item[plot.Xaxis] = ' ' + item[plot.Xaxis] |
| | | } else { |
| | | item[plot.Xaxis] = '' + item[plot.Xaxis] |
| | | } |
| | | |
| | | if (!_mdata.has(item[plot.Xaxis])) { |
| | |
| | | import React, { Component } from 'react' |
| | | import { DndProvider } from 'react-dnd' |
| | | import { withRouter } from 'react-router' |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { ConfigProvider, notification, Modal, Collapse, Button, Spin } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, LeftOutlined, UserOutlined, EllipsisOutlined } from '@ant-design/icons' |
| | | |
| | |
| | | direction: 'vertical', |
| | | settingshow: true, |
| | | controlshow: true, |
| | | adapters: [], |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | window.GLOB.shellHeight = 853 |
| | | } |
| | | |
| | | let adapters = sessionStorage.getItem('adapter') |
| | | if (adapters) { |
| | | adapters = adapters.split(',') |
| | | } else { |
| | | adapters = [] |
| | | } |
| | | |
| | | this.setState({ |
| | | adapters, |
| | | MenuId: param.MenuID, |
| | | }, () => { |
| | | this.getMenuParam() |
| | |
| | | message: '菜单信息解析错误!', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | if (this.props.match.params.param !== nextProps.match.params.param) { |
| | | window.location.reload() |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | sessionStorage.setItem('appViewList', JSON.stringify(appViewList)) |
| | | this.props.history.replace('/imdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: MenuID, type: 'view'})))) |
| | | window.location.reload() |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | this.setState({loading: false}) |
| | | return |
| | | } else { |
| | | } |
| | | |
| | | let config = null |
| | | let isCreate = false |
| | | |
| | |
| | | isCreate = true |
| | | config = { |
| | | version: 1.0, |
| | | uuid: MenuId, |
| | | MenuID: MenuId, |
| | | // uuid: MenuId, |
| | | // MenuID: MenuId, |
| | | Template: 'imPage', |
| | | enabled: false, |
| | | MenuName: '即时通信', |
| | |
| | | config: fromJS(config).toJS(), |
| | | loading: false |
| | | }) |
| | | } |
| | | }) |
| | | this.getAppMenus() |
| | | } |
| | |
| | | } |
| | | |
| | | submitConfig = () => { |
| | | const { adapters } = this.state |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | if (!config.MenuName || !config.MenuNo) { |
| | |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | let roleParam = {type: 'im', key: config.uuid, title: config.MenuName, children: []} |
| | | |
| | | if (adapters.includes('wxmini')) { |
| | | config = this.getMiniStyle(config) |
| | | } |
| | | |
| | | let param = { |
| | | func: 'sPC_TrdMenu_AddUpt', |
| | | FstID: 'mk_app', |
| | |
| | | MenuName: config.MenuName || '', |
| | | PageParam: JSON.stringify({Template: 'imPage'}), |
| | | open_edition: config.open_edition, |
| | | menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roleParam))), |
| | | menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify({type: 'im', key: config.uuid, title: config.MenuName, children: []}))), |
| | | LText: '', |
| | | LTexttb: '' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | let _config = fromJS(config).toJS() |
| | | |
| | | param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config))) |
| | | param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (!res.status) { |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { localedict, loading, settingshow, controlshow, dict, MenuId, config, menuloading, adapters } = this.state |
| | | const { localedict, loading, settingshow, controlshow, dict, MenuId, config, menuloading } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={localedict}> |
| | | <div className="mk-mob-view" id="mk-mob-design-view"> |
| | | <Header/> |
| | | {loading ? <Spin className="view-spin" size="large" /> : null} |
| | | <DndProvider backend={HTML5Backend}> |
| | | <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> |
| | | <div className="draw"> |
| | | {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} |
| | |
| | | dict={dict} |
| | | config={config} |
| | | MenuId={MenuId} |
| | | adapters={adapters} |
| | | updateConfig={this.updateConfig} |
| | | /> : null} |
| | | </Panel> |
| | |
| | | <div className="instant-message" style={config ? config.style : null}> |
| | | <div className="header"> |
| | | <LeftOutlined/> |
| | | <span className="title">friend</span> |
| | | {config && config.wrap.linkmenu ? <EllipsisOutlined onClick={this.changeEditMenu}/> : null} |
| | | <span className="title">朋友</span> |
| | | {config && config.wrap.linkmenu ? <EllipsisOutlined onDoubleClick={this.changeEditMenu}/> : null} |
| | | </div> |
| | | <div className="mk-content-wrap"> |
| | | <div className="line-wrap"> |
| | |
| | | <div className="img"><UserOutlined /></div> |
| | | </div> |
| | | <div className="msg"> |
| | | <div className="title">friend</div> |
| | | <div className="title">朋友</div> |
| | | <div className="words">您好</div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </DndProvider> |
| | | <StyleController /> |
| | | </div> |
| | | </ConfigProvider> |
| | |
| | | background-size: 100% 100%; |
| | | padding: 25px 13px 40px; |
| | | border-radius: 30px; |
| | | width: 375px; |
| | | height: 680px; |
| | | } |
| | | .menu-control { |
| | | position: fixed; |
| | |
| | | padding: 10px 13px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .anticon-ellipsis { |
| | | position: absolute; |
| | | right: 0px; |
| | | padding: 10px 13px; |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .mk-content-wrap { |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (menu.routerUrl) { |
| | | this.props.history.push(menu.routerUrl) |
| | | return |
| | | } |
| | | |
| | | let param = { |