| | |
| | | arrfield.push(...item.linkSubField) |
| | | } else if (item.type === 'checkcard') { |
| | | arrfield = item.fields.map(f => f.field) |
| | | arrfield.push(item.valueField) |
| | | arrfield.push(item.cardValField) |
| | | if (item.urlField) { |
| | | arrfield.push(item.urlField) |
| | | } |
| | | } |
| | | |
| | | arrfield = Array.from(new Set(arrfield)) |
| | |
| | | } |
| | | |
| | | // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过) |
| | | if (data && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') { |
| | | if (data && !btn.$forbid && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') { |
| | | datavars = {...data, ...datavars} |
| | | |
| | | const setField = (col) => { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 生成替换函数列表 |
| | | */ |
| | | export function setGLOBFuncs () { |
| | | window.GLOB.funcs = [] |
| | | if (!window.GLOB.WebSql && !window.GLOB.IndexDB) { |
| | | return |
| | | } |
| | | |
| | | if (window.GLOB.WebSql) { |
| | | window.GLOB.WebSql.transaction(tx => { |
| | | tx.executeSql("SELECT * FROM FUNCS", [], (tx, results) => { |
| | | let rows = results.rows |
| | | if (!rows || rows.length === 0) return |
| | | for (let i = 0; i < rows.length; i++) { |
| | | window.GLOB.funcs.push({ |
| | | func_code: rows[i].func_code, |
| | | key_sql: window.decodeURIComponent(window.atob(rows[i].key_sql)) |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let objectStore = window.GLOB.IndexDB.transaction('funcs').objectStore('funcs') |
| | | |
| | | objectStore.openCursor().onsuccess = (event) => { |
| | | let cursor = event.target.result |
| | | |
| | | if (cursor) { |
| | | window.GLOB.funcs.push({ |
| | | func_code: cursor.value.func_code, |
| | | key_sql: window.decodeURIComponent(window.atob(cursor.value.key_sql)) |
| | | }) |
| | | cursor.continue() |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * @description 创建存储过程类 |
| | | */ |
| | | export class FuncUtils { |