king
2020-11-27 a06655e10f4242c350a3450c6c21e77f33302e2e
2020-11-27
21个文件已修改
1个文件已添加
589 ■■■■■ 已修改文件
src/menu/components/table/normal-table/columncomponent/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/dragabletabs.jsx 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/utils.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecontroller/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecontroller/index.scss 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecontroller/styleInput/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecontroller/styleInput/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/editcard/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editTable/index.jsx 129 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editTable/index.scss 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columncomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Modal, notification, Switch, message, Spin } from 'antd'
import { Icon, Modal, notification, Switch, message } from 'antd'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
@@ -25,7 +25,6 @@
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    columnlist: null,    // 显示列
    loading: false,      // 查询显示列联动菜单
    showField: false,    // 显示列字段
    modaltype: '',       // 模态框控制
    card: null           // 编辑中元素
@@ -500,7 +499,6 @@
            columns={columnlist}
          />
        </Modal>
        {this.state.loading && <Spin size="large" />}
      </div>
    )
  }
src/menu/components/table/normal-table/index.jsx
@@ -71,6 +71,18 @@
        cols: [
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }
        ],
        scripts: []
src/menu/components/table/normal-table/index.scss
@@ -10,6 +10,7 @@
  .model-table-search-list {
    padding: 10px 0px 0px;
    min-height: 65px;
    border-bottom: 1px solid #f0f0f0;
    >.anticon-question-circle {
      display: none;
    }
@@ -32,7 +33,7 @@
  }
  .model-menu-action-list {
    line-height: 40px;
    padding: 15px 0px 10px;
    padding: 10px 0px;
  }
  .model-menu-action-list.length0 {
    display: none;
src/menu/components/tabs/antv-tabs/dragabletabs.jsx
New file
@@ -0,0 +1,125 @@
import React, { Component } from 'react'
import { Tabs } from 'antd'
import { DndProvider, DragSource, DropTarget } from 'react-dnd'
// Drag & Drop node
class TabNode extends Component {
  render() {
    const { connectDragSource, connectDropTarget, children } = this.props
    return connectDragSource(connectDropTarget(children))
  }
}
const cardTarget = {
  drop(props, monitor) {
    const dragKey = monitor.getItem().index
    const hoverKey = props.index
    if (dragKey === hoverKey) {
      return;
    }
    props.moveTabNode(dragKey, hoverKey)
    monitor.getItem().index = hoverKey
  }
}
const cardSource = {
  beginDrag(props) {
    return {
      id: props.id,
      index: props.index,
    }
  }
}
const WrapTabNode = DropTarget('DND_NODE', cardTarget, connect => ({
  connectDropTarget: connect.dropTarget(),
}))(
  DragSource('DND_NODE', cardSource, (connect, monitor) => ({
    connectDragSource: connect.dragSource(),
    isDragging: monitor.isDragging(),
  }))(TabNode)
)
class DraggableTabs extends Component {
  state = {
    order: []
  }
  moveTabNode = (dragKey, hoverKey) => {
    const newOrder = this.state.order.slice()
    const { children } = this.props
    if (dragKey === 'tool' || hoverKey === 'tool') return
    React.Children.forEach(children, c => {
      if (newOrder.indexOf(c.key) === -1) {
        newOrder.push(c.key)
      }
    })
    const dragIndex = newOrder.indexOf(dragKey)
    const hoverIndex = newOrder.indexOf(hoverKey)
    newOrder.splice(dragIndex, 1)
    newOrder.splice(hoverIndex, 0, dragKey)
    let _order = newOrder.filter(item => item !== 'tool')
    this.setState({
      order: [..._order, 'tool']
    })
    this.props.tabsMove(_order)
  }
  renderTabBar = (props, DefaultTabBar) => (
    <DefaultTabBar {...props}>
      {node => (
        <WrapTabNode key={node.key} index={node.key} moveTabNode={this.moveTabNode}>
          {node}
        </WrapTabNode>
      )}
    </DefaultTabBar>
  )
  render() {
    const { order } = this.state
    const { children } = this.props
    const tabs = []
    React.Children.forEach(children, c => {
      tabs.push(c)
    })
    const orderTabs = tabs.slice().sort((a, b) => {
      const orderA = order.indexOf(a.key)
      const orderB = order.indexOf(b.key)
      if (orderA !== -1 && orderB !== -1) {
        return orderA - orderB
      }
      if (orderA !== -1) {
        return -1
      }
      if (orderB !== -1) {
        return 1
      }
      const ia = tabs.indexOf(a)
      const ib = tabs.indexOf(b)
      return ia - ib
    })
    return (
      <DndProvider>
        <Tabs renderTabBar={this.renderTabBar} {...this.props}>
          {orderTabs}
        </Tabs>
      </DndProvider>
    )
  }
}
export default DraggableTabs
src/menu/components/tabs/antv-tabs/index.jsx
@@ -7,6 +7,7 @@
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import DraggableTabs from './dragabletabs'
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/model.js'
@@ -218,9 +219,20 @@
    })
  }
  moveSwitch = (index, index1) => {
  moveSwitch = (order) => {
    let tabs = fromJS(this.state.tabs).toJS()
    tabs.subtabs[index] = tabs.subtabs.splice(index1, 1, tabs.subtabs[index])[0]
    let subtab = {}
    tabs.subtabs.forEach(item => {
      subtab[item.uuid] = item
    })
    tabs.subtabs = []
    order.forEach(item => {
      if (subtab[item]) {
        tabs.subtabs.push(subtab[item])
      }
    })
    this.setState({tabs})
    this.props.updateConfig(tabs)
@@ -231,14 +243,12 @@
    return (
      <div className="menu-tabs-edit-box" style={tabs.style}>
        <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}>
          {tabs.subtabs.map((tab, index) => (
        <DraggableTabs tabPosition={tabs.setting.position} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch}>
          {tabs.subtabs.map(tab => (
            <TabPane tab={
              <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
                <div className="mk-popover-control">
                  <Icon className="edit" title="edit" type="edit" onClick={() => this.editTab(tab)} />
                  {index !== 0 ? <Icon className="edit" type="arrow-left" onClick={() => this.moveSwitch(index, index - 1)} /> : null}
                  {(index + 1) !== tabs.subtabs.length ? <Icon className="edit" type="arrow-right" onClick={() => this.moveSwitch(index, index + 1)} /> : null}
                  <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} />
                </div>
              } trigger="hover">
@@ -261,7 +271,7 @@
            </Popover>
          } key="tool">
          </TabPane>
        </Tabs>
        </DraggableTabs>
        <Modal
          wrapClassName="popview-modal"
          title={'标签编辑'}
src/menu/components/tabs/antv-tabs/index.scss
@@ -10,6 +10,15 @@
    min-height: 200px;
  }
  .ant-tabs .ant-tabs-top-bar > .ant-tabs-nav-container {
    >.ant-tabs-tab-next:not(.ant-tabs-tab-arrow-show) + .ant-tabs-nav-wrap > .ant-tabs-nav-scroll > .ant-tabs-nav {
      width: 100%;
      > div > .ant-tabs-tab-disabled {
        float: right;
      }
    }
  }
  .ant-tabs .ant-tabs-left-bar .ant-tabs-tab {
    padding: 0px;
    text-align: right;
src/menu/datasource/verifycard/utils.jsx
@@ -141,19 +141,24 @@
        _dataresource = '(' + _dataresource + ') tb'
      }
      _dataresource = `select ${setting.laypage !== 'false' ?  'top 10' : ''} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource} ${_search}) tmptable ${setting.laypage !== 'false' ?  'where rows > 0' : ''} order by tmptable.rows`
      _dataresource = `select${setting.laypage !== 'false' ?  ' top 10' : ''} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource} ${_search}) tmptable ${setting.laypage !== 'false' ?  'where rows > 0' : ''} order by tmptable.rows`
    }
    if (_customScript) {
      sql = `${_customScript}
      sql = `/* sql 验证 */
        ${_customScript}
        ${_dataresource}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
      `
    } else {
      sql = _dataresource
      sql = `/* sql 验证 */
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    
    return { error, sql }
  }
src/menu/stylecontroller/index.jsx
@@ -295,7 +295,7 @@
      >
        <div className="menu-style-controller">
          <Form {...formItemLayout}>
            {card ? <Collapse expandIconPosition="right" destroyInactivePanel={true} defaultActiveKey={options[0]} accordion={true}>
            {card ? <Collapse expandIconPosition="right" destroyInactivePanel={true} defaultActiveKey={options[0]}>
              {options.includes('height') ? <Panel header="高度" key="height">
                <Col span={24}>
                  <Form.Item
@@ -597,7 +597,7 @@
            </Collapse> : null}
          </Form>
          <div style={{textAlign: 'right'}}>
            <Button style={{margin: '30px 10px 0px 0px'}} onClick={this.onCloseDrawer}>关闭</Button>
            <Button style={{margin: '30px 10px 30px 0px'}} onClick={this.onCloseDrawer}>关闭</Button>
          </div>
        </div>
      </Drawer>
src/menu/stylecontroller/index.scss
@@ -9,7 +9,7 @@
    > .ant-collapse-item {
      border-color: #202735;
      > .ant-collapse-header {
        padding: 10px 40px 10px 16px;
        padding: 7px 40px 7px 16px;
        background: #262E3F;
        color: rgba(255, 255, 255, 0.85);
      }
@@ -29,7 +29,7 @@
          width: 100%;
        }
        .ant-form-item {
          margin-bottom: 5px;
          margin-bottom: 2px;
          .ant-form-item-label > label {
            color: rgba(255, 255, 255, 0.85);
@@ -62,6 +62,9 @@
                .ant-input-number-input {
                  height: 28px;
                }
              }
              .ant-input-group-addon {
                background: transparent;
              }
              .ant-select-selection {
                background: transparent;
@@ -172,18 +175,7 @@
    overflow-y: auto;
  }
  .ant-drawer-body::-webkit-scrollbar {
    width: 7px;
  }
  .ant-drawer-body::-webkit-scrollbar-thumb {
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
    background: rgba(0, 0, 0, 0.13);
  }
  .ant-drawer-body::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(0, 0, 0, 0);
    display: none;
  }
  .ant-drawer-wrapper-body {
    background: #262E3F;
@@ -206,7 +198,7 @@
        height: 48px;
        width: 48px;
        line-height: 48px;
        color: rgba(255, 255, 255, 0.65);
        color: #ffffff;
      }
    }
  }
src/menu/stylecontroller/styleInput/index.jsx
@@ -139,9 +139,11 @@
    return (
      <div className="style-input-box">
        <Input value={value} addonAfter={
          options.length > 1 ?
          <Select value={unit} onChange={this.changeUnit}>
            {options.map(item => <Option key={item} value={item}>{item}</Option>)}
          </Select>
          </Select> :
          <div className="single-unit">{unit}</div>
        } onChange={this.changeValue}/>
      </div>
    )
src/menu/stylecontroller/styleInput/index.scss
@@ -2,8 +2,10 @@
  line-height: 32px;
  .ant-select {
    width: 60px!important;
    .ant-select-selection {
      color: rgba(0, 0, 0, 0.75)!important;
    }
  }
  .single-unit {
    width: 38px;
    text-align: left;
    color: rgba(255, 255, 255, 0.65);
  }
}
src/tabviews/zshare/normalTable/index.jsx
@@ -56,7 +56,6 @@
    imgShow: false,       // 图片放大模态框
    imgSrc: '',           // 图片路径
    lineMarks: null,      // 行标记
    colMap: null,         // 列信息(全部)
    activeIndex: null,    // 标记当前选中行
    rowspan: null         // 行合并字段信息
  }
@@ -66,7 +65,6 @@
    let columns = JSON.parse(JSON.stringify(this.props.columns))
    let lineMarks = []
    let _columns = []
    let colMap = new Map() // 用于获取字段信息
    let radio = 5          // 虚化比例
    let _format = false    // 是否虚化处理
    let rowspan = null
@@ -81,10 +79,15 @@
      }
    }
    // 获取行标记
    config.columns.forEach(col => {
      if (!col.field) return
      colMap.set(col.field, col)
      col.marks && col.marks.forEach(mark => {
        if (mark.signType === 'line') {
          lineMarks.push(mark)
        }
      })
    })
    columns.forEach((item, index) => {
@@ -94,31 +97,8 @@
        item.blur = true
      }
      if (item.marks) {
        item.marks = item.marks.filter(mark => {
          let originField = colMap.get(mark.field)
          let contrastField = mark.contrastType === 'dynamic' ? colMap.get(mark.contrastField) : ''
          if (!originField || (mark.contrastType === 'dynamic' && !contrastField)) return false
          if (contrastField && originField.type !== contrastField.type) return false
          if (mark.contrastType === 'static') {
            if (originField.type === 'text' && typeof(mark.contrastValue) === 'number') {
              return false
            } else if (originField.type === 'number' && typeof(mark.contrastValue) === 'string') {
              return false
            } else if (!['number', 'text'].includes(originField.type)) {
              return false
            }
          }
          if (mark.signType === 'line') {
            lineMarks.push(mark)
            return false
          } else if (mark.signType === 'card') {
            return false
          }
          return true
        })
      if (item.marks) { // 过滤行和卡片标记
        item.marks = item.marks.filter(mark => mark.signType !== 'line' && mark.signType !== 'card')
        if (item.marks.length === 0) {
          item.marks = ''
@@ -134,6 +114,14 @@
          if (col.rowspan === 'true') {
            rowspan = col
          }
          if (col.marks) { // 过滤行和卡片标记
            col.marks = col.marks.filter(mark => mark.signType !== 'line' && mark.signType !== 'card')
            if (col.marks.length === 0) {
              col.marks = ''
            }
          }
          cell.children.push({
@@ -179,7 +167,6 @@
      columns: _columns,
      pageSize: pageSize ? pageSize : 10,
      lineMarks: lineMarks,
      colMap: colMap,
      rowspan: rowspan
    })
  }
@@ -271,54 +258,48 @@
  }
  getMark = (record, marks) => {
    const { colMap } = this.state
    let className = ''
    let isIcon = false
    let position = 'back'
    let icon = ''
    marks.some(mark => {
      let originField = colMap.get(mark.field)
      if (!originField) return false
      let originType = originField.type || 'text'
      let originVal = record.hasOwnProperty(mark.field) ? record[mark.field] : ''
      let originVal = record[mark.field] + ''
      let contrastVal = ''
      if (mark.contrastType === 'static') {
        contrastVal = mark.contrastValue
        contrastVal = mark.contrastValue + ''
      } else {
        contrastVal = record.hasOwnProperty(mark.contrastField) ? record[mark.contrastField] : ''
        contrastVal = record[mark.contrastField] + ''
      }
      if (originType === 'text') {
        originVal = '' + originVal
        contrastVal = '' + contrastVal
      } else if (originType === 'number' && originVal !== '' && contrastVal !== '') {
      if (mark.match === '=') {
        className = originVal === contrastVal ? mark.color[1] : ''
      } else if (mark.match === '!=') {
        className = originVal !== contrastVal ? mark.color[1] : ''
      } else if (mark.match === 'like') {
        className = originVal.indexOf(contrastVal) > -1 ? mark.color[1] : ''
      } else if (mark.match === '>') {
        try {
          originVal = parseFloat(originVal)
          contrastVal = parseFloat(contrastVal)
          if (isNaN(originVal) || isNaN(contrastVal)) {
            originVal = ''
          }
        } catch {
          originVal = ''
          originVal = NaN
        }
      }
      if (originVal === '' || contrastVal === '') return false
        if (!isNaN(originVal) && !isNaN(contrastVal) && originVal > contrastVal) {
          className = mark.color[1]
        }
      } else if (mark.match === '<') {
        try {
          originVal = parseFloat(originVal)
          contrastVal = parseFloat(contrastVal)
        } catch {
          originVal = NaN
        }
      if (mark.match === '=' && originVal === contrastVal) {
        className = mark.color[1]
      } else if (mark.match === '!=' && originVal !== contrastVal) {
        className = mark.color[1]
      } else if (mark.match === 'like' && originVal.indexOf(contrastVal) > -1) {
        className = mark.color[1]
      } else if (mark.match === '>' && originVal > contrastVal) {
        className = mark.color[1]
      } else if (mark.match === '<' && originVal < contrastVal) {
        className = mark.color[1]
        if (!isNaN(originVal) && !isNaN(contrastVal) && originVal < contrastVal) {
          className = mark.color[1]
        }
      }
      if (!className) return false
@@ -999,7 +980,7 @@
  render() {
    const { setting, pickup, statFValue } = this.props
    const { selectedRowKeys, lineMarks, colMap, activeIndex, rowspan } = this.state
    const { selectedRowKeys, lineMarks, activeIndex, rowspan } = this.state
    // 设置表格选择属性:单选、多选、不可选
    let rowSelection = null
@@ -1112,43 +1093,42 @@
            if (lineMarks.length === 0) return className
            lineMarks.some(mark => {
              let originType = colMap.get(mark.field).type
              let originVal = record.hasOwnProperty(mark.field) ? record[mark.field] : ''
              let originVal = record[mark.field] + ''
              let contrastVal = ''
              if (mark.contrastType === 'static') {
                contrastVal = mark.contrastValue
                contrastVal = mark.contrastValue + ''
              } else {
                contrastVal = record.hasOwnProperty(mark.contrastField) ? record[mark.contrastField] : ''
                contrastVal = record[mark.contrastField] + ''
              }
              if (originType === 'text') {
                originVal = '' + originVal
                contrastVal = '' + contrastVal
              } else if (originType === 'number' && originVal !== '' && contrastVal !== '') {
              if (mark.match === '=') {
                className = originVal === contrastVal ? 'background ' + mark.color[1] : ''
              } else if (mark.match === '!=') {
                className = originVal !== contrastVal ? 'background ' + mark.color[1] : ''
              } else if (mark.match === 'like') {
                className = originVal.indexOf(contrastVal) > -1 ? 'background ' + mark.color[1] : ''
              } else if (mark.match === '>') {
                try {
                  originVal = parseFloat(originVal)
                  contrastVal = parseFloat(contrastVal)
                  if (isNaN(originVal) || isNaN(contrastVal)) {
                    originVal = ''
                  }
                } catch {
                  originVal = ''
                  originVal = NaN
                }
              }
              if (originVal === '' || contrastVal === '') return false
              if (mark.match === '=' && originVal === contrastVal) {
                className = 'background ' + mark.color[1]
              } else if (mark.match === '!=' && originVal !== contrastVal) {
                className = 'background ' + mark.color[1]
              } else if (mark.match === 'like' && originVal.indexOf(contrastVal) > -1) {
                className = 'background ' + mark.color[1]
              } else if (mark.match === '>' && originVal > contrastVal) {
                className = 'background ' + mark.color[1]
              } else if (mark.match === '<' && originVal < contrastVal) {
                className = 'background ' + mark.color[1]
                if (!isNaN(originVal) && !isNaN(contrastVal) && originVal > contrastVal) {
                  className = 'background ' + mark.color[1]
                }
              } else if (mark.match === '<') {
                try {
                  originVal = parseFloat(originVal)
                  contrastVal = parseFloat(contrastVal)
                } catch {
                  originVal = NaN
                }
                if (!isNaN(originVal) && !isNaN(contrastVal) && originVal < contrastVal) {
                  className = 'background ' + mark.color[1]
                }
              }
              if (!className) return false
src/templates/sharecomponent/columncomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Tooltip, Modal, notification, Switch, message, Spin } from 'antd'
import { Icon, Tooltip, Modal, notification, Switch, message } from 'antd'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
@@ -26,7 +26,6 @@
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    columnlist: null,    // 显示列
    loading: false,      // 查询显示列联动菜单
    showField: false,    // 显示列字段
    modaltype: '',       // 模态框控制
    card: null           // 编辑中元素
@@ -583,7 +582,6 @@
            columns={columnlist}
          />
        </Modal>
        {this.state.loading && <Spin size="large" />}
      </div>
    )
  }
src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Select, Button, Input, InputNumber, Radio, Icon, Cascader, Tooltip } from 'antd'
import { Form, Row, Col, Select, Button, Input, Radio, Icon, Cascader, Tooltip } from 'antd'
import { minkeColorSystem, minkeIconSystem } from '@/utils/option.js'
import './index.scss'
@@ -183,8 +183,6 @@
      }
    }
    let contFields = columns.filter(col => originField.field !== col.field && originField.type === col.type)
    return (
      <Form {...formItemLayout} id="model-mark-form-box" className="mingke-table">
        <Row gutter={24}>
@@ -237,9 +235,9 @@
                <Select>
                  <Select.Option value="="> = </Select.Option>
                  <Select.Option value="!="> != </Select.Option>
                  {originField.type === 'number' ? <Select.Option value=">"> > </Select.Option> : null}
                  {originField.type === 'number' ? <Select.Option value="<"> &lt; </Select.Option> : null}
                  {originField.type === 'text' ? <Select.Option value="like"> like </Select.Option> : null}
                  <Select.Option value=">"> > </Select.Option>
                  <Select.Option value="<"> &lt; </Select.Option>
                  <Select.Option value="like"> like </Select.Option>
                </Select>
              )}
            </Form.Item>
@@ -247,14 +245,8 @@
          {contrastType === 'static' ? <Col span={6}>
            <Form.Item label={'对比值'}>
              {getFieldDecorator('contrastValue', {
                initialValue: '',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '对比值!'
                  }
                ]
              })(originField.type === 'number' ? <InputNumber /> : <Input placeholder="" autoComplete="off" />)}
                initialValue: ''
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          {contrastType === 'dynamic' ? <Col span={6}>
@@ -272,7 +264,7 @@
                  showSearch
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  {contFields.map(item => (
                  {columns.map(item => (
                    <Select.Option key={item.uuid} title={item.label + '(' + item.field + ')'} value={item.field}>{item.label + '(' + item.field + ')'}</Select.Option>
                  ))}
                </Select>
src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
@@ -139,7 +139,7 @@
        </Row>
        <Row>
          {dataSource.map((item, index) => {
            if (item.field.toLowerCase().indexOf(this.state.searchKey.toLowerCase()) >= 0) {
            if (item.field.toLowerCase().indexOf(this.state.searchKey.toLowerCase()) >= 0 || item.label.indexOf(this.state.searchKey) >= 0) {
              return (
                <Col key={index} span={8}>
                  <EditCardCell ref={'cellCard' + index} type={type} card={item} dict={this.props.dict} changeCard={this.changeCard} />
src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx
@@ -96,15 +96,19 @@
    }
    if (_customScript) {
      sql = `${_customScript}
      sql = `/* sql 验证 */
        ${_customScript}
        ${_dataresource}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
      `
    } else {
      sql = _dataresource
      sql = `/* sql 验证 */
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    
    return sql
  }
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
@@ -78,15 +78,19 @@
    }
    if (_customScript) {
      sql = `${_customScript}
      sql = `/* sql 验证 */
        ${_customScript}
        ${_dataresource}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
      `
    } else {
      sql = _dataresource
      sql = `/* sql 验证 */
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    return sql
  }
src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx
@@ -52,15 +52,19 @@
    }
    if (_customScript) {
      sql = `${_customScript}
      sql = `/* sql 验证 */
        ${_customScript}
        ${_dataresource}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
      `
    } else {
      sql = _dataresource
      sql = `/* sql 验证 */
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    
    return sql
  }
src/templates/zshare/editTable/index.jsx
@@ -1,6 +1,7 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { DndProvider, DragSource, DropTarget } from 'react-dnd'
import { Table, Input, InputNumber, Popconfirm, Form, Icon, Select, Radio, Cascader, notification } from 'antd'
import ColorSketch from '@/mob/colorsketch'
@@ -11,6 +12,61 @@
let eTDict = localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
const EditableContext = React.createContext()
let dragingIndex = -1
class BodyRow extends React.Component {
  render() {
    const { isOver, connectDragSource, connectDropTarget, moveRow, ...restProps } = this.props
    const style = { ...restProps.style, cursor: 'move' }
    let { className } = restProps
    if (isOver) {
      if (restProps.index > dragingIndex) {
        className += ' drop-over-downward'
      }
      if (restProps.index < dragingIndex) {
        className += ' drop-over-upward'
      }
    }
    return connectDragSource(
      connectDropTarget(<tr {...restProps} className={className} style={style} />),
    )
  }
}
const rowSource = {
  beginDrag(props) {
    dragingIndex = props.index
    return {
      index: props.index,
    }
  }
}
const rowTarget = {
  drop(props, monitor) {
    const dragIndex = monitor.getItem().index
    const hoverIndex = props.index
    if (dragIndex === hoverIndex) {
      return
    }
    props.moveRow(dragIndex, hoverIndex)
    monitor.getItem().index = hoverIndex
  },
}
const DragableBodyRow = DropTarget('row', rowTarget, (connect, monitor) => ({
  connectDropTarget: connect.dropTarget(),
  isOver: monitor.isOver(),
}))(
  DragSource('row', rowSource, connect => ({
    connectDragSource: connect.dragSource(),
  }))(BodyRow),
)
class EditableCell extends Component {
  getInput = (form) => {
@@ -130,8 +186,6 @@
        ) : (
          <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')}>
            {!actions || actions.includes('edit') ? <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><Icon type="edit" /></span> : null}
            {!actions || actions.includes('up') ? <span className="primary" onClick={() => {editingKey === '' && this.handleUpDown(record.uuid, 'up')}}><Icon type="arrow-up" /></span> : null}
            {!actions || actions.includes('down') ? <span className="danger" onClick={() => {editingKey === '' && this.handleUpDown(record.uuid, 'down')}}><Icon type="arrow-down" /></span> : null}
            {(!actions || actions.includes('del')) && editingKey === '' ? <Popconfirm
              overlayClassName="popover-confirm"
              title={eTDict['model.query.delete']}
@@ -226,27 +280,6 @@
    })
  }
  handleUpDown = (uuid, direction) => {
    let _data = fromJS(this.state.data).toJS()
    const index = _data.findIndex(item => uuid === item.uuid)
    if ((index === 0 && direction === 'up') || (index === _data.length - 1 && direction === 'down')) {
      return
    }
    if (direction === 'up') {
      _data.splice(index - 1, 0, ..._data.splice(index, 1))
    } else {
      _data.splice(index + 1, 0, ..._data.splice(index, 1))
    }
    this.setState({
      data: _data
    }, () => {
      this.props.onChange(_data)
    })
  }
  save(form, uuid) {
    const { columns } = this.state
    form.validateFields((error, row) => {
@@ -296,11 +329,31 @@
    this.setState({ editingKey: uuid })
  }
  moveRow = (dragIndex, hoverIndex) => {
    const { editingKey } = this.state
    let _data = fromJS(this.state.data).toJS()
    if (editingKey) return
    _data.splice(hoverIndex, 0, ..._data.splice(dragIndex, 1))
    this.setState({
      data: _data
    }, () => {
      this.props.onChange(_data)
    })
  }
  render() {
    const components = {
    const { actions } = this.props
    let components = {
      body: {
        cell: EditableCell,
        cell: EditableCell
      }
    }
    if (!actions || actions.includes('down') || actions.includes('up')) {
      components.body.row = DragableBodyRow
    }
    
    const columns = this.state.columns.map(col => {
@@ -325,16 +378,22 @@
    return (
      <EditableContext.Provider value={this.props.form}>
        <div className="modal-edit-table">
          <Table
            bordered
            rowKey="uuid"
            components={components}
            dataSource={this.state.data}
            columns={columns}
            rowClassName="editable-row"
            pagination={false}
          />
        <div className={'modal-edit-table ' + (this.state.editingKey ? 'editing' : '')}>
          <DndProvider>
            <Table
              bordered
              rowKey="uuid"
              components={components}
              dataSource={this.state.data}
              columns={columns}
              rowClassName="editable-row"
              pagination={false}
              onRow={(record, index) => ({
                index,
                moveRow: this.moveRow,
              })}
            />
          </DndProvider>
        </div>
      </EditableContext.Provider>
    )
src/templates/zshare/editTable/index.scss
@@ -14,7 +14,10 @@
      width: 100%;
    }
    > td {
      padding: 16px 10px;
      padding: 14px 10px;
    }
    > td:last-child {
      padding: 0px;
    }
  }
@@ -27,6 +30,8 @@
    span {
      margin-right: 10px;
      cursor: pointer;
      font-size: 16px;
      padding: 5px;
    }
    .primary {
      color: #1890ff;
@@ -54,3 +59,16 @@
    margin: 0;
  }
}
.modal-edit-table.editing {
  .editable-row {
    cursor: default!important;
  }
}
.modal-edit-table:not(.editing) {
  tr.drop-over-downward td {
    border-bottom: 2px dashed #1890ff;
  }
  tr.drop-over-upward td {
    border-top: 2px dashed #1890ff;
  }
}
src/templates/zshare/verifycard/customscript/index.jsx
@@ -106,6 +106,8 @@
        // 数据权限
        param.LText = param.LText.replace(/@\$|\$@/ig, '')
        console.info(`/* sql 验证 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`)
        param.LText = Utils.formatOptions(param.LText)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
src/templates/zshare/verifycard/index.jsx
@@ -60,7 +60,7 @@
      {
        title: '报错编码',
        dataIndex: 'errorCode',
        width: '12%',
        width: '13%',
        editable: true,
        inputType: 'select',
        options: [
@@ -73,7 +73,7 @@
      {
        title: '验证类型',
        dataIndex: 'verifyType',
        width: '13%',
        width: '14%',
        render: (text, record) => record.verifyType === 'logic' ? '逻辑验证' : '物理验证',
        inputType: 'select',
        editable: true,
@@ -85,7 +85,7 @@
      {
        title: '是否启用',
        dataIndex: 'status',
        width: '13%',
        width: '14%',
        editable: true,
        required: false,
        inputType: 'switch',