king
2019-11-29 0ae7068208a32226f8f8812641f31646fb8b54c9
2019-11-29-01
10个文件已修改
514 ■■■■ 已修改文件
src/locales/en-US/comtable.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/mainAction/index.jsx 130 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/mainTable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/actionform/index.jsx 193 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/dragelement/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 141 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js
@@ -66,6 +66,9 @@
  'header.form.popview': '弹窗(页面)',
  'header.form.tab': '新标签页',
  'header.form.newpage': '新页面',
  'header.form.newpage.inner': '新页面(内部)',
  'header.form.newpage.outer': '新页面(外部)',
  'header.form.newpage.url': '页面地址',
  'header.form.blank': '当前页跳转',
  'header.form.prompt': '提示框',
  'header.form.exec': '直接执行',
src/locales/zh-CN/comtable.js
@@ -66,6 +66,9 @@
  'header.form.popview': '弹窗(页面)',
  'header.form.tab': '新标签页',
  'header.form.newpage': '新页面',
  'header.form.newpage.inner': '新页面(内部)',
  'header.form.newpage.outer': '新页面(外部)',
  'header.form.newpage.url': '页面地址',
  'header.form.blank': '当前页跳转',
  'header.form.prompt': '提示框',
  'header.form.exec': '直接执行',
src/tabviews/commontable/index.jsx
@@ -108,8 +108,7 @@
      if (item.resourceType === '1' && item.dataSource && unloaded) {
        let param = {
          func: 'sPC_Get_SelectedList',
          // LText: item.dataSourceSql,
          LText: 'msltk * mfrmk sOrganization',
          LText: item.dataSourceSql,
          obj_name: 'data',
          arr_field: item.valueField + ',' + item.valueText
        }
@@ -228,7 +227,6 @@
    // 获取表格选择项
    let data = []
    this.refs.mainTable.state.selectedRowKeys.forEach(item => {
      console.log(item)
      data.push(this.refs.mainTable.props.data[item])
    })
    return data
@@ -240,9 +238,9 @@
    // this.loadmaindata()
    this.setState({
      data: [1,2,3,4,5,6,7,8,9,10].map(item => {
      data: [1,2,3,4,5,6,7,8,9,10].map((item, index) => {
        return {
          key: item,
          key: index,
          ID: item + 'mainkey',
          ExRateName: '$',
          SupplierName: '天猫' + item + '店',
src/tabviews/commontable/mainAction/index.jsx
@@ -6,7 +6,7 @@
import Api from '@/api'
import './index.scss'
// const { confirm } = Modal
const { confirm } = Modal
class MainAction extends Component {
  static propTpyes = {
@@ -28,77 +28,69 @@
    this.props.refreshdata()
  }
  actionTrigger = (item) => {
    // let _this = this
    let _this = this
    let data = this.props.gettableselected() || []
    console.log(item)
    console.log(data)
    // if (item.Ot === 'required' && data.length === 0) {
    //   // 需要选择行时,校验数据
    //   notification.warning({
    //     top: 92,
    //     message: this.props.dict['main.action.confirm.selectline']
    //   })
    //   return
    // } else if (item.Ot === 'pop' && data.length !== 1) {
    //   if (data.length === 0) {
    //     // 需要选择行时,校验数据
    //     notification.warning({
    //       top: 92,
    //       message: this.props.dict['main.action.confirm.selectline']
    //     })
    //     return
    //   } else {
    //     // 需要选择单行时,校验数据
    //     notification.warning({
    //       top: 92,
    //       message: this.props.dict['main.action.confirm.selectSingleLine']
    //     })
    //     return
    //   }
    // }
    if (item.Ot !== 'notRequired' && data.length === 0) {
      // 需要选择行时,校验数据
      notification.warning({
        top: 92,
        message: this.props.dict['main.action.confirm.selectline']
      })
      return
    } else if (item.Ot === 'requiredSgl' && data.length !== 1) {
      // 需要选择单行时,校验数据
      notification.warning({
        top: 92,
        message: this.props.dict['main.action.confirm.selectSingleLine']
      })
      return
    }
    // if (item.Action === 'Prompt' || item.Action === 'Delete') {
    //   confirm({
    //     title: this.props.dict['main.action.confirm.tip'],
    //     onOk() {
    //       return Api.setActionSubmit({
    //         func: 'SetActionSubmitSuccess'
    //         // func: 'SetActionSubmitError'
    //       }).then((res) => {
    //         if (res.status) {
    //           notification.success({
    //             top: 92,
    //             message: _this.props.dict['main.action.confirm.success']
    //             // duration: 0
    //             // description:
    //           })
    //           _this.refreshdata()
    //         } else {
    //           notification.error({
    //             top: 92,
    //             message: res.message
    //           })
    //         }
    //       })
    //     },
    //     onCancel() {}
    //   })
    // } else if (item.Action === 'Update') {
    //   Api.getModelFormData(item.MenuID).then(res => {
    //     if (res.status) {
    //       this.setState({
    //         formdata: res.data.map(input => {
    //           let validate = input.Validate && JSON.parse(input.Validate)
    //           input.DynOptions = JSON.parse(input.DynOptions)
    //           input.required = (validate && validate.required) || false
    //           return input
    //         }),
    //         visible: true,
    //         execAction: item,
    //         tabledata: data[0]
    //       })
    //     }
    //   })
    // }
    if (item.OpenType === 'prompt') {
      confirm({
        title: this.props.dict['main.action.confirm.tip'],
        onOk() {
          return Api.setActionSubmit({
            func: 'SetActionSubmitSuccess'
            // func: 'SetActionSubmitError'
          }).then((res) => {
            if (res.status) {
              notification.success({
                top: 92,
                message: _this.props.dict['main.action.confirm.success']
                // duration: 0
                // description:
              })
              _this.refreshdata()
            } else {
              notification.error({
                top: 92,
                message: res.message
              })
            }
          })
        },
        onCancel() {}
      })
    } else if (item.OpenType === 'exec') {
      Api.getModelFormData(item.MenuID).then(res => {
        if (res.status) {
          this.setState({
            formdata: res.data.map(input => {
              let validate = input.Validate && JSON.parse(input.Validate)
              input.DynOptions = JSON.parse(input.DynOptions)
              input.required = (validate && validate.required) || false
              return input
            }),
            visible: true,
            execAction: item,
            tabledata: data[0]
          })
        }
      })
    }
  }
  getModels = () => {
src/tabviews/commontable/mainTable/index.jsx
@@ -77,11 +77,9 @@
  changeRow = (record, index) => {
    // 点击整行,触发切换,判断是否可选,单选或多选,进行对应操作
    console.log(index)
    if (!this.props.setting.tableType) return
    let newkeys = JSON.parse(JSON.stringify(this.state.selectedRowKeys))
    console.log(newkeys)
    let _re = newkeys.includes(index)
    if (this.props.setting.tableType === 'radio') {
@@ -92,6 +90,7 @@
      } else {
        newkeys.push(index)
      }
      this.setState({ selectedRowKeys: newkeys })
    }
  }
@@ -137,6 +136,7 @@
        }
      }
    }
    return (
      <div className="main-table">
        {this.props.setting.columnfixed && <Affix offsetTop={offset} className="fix-header">
src/templates/comtableconfig/actionform/index.jsx
@@ -66,32 +66,123 @@
    formlist: null,
    openType: null,
    interType: null,
    expand: false
    reqOptionSgl: [{
      MenuID: 'requiredSgl',
      text: this.props.dict['header.form.requiredSgl']
    }],
    reqOptions: [{
      MenuID: 'notRequired',
      text: this.props.dict['header.form.notRequired']
    }, {
      MenuID: 'requiredSgl',
      text: this.props.dict['header.form.requiredSgl']
    }],
    reqOptionsMutil: [{
      MenuID: 'notRequired',
      text: this.props.dict['header.form.notRequired']
    }, {
      MenuID: 'requiredSgl',
      text: this.props.dict['header.form.requiredSgl']
    }, {
      MenuID: 'required',
      text: this.props.dict['header.form.required']
    }, {
      MenuID: 'requiredOnce',
      text: this.props.dict['header.form.requiredOnce']
    }]
  }
  UNSAFE_componentWillMount () {
    let _opentype = this.props.formlist.filter(form => form.key === 'OpenType')[0].initVal
    let _intertype = this.props.formlist.filter(form => form.key === 'intertype')[0].initVal
    let _options = null
    if (_opentype === 'innerpage') { // 新页面(内部),可选模板
      _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position']
    } else if (_opentype === 'outerpage') { // 新页面(外部),需要页面地址
      _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position']
    } else if (_opentype === 'blank' || _opentype === 'tab' || _opentype === 'popview') {
      _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position']
    } else {
      if (_intertype === 'outer') {
      _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
      } else {
        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
      }
    }
    this.setState({
      openType: _opentype,
      interType: _intertype,
      formlist: this.props.formlist.map(item => {
        if (item.key === 'class') {
          item.options = btnClasses
        } else if (item.key === 'icon') {
          item.options = btnIcons
        } else if (item.key === 'Ot') {
          if (_opentype === 'innerpage') {
            item.options = this.state.reqOptionSgl
          } else if (['outerpage', 'blank', 'tab', 'pop', 'popview'].includes(_opentype)) {
            item.options = this.state.reqOptions
          } else {
            item.options = this.state.reqOptionsMutil
          }
        }
        item.hidden = !_options.includes(item.key)
        return item
      })
    })
  }
  openTypeChange = (key, value) => {
    if (key === 'OpenType') {
      let _options = null
      if (value === 'newpage') {
      if (value === 'innerpage') {
        _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position']
      } else if (value === 'outerpage') {
        _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position']
      } else if (value === 'blank' || value === 'tab' || value === 'popview') {
        _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position']
      } else {
        _options = ['label', 'position', 'OpenType', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        if (this.state.interType === 'inner') {
          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
        } else {
          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc']
        }
      }
      this.setState({
        openType: value,
        expand: false,
        interType: 'inner',
        formlist: this.state.formlist.map(item => {
          if (_options) {
            item.hidden = !_options.includes(item.key)
            if (item.key === 'intertype') {
              item.initVal = 'inner'
              item.initVal = this.state.interType
            }
            item.readonly = ['interface', 'outerFunc', 'callbackFunc'].includes(item.key)
          }
          if (item.key === 'Ot') {
            if (value === 'innerpage') {
              item.options = this.state.reqOptionSgl
              item.initVal = 'requiredSgl'
              item.hidden = true
            } else if (['outerpage', 'blank', 'tab', 'pop', 'popview'].includes(value)) {
              item.options = this.state.reqOptions
              item.initVal = 'requiredSgl'
              item.hidden = true
            } else {
              item.options = this.state.reqOptionsMutil
            }
          }
          return item
        })
      }, () => {
        if (!['innerpage', 'outerpage', 'blank', 'tab', 'pop', 'popview'].includes(value)) return
        this.setState({
          formlist: this.state.formlist.map(item => {
            if (item.key === 'Ot') {
              item.hidden = false
            }
            return item
          })
        })
      })
    }
@@ -100,14 +191,16 @@
  onChange = (e, key) => {
    let value = e.target.value
    if (key === 'intertype') {
      let _options = null
      if (value === 'inner') {
        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
      } else {
        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc']
      }
      this.setState({
        interType: value,
        formlist: this.state.formlist.map(item => {
          if (value === 'inner') {
            item.readonly = ['interface', 'outerFunc', 'callbackFunc'].includes(item.key)
          } else {
            item.readonly = false
          }
          item.hidden = !_options.includes(item.key)
          return item
        })
      })
@@ -203,9 +296,6 @@
        if (!err) {
          values.id = this.props.card.id
          values.uuid = this.props.card.uuid
          if (!this.state.expand) {
            values.intertype = 'inner'
          }
          resolve({
            type: 'action',
            values
@@ -217,73 +307,7 @@
    })
  }
  toggle = () => {
    let expand = !this.state.expand
    let _options = null
    if (expand) {
      _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
    } else {
      _options = ['label', 'position', 'OpenType', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
    }
    if (!expand) {
      this.setState({
        expand: !this.state.expand,
        formlist: this.state.formlist.map(item => {
          if (item.key === 'intertype') {
            item.initVal = 'inner'
          }
          item.readonly = ['interface', 'outerFunc', 'callbackFunc'].includes(item.key)
          item.hidden = !_options.includes(item.key)
          return item
        })
      })
    } else {
      this.setState({
        expand: !this.state.expand,
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
          return item
        })
      })
    }
  }
  UNSAFE_componentWillMount () {
    let _opentype = this.props.formlist.filter(form => form.key === 'OpenType')[0].initVal
    let _intertype = this.props.formlist.filter(form => form.key === 'intertype')[0].initVal
    let _options = null
    if (_opentype === 'newpage') {
      _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position']
    } else if (_opentype === 'blank' || _opentype === 'tab' || _opentype === 'popview') {
      _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position']
    } else {
      if (_intertype === 'outer') {
      _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
      } else {
        _options = ['label', 'position', 'OpenType', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError']
      }
    }
    this.setState({
      openType: _opentype,
      interType: _intertype,
      expand: _intertype === 'outer' ? true : false,
      formlist: this.props.formlist.map(item => {
        if (item.key === 'class') {
          item.options = btnClasses
        } else if (item.key === 'icon') {
          item.options = btnIcons
        }
        if (_intertype === 'inner') {
          item.readonly = ['interface', 'outerFunc', 'callbackFunc'].includes(item.key)
        }
        item.hidden = !_options.includes(item.key)
        return item
      })
    })
  }
  render() {
    const { openType } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -297,13 +321,6 @@
    return (
      <Form {...formItemLayout} className="ant-advanced-search-form commontable-action-form" id="winter">
        <Row gutter={24}>{this.getFields()}</Row>
        {openType !== 'newpage' && openType !== 'blank' && openType !== 'tab' && openType !== 'popview' && <Row>
          <Col span={24} style={{ textAlign: 'right' }}>
            <span className="superconfig" onClick={this.toggle}>
              高级设置 <Icon type={this.state.expand ? 'up' : 'down'} />
            </span>
          </Col>
        </Row>}
      </Form>
    )
  }
src/templates/comtableconfig/dragelement/index.jsx
@@ -113,6 +113,7 @@
        newcard.execError = 'never'
        newcard.callbackFunc = ''
        newcard.pageTemplate = ''
        newcard.url = ''
      } else if (item.type === 'columns') {
        newcard.uuid = Utils.getuuid()
        newcard.Align = 'left'
src/templates/comtableconfig/index.jsx
@@ -137,8 +137,7 @@
   * 2、根据配置信息中已使用表获取相关字段信息
   */
  componentDidMount () {
    let _text = "select TbName ,Remark from sDataDictionary where IsKey!='' and Deleted =0 and Remark != '公司'"
    // let _text = "select TbName ,Remark from sDataDictionary where IsKey!='' and Deleted =0"
    let _text = "select TbName ,Remark from sDataDictionary where IsKey!='' and Deleted =0"
    _text = Utils.formatOptions(_text)
    Api.getSystemConfig({func: 'sPC_Get_SelectedList', LText: _text, obj_name: 'data', arr_field: 'TbName,Remark'}).then(res => {
@@ -475,8 +474,11 @@
            MenuID: 'blank',
            text: this.state.dict['header.form.blank']
          }, {
            MenuID: 'newpage',
            text: this.state.dict['header.form.newpage']
            MenuID: 'innerpage',
            text: this.state.dict['header.form.newpage.inner']
          }, {
            MenuID: 'outerpage',
            text: this.state.dict['header.form.newpage.outer']
          }]
        },
        {
@@ -489,6 +491,27 @@
        },
        {
          type: 'text',
          key: 'url',
          label: this.state.dict['header.form.newpage.url'],
          initVal: card.url || '',
          required: true
        },
        {
          type: 'radio',
          key: 'intertype',
          label: this.state.dict['header.form.intertype'],
          initVal: card.intertype,
          required: true,
          options: [{
            MenuID: 'inner',
            text: this.state.dict['header.form.interface.inner']
          }, {
            MenuID: 'outer',
            text: this.state.dict['header.form.interface.outer']
          }]
        },
        {
          type: 'text',
          key: 'innerFunc',
          label: this.state.dict['header.form.innerFunc'],
          initVal: card.innerFunc,
@@ -496,24 +519,36 @@
          readonly: false
        },
        {
          type: 'text',
          key: 'interface',
          label: this.state.dict['header.form.interface'],
          initVal: card.interface,
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'outerFunc',
          label: this.state.dict['header.form.outerFunc'],
          initVal: card.outerFunc,
          required: false,
          readonly: false
        },
        {
          type: 'select',
          key: 'Ot',
          label: this.state.dict['header.form.isRequired'],
          initVal: card.Ot,
          initVal: card.Ot || 'requiredSgl',
          required: true,
          options: [{
            MenuID: 'notRequired',
            text: this.state.dict['header.form.notRequired']
          }, {
            MenuID: 'requiredSgl',
            text: this.state.dict['header.form.requiredSgl']
          }, {
            MenuID: 'required',
            text: this.state.dict['header.form.required']
          }, {
            MenuID: 'requiredOnce',
            text: this.state.dict['header.form.requiredOnce']
          }]
          options: []
        },
        {
          type: 'text',
          key: 'callbackFunc',
          label: this.state.dict['header.form.callbackFunc'],
          initVal: card.callbackFunc,
          required: false,
          readonly: false
        },
        {
          type: 'select',
@@ -548,60 +583,6 @@
        },
        {
          type: 'select',
          key: 'icon',
          label: this.state.dict['header.form.icon'],
          initVal: card.icon,
          required: false,
          options: []
        },
        {
          type: 'select',
          key: 'class',
          label: this.state.dict['header.form.class'],
          initVal: card.class,
          required: false,
          options: []
        },
        {
          type: 'radio',
          key: 'intertype',
          label: this.state.dict['header.form.intertype'],
          initVal: card.intertype,
          required: true,
          options: [{
            MenuID: 'inner',
            text: this.state.dict['header.form.interface.inner']
          }, {
            MenuID: 'outer',
            text: this.state.dict['header.form.interface.outer']
          }]
        },
        {
          type: 'text',
          key: 'interface',
          label: this.state.dict['header.form.interface'],
          initVal: card.interface,
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'outerFunc',
          label: this.state.dict['header.form.outerFunc'],
          initVal: card.outerFunc,
          required: false,
          readonly: false
        },
        {
          type: 'text',
          key: 'callbackFunc',
          label: this.state.dict['header.form.callbackFunc'],
          initVal: card.callbackFunc,
          required: false,
          readonly: false
        },
        {
          type: 'select',
          key: 'execError',
          label: this.state.dict['header.form.execError'],
          initVal: card.execError || 'never',
@@ -617,6 +598,22 @@
            text: this.state.dict['header.form.refresh.view']
          }]
        },
        {
          type: 'select',
          key: 'icon',
          label: this.state.dict['header.form.icon'],
          initVal: card.icon,
          required: false,
          options: []
        },
        {
          type: 'select',
          key: 'class',
          label: this.state.dict['header.form.class'],
          initVal: card.class,
          required: false,
          options: []
        }
      ]
    })
  }
src/templates/comtableconfig/source.jsx
@@ -93,6 +93,7 @@
        execError: 'never',
        OpenType: 'pop',
        pageTemplate: '',
        url: '',
        icon: 'plus',
        class: 'green'
      }, {
@@ -111,6 +112,7 @@
        execError: 'never',
        OpenType: 'pop',
        pageTemplate: '',
        url: '',
        icon: 'form',
        class: 'purple'
      }, {
@@ -129,6 +131,7 @@
        execError: 'never',
        OpenType: 'prompt',
        pageTemplate: '',
        url: '',
        icon: 'delete',
        class: 'red'
      }, {
@@ -145,6 +148,7 @@
        position: 'toolbar',
        OpenType: 'exec',
        pageTemplate: '',
        url: '',
        icon: '',
        class: 'default'
      }
@@ -240,8 +244,14 @@
  actionItems = [
    {
      type: 'action',
      label: CommonDict['header.form.pop'],
      label: CommonDict['header.form.popform'],
      subType: 'pop',
      url: ''
    },
    {
      type: 'action',
      label: CommonDict['header.form.popview'],
      subType: 'popview',
      url: ''
    },
    {
@@ -264,14 +274,20 @@
    },
    {
      type: 'action',
      label: CommonDict['header.form.newpage'],
      subType: 'newpage',
      label: CommonDict['header.form.blank'],
      subType: 'blank',
      url: ''
    },
    {
      type: 'action',
      label: CommonDict['header.form.blank'],
      subType: 'blank',
      label: CommonDict['header.form.newpage.inner'],
      subType: 'innerpage',
      url: ''
    },
    {
      type: 'action',
      label: CommonDict['header.form.newpage.outer'],
      subType: 'outerpage',
      url: ''
    }
  ]
src/utils/utils.js
@@ -138,9 +138,8 @@
    })
    value = value.replace(/(^\s|\s$)/ig, '')
    value = window.btoa(window.encodeURIComponent(value))
    // let index = Math.floor(Math.random() * value.length)
    // value = value.slice(0, index) + 'minKe' + value.slice(index)
    value = 'minKe' + value
    let index = Math.floor(Math.random() * value.length)
    value = value.slice(0, index) + 'minKe' + value.slice(index)
    value = window.btoa(value)
    // value = value.replace(/%/ig, 'mpercent')
    //   .replace(/>/ig, 'greateror')