king
2022-01-20 e62150eed77965519199d83d4988c4dde91f5069
2022-01-20
6个文件已修改
108 ■■■■ 已修改文件
public/options.json 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/imdesign/index.jsx 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/imdesign/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,17 +1,17 @@
{
  "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/"
}
src/menu/components/card/cardcomponent/index.jsx
@@ -1,7 +1,7 @@
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'
@@ -282,14 +282,18 @@
    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})
    }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -598,7 +598,7 @@
    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') {
@@ -614,6 +614,8 @@
        // 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]
        }
@@ -643,7 +645,7 @@
    } 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') {
@@ -658,6 +660,8 @@
        })
        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]
        }
@@ -684,10 +688,12 @@
    } 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])) {
src/views/imdesign/index.jsx
@@ -1,9 +1,7 @@
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'
@@ -49,7 +47,6 @@
    direction: 'vertical',
    settingshow: true,
    controlshow: true,
    adapters: [],
  }
  UNSAFE_componentWillMount() {
@@ -86,15 +83,7 @@
          window.GLOB.shellHeight = 853
        }
        let adapters = sessionStorage.getItem('adapter')
        if (adapters) {
          adapters = adapters.split(',')
        } else {
          adapters = []
        }
        this.setState({
          adapters,
          MenuId: param.MenuID,
        }, () => {
          this.getMenuParam()
@@ -106,12 +95,6 @@
        message: '菜单信息解析错误!',
        duration: 5
      })
    }
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.props.match.params.param !== nextProps.match.params.param) {
      window.location.reload()
    }
  }
@@ -205,6 +188,7 @@
      sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
      this.props.history.replace('/imdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: MenuID, type: 'view'}))))
      window.location.reload()
    })
  }
@@ -304,7 +288,8 @@
        })
        this.setState({loading: false})
        return
      } else {
      }
        let config = null
        let isCreate = false
@@ -319,8 +304,8 @@
          isCreate = true
          config = {
            version: 1.0,
            uuid: MenuId,
            MenuID: MenuId,
          // uuid: MenuId,
          // MenuID: MenuId,
            Template: 'imPage',
            enabled: false,
            MenuName: '即时通信',
@@ -344,7 +329,6 @@
          config: fromJS(config).toJS(),
          loading: false
        })
      }
    })
    this.getAppMenus()
  }
@@ -392,7 +376,6 @@
  }
  submitConfig = () => {
    const { adapters } = this.state
    let config = fromJS(this.state.config).toJS()
    if (!config.MenuName || !config.MenuNo) {
@@ -412,12 +395,6 @@
    })
    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',
@@ -432,17 +409,14 @@
        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) {
@@ -496,14 +470,13 @@
  }
  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}
@@ -518,7 +491,6 @@
                      dict={dict}
                      config={config}
                      MenuId={MenuId}
                      adapters={adapters}
                      updateConfig={this.updateConfig}
                    /> : null}
                  </Panel>
@@ -549,8 +521,8 @@
                <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">
@@ -560,7 +532,7 @@
                          <div className="img"><UserOutlined /></div>
                        </div>
                        <div className="msg">
                          <div className="title">friend</div>
                        <div className="title">朋友</div>
                          <div className="words">您好</div>
                        </div>
                      </div>
@@ -586,7 +558,6 @@
                </div>
              </div>
            </div>
          </DndProvider>
          <StyleController />
        </div>
      </ConfigProvider>
src/views/imdesign/index.scss
@@ -119,6 +119,8 @@
    background-size: 100% 100%;
    padding: 25px 13px 40px;
    border-radius: 30px;
    width: 375px;
    height: 680px;
  }
  .menu-control {
    position: fixed;
@@ -211,6 +213,14 @@
        padding: 10px 13px;
        font-size: 18px;
      }
      .anticon-ellipsis {
        position: absolute;
        right: 0px;
        padding: 10px 13px;
        font-size: 18px;
        cursor: pointer;
      }
    }
  
    .mk-content-wrap {
src/views/mobdesign/index.jsx
@@ -257,6 +257,9 @@
        duration: 5
      })
      return
    } else if (menu.routerUrl) {
      this.props.history.push(menu.routerUrl)
      return
    }
    let param = {