king
2024-08-15 cb59703536b8fe29117ea1de415361395f4820e6
2024-08-15
12个文件已修改
89 ■■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/data-card/options.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/options.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/options.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/options.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/timeline/normal-timeline/options.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/utils.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -135,10 +135,8 @@
        cell.$ctrls = cell.$ctrls || []
        cell.$ctrls.push(key)
        if (cell.hidden) return
        if (cell.skip && supItem.forbid) { // 上级表单禁用时,此表单不受控制
        if (cell.hidden) {
        } else if (supItem.hidden) {
          cell.hidden = true
        } else if (item.notNull) {
src/menu/components/card/balcony/options.jsx
@@ -170,7 +170,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/components/card/data-card/options.jsx
@@ -161,7 +161,7 @@
        {value: 'public', label: '公共数据源', priKeyType: 'static'},
      ],
      linkFields: ['priKeyType'],
      controlFields: [
      controlFields: subtype === 'propcard' ? [
        {field: 'goback', values: ['dynamic', 'public']},
        {field: 'empty', values: ['dynamic', 'public']},
        {field: 'jump', values: ['dynamic', 'public']},
@@ -169,7 +169,7 @@
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
        {field: 'emptyExec', values: ['dynamic', 'public']},
      ],
      ] : null,
      forbid: subtype !== 'propcard'
    },
    {
@@ -440,9 +440,9 @@
        {value: 'normal', label: '正常显示'},
        {value: 'hidden', label: '不可见'},
      ],
      controlFields: [
      controlFields: subtype === 'propcard' ? [
        {field: 'empty', values: ['normal']},
      ],
      ] : null,
      forbid: subtype !== 'propcard'
    },
    {
@@ -452,7 +452,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/components/carousel/data-card/options.jsx
@@ -54,9 +54,9 @@
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ],
      controlFields: [
      controlFields: subtype === 'propcard' ? [
        {field: 'empty', values: ['dynamic']},
      ],
      ] : null,
      forbid: subtype !== 'propcard'
    },
    {
@@ -197,7 +197,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/components/editor/braft-editor/options.jsx
@@ -125,7 +125,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/components/form/simple-form/options.jsx
@@ -233,7 +233,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/components/form/step-form/options.jsx
@@ -204,7 +204,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/components/timeline/normal-timeline/options.jsx
@@ -206,7 +206,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
src/menu/datasource/verifycard/utils.jsx
@@ -62,8 +62,8 @@
      {reg: /@Appkey@/ig, value: `'${window.GLOB.appkey}'`},
      {reg: /@lang@/ig, value: `'${sessionStorage.getItem('lang')}'`},
      {reg: /@\$|\$@/ig, value: ''},
      {reg: /@select\$|\$select@/ig, value: ''},
      {reg: /@sum\$|\$sum@/ig, value: ''},
      // {reg: /@select\$|\$select@/ig, value: ''},
      // {reg: /@sum\$|\$sum@/ig, value: ''},
    ]
    if (window.GLOB.process && type !== 'invoice') {
src/menu/debug/index.jsx
@@ -95,6 +95,9 @@
      config.interfaces.forEach(m => {
        if (m.status !== 'true' || m.setting.interType !== 'system') return false
  
        m.setting.laypage = 'false'
        m.setting.$top = true
        let sql = this.formatDataSource(m, regs)
  
        this.sqlList.push({label: m.setting.name, children: [{label: '数据源', sql: sql}]})
@@ -309,6 +312,11 @@
        }
        if (item.setting && item.setting.interType === 'system') {
          if (item.format === 'object') {
            item.setting.laypage = 'false'
            item.setting.$top = true
          }
          let sql = this.formatDataSource(item, regs, _mainSearch)
  
          children.push({label: '数据源', sql: sql})
@@ -656,8 +664,24 @@
    let BID = Utils.getuuid()
    let verify = btn.verify || {}
    let _actionType = null
    let setting = component.setting
    let setting = component.setting || {}
    let columns = component.columns || []
    if (verify.invalid === 'true') {
      if (component.wrap && (component.wrap.datatype === 'static' || component.wrap.datatype === 'public')) {
        verify.invalid = 'false'
      } else if (setting.maxScript && setting.maxScript >= 300) {
        verify.invalid = 'false'
      } else if (!setting.dataresource) {
        verify.invalid = 'false'
      } else if (btn.intertype !== 'system' && btn.procMode !== 'system') {
        verify.invalid = 'false'
      } else if (btn.sqlType === 'insert') {
        verify.invalid = 'false'
      } else if (btn.Ot === 'notRequired') {
        verify.invalid = 'false'
      }
    }
  
    if (verify.default !== 'false') { // 判断是否使用默认sql
      _actionType = btn.sqlType
@@ -820,7 +844,7 @@
    })
  
    // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过)
    if (btn.Ot !== 'notRequired' && columns && columns.length > 0) {
    if (btn.Ot !== 'notRequired' && columns.length > 0) {
      const setField = (col) => {
        if (!col.field) return
        let _key = col.field.toLowerCase()
@@ -955,7 +979,7 @@
    }
  
    // 失效验证,添加数据时不用
    if (btn.sqlType !== 'insert' && btn.Ot !== 'notRequired' && verify.invalid === 'true' && setting.dataresource) {
    if (verify.invalid === 'true') {
      let datasource = setting.dataresource
      let customScript = setting.customScript || ''
      let orderBy = setting.order
@@ -2055,7 +2079,7 @@
  formatDataSource = (item, regs, mainSearch = []) => {
    if (!item.setting || item.setting.interType !== 'system') return false
    let searches = item.search || []
    if (item.setting.useMSearch === 'true' && mainSearch.length > 0) {
      searches = [...searches, ...mainSearch]
@@ -2120,6 +2144,12 @@
        _dataresource = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search} `
      } else if (item.setting.laypage === 'true' && item.setting.order) {
        _dataresource = `/*system_query*/select top 10 ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${item.setting.order}) as rows from ${_dataresource} ${_search}) tmptable where rows > 0 order by tmptable.rows `
      } else if (item.setting.$top) {
        if (item.setting.order) {
          _dataresource = `/*system_query*/select top 1 ${arr_field} from ${_dataresource} ${_search} order by ${item.setting.order} `
        } else {
          _dataresource = `/*system_query*/select top 1 ${arr_field} from ${_dataresource} ${_search}  `
        }
      } else if (item.setting.order) {
        _dataresource = `/*system_query*/select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${item.setting.order}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
      } else {
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
@@ -38,13 +38,13 @@
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'1949-10-01 15:00:00'`)
    _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
    _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
    // _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
    // _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
    // _dataresource = _dataresource.replace(/@sum\$|\$sum@/ig, '')
    _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '')
    // _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '')
    _dataresource = _dataresource.replace(/\$sum@/ig, '/*$sum@')
    _dataresource = _dataresource.replace(/@sum\$/ig, '@sum$*/')
    // _dataresource = _dataresource.replace(/\$sum@/ig, '/*$sum@')
    // _dataresource = _dataresource.replace(/@sum\$/ig, '@sum$*/')
    // 外联数据库替换
    if (window.GLOB.externalDatabase !== null) {
src/utils/utils-datamanage.js
@@ -142,9 +142,9 @@
      { reg: /@orderBy@/ig, value: orderBy },
      { reg: /@pageSize@/ig, value: setting.laypage ? pageSize : '9999' },
      { reg: /@pageIndex@/ig, value: pageIndex},
      { reg: /@select\$|\$select@/ig, value: ''},
      { reg: /\$sum@/ig, value: '/*'},
      { reg: /@sum\$/ig, value: '*/'},
      // { reg: /@select\$|\$select@/ig, value: ''},
      // { reg: /\$sum@/ig, value: '/*'},
      // { reg: /@sum\$/ig, value: '*/'},
      { reg: /@ID@/ig, value: `'${id || ''}'`},
      { reg: /@BID@/ig, value: `'${BID || ''}'`},
      { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},
@@ -375,9 +375,9 @@
      { reg: /@orderBy@/ig, value: orderBy },
      { reg: /@pageSize@/ig, value: 999999 },
      { reg: /@pageIndex@/ig, value: 1},
      { reg: /\$select@/ig, value: '/*'},
      { reg: /@select\$/ig, value: '*/'},
      { reg: /@sum\$|\$sum@/ig, value: ''},
      // { reg: /\$select@/ig, value: '/*'},
      // { reg: /@select\$/ig, value: '*/'},
      // { reg: /@sum\$|\$sum@/ig, value: ''},
      { reg: /@ID@/ig, value: `''`},
      { reg: /@BID@/ig, value: `'${BID || ''}'`},
      { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},