king
2023-08-10 155ac060f543d5e8a64be36d611941e68ac0812f
Merge branch 'master' into positec
19个文件已修改
218 ■■■■ 已修改文件
src/assets/css/main.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/loginform.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/markcomponent/index.jsx 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/markcomponent/markform/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editTable/index.jsx 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/logincloudform.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/loginform.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/main.scss
@@ -16,6 +16,18 @@
    outline: none;
  }
}
::selection {
  color: #ffffff;
  background: var(--mk-sys-color);
}
::-moz-selection {
  color: #ffffff;
  background: var(--mk-sys-color);
}
::-webkit-selection {
  color: #ffffff;
  background: var(--mk-sys-color);
}
.table-col-1, .table-col-2, .table-col-3, .table-col-4 {
  .ant-table colgroup > col.ant-table-selection-col {
src/components/header/loginform.jsx
@@ -59,8 +59,8 @@
            values.password = oripassword
          }
          
          values.username = values.username.replace(/\t*|\v*|\s*/g, '')
          values.password = values.password.replace(/\t*|\v*|\s*/g, '')
          values.username = values.username.replace(/\t+|\v+|\s+/g, '')
          values.password = values.password.replace(/\t+|\v+|\s+/g, '')
          resolve(values)
        } else {
src/menu/components/share/markcomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Modal, Col } from 'antd'
import { Modal, Col, notification } from 'antd'
import { AntDesignOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
@@ -32,6 +32,20 @@
        dataIndex: 'field',
        width: '16%',
        editable: true,
        unique: true,
        uniqueFunc: (data, item) => {
          let index = data.findIndex(mark => mark.uuid !== item.uuid && mark.contrastValue === item.contrastValue && mark.match === item.match && mark.field.join('') === item.field.join(''))
          if (index > -1) {
            notification.warning({
              top: 92,
              message: '此标记已存在!',
              duration: 5
            })
            return false
          }
          return true
        },
        inputType: 'cascader',
        options: [],
        rules: [{
@@ -118,18 +132,24 @@
  markChange = (values) => {
    let _marks = fromJS(this.state.marks).toJS()
    if (values.uuid) {
      _marks = _marks.map(item => {
        if (item.uuid === values.uuid) {
          return values
        } else {
          return item
        }
    let has = false
    _marks.forEach(mark => {
      if (mark.contrastValue === values.contrastValue && mark.match === values.match && mark.field.join('') === values.field.join('')) {
        has = true
      }
    })
    if (has) {
      notification.warning({
        top: 92,
        message: '此标记已存在!',
        duration: 5
      })
    } else {
      values.uuid = Utils.getuuid()
      _marks.push(values)
      return
    }
    values.uuid = Utils.getuuid()
    _marks.push(values)
    this.setState({
      marks: _marks
@@ -319,6 +339,11 @@
          item.fontColor = ''
        }
      }
      if (item.contrastValue) {
        item.contrastValue = item.contrastValue.replace(/\t+|\v+|\s+/g, '')
      }
      if (val && item.contrastValue === val) {
        save = true
      }
src/menu/components/share/markcomponent/markform/index.jsx
@@ -18,6 +18,9 @@
    // 表单提交时检查输入值是否正确
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
        if (values.contrastValue) {
          values.contrastValue = values.contrastValue.replace(/\t+|\v+|\s+/g, '')
        }
        this.props.markChange(values)
      }
    })
src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss
@@ -167,12 +167,33 @@
      width: 300px;
      margin-bottom: 10px;
    }
    .ant-transfer-customize-list .ant-transfer-list {
      min-height: 300px;
    .ant-tree-checkbox-checked .ant-tree-checkbox-inner {
      background-color: var(--mk-sys-color);
      border-color: var(--mk-sys-color);
    }
    .ant-tree-checkbox-checked::after {
      border-color: var(--mk-sys-color);
    }
    .ant-tree-checkbox:hover .ant-tree-checkbox-inner {
      border-color: var(--mk-sys-color);
    }
    .ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover {
      background-color: var(--mk-sys-color1);
    }
    .ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner::after {
      border-color: var(--mk-sys-color4);
    }
    .ant-transfer-operation {
      .ant-btn, .ant-btn:hover {
        background-color: var(--mk-sys-color);
        border-color: var(--mk-sys-color);
      }
    }
    .ant-transfer-list-body {
      max-height: calc(100vh - 320px);
      min-height: 300px;
      overflow-y: auto;
    }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -207,7 +207,7 @@
    let xc = {label: {
      formatter: (val) => {
        if (!val || /^\s*$/.test(val)) return val
        if (!val || /^\s+$/.test(val)) return val
        let _val = `${val}`
        if (_val.length <= limit) return val
        return _val.substring(0, limit) + '...'
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2866,7 +2866,7 @@
        _item.fieldlen = item.decimal || 0
      } else if (['text', 'textarea', 'linkMain'].includes(_item.type)) {
        _item.value = _item.value + ''
        _item.value = _item.value.replace(/\t*|\v*/g, '')       // 去除制表符
        _item.value = _item.value.replace(/\t+|\v+/g, '')       // 去除制表符
        if (item.interception !== 'false') {                    // 去除首尾空格
          _item.value = _item.value.replace(/(^\s*|\s*$)/g, '')
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -2167,7 +2167,7 @@
        _item.fieldlen = item.decimal || 0
      } else if (['text', 'textarea', 'linkMain'].includes(_item.type)) {
        _item.value = _item.value + ''
        _item.value = _item.value.replace(/\t*|\v*/g, '')       // 去除制表符
        _item.value = _item.value.replace(/\t+|\v+/g, '')       // 去除制表符
        if (item.interception !== 'false') {                    // 去除首尾空格
          _item.value = _item.value.replace(/(^\s*|\s*$)/g, '')
src/tabviews/zshare/mutilform/index.jsx
@@ -1151,7 +1151,7 @@
            _item.fieldlen = item.decimal || 0
          } else if (['text', 'textarea', 'linkMain'].includes(item.type)) {
            _item.value = _item.value + ''
            _item.value = _item.value.replace(/\t*|\v*/g, '')       // 去除制表符
            _item.value = _item.value.replace(/\t+|\v+/g, '')       // 去除制表符
    
            if (item.interception !== 'false') {                    // 去除首尾空格
              _item.value = _item.value.replace(/(^\s*|\s*$)/g, '')
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -756,7 +756,7 @@
          ['linkField', 'valueField', 'valueText', 'orderBy'].forEach(item => {
            if (values[item]) {
              values[item] = values[item].replace(/\s* | \t* | \v* | \r*/ig, '')
              values[item] = values[item].replace(/\s+|\t+|\v+|\r+/ig, '')
            }
          })
src/templates/zshare/editTable/index.jsx
@@ -416,7 +416,9 @@
      columns.forEach(col => {
        if (col.unique !== true || !unique) return
        if (col.strict) {
        if (col.uniqueFunc) {
          unique = col.uniqueFunc(data, res.data)
        } else if (col.strict) {
          let key = res.data[col.dataIndex].toLowerCase()
          let _index = data.findIndex(item => key === item[col.dataIndex].toLowerCase())
@@ -455,7 +457,9 @@
        columns.forEach(col => {
          if (col.unique !== true || !unique) return
          if (col.strict) {
          if (col.uniqueFunc) {
            unique = col.uniqueFunc(data, cell)
          } else if (col.strict) {
            let _index = data.findIndex(item => cell[col.dataIndex].toLowerCase() === item[col.dataIndex].toLowerCase())
  
            if (_index > -1) {
@@ -518,15 +522,32 @@
    columns.forEach(col => {
      if (col.unique !== true || !unique) return
      let _index = newData.findIndex(item => record.uuid !== item.uuid && record[col.dataIndex] === item[col.dataIndex])
      if (col.uniqueFunc) {
        unique = col.uniqueFunc(newData, record)
        return
      } else if (col.strict) {
        let key = record[col.dataIndex].toLowerCase()
        let _index = newData.findIndex(item => key === item[col.dataIndex].toLowerCase())
      if (_index > -1) {
        notification.warning({
          top: 92,
          message: col.title + '不可重复!',
          duration: 5
        })
        unique = false
        if (_index > -1) {
          notification.warning({
            top: 92,
            message: col.title + '不可重复!',
            duration: 5
          })
          unique = false
        }
      } else {
        let _index = newData.findIndex(item => record.uuid !== item.uuid && record[col.dataIndex] === item[col.dataIndex])
        if (_index > -1) {
          notification.warning({
            top: 92,
            message: col.title + '不可重复!',
            duration: 5
          })
          unique = false
        }
      }
    })
@@ -557,31 +578,49 @@
      }
      const newData = [...this.state.data]
      const index = newData.findIndex(item => uuid === item.uuid)
      if (index > -1) {
        row = {...newData[index], ...row}
      } else {
        row.uuid = uuid
      }
      let unique = true
      columns.forEach(col => {
        if (col.unique !== true || !unique) return
        let _index = newData.findIndex(item => uuid !== item.uuid && row[col.dataIndex] === item[col.dataIndex])
        if (_index > -1) {
          notification.warning({
            top: 92,
            message: col.title + '不可重复!',
            duration: 5
          })
          unique = false
        if (col.uniqueFunc) {
          unique = col.uniqueFunc(newData, row)
          return
        } else if (col.strict) {
          let key = row[col.dataIndex].toLowerCase()
          let _index = newData.findIndex(item => key === item[col.dataIndex].toLowerCase())
          if (_index > -1) {
            notification.warning({
              top: 92,
              message: col.title + '不可重复!',
              duration: 5
            })
            unique = false
          }
        } else {
          let _index = newData.findIndex(item => row.uuid !== item.uuid && row[col.dataIndex] === item[col.dataIndex])
          if (_index > -1) {
            notification.warning({
              top: 92,
              message: col.title + '不可重复!',
              duration: 5
            })
            unique = false
          }
        }
      })
      if (!unique) return
      if (index > -1) {
        const item = newData[index]
        newData.splice(index, 1, {
          ...item,
          ...row,
        })
        newData.splice(index, 1, row)
        this.setState({ data: newData, editingKey: '' }, () => {
          this.props.onChange(newData)
        })
src/templates/zshare/modalform/index.jsx
@@ -986,7 +986,7 @@
          ['linkField', 'valueField', 'valueText', 'orderBy'].forEach(item => {
            if (values[item]) {
              values[item] = values[item].replace(/\s*|\t*|\v*|\r*/ig, '')
              values[item] = values[item].replace(/\s+|\t+|\v+|\r+/ig, '')
            }
          })
src/utils/utils.js
@@ -983,7 +983,7 @@
          val = val.replace(/'/ig, '"')
        }
        val = val.replace(/(^\s*$)|\t*|\v*/ig, '')
        val = val.replace(/(^\s+$)|\t+|\v+/ig, '')
        if (!val && col.required === 'true') {            // 必填校验
          errors.push(_position + '内容不可为空')
@@ -1018,7 +1018,7 @@
            val = moment('19000101', 'YYYYMMDD').add(Math.floor(val - 2), 'days').format('YYYY-MM-DD')
          }
        } else if (typeof(val) === 'string') {
          val = val.replace(/(^\s*$)|\t*|\v*/ig, '')
          val = val.replace(/(^\s+$)|\t+|\v+/ig, '')
          if (!val && col.required === 'true') {           // 时间必填校验
            errors.push(_position + '内容不可为空')
          } else if (val && !/^[1-9][0-9]{3}/.test(val)) { // 时间正则校验
src/views/login/logincloudform.jsx
@@ -20,8 +20,8 @@
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          values.cloudusername = values.cloudusername.replace(/\t*|\v*|\s*/g, '')
          values.cloudpassword = values.cloudpassword.replace(/\t*|\v*|\s*/g, '')
          values.cloudusername = values.cloudusername.replace(/\t+|\v+|\s+/g, '')
          values.cloudpassword = values.cloudpassword.replace(/\t+|\v+|\s+/g, '')
          resolve(values)
        } else {
          reject(err)
src/views/login/loginform.jsx
@@ -161,11 +161,11 @@
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          if (activeKey === 'uname_pwd') {
            values.username = values.username.replace(/\t*|\v*|\s*/g, '')
            values.password = values.password.replace(/\t*|\v*|\s*/g, '')
            values.username = values.username.replace(/\t+|\v+|\s+/g, '')
            values.password = values.password.replace(/\t+|\v+|\s+/g, '')
          } else if (activeKey === 'sms_vcode') {
            values.phone = values.phone.replace(/\t*|\v*|\s*/g, '')
            values.vercode = values.vercode.replace(/\t*|\v*|\s*/g, '')
            values.phone = values.phone.replace(/\t+|\v+|\s+/g, '')
            values.vercode = values.vercode.replace(/\t+|\v+|\s+/g, '')
          }
          resolve({type: activeKey, ...values})
        } else {
src/views/menudesign/index.jsx
@@ -1045,7 +1045,6 @@
            message: '保存成功',
            duration: 2
          })
          MKEmitter.emit('completeSave')
        } else {
          notification.warning({
            top: 92,
@@ -1053,6 +1052,7 @@
            duration: 5
          })
        }
        MKEmitter.emit('completeSave')
      }, this.netError)
    }, 300 + (+sessionStorage.getItem('mkDelay')))
  }
@@ -1069,6 +1069,7 @@
        duration: 5
      })
    }
    MKEmitter.emit('completeSave')
  }
  getRoleFields = () => {
src/views/mobdesign/index.jsx
@@ -1723,7 +1723,6 @@
            message: '保存成功',
            duration: 2
          })
          MKEmitter.emit('completeSave')
        } else {
          notification.warning({
            top: 92,
@@ -1731,6 +1730,7 @@
            duration: 5
          })
        }
        MKEmitter.emit('completeSave')
      }, this.netError)
    }, 300 + (+sessionStorage.getItem('mkDelay')))
  }
@@ -1747,6 +1747,7 @@
        duration: 5
      })
    }
    MKEmitter.emit('completeSave')
  }
  getRoleFields = () => {
src/views/pcdesign/index.jsx
@@ -1440,7 +1440,6 @@
            message: '保存成功',
            duration: 2
          })
          MKEmitter.emit('completeSave')
        } else {
          notification.warning({
            top: 92,
@@ -1448,6 +1447,7 @@
            duration: 5
          })
        }
        MKEmitter.emit('completeSave')
      }, this.netError)
    }, 300 + (+sessionStorage.getItem('mkDelay')))
  }
@@ -1464,6 +1464,7 @@
        duration: 5
      })
    }
    MKEmitter.emit('completeSave')
  }
  getRoleFields = () => {
src/views/tabledesign/index.jsx
@@ -692,7 +692,6 @@
            message: '保存成功',
            duration: 2
          })
          MKEmitter.emit('completeSave')
        } else {
          notification.warning({
            top: 92,
@@ -700,6 +699,7 @@
            duration: 5
          })
        }
        MKEmitter.emit('completeSave')
      }, this.netError)
    }, 300 + (+sessionStorage.getItem('mkDelay')))
  }
@@ -716,6 +716,7 @@
        duration: 5
      })
    }
    MKEmitter.emit('completeSave')
  }
  getRoleFields = () => {