king
2021-08-28 8ffdc354d93def23f046ad29dd5528b02444ec3d
2021-08-28
6个文件已修改
75 ■■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/elementform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/searchconfig/settingform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -14,7 +14,7 @@
const cardTypeOptions = {
  sequence: ['eleType', 'width'],
  text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link'],
  text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'noValue'],
  number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'],
  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link'],
  video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop'],
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -308,6 +308,17 @@
    },
    {
      type: 'radio',
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      required: false,
      options: [
        { value: 'show', text: '显示' },
        { value: 'hide', text: '隐藏' }
      ]
    },
    {
      type: 'radio',
      key: 'link',
      label: '链接',
      initVal: card.link || '',
src/menu/datasource/verifycard/settingform/index.jsx
@@ -137,6 +137,14 @@
    }
  }
  onSysInter = (e) => {
    let value = e.target.value
    if (value === 'true') {
      this.props.form.setFieldsValue({interface: window.GLOB.mainSystemApi})
    }
  }
  changeSupModule = (val) => {
    this.setState({supModule: val})
  }
@@ -210,6 +218,17 @@
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'outer' ? <Col span={8}>
              <Form.Item label="系统接口">
                {getFieldDecorator('sysInterface', {
                  initialValue: setting.sysInterface || 'false'
                })(
                <Radio.Group onChange={this.onSysInter}>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'自定义脚本中的变量(除报错及可用字段外),需以此标识开头。'}>
src/mob/components/topbar/normal-navbar/index.jsx
@@ -38,6 +38,7 @@
        subtype: card.subtype,
        wrap: { type: 'navbar', height: 50, title: 'NavBar', back: 'true', search: 'false', logout: 'false' },
        style: {boxShadow: '0 0 3px #D9D9D9', shadowColor: '#D9D9D9', shadowBlur: '3px', paddingLeft: '10px', paddingRight: '10px', lineHeight: '2.8', fontSize: '18px' },
        searchStyle: {}
      }
      if (card.config) {
@@ -94,7 +95,13 @@
    if (comIds[0] !== card.uuid) return
    let _card = {...card, style}
    let _card = fromJS(card).toJS()
    if (comIds[1] === 'search') {
      _card.searchStyle = style
    } else {
      _card.style = style
    }
    this.setState({
      card: _card
@@ -107,6 +114,12 @@
    const { card } = this.state
    MKEmitter.emit('changeStyle', [card.uuid], ['font', 'background', 'border', 'padding', 'shadow'], card.style)
  }
  changeSearchStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', [card.uuid, 'search'], ['font', 'background', 'border'], card.searchStyle || {})
  }
  clickComponent = (e) => {
@@ -199,7 +212,17 @@
          </div>
          {card.wrap.type !== 'search' ?
            <div className="am-navbar-title">{card.wrap.title || ''}</div> :
            <div className="am-navbar-search" onDoubleClick={this.setSearch}><div className="search-bar"><Icon type="search" /></div></div>
            <div className="am-navbar-search" onDoubleClick={this.setSearch}>
              <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
                <div className="mk-popover-control">
                  <Icon className="style" title="调整样式" onClick={this.changeSearchStyle} type="font-colors" />
                </div>
              } trigger="hover">
                <div style={card.searchStyle} className="search-bar">
                  {card.search && card.search.setting.scan === 'true' ? <Icon type="scan" /> : <Icon type="search" />}
                </div>
              </Popover>
            </div>
          }
          <div className="am-navbar-right">
            {card.wrap.search === 'true' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null}
src/mob/searchconfig/settingform/index.jsx
@@ -197,6 +197,18 @@
            </Form.Item>
          </Col>
          {type === 'search' ? <Col span={12}>
            <Form.Item label="扫码">
              {getFieldDecorator('scan', {
                initialValue: config.setting.scan || 'false'
              })(
                <Radio.Group>
                  <Radio value="true">开启</Radio>
                  <Radio value="false">关闭</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {type === 'search' ? <Col span={12}>
            <Form.Item label="黑名单">
              {getFieldDecorator('blacklist', {
                initialValue: config.setting.blacklist || []
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -299,6 +299,10 @@
        val = data[card.field]
      }
      if (val === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      if (val !== '' && card.format) {
        if (card.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(val)) {
          val = `${val.substr(0, 4)}-${val.substr(5, 2)}-${val.substr(8, 2)}`