king
2021-08-11 a757b75163d77acc5111637fbe20ec61d895a72b
2021-08-11
15个文件已修改
1个文件已添加
4个文件已删除
516 ■■■■ 已修改文件
src/api/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/qrcode/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/tabs/antv-tabs/index.jsx 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/tabs/antv-tabs/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/index.scss 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/options.jsx 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/wrapsetting/index.jsx 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/wrapsetting/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.jsx 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/index.scss 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/loginform.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/wrapsetting/settingform/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/rolemanage/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/rolemanage/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -459,7 +459,7 @@
      appkey: window.GLOB.appkey
    }
    let url = window.GLOB.mainSystemApi
    let url = window.GLOB.mainSystemApi || '/webapi/dostars'
    param = this.encryptParam(param)
    return axios({
src/components/qrcode/index.jsx
@@ -28,6 +28,7 @@
  render() {
    const { value, card } = this.props
    let color = card.color
    let size = card.qrWidth || 50
    
    if (/rgb/ig.test(color)) {
      color = this.hexify(color)
@@ -37,12 +38,12 @@
      <div className="qrcode-box">
        <QrCode
          value={value}
          size={card.qrWidth || 50}
          size={size}
          fgColor={color}
          imageSettings={card.url ? {
            src: card.url,
            height: (card.qrWidth || 50) / 4,
            width: (card.qrWidth || 50) / 4,
            height: size / 5,
            width: size / 5,
            excavate: true
          } : null}/>
      </div>
src/menu/components/card/cardcellcomponent/index.jsx
@@ -161,6 +161,12 @@
    if (comIds.length !== 3 || comIds[0] !== cards.uuid || comIds[1] !== cardCell.uuid || !card) return
    if (card.eleType === 'button') {
      if ((style.paddingLeft || style.paddingRight) && !style.width) {
        style.width = 'auto'
      }
    }
    let _card = this.resetCardStyle(card, style)
    let _elements = elements.map(cell => {
src/mob/components/tabs/antv-tabs/index.jsx
@@ -138,18 +138,34 @@
    MKEmitter.emit('changeStyle', [tabs.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], tabs.style)
  }
  changeTabStyle = () => {
    const { tabs } = this.state
    MKEmitter.emit('changeStyle', [tabs.uuid, 'tab'], ['font', 'padding'], tabs.tabStyle || {})
  }
  getStyle = (comIds, style) => {
    const { tabs } = this.state
    if (comIds.length !== 1 || comIds[0] !== tabs.uuid) return
    if (comIds[0] !== tabs.uuid) return
    let _card = {...tabs, style}
    if (comIds.length === 1) {
      let _card = {...tabs, style}
    this.setState({
      tabs: _card
    })
    this.props.updateConfig(_card)
      this.setState({
        tabs: _card
      })
      this.props.updateConfig(_card)
    } else if (comIds[1] === 'tab') {
      let _card = {...tabs, tabStyle: style}
      this.setState({
        tabs: _card
      })
      this.props.updateConfig(_card)
    }
  }
  handleTabsChange = (parentId) => {
@@ -353,6 +369,7 @@
  render() {
    const { tabs, dict, labelvisible, editab, appType } = this.state
    let _style = resetStyle(tabs.style)
    let _tabStyle = resetStyle(tabs.tabStyle)
    return (
      <div className={'mob-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}>
@@ -363,10 +380,11 @@
                <div className="mk-popover-control">
                  <Icon className="edit" title="edit" type="edit" onClick={() => this.editTab(tab)} />
                  <PasteController type="tab" Tab={tab} insert={this.insert} />
                  <Icon className="style" title="调整样式" onClick={this.changeTabStyle} type="font-colors" />
                  <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} />
                </div>
              } trigger="hover">
                <span>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>
                <span style={_tabStyle}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>
              </Popover>
            } key={tab.uuid}>
              {appType === 'mob' && tabs.setting.position === 'top' && tabs.setting.display === 'inline-block' && tab.hasSearch === 'icon' ?
src/mob/components/tabs/antv-tabs/index.scss
@@ -61,6 +61,11 @@
      padding: 12px 16px;
    }
  }
  .ant-tabs-tab.ant-tabs-tab-active {
    > span {
      color: #1890ff!important;
    }
  }
  .ant-tabs-bottom .ant-tabs-bottom-bar .ant-tabs-ink-bar {
    top: 0px;
  }
src/mob/components/topbar/normal-navbar/index.jsx
@@ -2,15 +2,16 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Popover } from 'antd'
import { ExpandOutlined, ReloadOutlined } from '@ant-design/icons'
import asyncIconComponent from '@/utils/asyncIconComponent'
import getWrapForm from './options'
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import './index.scss'
const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
class NormalNavbar extends Component {
  static propTpyes = {
@@ -155,14 +156,37 @@
    MKEmitter.emit('changeSearch', card)
  }
  getWrapForms = () => {
    const { wrap } = this.state.card
    return getWrapForm(wrap)
  }
  updateWrap = (res) => {
    this.updateComponent({...this.state.card, wrap: res})
  }
  render() {
    const { card } = this.state
    let right = null
    if (card.wrap.logout === 'true') {
      right = <Icon type="logout" />
    }
    if (card.wrap.scan === 'true') {
      right = !right ? <ExpandOutlined /> : <Icon type="ellipsis" />
    }
    if (card.wrap.refresh === 'true') {
      right = !right ? <ReloadOutlined /> : <Icon type="ellipsis" />
    }
    return (
      <div className="normal-topbar-edit-box" style={card.style} onClick={this.clickComponent} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <NormalForm title="导航栏设置" width={750} update={this.updateWrap} getForms={this.getWrapForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
          </div>
@@ -179,7 +203,7 @@
          }
          <div className="am-navbar-right">
            {card.wrap.search === 'true' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null}
            {card.wrap.logout === 'true' ? <Icon type="ellipsis" /> : null}
            {right}
          </div>
        </div>
      </div>
src/mob/components/topbar/normal-navbar/index.scss
@@ -28,11 +28,14 @@
    font-style: inherit;
    font-weight: inherit;
    .am-navbar-left {
      width: 30px;
      min-width: 10px;
      text-align: left;
      color: #1890ff;
      font-size: 20px;
      line-height: 50px;
      .anticon-left {
        margin: 0 8px 0 5px;
      }
    }
    .am-navbar-title {
      text-align: center;
@@ -61,7 +64,7 @@
    .am-navbar-right {
      text-align: right;
      color: #1890ff;
      min-width: 30px;
      min-width: 10px;
      font-size: 20px;
      line-height: 50px;
      .anticon-search {
@@ -69,6 +72,9 @@
        padding: 5px;
        cursor: pointer;
      }
      >.anticon:not(.anticon-search) {
        margin: 0px 5px;
      }
    }
  }
}
src/mob/components/topbar/normal-navbar/options.jsx
New file
@@ -0,0 +1,112 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  let menulist = sessionStorage.getItem('appMenus')
  if (menulist) {
    try {
      menulist = JSON.parse(menulist)
    } catch {
      menulist = []
    }
  } else {
    menulist = []
  }
  const topbarWrapForm = [
    {
      type: 'radio',
      field: 'type',
      label: '类型',
      initval: wrap.type || 'navbar',
      required: false,
      options: [
        {value: 'navbar', label: '导航栏'},
        {value: 'search', label: '搜索栏'},
      ],
      controlFields: [
        {field: 'search', values: ['navbar']},
      ]
    },
    {
      type: 'text',
      field: 'title',
      label: '标题',
      initval: wrap.title || '',
      tooltip: '使用搜索栏时,标题用于搜索条件隐藏时显示。',
      required: false
    },
    {
      type: 'radio',
      field: 'back',
      label: '返回',
      initval: wrap.back || 'true',
      required: false,
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '隐藏'},
      ]
    },
    {
      type: 'radio',
      field: 'search',
      label: '搜索',
      initval: wrap.search || 'false',
      required: false,
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '隐藏'},
      ]
    },
    {
      type: 'radio',
      field: 'logout',
      label: '退出',
      initval: wrap.logout || 'false',
      tooltip: '点击退出时,返回第一个页面。',
      required: false,
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '隐藏'},
      ]
    },
    {
      type: 'radio',
      field: 'scan',
      label: '扫一扫',
      initval: wrap.scan || 'false',
      tooltip: '系统功能:1、扫码登录,二维码信息以“login”开头,2、页面跳转,二维码信息以“url”开头',
      required: false,
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '隐藏'},
      ],
      controlFields: [
        {field: 'linkmenu', values: ['true']},
      ]
    },
    {
      type: 'radio',
      field: 'refresh',
      label: '刷新',
      initval: wrap.refresh || 'false',
      required: false,
      options: [
        {value: 'true', label: '显示'},
        {value: 'false', label: '隐藏'},
      ]
    },
    {
      type: 'select',
      field: 'linkmenu',
      label: '关联菜单',
      initval: wrap.linkmenu || '',
      tooltip: '使用扫码登录功能时的跳转页面,不使用扫码登录可忽略。',
      required: false,
      options: menulist
    },
  ]
  return topbarWrapForm
}
src/mob/components/topbar/normal-navbar/wrapsetting/index.jsx
File was deleted
src/mob/components/topbar/normal-navbar/wrapsetting/index.scss
File was deleted
src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.jsx
File was deleted
src/mob/components/topbar/normal-navbar/wrapsetting/settingform/index.scss
File was deleted
src/pc/components/login/normal-login/index.jsx
@@ -46,8 +46,9 @@
        wrap: { name: card.name, width: card.width || 24, loginWays: ['uname_pwd'] },
        style: { background: '#ffffff', width: '330px', borderRadius: '4px', marginLeft: '55vw'},
        loginWays: [
          {type: 'uname_pwd', label: '账号密码', remember: 'true', labelStyle: {}, submitStyle: {}, submitLabel: '登录'},
          {type: 'sms_vcode', label: '短信验证码', labelStyle: {}, submitStyle: {}, submitLabel: '登录'}
          {type: 'uname_pwd', label: '账号密码', remember: 'true'},
          {type: 'sms_vcode', label: '短信验证码'},
          {type: 'app_scan', label: '扫码登录'},
        ]
      }
@@ -71,8 +72,12 @@
      })
      this.props.updateConfig(_card)
    } else {
      let _card = fromJS(card).toJS()
      if (_card.loginWays.length === 2) {
        _card.loginWays.push({type: 'app_scan', label: '扫码登录'})
      }
      this.setState({
        card: fromJS(card).toJS()
        card: _card
      })
    }
  }
src/pc/components/login/normal-login/index.scss
@@ -93,6 +93,30 @@
      line-height: 60px;
    }
  }
  .form-scan-wrap {
    padding: 30px;
    text-align: center;
    font-size: 12px;
    line-height: 35px;
    .qr-wrap {
      position: relative;
      width: 60%;
      padding-top: 60%;
      margin: 0 auto;
      .qrcode-box {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        canvas {
          width: 100%!important;
          height: 100%!important;
        }
      }
    }
  }
}
.login-edit-box::after {
  display: block;
src/pc/components/login/normal-login/loginform.jsx
@@ -3,8 +3,11 @@
import { is, fromJS } from 'immutable'
import { Form, Icon, Input, Button, Checkbox } from 'antd'
import asyncElementComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const QrCode = asyncElementComponent(() => import('@/components/qrcode'))
class LoginTabForm extends Component {
  static propTpyes = {
@@ -45,7 +48,9 @@
          _loginWays.push(item)
        }
      })
      console.log(nextProps.wrap)
      console.log(loginWays)
      console.log(_loginWays)
      this.setState({
        loginWays: _loginWays,
        activeWay: _loginWays[0],
@@ -131,6 +136,12 @@
            </Button>
          </Form.Item>
        </div> : null}
        {activeWay.type === 'app_scan' ? <div className="form-scan-wrap">
          <div className="qr-wrap">
            <QrCode card={{qrWidth: 500, color: '#000000'}} value={'minkesoft'}/>
          </div>
          请使用客户端扫一扫登录
        </div> : null}
      </Form>
    )
  }
src/pc/components/login/wrapsetting/settingform/index.jsx
@@ -137,8 +137,9 @@
                })(
                  <Checkbox.Group
                    options={[
                      { label: '账号密码', value: 'uname_pwd' },
                      { label: '短信验证码', value: 'sms_vcode' },
                      { label: '账号', value: 'uname_pwd' },
                      { label: '短信', value: 'sms_vcode' },
                      { label: '扫码', value: 'app_scan' },
                    ]}
                  />
                )}
src/tabviews/custom/components/card/cardcellList/index.scss
@@ -58,9 +58,10 @@
    -webkit-line-clamp: 10;
  }
  .mk-cell-btn {
    > div {width: 100%;}
    > div {width: 100%;max-width: 100%;}
    button {
      width: 100%;
      max-width: 100%;
      height: auto;
      min-height: 32px;
    }
src/tabviews/rolemanage/index.jsx
@@ -5,6 +5,7 @@
import md5 from 'md5'
import Api from '@/api'
import options from '@/store/options.js'
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/main.js'
@@ -76,6 +77,8 @@
  }
  getAppList = () => {
    if (options.sysType !== 'local') return
    let param = {
      func: 's_get_kei'
    }
@@ -843,8 +846,10 @@
  render() {
    const { activeKey, filterRoleList, applist, selectApp, selectSubApp, loading, loadingTree, loadingAppTree, primarykey, menuTrees, appTrees, checkedKeys, appCheckedKeys, menuOpenKeys, selectMenuTrees, selectAppTrees, selectRoleId, selectMenuOpenKeys, selectAppOpenKeys, submitloading, appOpenKeys } = this.state
    let ismanage = options.sysType !== 'local'
    return (
      <div className="rolemanage">
      <div className={'rolemanage' + (ismanage ? ' manager' : '')}>
        {loading && <Spin size="large" />}
        <Tabs activeKey={activeKey} type="card" onChange={this.changeType}>
          <TabPane tab="管理系统" key="manage">
src/tabviews/rolemanage/index.scss
@@ -106,4 +106,9 @@
      }
    }
  }
}
.rolemanage.manager {
  .ant-tabs-bar.ant-tabs-card-bar {
    display: none;
  }
}
src/views/login/index.jsx
@@ -243,6 +243,15 @@
        nonc: Utils.getuuid()
      }
      // param = {
      //   func: _func,
      //   VerificationCode: '授权码',
      //   TimeStamp: timeStamp,
      //   userid: _id,
      //   LoginUID: _id,
      //   nonc: Utils.getuuid()
      // }
      let keys = Object.keys(param).sort()
      let values = ''
      keys.forEach(key => {
@@ -251,7 +260,7 @@
      param.sign = md5(values)
      param.t = new Date().getTime()
  
      Api.directRequest(_rduri + '/sEmpowerCloud_Get_LinkUrl', 'post', param, 'true').then(res => {
      Api.directRequest(_rduri + '/' + _func, 'post', param, 'true').then(res => {
        if (res.status) {
          if (res.EPC === str) {
            let box = []