king
2025-01-24 0ecde1c329ef1136f8f2a261c856ea405b327914
2025-01-24
10个文件已修改
129 ■■■■ 已修改文件
src/menu/components/card/data-card/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/double-data-card/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-scatter/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/pastecomponent/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/searchcomponent/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx
@@ -207,7 +207,7 @@
    this.updateComponent(_card)
  }
  addSearch = (copy) => {
  addSearch = (copy, type = '') => {
    const { card } = this.state
    let newcard = {}
@@ -228,7 +228,7 @@
    }
    // 注册事件-添加搜索
    MKEmitter.emit('addSearch', card.uuid, newcard)
    MKEmitter.emit('addSearch', card.uuid, newcard, type)
  }
  addButton = (copy) => {
@@ -501,14 +501,23 @@
        }
  
        if (res.field && keys.includes(res.field.toLowerCase())) {
          resolve({status: false, message: '搜索字段已存在!'})
          return
          resolve({status: false})
          const that = this
          confirm({
            title: '搜索字段已存在!',
            okText: '知道了',
            cancelText: '替换',
            onOk() {},
            onCancel() {
              that.addSearch(res, 'replace')
        }
          })
        } else {
        resolve({status: true})
        this.addSearch(res)
      }
      }
    } else if (type === 'action') {
      if (res.style) {
        delete res.style.width
src/menu/components/card/double-data-card/index.jsx
@@ -201,7 +201,7 @@
    this.updateComponent(_card)
  }
  addSearch = (copy) => {
  addSearch = (copy, type = '') => {
    const { card } = this.state
    let newcard = {}
@@ -222,7 +222,7 @@
    }
    // 注册事件-添加搜索
    MKEmitter.emit('addSearch', card.uuid, newcard)
    MKEmitter.emit('addSearch', card.uuid, newcard, type)
  }
  addButton = (copy) => {
@@ -466,14 +466,23 @@
        }
  
        if (res.field && keys.includes(res.field.toLowerCase())) {
          resolve({status: false, message: '搜索字段已存在!'})
          return
          resolve({status: false})
          const that = this
          confirm({
            title: '搜索字段已存在!',
            okText: '知道了',
            cancelText: '替换',
            onOk() {},
            onCancel() {
              that.addSearch(res, 'replace')
        }
          })
        } else {
        resolve({status: true})
        this.addSearch(res)
      }
      }
    } else if (type === 'action') {
      if (appType === 'mob' && !['pop', 'prompt', 'exec', 'innerpage'].includes(res.OpenType)) {
        resolve({status: false, message: '移动端不支持此类型的按钮。'})
src/menu/components/card/table-card/index.jsx
@@ -220,7 +220,7 @@
    this.updateComponent(card)
  }
  addSearch = (copy) => {
  addSearch = (copy, type = '') => {
    const { card } = this.state
    let newcard = {}
@@ -242,7 +242,7 @@
    }
    // 注册事件-添加搜索
    MKEmitter.emit('addSearch', card.uuid, newcard)
    MKEmitter.emit('addSearch', card.uuid, newcard, type)
  }
  move = (item, direction) => {
@@ -337,16 +337,25 @@
        }
  
        if (res.field && keys.includes(res.field.toLowerCase())) {
          resolve({status: false, message: '搜索字段已存在!'})
          return
          resolve({status: false})
          const that = this
          confirm({
            title: '搜索字段已存在!',
            okText: '知道了',
            cancelText: '替换',
            onOk() {},
            onCancel() {
              that.addSearch(res, 'replace')
        }
          })
        } else {
        resolve({status: true})
        this.addSearch(res)
      }
    }
  }
  }
  addButton = (copy) => {
    const { card } = this.state
src/menu/components/chart/antv-bar/index.jsx
@@ -1337,12 +1337,12 @@
  plusSearch = (uuid, search, type) => {
    const { card } = this.state
    if (card.uuid !== uuid || type !== 'simple') return
    if (card.uuid !== uuid || (type !== 'simple' && type !== 'replace')) return
    search.uuid = Utils.getuuid()
    search.focus = true
    MKEmitter.emit('addSearch', card.uuid, search)
    MKEmitter.emit('addSearch', card.uuid, search, type === 'replace' ? 'replace' : '')
  }
  addButton = () => {
src/menu/components/chart/antv-scatter/index.jsx
@@ -278,12 +278,12 @@
  plusSearch = (uuid, search, type) => {
    const { card } = this.state
    if (card.uuid !== uuid || type !== 'simple') return
    if (card.uuid !== uuid || (type !== 'simple' && type !== 'replace')) return
    search.uuid = Utils.getuuid()
    search.focus = true
    MKEmitter.emit('addSearch', card.uuid, search)
    MKEmitter.emit('addSearch', card.uuid, search, type === 'replace' ? 'replace' : '')
  }
  addButton = () => {
src/menu/components/search/main-search/index.jsx
@@ -342,6 +342,17 @@
      this.updateComponent(_card)
      this.handleSearch(item)
    } else if (type === 'replace') {
      delete item.focus
      _card.search = _card.search.map(cell => {
        if (cell.field && cell.field.toLowerCase() === item.field.toLowerCase()) {
          return item
        }
        return cell
      })
      this.updateComponent(_card)
      this.handleSearch(item)
    } else if (type === 'multil') {
      _card.search.push(...item)
src/menu/components/share/pastecomponent/index.jsx
@@ -10,6 +10,7 @@
import asyncComponent from '@/utils/asyncComponent'
// import './index.scss'
const { confirm } = Modal
const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform'))
class PasteController extends Component {
@@ -173,17 +174,20 @@
          }
        }
        if (res.field && keys.includes(res.field.toLowerCase())) {
          notification.warning({
            top: 92,
            message: '搜索字段已存在!',
            duration: 5
          })
          return
        }
        MKEmitter.emit('plusSearch', config.uuid, res, 'simple')
        this.setState({visible: false})
        if (res.field && keys.includes(res.field.toLowerCase())) {
          confirm({
            title: '搜索字段已存在!',
            okText: '知道了',
            cancelText: '替换',
            onOk() {},
            onCancel() {
              MKEmitter.emit('plusSearch', config.uuid, res, 'replace')
            }
          })
        } else {
          MKEmitter.emit('plusSearch', config.uuid, res, 'simple')
        }
        return
      } else if (type === 'cardcell') {
        config.subcards.push(res)
src/menu/components/share/searchcomponent/index.jsx
@@ -64,12 +64,24 @@
    MKEmitter.removeListener('addSearch', this.addSearch)
  }
  addSearch = (cardId, element) => {
  addSearch = (cardId, element, type) => {
    if (cardId !== this.props.config.uuid) return
    const { searchlist } = this.state
    if (type === 'replace') {
      delete element.focus
      this.setState({
        searchlist: searchlist.map(cell => {
          if (cell.field && cell.field.toLowerCase() === element.field.toLowerCase()) {
            return element
          }
          return cell
        }),
      })
    } else {
    this.setState({searchlist: [...searchlist, element]})
    }
    this.handleSearch(element)
  }
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -61,6 +61,18 @@
      }, () => {
        this.handleSearch(item)
      })
    } else if (type === 'replace') {
      delete item.focus
      this.setState({
        searchlist: searchlist.map(cell => {
          if (cell.field && cell.field.toLowerCase() === item.field.toLowerCase()) {
            return item
          }
          return cell
        }),
      }, () => {
        this.handleSearch(item)
      })
    } else if (type === 'multil') {
      let list = [...searchlist, ...item]
      list = list.filter(item => !item.origin) // 去除系统项
src/templates/zshare/verifycard/index.jsx
@@ -2027,7 +2027,8 @@
      _lpline = `set @ModularDetailCode= right('${record.ModularDetailCode}',50)`
    }
    let sql = `select @BillCode='', @${record.field}='', @ModularDetailCode=''
    let sql = `Declare @BillCode nvarchar(50),@ModularDetailCode nvarchar(50)
    select @BillCode='', @${record.field}='', @ModularDetailCode=''
    ${_lpline}
    exec s_get_BillCode
      @ModularDetailCode=@ModularDetailCode,