king
2021-09-14 051eb785a36ec3b6cd3b4305fdb65f6940415e9b
2021-09-14
13个文件已修改
169 ■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/loginform.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/options.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/tabbutton/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.jsx 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -101,10 +101,17 @@
        if (cell.hidden) return
        if (supItem.hidden || !item.values.includes(supItem.initval)) {
        if (supItem.hidden) {
          cell.hidden = true
          fieldMap.set(item.field, cell)
        } else if (supItem.type === 'checkbox') {
          let vals = [...supItem.initval, ...item.values]
          if (vals.length === new Set(vals).size) {
            cell.hidden = true
        }
        } else if (!item.values.includes(supItem.initval)) {
          cell.hidden = true
        }
        fieldMap.set(item.field, cell)
        fields.push(item)
      })
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -339,7 +339,7 @@
          _fieldval.Ot = 'requiredSgl'
        } else if (value === 'audit') {
          _fieldval.label = '审核'
          _fieldval.class = 'purple'
          _fieldval.class = 'primary'
          _fieldval.Ot = 'requiredSgl'
        } else if (value === 'LogicDelete' || value === 'delete') {
          _fieldval.label = '删除'
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -78,6 +78,7 @@
        { value: 'mkBinding', text: '开通扫码登录' },
        { value: 'mkUnBinding', text: '用户解绑' },
        { value: 'reAuth', text: '重新授权' },
        { value: 'goBack', text: '返回' },
      ]
      pageTemps = [
        { value: 'linkpage', text: '关联菜单' },
src/pc/components/login/normal-login/index.jsx
@@ -44,10 +44,10 @@
        width: card.width || 24,
        name: card.name,
        subtype: card.subtype,
        wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'] },
        wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'], shortcut: 'remember' },
        style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw'},
        loginWays: [
          {type: 'uname_pwd', label: '账号密码登录', remember: 'true'},
          {type: 'uname_pwd', label: '账号密码登录', shortcut: 'remember'},
          {type: 'sms_vcode', label: '短信验证码'},
          {type: 'app_scan', label: '扫码登录'},
        ]
@@ -149,7 +149,15 @@
  }
  updateWrap = (res) => {
    this.updateComponent({...this.state.card, wrap: res})
    let card = fromJS(this.state.card).toJS()
    card.wrap = res
    if (res.shortcut) {
      card.loginWays[0].shortcut = res.shortcut
    }
    this.updateComponent(card)
  }
  render() {
src/pc/components/login/normal-login/index.scss
@@ -119,6 +119,11 @@
      }
    }
  }
  .no-short.form-item-wrap {
    .btn-login {
      margin-top: 45px;
    }
  }
}
.login-edit-box::after {
  display: block;
src/pc/components/login/normal-login/loginform.jsx
@@ -39,11 +39,11 @@
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { loginWays, wrap } = this.props
    const { wrap } = this.props
    if (!is(fromJS(wrap), fromJS(nextProps.wrap))) {
      let _loginWays = []
      loginWays.forEach(item => {
      nextProps.loginWays.forEach(item => {
        if (!nextProps.wrap.loginWays || nextProps.wrap.loginWays.includes(item.type)) {
          _loginWays.push(item)
        }
@@ -90,7 +90,7 @@
            <div className={'login-way' + (activeWay.type === item.type ? ' active' : '')} onClick={() => this.onChangeTab(item)} key={item.type}>{item.label}</div>
          ))}
        </div>
        {activeWay.type === 'uname_pwd' ? <div className="form-item-wrap">
        {activeWay.type === 'uname_pwd' ? <div className={'form-item-wrap ' + (activeWay.shortcut === 'none' ? 'no-short' : '')}>
          <Form.Item>
            <Input
              prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
@@ -101,9 +101,12 @@
          <Form.Item>
            <Input.Password placeholder="密码" prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />
          </Form.Item>
          <Form.Item className="minline">
          {!activeWay.shortcut || activeWay.shortcut === 'remember' ? <Form.Item className="minline">
            <Checkbox>记住密码</Checkbox>
          </Form.Item>
          </Form.Item> : null}
          {activeWay.shortcut === 'autologon' ? <Form.Item className="minline">
            <Checkbox>自动登录</Checkbox>
          </Form.Item> : null}
          <Form.Item className="btn-login">
            <Button type="primary" onDoubleClick={() => this.changeMenu()} className="login-form-button">
              登录
src/pc/components/login/normal-login/options.jsx
@@ -52,7 +52,8 @@
        { label: '扫码', value: 'app_scan', disabled: appType === 'mob' },
      ],
      controlFields: [
        {field: 'tempId', values: ['sms_vcode']}
        {field: 'tempId', values: ['sms_vcode']},
        {field: 'shortcut', values: ['uname_pwd']},
      ]
    },
    {
@@ -116,7 +117,20 @@
      tooltip: '短信模板可在管理系统 HS-奇云短信模板 处添加。',
      required: true,
      options: msgTemps
    }
    },
    {
      type: 'radio',
      field: 'shortcut',
      label: '快捷方式',
      initval: wrap.shortcut || 'remember',
      tooltip: '账号密码登录时的快捷方式。',
      required: false,
      options: [
        {value: 'none', label: '无'},
        {value: 'remember', label: '记住密码'},
        {value: 'autologon', label: '自动登录'},
      ]
    },
  ]
  return wrapForm
src/pc/components/navbar/normal-navbar/index.jsx
@@ -41,7 +41,7 @@
        dataName: card.dataName || '',
        name: card.name,
        subtype: card.subtype,
        wrap: { name: card.name, width: card.width || 1200 },
        wrap: { name: card.name, width: card.width || 1200, height: 50 },
        logoStyle: { width: '100px' },
        style: { },
        links: [],
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -116,7 +116,8 @@
          primaryId: primaryId
        }
      }
    } else if (btn.tabTemplate === 'ThdMenu') {
    // } else if (btn.tabTemplate === 'ThdMenu') {
    } else {
      let menu = null
      if (btn.linkmenu && btn.linkmenu.length > 0) {
src/utils/option.js
@@ -777,6 +777,8 @@
    'credit-card',
    'customer-service',
    'dashboard',
    'ellipsis',
    'more',
    'database',
    'dislike',
    'environment',
src/views/mobdesign/menuform/index.jsx
@@ -2,7 +2,10 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Icon, Tooltip, InputNumber } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
class CustomMenuForm extends Component {
  static propTpyes = {
@@ -22,6 +25,10 @@
      this.props.updateConfig({...config, cacheUseful: value})
    } else if (key === 'timeUnit') {
      this.props.updateConfig({...config, timeUnit: value})
    } else if (key === 'advertUrl') {
      this.props.updateConfig({...config, advertUrl: value})
    } else if (key === 'advertTime') {
      this.props.updateConfig({...config, advertTime: value})
    }
  }
@@ -146,6 +153,35 @@
              )}
            </Form.Item>
          </Col> : null}
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="在明科云APP中有效。">
                <Icon type="question-circle" />
                广告页
              </Tooltip>
            }>
              {getFieldDecorator('advertUrl', {
                initialValue: config.advertUrl || ''
              })(
                <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('advertUrl', val)}}/>
              )}
            </Form.Item>
          </Col>
          {config.advertUrl ? <Col span={24}>
            <Form.Item label="停留(s)">
              {getFieldDecorator('advertTime', {
                initialValue: config.advertTime || 3,
                rules: [
                  {
                    required: true,
                    message: dict['mob.required.input'] + '停留时间!'
                  }
                ]
              })(
                <InputNumber min={1} max={10} precision={0} onChange={(val) => {this.selectChange('advertTime', val)}}/>
              )}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )
src/views/mobdesign/menuform/index.scss
@@ -13,4 +13,7 @@
      font-size: 12px;
    }
  }
  .ant-radio-group {
    white-space: nowrap;
  }
}
src/views/rolemanage/index.jsx
@@ -48,7 +48,8 @@
    targetKeys: [],
    trees: null,
    expandedKeys: [],
    searchkey: ''
    searchkey: '',
    appViewList: []
  }
  oriTrees = null
@@ -59,6 +60,7 @@
    this.setState({app: param}, () => {
      this.getTreeList()
      this.getMenuList()
      this.getAppViewList()
    })
  }
@@ -69,6 +71,25 @@
    this.setState = () => {
      return
    }
  }
  getAppViewList = () => {
    const { app } = this.state
    Api.getSystemConfig({
      func: 's_get_keyids',
      bid: app.ID
    }).then(result => {
      if (!result.status) {
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
        return
      }
      this.setState({appViewList: result.data || []})
    })
  }
  getMenuList = (reset) => {
@@ -318,7 +339,7 @@
  }
  deleteMenu = (record) => {
    const { app } = this.state
    const { app, appViewList } = this.state
    const _this = this
    let param = {
@@ -333,6 +354,26 @@
      param.MenuID = param.MenuID + ',' + record.nodes.popviews.join(',')
    }
    let _param = {
      func: 's_kei_link_keyids_addupt',
      BID: app.ID,
      exec_type: 'y',
      LText: ''
    }
    let _appViewList = appViewList.filter(item => item.keys_id !== record.MenuID)
    if (appViewList.length !== _appViewList.length) {
      _param.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
      _param.LText = _param.LText.join(' union all ')
      _param.LText = Utils.formatOptions(_param.LText)
      _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      _param.secretkey = Utils.encrypt('', _param.timestamp)
    } else {
      _param = null
    }
    confirm({
      content: '确定删除该菜单吗?',
      onOk() {
@@ -345,6 +386,20 @@
                duration: 3
              })
              _this.getMenuList(true)
              if (_param) {
                Api.getCloudConfig(_param).then(res => {
                  if (!res.status) {
                    notification.warning({
                      top: 92,
                      message: res.message,
                      duration: 5
                    })
                  } else {
                    _this.setState({appViewList: _appViewList})
                  }
                })
              }
            } else {
              notification.warning({
                top: 92,