king
2023-03-17 05cd35931c3c526117b6cc297e451ee4139c4a67
2023-03-17
6个文件已修改
187 ■■■■ 已修改文件
src/assets/css/viewstyle.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/timeline/normal-timeline/options.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.scss 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemfunc/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss
@@ -312,17 +312,7 @@
  .system-color {
    color: $color6;
  }
  .ant-timeline.system {
    .ant-timeline-item-tail {
      border-color: $color2;
    }
  }
  .mk-time-line-wrap.system {
    .mk-timeline-item-tail {
      border-color: $color2;
    }
  }
  .custom-tab-form-box .mk-normal-form-title.mkbtn {
    .form-title {
      color: $color6;
src/menu/components/timeline/normal-timeline/options.jsx
@@ -56,6 +56,8 @@
        {field: 'mode', values: ['vertical']},
        {field: 'hmode', values: ['horizontal']},
        {field: 'label', values: ['vertical']},
        {field: 'iconSize', values: ['horizontal']},
        {field: 'dotSign', values: ['horizontal']},
      ]
    },
    {
@@ -112,6 +114,35 @@
      ]
    },
    {
      type: 'radio',
      field: 'dotSign',
      label: '节点渲染',
      initval: wrap.dotSign || 'background',
      tooltip: '节点的渲染方式,在节点组中设置的颜色渲染图标还是渲染背景色。',
      required: false,
      options: [
        {value: 'background', label: '背景色'},
        {value: 'icon', label: '图标'},
      ]
    },
    {
      type: 'select',
      field: 'iconSize',
      label: '图标大小',
      initval: wrap.iconSize || '',
      tooltip: '图标可在节点组中添加。',
      required: false,
      options: [
        {value: '', label: '默认(14px)'},
        {value: 'size16', label: '16px'},
        {value: 'size18', label: '18px'},
        {value: 'size20', label: '20px'},
        {value: 'size22', label: '22px'},
        {value: 'size24', label: '24px'},
        {value: 'adaptive', label: '自适应'},
      ]
    },
    {
      type: 'select',
      field: 'label',
      label: '标签',
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -696,7 +696,7 @@
      } else if (card.eleType === 'formula') {
        let val = 0
        let _style = card.style ? {...card.style} : {}
        if (card.$sync) {
          if (card.eval === 'false') {
            val = ''
@@ -726,7 +726,7 @@
            let reg = new RegExp('@' + key + '@', 'ig')
            _val = _val.replace(reg, data[key])
          })
          if (card.eval !== 'false') {
            try {
              // eslint-disable-next-line
@@ -738,14 +738,18 @@
  
          val = _val === undefined ? '' : _val
        }
        if (val === '' && card.noValue === 'hide') { // 空值隐藏
          return null
        }
  
        if (val !== '') {
          if (val && typeof(val) === 'string') {
            val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
            val = val.replace(/\n/ig, '<br/>')
            if (!/<(span|div|p|a|img)\s/g.test(val)) {
              val = val.replace(/\s/ig, '&nbsp;')
            }
            val = <span dangerouslySetInnerHTML={{__html: val}}></span>
          }
  
@@ -753,10 +757,10 @@
            let _s = {fontSize: card.fixSize, color: card.fixColor, marginLeft: card.fixLeft, marginRight: card.fixRight}
            val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></>
          } else {
            val = `${card.prefix || ''}${val}${card.postfix || ''}`
            val = <>{card.prefix || ''}{val}{card.postfix || ''}</>
          }
        }
        let className = ''
        if (card.marks) {
          let mark = getMark(card.marks, data, _style)
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -83,6 +83,15 @@
    card = _config.subcards[0]
    if (_config.wrap.dotSign === 'adaptive') {
      try {
        let cl = Math.floor(document.body.clientWidth * _config.width / 24 / 320)
        _config.wrap.dotSign = ['', 'size16', 'size18', 'size20', 'size22', 'size24', 'size24', 'size24', 'size24'][cl]
      } catch(e) {
        _config.wrap.dotSign = 'size20'
      }
    }
    this.setState({
      card,
      sync: _sync,
@@ -445,7 +454,7 @@
        </div>
        <div className="mk-timeline-item-head">
          <div className="mk-timeline-item-tail" style={linebg}></div>
          <div className={'mk-dot ' + (dot ? 'mk-dot-icon' : '')} style={{background: color}}>
          <div className={'mk-dot ' + (dot ? 'mk-dot-icon' : '')} style={{background: color, color: color}}>
            {dot}
          </div>
        </div>
@@ -454,7 +463,7 @@
      return (<div className="mk-time-line-item" key={data.$Index}>
        <div className="mk-timeline-item-head">
          <div className="mk-timeline-item-tail" style={linebg}></div>
          <div className={'mk-dot ' + (dot ? 'mk-dot-icon' : '')} style={{background: color}}>
          <div className={'mk-dot ' + (dot ? 'mk-dot-icon' : '')} style={{background: color, color: color}}>
            {dot}
          </div>
        </div>
@@ -484,7 +493,7 @@
        {config.wrap.direction !== 'horizontal' && data && data.length > 0 ? <Timeline mode={config.wrap.mode} className={'card-row-list ' + (config.wrap.line || '')} style={{height: config.wrap.contentHeight}}>
          {data.map(item => this.getnodes(item))}
        </Timeline> : null}
        {config.wrap.direction === 'horizontal' && data && data.length > 0 ? <div className={'mk-time-line-wrap card-row-list ' + (config.wrap.line || '')} style={{height: config.wrap.contentHeight}}>
        {config.wrap.direction === 'horizontal' && data && data.length > 0 ? <div className={`mk-time-line-wrap card-row-list ${config.wrap.line || ''} ${config.wrap.iconSize || ''} ${config.wrap.dotSign || ''}`} style={{height: config.wrap.contentHeight}}>
          {data.map(item => this.getMknodes(item))}
        </div> : null}
        {data && data.length === 0 ? <div className="card-row-list" style={{height: config.wrap.contentHeight}}>
src/tabviews/custom/components/timeline/normal-timeline/index.scss
@@ -150,6 +150,106 @@
      border-top: 2px solid #e8e8e8;
    } 
  }
  .mk-time-line-wrap.icon {
    .mk-timeline-item-head {
      .mk-dot {
        background: #f8f8f8!important;
      }
      .mk-dot-icon {
        color: inherit;
        .anticon {
          color: inherit;
        }
      }
    }
  }
  .mk-time-line-wrap.size16 {
    .mk-timeline-item-head {
      height: 28px;
      .mk-dot {
        .anticon {
          font-size: 16px;
        }
      }
      .mk-dot-icon {
        width: 28px;
        height: 28px;
      }
    }
  }
  .mk-time-line-wrap.size18 {
    .mk-timeline-item-head {
      height: 32px;
      .mk-dot {
        .anticon {
          font-size: 18px;
        }
      }
      .mk-dot-icon {
        width: 32px;
        height: 32px;
      }
    }
  }
  .mk-time-line-wrap.size20 {
    .mk-timeline-item-head {
      height: 36px;
      .mk-dot {
        .anticon {
          font-size: 20px;
        }
      }
      .mk-dot-icon {
        width: 36px;
        height: 36px;
      }
    }
  }
  .mk-time-line-wrap.size22 {
    .mk-timeline-item-head {
      height: 40px;
      .mk-dot {
        .anticon {
          font-size: 22px;
        }
      }
      .mk-dot-icon {
        width: 40px;
        height: 40px;
      }
    }
  }
  .mk-time-line-wrap.size24 {
    .mk-timeline-item-head {
      height: 44px;
      .mk-dot {
        .anticon {
          font-size: 24px;
        }
      }
      .mk-dot-icon {
        width: 44px;
        height: 44px;
      }
    }
  }
  .mk-time-line-wrap.system {
    .mk-timeline-item-tail {
      border-color: var(--mk-sys-color2);
    }
  }
  .ant-timeline.system {
    .ant-timeline-item-tail {
      border-color: var(--mk-sys-color2);
    }
  }
}
.normal-timeline-box::after {
src/views/systemfunc/index.jsx
@@ -4,6 +4,7 @@
import asyncComponent from '@/utils/asyncComponent'
import Header from './header'
import MKEmitter from '@/utils/events.js'
import Sidemenu from './sidemenu'
// import './index.scss'
@@ -25,6 +26,18 @@
      value: false
    })
  }
  componentDidMount () {
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
  }
  componentWillUnmount () {
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
  }
  resetParentParam = (MenuID, id, data) => {
    window.GLOB.CacheData.set(MenuID, {...data, $BID: id})
  }
  
  render () {
    return (