king
2025-04-30 9a47acddeb1e6c8a22538a6f12d525106a6f6e5a
src/utils/utils-custom.js
@@ -2288,40 +2288,6 @@
      duration: 5
    })
    return false
  } else if (/,\./ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/,\./ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现英文逗号,.`,
      duration: 5
    })
    return false
  } else if (/\.,/ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/\.,/ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现英文逗号.,`,
      duration: 5
    })
    return false
  } else if (/‘|’/ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
@@ -2424,6 +2390,38 @@
      duration: 5
    })
    return false
  } else if (/,\./ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/,\./ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现英文逗号,.`,
      duration: 5
    })
  } else if (/\.,/ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/\.,/ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现英文逗号.,`,
      duration: 5
    })
  }
  return true
@@ -5012,7 +5010,7 @@
    let sFields = getSearches(searches)
    let _columns = []
    if (item.subtype === 'dualdatacard') {
    if (item.subtype === 'dualdatacard' && item.setting.subdata !== 'sub_data_string') {
      _columns = [...item.columns, ...item.subColumns]
    } else if (item.columns) {
      _columns = [...item.columns]
@@ -5128,7 +5126,7 @@
      } else if (item.setting.laypage === 'true' && item.setting.order) {
        LText = `select top @pageSize@ ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by @orderBy@) as rows from ${_dataresource} ${_search}) tmptable where rows > @pageSize@ * (@pageIndex@ - 1) order by tmptable.rows `
        reps.push('pageSize', 'orderBy', 'pageIndex')
        if (item.subtype === 'dualdatacard') {
        if (item.subtype === 'dualdatacard' && item.setting.subdata !== 'sub_data_string') {
          DateCount = `select count(1) as total from (select distinct ${item.setting.primaryKey || 'ID'} from ${_dataresource} ${_search})a`
        } else {
          DateCount = `select count(1) as total from ${_dataresource} ${_search}`
@@ -5155,7 +5153,7 @@
    let parid = ''
    let sub_field = ''
    if (item.subtype === 'dualdatacard') {
    if (item.subtype === 'dualdatacard' && item.setting.subdata !== 'sub_data_string') {
      arr_field = item.columns.map(col => col.field).join(',')
      sub_name = item.setting.subdata
      tabid = item.setting.primaryKey || ''