king
2023-03-02 d1f19b794216b37417e114b71c1cd7a2ac3d7748
2023-03-02
25个文件已修改
200 ■■■■ 已修改文件
src/menu/components/card/balcony/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/dragtitle/card.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/dragtitle/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/dragtitle/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/index.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/options.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/options.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkInput/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkInput/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/settingform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Checkbox, message } from 'antd'
import { PlusOutlined, PlusSquareOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SettingOutlined, ToolOutlined, ClockCircleOutlined } from '@ant-design/icons'
import { PlusOutlined, PlusSquareOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SettingOutlined, ToolOutlined, ClockCircleOutlined, ColumnHeightOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -285,6 +285,7 @@
    return (
      <div className="menu-balcony-edit-box" style={_style} id={card.uuid}>
        {card.style.height ? <ColumnHeightOutlined className="fixed-height" title="定高" /> : null}
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <PlusOutlined className="plus" title="添加元素" onClick={this.addElement} />
src/menu/components/card/balcony/index.scss
@@ -47,6 +47,13 @@
    right: -30px;
    font-size: 16px;
  }
  .fixed-height {
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 10px;
    color: orange;
  }
}
.menu-balcony-edit-box::after {
  display: block;
src/menu/components/form/dragtitle/card.jsx
@@ -11,7 +11,7 @@
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const Card = ({ id, card, sort, active, moveCard, findCard, closeCard, selectCard, updateGroup }) => {
const Card = ({ id, card, sort, labelSize, active, moveCard, findCard, closeCard, selectCard, updateGroup }) => {
  const originalIndex = findCard(id).index
  const [{ isDragging }, drag] = useDrag({
    item: { type: 'form', id, originalIndex },
@@ -68,6 +68,10 @@
    updateGroup(_card)
  }
  let style = {fontSize: labelSize}
  let s = labelSize * 1.5 + 'px'
  let sortStyle = {width: s, height: s, lineHeight: s, borderRadius: s}
  return (
    <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
      <div className="mk-popover-control">
@@ -79,8 +83,8 @@
      </div>
    } trigger="hover">
      <div className={'page-card ' + (active ? 'active' : '')} onClick={select} style={{ opacity: opacity}}>
        <div ref={node => drag(drop(node))}>
          <span className="form-sort">{sort}</span>
        <div ref={node => drag(drop(node))} style={style}>
          <span className="form-sort" style={sortStyle}>{sort}</span>
          {card.setting.title}
        </div>
      </div>
src/menu/components/form/dragtitle/index.jsx
@@ -4,7 +4,7 @@
import Card from './card'
import './index.scss'
const Container = ({list, selectId, tabtype, handleList, handleGroup, closeGroup, selectGroup}) => {
const Container = ({list, labelSize, selectId, tabtype, handleList, handleGroup, closeGroup, selectGroup}) => {
  const [cards, setCards] = useState(list)
  const moveCard = (id, atIndex) => {
    const { card, index } = findCard(id)
@@ -45,6 +45,7 @@
          id={card.uuid}
          key={card.uuid}
          sort={i + 1}
          labelSize={labelSize}
          active={card.uuid === selectId}
          card={card}
          moveCard={moveCard}
src/menu/components/form/dragtitle/index.scss
@@ -2,6 +2,10 @@
  display: flex;
  line-height: 30px;
  min-height: 50px;
  font-weight: inherit;
  div {
    font-weight: inherit;
  }
  .page-card {
    position: relative;
    flex: 1;
src/menu/components/form/step-form/index.jsx
@@ -201,7 +201,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['height', 'font1', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -704,6 +704,11 @@
  render() {
    const { card, group, appType } = this.state
    let labelSize = 14
    if (card.style.fontSize) {
      labelSize = parseInt(card.style.fontSize)
    }
    return (
      <div className="menu-normal-form-edit-box" style={resetStyle(card.style)} onClick={this.clickComponent} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
@@ -725,6 +730,7 @@
        </Popover>
        <FormTitle
          list={card.subcards}
          labelSize={labelSize}
          selectId={group ? group.uuid : ''}
          handleList={this.changecards}
          handleGroup={this.changeGroup}
src/menu/components/form/step-form/index.scss
@@ -15,6 +15,7 @@
    top: 1px;
    cursor: pointer;
    padding: 5px;
    color: rgba(0, 0, 0, 0.65);
    background: rgba(255, 255, 255, 0.55);
  }
@@ -25,6 +26,7 @@
  }
  .form-area {
    position: relative;
    font-size: 14px;
    .page-card {
      background: transparent;
    }
src/menu/components/form/step-form/options.jsx
@@ -84,8 +84,22 @@
      options: [
        {value: 'show', label: '显示'},
        {value: 'hidden', label: '隐藏'},
      ]
      ],
      // controlFields: [
      //   {field: 'labelSize', values: ['show']},
      // ]
    },
    // {
    //   type: 'number',
    //   field: 'labelSize',
    //   label: '名称大小',
    //   initval: wrap.labelSize || '',
    //   tooltip: '分组名称字体大小。',
    //   min: 12,
    //   max: 50,
    //   precision: 0,
    //   required: false
    // },
    {
      type: 'radio',
      field: 'tabtype',
src/menu/components/form/tab-form/index.jsx
@@ -213,7 +213,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['height', 'font1', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -729,6 +729,11 @@
  render() {
    const { card, group, appType } = this.state
    let labelSize = 14
    if (card.style.fontSize) {
      labelSize = parseInt(card.style.fontSize)
    }
    return (
      <div className="menu-normal-form-edit-box" style={resetStyle(card.style)} onClick={this.clickComponent} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
@@ -750,6 +755,7 @@
        </Popover>
        <FormTitle
          list={card.subcards}
          labelSize={labelSize}
          tabtype={card.wrap.tabtype || ''}
          selectId={group ? group.uuid : ''}
          handleList={this.changecards}
src/menu/components/form/tab-form/index.scss
@@ -25,6 +25,7 @@
  }
  .form-area {
    position: relative;
    font-size: 14px;
    .page-card {
      background: transparent;
    }
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -437,7 +437,7 @@
      } else if (_funcType === 'closetab') {
        shows.push('refreshTab')
      } else if (_funcType === 'scan') {
        shows.push('linkmenu')
        shows.push('linkmenu', 'prefix')
        reRequired.linkmenu = false
        reTooltip.linkmenu = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。'
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -137,6 +137,7 @@
      { value: 'mkUnBinding', text: '用户解绑' },
      { value: 'mkUnsubscribe', text: '注销账户' },
      { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
      { value: 'clearCache', text: '清空本地配置' },
      { value: 'copyurl', text: '复制链接地址' },
      { value: 'logout', text: '退出' },
      { value: 'goBack', text: '返回' },
@@ -384,6 +385,14 @@
      options: isApp ? appMenus : menulist
    },
    {
      type: 'text',
      key: 'prefix',
      label: '前缀',
      initVal: card.prefix || '',
      tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。',
      required: false
    },
    {
      type: 'textarea',
      key: 'url',
      label: '页面地址',
src/mob/components/topbar/normal-navbar/options.jsx
@@ -87,6 +87,7 @@
      controlFields: [
        {field: 'reload', values: ['back']},
        {field: 'linkmenu', values: ['scan']},
        {field: 'prefix', values: ['scan']},
      ],
      span: 24
    },
@@ -179,6 +180,14 @@
      options: menulist
    },
    {
      type: 'text',
      field: 'prefix',
      label: '前缀',
      initval: wrap.prefix || '',
      tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。',
      required: false
    },
    {
      type: 'radio',
      field: 'minishow',
      label: '小程序中',
src/tabviews/custom/components/form/step-form/index.jsx
@@ -104,6 +104,16 @@
      _group = _groups || _group
    }
    config.titleStyle = {}
    config.sortStyle = {}
    if (config.style.fontSize) {
      let size = parseInt(config.style.fontSize)
      config.titleStyle = {fontSize: size}
      let s = size * 1.5 + 'px'
      config.sortStyle = {width: s, height: s, lineHeight: s, borderRadius: s}
    }
    this.setState({
      sync: _sync,
      data: _data,
@@ -390,8 +400,8 @@
        }
        {config.wrap.groupLabel !== 'hidden' ? <div className="mk-normal-form-title">
          {config.subcards.map(card => (
            <div key={card.uuid} className={'form-title' + (card.sort <= step ? ' active' : '')}>
              <span className="form-sort" style={{background: config.wrap.color}}>{card.sort}</span>
            <div key={card.uuid} style={config.titleStyle} className={'form-title' + (card.sort <= step ? ' active' : '')}>
              <span className="form-sort" style={{background: config.wrap.color, ...config.sortStyle}}>{card.sort}</span>
              <span className="before-line" style={{background: config.wrap.color}}></span>
              <span className="after-line" style={{background: config.wrap.color}}></span>
              {card.setting.title}
src/tabviews/custom/components/form/step-form/index.scss
@@ -11,10 +11,12 @@
    line-height: 30px;
    min-height: 50px;
    margin-bottom: 20px;
    font-weight: inherit;
    .form-title {
      position: relative;
      flex: 1;
      text-align: center;
      font-weight: inherit;
      .form-sort {
        background: #d8d8d8;
        display: block;
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -83,6 +83,12 @@
      return group
    })
    config.titleStyle = {}
    if (config.style.fontSize) {
      config.titleStyle = {fontSize: parseInt(config.style.fontSize)}
    }
    this.setState({
      sync: _sync,
      data: _data,
@@ -310,7 +316,7 @@
        }
        {config.wrap.groupLabel !== 'hidden' ? <div className={'mk-normal-form-title ' + config.wrap.tabtype}>
          {config.subcards.map(card => (
            <div key={card.uuid} onClick={() => this.changeGroup(card)} className={'form-title' + (group && group.uuid === card.uuid ? ' active' : '')}>
            <div key={card.uuid} onClick={() => this.changeGroup(card)} style={config.titleStyle} className={'form-title' + (group && group.uuid === card.uuid ? ' active' : '')}>
              {card.setting.title}
            </div>))
          }
src/tabviews/custom/components/form/tab-form/index.scss
@@ -12,11 +12,13 @@
    min-height: 36px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: inherit;
    .form-title {
      position: relative;
      flex: 1;
      text-align: center;
      cursor: pointer;
      font-weight: inherit;
    }
  }
  .mk-normal-form-title.mkbtn {
src/tabviews/custom/components/module/account/index.jsx
@@ -90,13 +90,13 @@
    if (!activeItem && Item) {
      this.setBook(Item)
    } else if (Item) {
      const _this = this
      const that = this
      confirm({
        title: '确定切换账套吗?',
        content: '切换账套时系统需要刷新。',
        onOk() {
          return new Promise(resolve => {
            _this.setBook(Item, resolve)
            that.setBook(Item, resolve)
          })
        },
        onCancel() {}
@@ -115,7 +115,7 @@
    let sid = localStorage.getItem('SessionUid') || ''
    let param = {
      func: 'sPC_TableData_InUpDe',
      LText: `delete  tmp_session_show_key where createuserid='${userid}' and createuser='${sid}' and key_type='fcc_years'
      LText: `delete  tmp_session_show_key where createuserid='${userid}' and key_type='fcc_years'
        insert into tmp_session_show_key ( key_id,key_type,createuserid,CreateUser,CreateStaff) 
        select '${item.id}','fcc_years','${userid}','${sid}','${sessionStorage.getItem('Full_Name') || ''}'`,
      exec_type: 'y'
src/tabviews/zshare/mutilform/index.jsx
@@ -545,6 +545,10 @@
      if (item.database === 'sso') {
        let sql = _sso + item.base_sql
        _sso = ''
        sql = sql.replace(/@ID@/ig, `'${this.state.ID || ''}'`)
        sql = sql.replace(/@BID@/ig, `'${BID}'`)
        if (debug) {
          console.info(sql)
        }
@@ -552,6 +556,10 @@
      } else {
        let sql = _sql + item.base_sql
        _sql = ''
        sql = sql.replace(/@ID@/ig, `'${this.state.ID || ''}'`)
        sql = sql.replace(/@BID@/ig, `'${BID}'`)
        if (debug) {
          console.info(sql)
        }
@@ -565,9 +573,7 @@
      LText: localItems.join(' union all '),
      obj_name: '',
      arr_field: '',
      table_type: 'Y',
      BID: BID || '',
      ID: this.state.ID || ''
      table_type: 'Y'
    }
    if (param.LText) {
@@ -601,9 +607,7 @@
      LText: mainItems.join(' union all '),
      obj_name: '',
      arr_field: '',
      table_type: 'Y',
      BID: BID || '',
      ID: this.state.ID || ''
      table_type: 'Y'
    }
    if (mainparam.LText) {
@@ -663,11 +667,12 @@
        func: 'sPC_Get_SelectedList',
        LText: _sql + form.base_sql,
        obj_name: form.field,
        arr_field: form.arr_field,
        BID: this.props.BID || '',
        ID: this.state.ID || ''
        arr_field: form.arr_field
      }
      param.LText = param.LText.replace(/@ID@/ig, `'${this.state.ID || ''}'`)
      param.LText = param.LText.replace(/@BID@/ig, `'${this.props.BID || ''}'`)
      if (debug) {
        console.info(param.LText)
      }
src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -131,6 +131,10 @@
    const { config } = this.props
    const { value } = this.state
    if (config.inputType === 'password') {
      return <Input.Password ref={this.inputRef} className="mk-form-input" placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit}/>
    }
    return <Input ref={this.inputRef} className="mk-form-input" allowClear placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} />
  }
}
src/tabviews/zshare/mutilform/mkInput/index.scss
@@ -1,4 +1,4 @@
.mk-form-input {
.mk-form-input:not(.ant-input-password) {
  .ant-input-suffix {
    opacity: 0;
    transition: opacity 0.3s;
src/templates/modalconfig/settingform/index.jsx
@@ -142,6 +142,18 @@
              })(<InputNumber min={10} max={2000} precision={0} onPressEnter={this.handleSubmit}/>)}
            </Form.Item>
          </Col> : null}
          {display === 'dialog' && appType === 'mob' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="小于100时为百分率,大于100时为绝对值。空值时宽度自适应。">
                <QuestionCircleOutlined className="mk-form-tip" />
                宽度
              </Tooltip>
            }>
              {getFieldDecorator('width', {
                initialValue: config.setting.width || ''
              })(<InputNumber min={10} max={2000} precision={0} onPressEnter={this.handleSubmit}/>)}
            </Form.Item>
          </Col> : null}
          {['dialog', 'drawer', 'modal'].includes(display) ? <Col span={12}>
            <Form.Item label="初始焦点">
              {getFieldDecorator('focus', {
src/templates/zshare/formconfig.jsx
@@ -3386,6 +3386,20 @@
    },
    {
      type: 'radio',
      key: 'inputType',
      label: '加密显示',
      initVal: card.inputType || 'text',
      required: false,
      options: [{
        value: 'text',
        text: '否'
      }, {
        value: 'password',
        text: '是'
      }]
    },
    {
      type: 'radio',
      key: 'interception',
      label: '截取空格',
      initVal: card.interception || 'true',
src/templates/zshare/modalform/index.jsx
@@ -19,7 +19,7 @@
const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
const modalTypeOptions = {
  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl'],
  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl', 'inputType'],
  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom'],
  select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'empty'],
  checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom', 'empty'],
src/utils/utils.js
@@ -206,6 +206,35 @@
    return value
  }
  // /**
  //  * @description sql解密
  //  * @return {String}   value
  //  */
  // static unFormatOptions (value) {
  //   if (!value) return ''
  //   value = window.atob(value)
  //   value = value.replace('minKe', '')
  //   value = window.decodeURIComponent(window.atob(value))
  //   // 外联数据库替换
  //   if (window.GLOB.externalDatabase !== null && window.GLOB.externalDatabase) {
  //     value = value.replace(window.GLOB.externalDatabase, '@db@')
  //   }
  //   value = value.replace(/ mpercent /ig, '%')
  //   // 替换关键字
  //   formatKeys.forEach(item => {
  //     let reg = new RegExp('(\\s)?' + item.value.replace(/\s/g, '') + '(\\s)?', 'ig')
  //     value = value.replace(reg, ' ' + item.key + ' ')
  //   })
  //   // value = value.replace(/\n/ig, ' \n ')
  //   return value
  // }
  /**
   * @description sPC_TableData_InUpDe sql加密
   * @return {String}  value