king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/utils/utils-custom.js
@@ -700,17 +700,15 @@
  }
  /**
   * @description 数据源名称,用于统一查询
   * @return {String}  name
   * @description 组件名加后缀
   */
  static getdataName () {
  static getSignName () {
    let name = []
    let _options = 'abcdefghigklmnopqrstuvwxyz'
    for (let i = 0; i < 6; i++) {
    for (let i = 0; i < 3; i++) {
      name.push(_options.substr(Math.floor(Math.random() * 26), 1))
    }
    name.splice(3, 0, new Date().getTime())
    return name.join('')
    return (Math.floor(Math.random()*10) + name.join('')).toUpperCase()
  }
  /**
@@ -728,12 +726,8 @@
    item.uuid = _uuid
    if (item.dataName) {
      item.dataName = this.getdataName()
    }
    // 重置组件名称
    let sign = this.getdataName().toUpperCase().substr(-4)
    let sign = this.getSignName()
    if (item.plot) { // 图表
      item.plot.name = item.plot.name + sign
      item.name = item.plot.name