king
2023-01-18 9cacf4bf8339ebdfbf2fec7604b501a8dc32f9a4
2023-01-18
10个文件已修改
141 ■■■■■ 已修改文件
src/menu/components/card/balcony/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/tablenodes/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/tablenodes/index.jsx 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/thdmenuplus/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemfunc/sidemenu/config.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemfunc/sidemenu/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx
@@ -245,9 +245,19 @@
  }
  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) => {
src/menu/components/card/balcony/options.jsx
@@ -4,7 +4,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
export default function (wrap, buttons) {
  let menu = window.GLOB.customMenu
  let modules = MenuUtils.getLinkModules(menu.components) || []
@@ -260,6 +260,14 @@
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'select',
      field: 'linkbtn',
      label: '关联按钮',
      initval: wrap.linkbtn || '',
      required: false,
      options: buttons
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
src/menu/tablenodes/index.jsx
@@ -1,7 +1,7 @@
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'
@@ -158,6 +158,7 @@
              id: 'par' + i,
              direction: 'left',
              color: '#5AD8A6',
              node: 'table',
              children: []
            }
@@ -232,7 +233,12 @@
    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') {
@@ -354,6 +360,23 @@
          }
        })
        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)
        
src/tabviews/custom/components/card/balcony/index.jsx
@@ -395,20 +395,28 @@
    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>
    )
src/tabviews/zshare/tablenodes/index.jsx
@@ -1,7 +1,7 @@
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"
@@ -166,6 +166,7 @@
              id: 'par' + i,
              direction: 'left',
              color: '#5AD8A6',
              node: 'table',
              children: []
            }
@@ -345,6 +346,44 @@
        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) => {
@@ -420,7 +459,8 @@
            },
          },
          'drag-canvas',
          'zoom-canvas'
          'zoom-canvas',
          'dice-mindmap'
        ],
      },
    });
src/views/appmanage/index.jsx
@@ -469,6 +469,7 @@
              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 || '' // 分享图片
@@ -652,7 +653,7 @@
    })
    // 子应用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)
    
@@ -898,7 +899,7 @@
          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)
      }
@@ -991,7 +992,7 @@
        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)
src/views/appmanage/submutilform/index.jsx
@@ -309,6 +309,18 @@
              )}
            </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="子应用通用的背景色,子应用页面创建时会默认添加此背景色。">
src/views/design/sidemenu/thdmenuplus/index.jsx
@@ -123,6 +123,7 @@
    let sysMenu = {
      MenuID: Utils.getuuid(),
      MenuName: template.title,
      MenuNo: template.MenuNo ? template.MenuNo + '_01' : '',
      Template: template.type,
      fstMenuId: mainMenu.MenuID,
      ParentId: supMenu.MenuID,
src/views/systemfunc/sidemenu/config.jsx
@@ -5,8 +5,8 @@
  PageParam: {Icon: 'folder'},
  children: [{
    src: '',
    PageParam: {OpenType: 'newtab', Template: 'CommonTable'},
    type: 'CommonTable',
    PageParam: {OpenType: 'newtab', Template: 'CustomPage'},
    type: 'CustomPage',
    MenuID: '1581067625930haged11ieaivpavv77k',
    MenuNo: 'sDatasM',
    MenuName: '数据字典',
src/views/systemfunc/sidemenu/index.jsx
@@ -1,5 +1,6 @@
import React, {Component} from 'react'
import { Menu } from 'antd'
import { fromJS } from 'immutable'
import { FolderOutlined } from '@ant-design/icons'
import { SySMenuList } from './config'
@@ -39,10 +40,19 @@
      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')
    })
  }