king
2021-09-10 c66c7b65432af8cdab430b7ac079a4fd75c3d60f
2021-09-10
20个文件已修改
257 ■■■■ 已修改文件
src/menu/components/card/table-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/sourcecomponent/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/sourcecomponent/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/popview/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/navbar/normal-navbar/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.jsx 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/menuform/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx
@@ -456,7 +456,7 @@
    return (
      <div className="menu-table-card-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <Icon className="plus" title="添加卡片" onClick={() => this.addCard()} type="plus" />
src/menu/components/card/table-card/index.scss
@@ -5,7 +5,7 @@
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100px;
  min-height: 50px;
  
  .table-header {
    position: relative;
src/menu/components/share/sourcecomponent/index.jsx
@@ -68,8 +68,8 @@
          <Radio.Button value="upload" size="small" onClick={() => this.handleChange('upload')}>上传</Radio.Button>
          <Radio.Button value="system" size="small" onClick={() => this.handleChange('system')}>系统</Radio.Button>
        </Radio.Group> : null}
        {url ? <div className="mk-source-item-info">
          <Icon type="paper-clip" />
        {url ? <div className={'mk-source-item-info' + (type !== 'video' ? ' picture' : '')}>
          {type === 'video' ? <Icon type="paper-clip" /> : <img src={url} alt="" />}
          <a target="_blank" rel="noopener noreferrer" href={url}>{name}</a>
          <Icon title="删除文件" type="delete" onClick={this.deleteUrl}/>
        </div> : null}
src/menu/components/share/sourcecomponent/index.scss
@@ -28,6 +28,20 @@
      text-overflow: ellipsis;
    }
  }
  .mk-source-item-info.picture {
    display: flex;
    img {
      width: 32px;
      height: 32px;
    }
    img + a {
      height: 32px;
      line-height: 32px;
    }
    .anticon-delete {
      top: 8px;
    }
  }
  .mk-source-item-info:hover {
    background-color: #e6f7ff;
    .anticon-delete {
src/menu/pastecontroller/index.jsx
@@ -68,10 +68,10 @@
  }
  pasteSubmit = () => {
    let options = ['tabs', 'menubar', 'datacard', 'propcard', 'mainsearch', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
    let options = ['tabs', 'menubar', 'topbar', 'datacard', 'propcard', 'mainsearch', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
    this.pasteFormRef.handleConfirm().then(res => {
      if (res.copyType === 'menubar' && sessionStorage.getItem('appType') !== 'mob') {
      if ((res.copyType === 'menubar' || res.copyType === 'topbar') && sessionStorage.getItem('appType') !== 'mob') {
        notification.warning({
          top: 92,
          message: '当前系统不支持菜单组件!',
@@ -102,12 +102,6 @@
      }
      this.setState({visible: false})
      notification.success({
        top: 92,
        message: '粘贴成功!',
        duration: 2
      })
    })
  }
src/menu/popview/index.jsx
@@ -553,6 +553,12 @@
    this.setState({config})
    window.GLOB.customMenu = config
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  refreshConfig = () => {
src/mob/components/navbar/normal-navbar/index.jsx
@@ -40,7 +40,6 @@
        pageable: false,    // 组件属性 - 是否可分页
        switchable: false,  // 组件属性 - 数据是否可切换
        dataName: card.dataName || '',
        width: card.width || 24,
        name: card.name,
        subtype: card.subtype,
        setting: { interType: 'system' },
@@ -96,7 +95,6 @@
      card: component
    })
    component.width = component.wrap.width
    component.name = component.wrap.name
    this.props.updateConfig(component)
src/mob/components/topbar/normal-navbar/index.jsx
@@ -12,6 +12,7 @@
import './index.scss'
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
class NormalNavbar extends Component {
  static propTpyes = {
@@ -200,6 +201,7 @@
            <NormalForm title="导航栏设置" width={750} update={this.updateWrap} getForms={this.getWrapForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="topbar" card={card}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
          </div>
src/pc/components/navbar/normal-navbar/index.jsx
@@ -39,7 +39,6 @@
        type: card.type,
        floor: card.floor,
        dataName: card.dataName || '',
        width: card.width || 24,
        name: card.name,
        subtype: card.subtype,
        wrap: { name: card.name, width: card.width || 1200 },
@@ -94,7 +93,6 @@
      card: component
    })
    component.width = component.wrap.width
    component.name = component.wrap.name
    this.props.updateConfig(component)
src/tabviews/custom/index.jsx
@@ -132,7 +132,8 @@
      // 权限过滤
      let roleId = sessionStorage.getItem('role_id') || '' // 角色ID
      let balMap = new Map()
      config.components = this.filterComponent(config.components, roleId, permAction, permMenus, balMap)
      let skip = config.permission === 'false' || this.props.menuType === 'HS'
      config.components = this.filterComponent(config.components, roleId, permAction, permMenus, balMap, skip)
      
      // 获取主搜索条件
      let mainSearch = []
@@ -445,7 +446,7 @@
    })
  }
  filterComponent = (components, roleId, permAction, permMenus, balMap) => {
  filterComponent = (components, roleId, permAction, permMenus, balMap, skip) => {
    return components.filter(item => {
      
      if (item.style && item.style.boxShadow) {
@@ -476,7 +477,7 @@
        })
        item.subtabs = item.subtabs.map(tab => {
          tab.components = this.filterComponent(tab.components, roleId, permAction, permMenus, balMap)
          tab.components = this.filterComponent(tab.components, roleId, permAction, permMenus, balMap, skip)
          return tab
        })
@@ -499,7 +500,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, permMenus, balMap)
        item.components = this.filterComponent(item.components, roleId, permAction, permMenus, balMap, skip)
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter'].includes(item.type)) {
        if (
          item.plot.blacklist && item.plot.blacklist.length > 0 &&
@@ -562,7 +563,6 @@
      }
      // 权限过滤
      let isHS = this.props.menuType === 'HS'
      let tabId = this.props.Tab ? this.props.Tab.uuid : '' // 弹窗标签按钮Id
      if (item.action && item.action.length > 0) {
        item.action = item.action.filter(cell => {
@@ -584,7 +584,7 @@
            cell.style = {...cell.style, ...cell.btnstyle}
          }
          return isHS || permAction[cell.uuid]
          return skip || permAction[cell.uuid]
        })
      }
@@ -622,7 +622,7 @@
              cell.innerHeight = 'auto'
            }
            return cell.eleType !== 'button' || isHS || permAction[cell.uuid]
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })
          card.backElements = card.backElements.filter(cell => {
            if (cell.eleType === 'button') {
@@ -646,7 +646,7 @@
            } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
              cell.innerHeight = 'auto'
            }
            return cell.eleType !== 'button' || isHS || permAction[cell.uuid]
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })
        })
      } else if (item.type === 'balcony') {
@@ -672,7 +672,7 @@
            cell.innerHeight = 'auto'
          }
          return cell.eleType !== 'button' || isHS || permAction[cell.uuid]
          return cell.eleType !== 'button' || skip || permAction[cell.uuid]
        })
      } else if ((item.type === 'table' && item.subtype === 'tablecard') || item.type === 'carousel') {
        item.subcards && item.subcards.forEach(card => {
@@ -700,7 +700,7 @@
            } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
              cell.innerHeight = 'auto'
            }
            return cell.eleType !== 'button' || isHS || permAction[cell.uuid]
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })
        })
      } else if (item.type === 'table' && item.subtype === 'normaltable') {
@@ -726,7 +726,7 @@
              cell.style = {...cell.style, ...cell.btnstyle}
            }
            return isHS || permAction[cell.uuid]
            return skip || permAction[cell.uuid]
          })
          return col.elements.length !== 0
        })
src/utils/utils-custom.js
@@ -667,6 +667,8 @@
      })
    }
    if (item.type === 'topbar') {
      item.wrap.name = ''
      item.name = ''
      if (item.search && item.search.fields) {
        item.search.fields = item.search.fields.map(cell => {
          cell.uuid = this.getuuid()
src/views/appmanage/submutilform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Select, Radio, Input, Tooltip, Icon, notification, InputNumber } from 'antd'
import { Form, Row, Col, Select, Radio, Input, Tooltip, Icon, notification, InputNumber, Checkbox } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -50,6 +50,10 @@
        }
      })
    })
  }
  onChange = (vals) => {
    this.setState({user_binding: vals})
  }
  /**
@@ -118,7 +122,7 @@
          <Col span={12}>
            <Form.Item label="权限管理">
              {getFieldDecorator('role_type', {
                initialValue: card ? card.role_type || 'true' : 'true'
                initialValue: card ? card.role_type || 'false' : 'false'
              })(
                <Radio.Group>
                  <Radio value="true">启用</Radio>
@@ -127,41 +131,6 @@
              )}
            </Form.Item>
          </Col>
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用微信授权登录时,是否需要绑定用户。">
                <Icon type="question-circle" />
                用户绑定
              </Tooltip>
            }>
              {getFieldDecorator('user_binding', {
                initialValue: user_binding
              })(
                <Select mode="multiple">
                  <Select.Option value="uname_pwd">用户名</Select.Option>
                  <Select.Option value="sms_vcode">手机号</Select.Option>
                </Select>
              )}
            </Form.Item>
          </Col> : null}
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="短信模板可在管理系统 HS-奇云短信模板 处添加。">
                <Icon type="question-circle" />
                短信模板
              </Tooltip>
            }>
              {getFieldDecorator('sms_id', {
                initialValue: card ? card.sms_id || '' : ''
              })(
                <Select allowClear>
                  {msgs.map(option =>
                    <Select.Option key={option.ID} value={option.ID}>{option.SignName + ' - ' + option.TemplateCode}</Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="皮肤">
              {getFieldDecorator('css', {
@@ -186,6 +155,45 @@
              )}
            </Form.Item>
          </Col>
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用公众号授权登录时,是否需要绑定用户。">
                <Icon type="question-circle" />
                用户绑定
              </Tooltip>
            }>
              {getFieldDecorator('user_binding', {
                initialValue: user_binding
              })(
                <Checkbox.Group onChange={this.onChange}>
                  <Checkbox value="uname_pwd">账号</Checkbox>
                  <Checkbox value="sms_vcode">手机短信</Checkbox>
                </Checkbox.Group>
              )}
            </Form.Item>
          </Col> : null}
          {typename !== 'pc' && user_binding.includes('sms_vcode') ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="短信模板可在管理系统 HS-奇云短信模板 处添加。">
                <Icon type="question-circle" />
                短信模板
              </Tooltip>
            }>
              {getFieldDecorator('sms_id', {
                initialValue: card ? card.sms_id || '' : '',
                rules: [{
                  required: true,
                  message: '使用手机短信时请选择短信模板!'
                }]
              })(
                <Select allowClear>
                  {msgs.map(option =>
                    <Select.Option key={option.ID} value={option.ID}>{option.SignName + ' - ' + option.TemplateCode}</Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="标题">
              {getFieldDecorator('title', {
@@ -202,7 +210,7 @@
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
          {typename !== 'pc' && user_binding.length > 0 ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用微信授权登录时,绑定用户页面的版权声明,注:可添加html标签。">
                <Icon type="question-circle" />
@@ -213,16 +221,21 @@
                initialValue: card ? card.copyright || '' : ''
              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="LOGO">
          </Col> : null}
          {typename !== 'pc' && user_binding.length > 0 ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用微信授权登录时,绑定用户页面的LOGO。">
                <Icon type="question-circle" />
                LOGO
              </Tooltip>
            }>
              {getFieldDecorator('logo', {
                initialValue: card ? card.logo : ''
              })(
                <SourceComponent type="picture" placement="right"/>
              )}
            </Form.Item>
          </Col>
          </Col> : null}
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="在使用明科云APP时,页面的切换模式">
@@ -244,7 +257,7 @@
            <Form.Item label={
              <Tooltip placement="topLeft" title="在使用明科云APP时,且在app模式中无效">
                <Icon type="question-circle" />
                延迟加载
                延迟加载(ms)
              </Tooltip>
            }>
              {getFieldDecorator('delay', {
src/views/appmanage/submutilform/index.scss
@@ -16,4 +16,10 @@
  .ant-input-number {
    width: 100%;
  }
  .ant-form-item-control {
    height: 40px;
  }
  .ant-form-item-with-help {
    margin-bottom: 24px;
  }
}
src/views/menudesign/index.jsx
@@ -918,6 +918,12 @@
    this.setState({config})
    window.GLOB.customMenu = config
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  render () {
src/views/menudesign/menuform/index.jsx
@@ -283,6 +283,23 @@
              )}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="跳过权限验证时,页面中组件及按钮不在进行权限控制。">
                <Icon type="question-circle" />
                权限验证
              </Tooltip>
            }>
              {getFieldDecorator('permission', {
                initialValue: config.permission || 'true'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('permission', e.target.value)}}>
                  <Radio value="true">使用</Radio>
                  <Radio value="false">不使用</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="单位">
              {getFieldDecorator('timeUnit', {
src/views/mobdesign/index.jsx
@@ -942,7 +942,7 @@
                Typename: sessionStorage.getItem('typename'),
                MenuName: item.name || '',
                PageParam: JSON.stringify({Template: item.type}),
                open_edition: item.open_edition || '',
                open_edition: _item.open_edition || '',
                menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roles))),
                LText: '',
                LTexttb: ''
@@ -1181,10 +1181,25 @@
  insert = (item) => {
    let config = fromJS(this.state.config).toJS()
    if (item.type === 'topbar' && config.components.findIndex(m => m.type === 'topbar') > -1) {
      notification.warning({
        top: 92,
        message: '导航栏不可重复添加!',
        duration: 5
      })
      return
    }
    config.components.push(item)
    this.setState({config})
    window.GLOB.customMenu = config
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  refreshView = () => {
src/views/mobdesign/menuform/index.jsx
@@ -102,6 +102,23 @@
              )}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="跳过权限验证时,页面中组件及按钮不在进行权限控制。">
                <Icon type="question-circle" />
                权限验证
              </Tooltip>
            }>
              {getFieldDecorator('permission', {
                initialValue: config.permission || 'true'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('permission', e.target.value)}}>
                  <Radio value="true">使用</Radio>
                  <Radio value="false">不使用</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="单位">
              {getFieldDecorator('timeUnit', {
src/views/pcdesign/index.jsx
@@ -1459,6 +1459,12 @@
    this.setState({config})
    window.GLOB.customMenu = config
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  refreshView = () => {
src/views/pcdesign/menuform/index.jsx
@@ -102,6 +102,23 @@
              )}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="跳过权限验证时,页面中组件及按钮不在进行权限控制。">
                <Icon type="question-circle" />
                权限验证
              </Tooltip>
            }>
              {getFieldDecorator('permission', {
                initialValue: config.permission || 'true'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('permission', e.target.value)}}>
                  <Radio value="true">使用</Radio>
                  <Radio value="false">不使用</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {config.cacheUseful === 'true' ? <Col span={24}>
            <Form.Item label="单位">
              {getFieldDecorator('timeUnit', {
src/views/rolemanage/index.jsx
@@ -791,8 +791,8 @@
            </div>
            <div className="right-view">
              <div className="app-action">
                <Button className="mk-primary" onClick={this.initTree}>初始化</Button>
                <Button className="mk-purple" onClick={this.syncTree}>同步</Button>
                <Button className="mk-primary" onClick={this.initTree}>同步</Button>
                {/* <Button className="mk-purple" onClick={this.syncTree}>同步</Button> */}
                <Button className="mk-green save" onClick={this.saveTree}>保存</Button>
              </div>
              {trees && trees.length ? <Tree