king
2021-09-02 3d4bc79a80eb9cff0f8ef7c53f9685c9ff9fbd2d
2021-09-02
16个文件已修改
209 ■■■■■ 已修改文件
src/components/qrcode/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/qrcode/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/actionList/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/scriptform/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/submutilform/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/qrcode/index.jsx
@@ -29,13 +29,17 @@
    const { value, card } = this.props
    let color = card.color
    let size = card.qrWidth || 50
    let width = size + 'px'
    
    if (/rgb/ig.test(color)) {
      color = this.hexify(color)
    }
    if (size < 640) {
      size = 640
    }
    return (
      <div className="qrcode-box">
      <div className="qrcode-box" style={{width: width, height: width}}>
        <QrCode
          value={value}
          size={size}
src/components/qrcode/index.scss
@@ -1,5 +1,8 @@
.qrcode-box {
  display: inline-block;
  canvas {
    vertical-align: top;
    max-width: 100%;
    max-height: 100%;
  }
}
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -177,8 +177,6 @@
        }
      } else if (_funcType === 'mkBinding' || _funcType === 'mkUnBinding') {
        _options.push('execSuccess', 'execError')
      } else if (_funcType === 'scan') {
        _options.push('openmenu')
      } else if (_funcType === 'closetab') {
        _options.push('refreshTab')
      }
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -87,7 +87,7 @@
      funTypes = [
        { value: 'mkBinding', text: '开通扫码登录' },
        { value: 'mkUnBinding', text: '用户解绑' },
        { value: 'scan', text: '扫一扫' },
        // { value: 'scan', text: '扫一扫' },
        { value: 'reAuth', text: '重新授权' },
      ]
    } else {
src/menu/modalconfig/index.jsx
@@ -303,6 +303,19 @@
    }, 100)
  }
  clearConfig = () => {
    const _this = this
    let _config = {...this.state.config, fields: []}
    confirm({
      content: '确定清空表单吗?',
      onOk() {
        _this.setState({ config: _config })
      },
      onCancel() {}
    })
  }
  completeSave = () => {
    this.setState({saving: false})
  }
@@ -434,6 +447,7 @@
          <div className="setting">
            <Card title={dict['header.menu.form.configurable']} bordered={false} extra={
              <div>
                <Button type="danger" onClick={this.clearConfig}>清空</Button>
                <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={(res) => this.updateConfig(res.config)}/>
                <Button type="primary" loading={saving} onClick={this.submitConfig}>保存</Button>
                <Button onClick={this.cancelConfig}>返回</Button>
src/tabviews/verupmanage/actionList/index.jsx
@@ -440,6 +440,7 @@
    let param = params.shift()
    let _outParam = null
    let _localParam = null
    let errRes = null
    if (widthNumber) {
      this.setState({
@@ -545,7 +546,9 @@
      if (!res) return
      if (_localParam) {
        if (!res.status) {
          errRes = res
        }
        return Api.getLocalConfig(_localParam)
      } else if (res.status) {
        if (params.length === 0) {
@@ -561,7 +564,7 @@
    }).then(res => {
      if (!res) return
      if (res.status) {
      if (res.status && !errRes) {
        if (params.length === 0) {
          this.execSuccess(btn, res)
          _resolve()
@@ -569,7 +572,7 @@
          this.outerLoopRequest(params, btn, _resolve, widthNumber)
        }
      } else {
        this.execError(res, btn)
        this.execError(errRes || res, btn)
        _resolve()
      }
    })
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -211,17 +211,17 @@
    let printlist = []
    let templates = []
    let printCount = 1
    let printCount = +(formdata.printCount || formdata.PrintCount || formdata.printcount || formdata.Printcount || 1)
    if (formdata.printCount && typeof(formdata.printCount) === 'number' && formdata.printCount >= 1) {
      printCount = formdata.printCount
    if (isNaN(printCount) || printCount < 1) {
      printCount = 1
    }
    new Promise(resolve => {
      if (btn.intertype === 'system') { // 使用系统时,直接从表格或表单中选取数据
        let printcell = {}
        printcell.printType = formdata.printType || ''
        printcell.printType = formdata.printType || formdata.PrintType || formdata.printtype || formdata.Printtype || ''
        printcell.printCount = printCount
        printcell.templateID = btn.verify.Template || ''
@@ -245,12 +245,13 @@
              // 系统打印数据,校验data字段
              if (btn.verify.printMode !== 'custom' && (!cell.data || cell.data.length === 0)) return
              cell.templateID = cell.templateID || btn.verify.Template
              cell.printType = cell.printType || formdata.printType || ''
              cell.templateID = cell.templateID || cell.TemplateID || cell.Templateid || cell.templateid || btn.verify.Template
              cell.printType = cell.printType || cell.PrintType || cell.printtype || cell.Printtype || formdata.printType || formdata.PrintType || formdata.printtype || formdata.Printtype || ''
              let _printCount = printCount
              if (cell.printCount && typeof(cell.printCount) === 'number' && cell.printCount >= 1) {
                _printCount = cell.printCount
              let _printCount = +(cell.printCount || cell.PrintCount || cell.printcount || cell.Printcount || 0)
              if (isNaN(_printCount) || _printCount < 1) {
                _printCount = printCount
              }
              
              cell.printCount = _printCount
@@ -1031,7 +1032,7 @@
            task: {
              taskID: Utils.getuuid(),
              preview: false,
              printer: printer,
              printer: printer === 'lackprinter' ? '' : printer,
              documents: [_cell]
            }
          })
@@ -1078,19 +1079,19 @@
      return
    }
    let lackItems = printerList.filter(cell => cell.task.printer === 'lackprinter')[0]
    // let lackItems = printerList.filter(cell => cell.task.printer === 'lackprinter')[0]
    if (!socket || socket.readyState !== 1 || socket.url !== 'ws://' + btn.verify.linkUrl) {
      socket = new WebSocket('ws://' + btn.verify.linkUrl)
    } else {
      if (lackItems) {
        let request  = {
          requestID: '',
          version: '',
          cmd: 'getPrinters'
        }
        socket.send(JSON.stringify(request))
      } else {
      // if (lackItems) {
      //   let request  = {
      //     requestID: '',
      //     version: '',
      //     cmd: 'getPrinters'
      //   }
      //   socket.send(JSON.stringify(request))
      // } else {
        this.syncMessageSend(printerList)
        this.execSuccess({
@@ -1099,19 +1100,19 @@
          ErrMesg: '打印请求已发出。',
          status: true
        })
      }
      // }
    }
    // 打开Socket
    socket.onopen = () =>{
      if (lackItems) {
        let request  = {
          requestID: '',
          version: '',
          cmd: 'getPrinters'
        }
        socket.send(JSON.stringify(request))
      } else {
      // if (lackItems) {
      //   let request  = {
      //     requestID: '',
      //     version: '',
      //     cmd: 'getPrinters'
      //   }
      //   socket.send(JSON.stringify(request))
      // } else {
        this.syncMessageSend(printerList)
        this.execSuccess({
@@ -1120,7 +1121,7 @@
          ErrMesg: '打印请求已发出。',
          status: true
        })
      }
      // }
    }
    // 监听消息
    socket.onmessage = (event) => {
@@ -1141,23 +1142,24 @@
        }
      }
      if (data && data.cmd === 'getPrinters' && data.status) {
        printerList = printerList.map(cell => {
          if (cell.task.printer === 'lackprinter') {
            cell.task.printer = data.defaultPrinter
          }
          return cell
        })
      // if (data && data.cmd === 'getPrinters' && data.status) {
      //   printerList = printerList.map(cell => {
      //     if (cell.task.printer === 'lackprinter') {
      //       cell.task.printer = data.defaultPrinter
      //     }
      //     return cell
      //   })
        this.syncMessageSend(printerList)
      //   this.syncMessageSend(printerList)
        this.execSuccess({
          ErrCode: 'S',
          message: '',
          ErrMesg: '打印请求已发出。',
          status: true
        })
      } else if (data && data.message && !data.status) {
      //   this.execSuccess({
      //     ErrCode: 'S',
      //     message: '',
      //     ErrMesg: '打印请求已发出。',
      //     status: true
      //   })
      // } else if (data && data.message && !data.status) {
      if (data && data.message && !data.status) {
        this.execError({
          ErrCode: 'N',
          message: data.message,
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -41,12 +41,7 @@
    columns = columns.filter(item => item.import !== 'false')
    let fields = columns.map(item => item.Column)
    if (!fields.includes('ID')) {
      fields.unshift('ID')
    }
    if (!fields.includes('BID')) {
      fields.unshift('BID')
    }
    fields.push('jskey')
    let _sql = `Declare @${btn.sheet} table (${columns.map(item => item.Column + ' ' + item.type).join(',')},jskey nvarchar(50) )
      Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@departmentcode nvarchar(50),@organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512)
@@ -287,7 +282,7 @@
          </Col>
          {usefulfields ? <Col span={24} className="sqlfield">
            <Form.Item label={'可用字段'}>
              {usefulfields}, jskey
            BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, departmentcode, organization, login_city, {usefulfields}
            </Form.Item>
          </Col> : null}
          <Col span={8} style={{whiteSpace: 'nowrap'}}>
src/views/appmanage/index.jsx
@@ -313,8 +313,8 @@
      })
      let kei_no = res.appId.split(',')[1]
      let lang = res.subAppId.split(',')[1]
      let kei_no_detail = res.subAppId.split(',')[2]
      let lang = res.subAppId ? res.subAppId.split(',')[1] : ''
      let kei_no_detail = res.subAppId ? res.subAppId.split(',')[2] : ''
      
      let param = {
        func: 's_sVersionDetail_CloudAdd',
@@ -469,6 +469,7 @@
              cell.copyright = _param.copyright || ''
              cell.logo = _param.logo || ''
              cell.apptype = _param.apptype || ''
              cell.delay = _param.delay || 0
            }
            return cell
@@ -601,7 +602,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 || ''})))}'`)
    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 = param.LText.join(' union all ')
    param.LText = Utils.formatOptions(param.LText)
    
@@ -825,7 +826,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 || ''})))}'`)
        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 = param.LText.join(' union all ')
        param.LText = Utils.formatOptions(param.LText)
      }
@@ -911,7 +912,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 || ''})))}'`)
      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 = param.LText.join(' union all ')
      param.LText = Utils.formatOptions(param.LText)
src/views/appmanage/index.scss
@@ -23,6 +23,14 @@
    position: relative;
    display: flex;
    .ant-table {
      th {
        white-space: nowrap;
      }
      td {
        word-break: break-all;
      }
    }
    .left-view {
      flex: 1;
      width: 60%;
src/views/appmanage/scriptform/index.jsx
@@ -66,6 +66,7 @@
  changeApp = (val) => {
    const { applist } = this.props
    const { type } = this.state
    let app = applist.filter(item => `${item.ID},${item.kei_no}` === val)[0]
@@ -84,7 +85,10 @@
    this.setState({sublist, subAppId, appId}, () => {
      this.getViews()
    })
    if (type !== 'app') {
    this.props.form.setFieldsValue({subAppId})
    }
  }
  changeSubApp = (val) => {
@@ -164,7 +168,7 @@
                }]
              })(
                <Select onChange={this.changeType}>
                  <Select.Option value="app">应用</Select.Option>
                  <Select.Option value="app">应用(基本信息)</Select.Option>
                  <Select.Option value="subapp">子应用</Select.Option>
                  <Select.Option value="view">页面</Select.Option>
                  <Select.Option value="role">权限树</Select.Option>
@@ -189,7 +193,7 @@
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
          {type !== 'app' ? <Col span={12}>
            <Form.Item label="子应用">
              {getFieldDecorator('subAppId', {
                initialValue: subAppId,
@@ -205,7 +209,7 @@
                </Select>
              )}
            </Form.Item>
          </Col>
          </Col> : null}
          {type === 'view' ? <Col span={12}>
            <Form.Item label="页面">
              {getFieldDecorator('viewId', {
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 } from 'antd'
import { Form, Row, Col, Select, Radio, Input, Tooltip, Icon, notification, InputNumber } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -240,6 +240,18 @@
              )}
            </Form.Item>
          </Col> : null}
          {typename !== 'pc' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="在使用明科云APP时,且在app模式中无效">
                <Icon type="question-circle" />
                延迟加载
              </Tooltip>
            }>
              {getFieldDecorator('delay', {
                initialValue: card ? card.delay || 0 : 0
              })(<InputNumber min={0} max={5000} precision={0} onPressEnter={this.handleSubmit}/>)}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )
src/views/appmanage/submutilform/index.scss
@@ -13,4 +13,7 @@
      border-radius: 0 4px 4px 0;
    }
  }
  .ant-input-number {
    width: 100%;
  }
}
src/views/mobdesign/index.jsx
@@ -88,7 +88,7 @@
          localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS,
          dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
        })
        this.getAppMessage()
        this.getAppMessage(param.MenuID)
      } else if (param.type === 'view') {
        window.GLOB.winWidth = 420
        window.GLOB.winHeight = 738
@@ -218,7 +218,7 @@
    this.props.history.push('/mobdesign/' + param)
  }
  getAppMessage = () => {
  getAppMessage = (MenuID) => {
    Api.getSystemConfig({
      func: 's_get_keyids',
      bid: sessionStorage.getItem('appId')
@@ -232,9 +232,9 @@
        return
      }
      let homeId = ''
      let homeId = MenuID || ''
      let appViewList = []
      if (res.data && res.data.length > 0) {
      if (!homeId && res.data && res.data.length > 0) {
        appViewList = res.data
        appViewList.forEach(item => {
          if (item.keys_type === 'index') {
src/views/pcdesign/index.jsx
@@ -91,7 +91,7 @@
          localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS,
          dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
        })
        this.getAppMessage()
        this.getAppMessage(param.MenuID)
      } else if (param.type === 'view') {
        this.setState({
          MenuId: param.MenuID
@@ -193,7 +193,7 @@
    this.props.history.push('/pcdesign/' + param)
  }
  getAppMessage = () => {
  getAppMessage = (MenuID) => {
    Api.getSystemConfig({
      func: 's_get_keyids',
      bid: sessionStorage.getItem('appId')
@@ -207,9 +207,9 @@
        return
      }
      let homeId = ''
      let homeId = MenuID || ''
      let appViewList = []
      if (res.data && res.data.length > 0) {
      if (!homeId && res.data && res.data.length > 0) {
        appViewList = res.data
        appViewList.forEach(item => {
          if (item.keys_type === 'index') {
src/views/rolemanage/index.jsx
@@ -35,6 +35,7 @@
        render: (text, record) => (
          <div>
            <Button type="link" onClick={() => this.deleteMenu(record)} style={{color: '#ff4d4f'}}>删除</Button>
            <Button type="link" onClick={() => this.jumpApp(record)} style={{color: '#1890ff', marginLeft: '5px'}}>编辑</Button>
          </div>
        ),
      },
@@ -741,6 +742,17 @@
    this.setState({ visible: true, targetKeys: [] })
  }
  jumpApp = (item) => {
    const { app } = this.state
    let route = 'mobdesign'
    if (app.typename === 'pc') {
      route = 'pcdesign'
    }
    window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`))
  }
  render () {
    const { app, loading, columns, menulist, trees, searchkey } = this.state
    let _menulist = menulist