king
2021-04-13 16145059198ba7c7ff8a73f4ac207d3ba2269e5a
2021-04-13
12个文件已修改
160 ■■■■■ 已修改文件
src/menu/components/card/data-card/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/wrapsetting/settingform/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/mobshell/card.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/mobshell/index.scss 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.scss 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx
@@ -34,14 +34,15 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,
    ismob: sessionStorage.getItem('appType') === 'mob',
    back: false
  }
  UNSAFE_componentWillMount () {
    const { card } = this.props
    const { ismob } = this.state
    if (card.isNew) {
      let ismob = sessionStorage.getItem('appType') === 'mob'
      let _card = {
        uuid: card.uuid,
        type: card.type,
@@ -382,7 +383,7 @@
  }
  render() {
    const { card } = this.state
    const { card, ismob } = this.state
    let offset = 0
    if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') {
@@ -402,7 +403,7 @@
        <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" />
            {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" />
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <CopyComponent type="datacard" card={card}/>
src/menu/components/card/data-card/wrapsetting/settingform/index.jsx
@@ -13,7 +13,8 @@
  }
  state = {
    roleList: []
    roleList: [],
    MenuType: ''
  }
  UNSAFE_componentWillMount () {
@@ -28,7 +29,13 @@
      roleList = []
    }
    this.setState({roleList})
    let MenuType = ''
    if (window.GLOB.customMenu && window.GLOB.customMenu.parentId === 'BillPrintTemp') {
      MenuType = 'billPrint'
    }
    this.setState({roleList, MenuType})
  }
  handleConfirm = () => {
@@ -55,7 +62,7 @@
  render() {
    const { wrap, config } = this.props
    const { getFieldDecorator } = this.props.form
    const { roleList } = this.state
    const { roleList, MenuType } = this.state
    const formItemLayout = {
      labelCol: {
@@ -197,7 +204,7 @@
                )}
              </Form.Item>
            </Col> : null}
            {config.subtype === 'propcard' ? <Col span={12}>
            {config.subtype === 'propcard' && MenuType === 'billPrint' ? <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="选择类型为《页眉/页脚》时,打印的每页里都会带有该组件。">
                  <Icon type="question-circle" />
src/menu/components/card/table-card/index.jsx
@@ -33,6 +33,7 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,
    ismob: sessionStorage.getItem('appType') === 'mob',
    back: false
  }
@@ -322,7 +323,7 @@
  }
  render() {
    const { card } = this.state
    const { card, ismob } = this.state
    let _style = resetStyle(card.style)
    return (
@@ -331,7 +332,7 @@
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" />
            <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" />
            {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <CopyComponent type="tablecard" card={card}/>
            <PasteComponent config={card} options={['cardcell', 'search', 'form']} updateConfig={this.updateComponent} />
src/menu/components/chart/antv-bar/index.jsx
@@ -35,6 +35,7 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,
    ismob: sessionStorage.getItem('appType') === 'mob',
    eventListener: null
  }
@@ -875,7 +876,7 @@
  }
  render() {
    const { card } = this.state
    const { card, ismob } = this.state
    let _style = resetStyle(card.style)
    return (
@@ -883,7 +884,7 @@
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" />
            {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" />
            <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
            <CopyComponent type="line" card={card}/>
src/menu/components/chart/antv-pie/index.jsx
@@ -33,6 +33,7 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,
    ismob: sessionStorage.getItem('appType') === 'mob',
    eventListener: null
  }
@@ -444,7 +445,7 @@
  }
  render() {
    const { card } = this.state
    const { card, ismob } = this.state
    let _style = resetStyle(card.style)
    return (
@@ -452,7 +453,7 @@
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" />
            {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
            <CopyComponent type="pie" card={card}/>
            <PasteComponent config={card} options={['search', 'form']} updateConfig={this.updateComponent} />
src/mob/mobshell/card.jsx
@@ -80,21 +80,26 @@
    } else if (card.type === 'code') {
      return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'login') {
      return (<NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    }
  }
  if (card.type === 'login') {
      let height = ''
      if (card.wrap && card.wrap.height) {
      // scaleview
        height = card.wrap.height.replace(/\d+vw/ig, (word) => {
          return parseFloat(word) * 350 / 100 + 'px'
        return parseFloat(word) * 420 / 100 + 'px'
        // return parseFloat(word) * 350 / 100 + 'px'
        }).replace(/\d+vh/ig, (word) => {
          return parseFloat(word) * 615 / 100 + 'px'
        return parseFloat(word) * 738 / 100 + 'px'
        // return parseFloat(word) * 615 / 100 + 'px'
        })
      }
      
      return (<>
        <NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>
        <div style={{float: 'right', height}}></div>
      </>)
    style.minHeight = height
    }
  }
  return (
    <div className={'ant-col mk-component-card ant-col-' + (card.width || 24)} ref={node => drag(drop(node))} style={style}>
      {getCardComponent()}
src/mob/mobshell/index.scss
@@ -1,4 +1,13 @@
.mob-shell-inner {
  // scaleview
  width: 120%;
  height: 120%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  box-shadow: 0px 0px 2px #000000;
  transform: scale(0.8333333333333334, 0.8333333333333334);
  transform-origin: left top;
  .mk-component-card {
    position: relative;
  }
@@ -6,3 +15,17 @@
    padding-top: 150px;
  }
}
.mob-shell-inner::-webkit-scrollbar {
  width: 2px;
}
.mob-shell-inner::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
  background: rgba(0, 0, 0, 0.23);
  border-radius: 5px;
}
.mob-shell-inner::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(0, 0, 0, 0);
  border-radius: 3px;
}
src/pc/components/login/normal-login/index.scss
@@ -115,4 +115,8 @@
    border-bottom: 1px solid #d9d9d9;
    box-shadow: none!important;
  }
  .ant-input-group-addon {
    border: 0;
    border-radius: 0;
  }
}
src/utils/utils-custom.js
@@ -376,10 +376,13 @@
  if (sessionStorage.getItem('appType') === 'mob' && style) {
    let _style = JSON.stringify(style)
    // scaleview
    _style = _style.replace(/\d+vw/ig, (word) => {
      return parseFloat(word) * 350 / 100 + 'px'
      return parseFloat(word) * 420 / 100 + 'px'
      // return parseFloat(word) * 350 / 100 + 'px'
    }).replace(/\d+vh/ig, (word) => {
      return parseFloat(word) * 615 / 100 + 'px'
      return parseFloat(word) * 738 / 100 + 'px'
      // return parseFloat(word) * 615 / 100 + 'px'
    })
    return JSON.parse(_style)
src/utils/utils.js
@@ -1064,6 +1064,7 @@
  let datavars = {}                 // 声明的变量,表单及显示列
  let _actionType = null
  let _callbacksql = ''
  let foreignKey = tab && tab.foreignKey ? tab.foreignKey.toLowerCase() : ''
  if (verify.default !== 'false') { // 判断是否使用默认sql
    _actionType = btn.sqlType
@@ -1435,9 +1436,9 @@
        if (_key === 'bid' && !datavars.bid) { // 表单中没有bid则使用系统bid变量
          _fval = '@BID@'
        }
        if (_key === 'bid' && tab && tab.foreignKey) {
          arr.push(tab.foreignKey.toLowerCase())
          _fieldValue.push(`${tab.foreignKey}=${_fval}`)
        if (_key === 'bid' && foreignKey) {
          arr.push(foreignKey)
          _fieldValue.push(`${foreignKey}=${_fval}`)
        } else {
          arr.push(_key)
          _fieldValue.push(`${_key}=${_fval}`)
@@ -1558,14 +1559,14 @@
      values.push('@fullname')
    }
    if (!keys.includes('bid')) {
      if (tab && tab.foreignKey && !keys.includes(tab.foreignKey.toLowerCase())) {
        keys.push(tab.foreignKey.toLowerCase())
      if (foreignKey && !keys.includes(foreignKey)) {
        keys.push(foreignKey)
      } else {
        keys.push('bid')
      }
      values.push('@BID@')
    } else if (tab && tab.foreignKey && !keys.includes(tab.foreignKey.toLowerCase())) {
      keys.push(tab.foreignKey.toLowerCase())
    } else if (foreignKey && !keys.includes(foreignKey)) {
      keys.push(foreignKey)
      values.push('@BID@')
    }
src/views/mobdesign/index.jsx
@@ -124,6 +124,7 @@
    setTimeout(() => {
      this.updateCustomComponent()
      this.getAppPictures()
      this.getSmStemp()
    }, 1000)
  }
@@ -142,6 +143,37 @@
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
  getSmStemp = () => {
    let _sql = `select ID,TemplateCode,SignName from bd_msn_sms_temp where deleted=0 and appkey='${window.GLOB.appkey}'`
    _sql = Utils.formatOptions(_sql)
    let param = {
      func: 'sPC_Get_SelectedList',
      LText: _sql,
      obj_name: 'data',
      arr_field: 'ID,TemplateCode,SignName'
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证
    Api.getSystemConfig(param).then(res => {
      let msgs = []
      if (!res.status) {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 5
        })
      } else if (res.data) {
        msgs = res.data
      }
      sessionStorage.setItem('msgTemplate', JSON.stringify(msgs))
    })
  }
  changeEditMenu = (menu) => {
    const { oriConfig, config } = this.state
src/views/mobdesign/index.scss
@@ -110,29 +110,6 @@
    background-size: 100% 100%;
    padding: 25px 13px 40px;
    border-radius: 30px;
    .mob-shell-inner {
      width: 100%;
      height: 100%;
      overflow-y: auto;
      overflow-x: hidden;
      background: #ffffff;
      box-shadow: 0px 0px 2px #000000;
    }
    .mob-shell-inner::-webkit-scrollbar {
      width: 2px;
    }
    .mob-shell-inner::-webkit-scrollbar-thumb {
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
      background: rgba(0, 0, 0, 0.23);
      border-radius: 5px;
    }
    .mob-shell-inner::-webkit-scrollbar-track {
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
      border: 1px solid rgba(0, 0, 0, 0.07);
      background: rgba(0, 0, 0, 0);
      border-radius: 3px;
    }
  }
  .menu-control {
    position: fixed;