king
2021-11-08 0225695d43c773d16f4d0743ad205590eed58cec
2021-11-08
12个文件已修改
189 ■■■■ 已修改文件
src/menu/components/share/actioncomponent/actionform/index.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/options.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.scss 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/settingform/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -10,9 +10,9 @@
const { TextArea } = Input
const MkIcon = asyncComponent(() => import('@/components/mkIcon'))
const actionTypeOptions = {
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'],
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'],
  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement'],
@@ -113,6 +113,14 @@
          item.options = btnCustomClasses
        } else if (item.key === 'innerFunc' && _procMode === 'inner') {
          item.required = true
        } else if (item.key === 'linkmenu') {
          if (_opentype === 'funcbutton' && _funcType === 'scan') {
            item.required = false
            item.tooltip = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。'
          } else {
            item.tooltip = ''
            item.required = true
          }
        } else if (item.key === 'intertype') {
          let iscustom = ['pop', 'prompt', 'exec'].includes(_opentype)
          item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom'))
@@ -183,6 +191,10 @@
        _options.push('execSuccess', 'execError')
      } else if (_funcType === 'closetab') {
        _options.push('refreshTab')
      } else if (_funcType === 'scan') {
        _options.push('linkmenu')
      } else if (_funcType === 'goBack') {
        _options.push('reload')
      }
    } else if (_opentype !== 'popview' && _opentype !== 'tab') {
      if (_intertype === 'custom') {
@@ -272,6 +284,14 @@
          _fieldval.sqlType = ''
        } else if (item.key === 'pageTemplate') {
          item.initVal = ''
        } else if (item.key === 'linkmenu') {
          if (value === 'funcbutton' && this.state.funcType === 'scan') {
            item.required = false
            item.tooltip = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。'
          } else {
            item.tooltip = ''
            item.required = true
          }
        }
        return item
@@ -319,6 +339,14 @@
            } else {
              item.options = this.state.requireOptions
            }
          } else if (item.key === 'linkmenu') {
            if (value === 'scan') {
              item.required = false
              item.tooltip = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。'
            } else {
              item.tooltip = ''
              item.required = true
            }
          }
          return item
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -102,9 +102,11 @@
    if (appType === 'mob') {
      opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
      funTypes = [
        { value: 'scan', text: '扫码' },
        { value: 'logout', text: '退出' },
        { value: 'mkBinding', text: '开通扫码登录' },
        { value: 'mkUnBinding', text: '用户解绑' },
        { value: 'reAuth', text: '重新授权' },
        { value: 'reAuth', text: '切换系统' },
        { value: 'goBack', text: '返回' },
      ]
      pageTemps = [
@@ -689,6 +691,21 @@
        text: '下侧'
      }]
    },
    {
      type: 'radio',
      key: 'reload',
      label: '返回后',
      initVal: card.reload || 'false',
      tooltip: '按钮成功后返回上一页面或使用功能按钮-返回功能时,返回后是否刷新数据。注:在明科云app中(应用模式为app)有效。',
      forbid: appType !== 'mob',
      options: [{
        value: 'false',
        text: '不刷新'
      }, {
        value: 'true',
        text: '刷新'
      }]
    },
  ]
  return forms
src/mob/components/topbar/normal-navbar/options.jsx
@@ -46,6 +46,9 @@
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '隐藏'},
      ],
      controlFields: [
        {field: 'reload', values: ['true']},
      ]
    },
    {
@@ -106,6 +109,21 @@
      required: false,
      options: menulist
    },
    {
      type: 'radio',
      field: 'reload',
      label: '返回后',
      initval: wrap.reload || 'false',
      tooltip: '返回后是否刷新数据。注:在明科云app中(应用模式为app)有效。',
      required: false,
      options: [{
        value: 'false',
        label: '不刷新'
      }, {
        value: 'true',
        label: '刷新'
      }]
    },
  ]
  return topbarWrapForm
src/mob/modalconfig/index.jsx
@@ -428,8 +428,9 @@
            <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
              <div className="mob-shell-inner">
                <div className="am-navbar">
                  <Icon type="close" />
                  <Icon type="left" />
                  <div className="am-navbar-title">{config.setting.title}</div>
                  {config.setting.btnPosition === 'top' ? <Button className="modal-submit-top">{config.setting.btnName || '确定'}</Button> : null}
                </div>
                <DragElement
                  list={config.fields}
@@ -440,10 +441,10 @@
                  handleForm={this.handleForm}
                  closeForm={this.closeForm}
                />
                <div className="modal-btns">
                {config.setting.btnPosition !== 'top' ? <div className="modal-btns">
                  <Button className="modal-reset" type="default">重置</Button>
                  <Button className="modal-submit" type="primary">{config.setting.btnName || '确定'}</Button>
                </div>
                </div> : null}
              </div>
            </div>
          </div>
src/mob/modalconfig/index.scss
@@ -156,16 +156,25 @@
        position: relative;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 10px;
        .anticon-close {
        .anticon-left {
          position: absolute;
          line-height: 45px;
          font-size: 18px;
          right: 10px;
          left: 10px;
        }
        .am-navbar-title {
          font-size: 16px;
          text-align: center;
        }
        .modal-submit-top {
          position: absolute;
          top: 7px;
          right: 5px;
          color: #1890ff;
          border: none;
          box-shadow: none;
          font-size: 16px;
        }
      }
      .modal-btns {
        display: flex;
src/templates/modalconfig/settingform/index.jsx
@@ -290,6 +290,17 @@
              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col> : null}
          {appType === 'mob' ? <Col span={12}>
            <Form.Item label="按钮位置">
              {getFieldDecorator('btnPosition', {
                initialValue: config.setting.btnPosition || 'bottom'
              })(
                <Radio.Group style={{whiteSpace: 'nowrap'}}>
                  <Radio value="bottom">下侧</Radio>
                  <Radio value="top">上侧</Radio>
                </Radio.Group>)}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )
src/utils/option.js
@@ -675,24 +675,24 @@
    'up',
    'left',
    'right',
    'caret-up',
    'caret-down',
    'caret-left',
    'caret-right',
    // 'caret-up',
    // 'caret-down',
    // 'caret-left',
    // 'caret-right',
    'step-backward',
    'step-forward',
    'fast-backward',
    'fast-forward',
    // 'fast-backward',
    // 'fast-forward',
    'double-right',
    'double-left',
    'forward',
    'backward',
    // 'forward',
    // 'backward',
    'rollback',
    'enter',
    'retweet',
    'swap',
    'swap-left',
    'swap-right',
    // 'swap-left',
    // 'swap-right',
    'play-circle',
    'login',
    'logout',
@@ -771,6 +771,7 @@
    'audio',
    'bank',
    'bell',
    'scan',
    'bug',
    'calendar',
    'camera',
src/utils/utils.js
@@ -1360,7 +1360,7 @@
  })
  // 需要声明的变量集
  let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'login_city']
  let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'login_city', 'bid']
  // 主键字段
  let primaryKey = setting.primaryKey || 'id'
@@ -1482,7 +1482,7 @@
    _declarefields = ',' + _declarefields
  }
  _sql = `/* 系统生成 */
      Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields}
      Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@bid nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields}
    `
  // 表单变量赋值
src/views/appmanage/index.jsx
@@ -470,6 +470,7 @@
              cell.logo = _param.logo || ''
              cell.apptype = _param.apptype || ''
              cell.delay = _param.delay || 0
              cell.statusBarColor = _param.statusBarColor || 'black'
            }
            return cell
@@ -602,7 +603,7 @@
    sublist = sublist.filter(item => item.ID !== record.ID)
    // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}'`)
    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 || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`)
    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 || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black'})))}'`)
    param.LText = param.LText.join(' union all ')
    param.LText = Utils.formatOptions(param.LText)
    
@@ -826,7 +827,7 @@
      if (visible === 'edit') {
        // param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`)
        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 || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`)
        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 || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black'})))}'`)
        param.LText = param.LText.join(' union all ')
        param.LText = Utils.formatOptions(param.LText)
      }
@@ -912,7 +913,7 @@
      }
      // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`)
      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 || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`)
      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 || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black'})))}'`)
      param.LText = param.LText.join(' union all ')
      param.LText = Utils.formatOptions(param.LText)
src/views/appmanage/submutilform/index.jsx
@@ -265,6 +265,23 @@
              })(<InputNumber min={0} max={5000} precision={0} onPressEnter={this.handleSubmit}/>)}
            </Form.Item>
          </Col> : null}
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="在使用明科云APP时,状态栏的字体颜色。">
                <Icon type="question-circle" />
                状态栏
              </Tooltip>
            }>
              {getFieldDecorator('statusBarColor', {
                initialValue: card ? card.statusBarColor || 'black' : 'black'
              })(
                <Radio.Group>
                  <Radio value="black">黑色</Radio>
                  <Radio value="white">白色</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )
src/views/mobdesign/menuform/index.jsx
@@ -6,6 +6,7 @@
import './index.scss'
const { TextArea } = Input
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
class CustomMenuForm extends Component {
@@ -30,6 +31,10 @@
      this.props.updateConfig({...config, advertUrl: value})
    } else if (key === 'advertTime') {
      this.props.updateConfig({...config, advertTime: value})
    } else if (key === 'pullRefresh') {
      this.props.updateConfig({...config, pullRefresh: value})
    } else if (key === 'statusBarbgColor') {
      this.props.updateConfig({...config, statusBarbgColor: value})
    }
  }
@@ -189,6 +194,28 @@
              )}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label="下拉刷新">
              {getFieldDecorator('pullRefresh', {
                initialValue: config.pullRefresh || 'false'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('pullRefresh', e.target.value)}}>
                  <Radio value="false">关闭</Radio>
                  <Radio value="true">开启</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item className="status-bar" label={
              <Tooltip placement="topLeft" title="在明科云APP中,状态栏的背景色。">
                <Icon type="question-circle" />
                状态栏
              </Tooltip>
            }>
              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} />
            </Form.Item>
          </Col>
          {config.advertUrl ? <Col span={24}>
            <Form.Item label="停留(s)">
              {getFieldDecorator('advertTime', {
src/views/mobdesign/menuform/index.scss
@@ -19,4 +19,15 @@
  .mk-source-wrap .mk-source-item-info .anticon-delete {
    color: #ff4d4f;
  }
  .status-bar {
    .ant-form-item-control {
      padding-top: 7px;
      .color-sketch-block-box {
        width: calc(100% - 140px);
      }
      .color-sketch-value {
        width: 140px;
      }
    }
  }
}