From cce4ab076f3fa26f393fe4039ef5a891e2e8b2a1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 31 十二月 2024 10:49:28 +0800 Subject: [PATCH] 2024-12-31 --- src/utils/utils-custom.js | 92 ++++++++++++++++++++++++---------------------- 1 files changed, 48 insertions(+), 44 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 0164b7c..8058453 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -652,7 +652,7 @@ */ static resetBtn (btn, commonId) { if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.execMode === 'pop')) { - if (btn.modal && btn.modal.fields.length > 0) { + if (btn.modal && btn.modal.fields && btn.modal.fields.length > 0) { btn.modal.fields = btn.modal.fields.map(m => { m.uuid = this.getuuid() return m @@ -684,6 +684,10 @@ return md5(commonId + m) }) + } + + if (btn.OpenType === 'popview' && btn.config && btn.config.components) { + btn.config.components = this.resetConfig(btn.config.components, commonId) } } @@ -771,14 +775,7 @@ if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) - if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { - if (cell.modal && cell.modal.fields.length > 0) { - cell.modal.fields = cell.modal.fields.map(m => { - m.uuid = this.getuuid() - return m - }) - } - } + this.resetBtn(cell, commonId) } else { cell.uuid = this.getuuid() } @@ -792,14 +789,8 @@ card.backElements = card.backElements.map(cell => { if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) - if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { - if (cell.modal && cell.modal.fields.length > 0) { - cell.modal.fields = cell.modal.fields.map(m => { - m.uuid = this.getuuid() - return m - }) - } - } + + this.resetBtn(cell, commonId) } else { cell.uuid = this.getuuid() } @@ -818,14 +809,8 @@ item.elements = item.elements.map(cell => { if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) - if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { - if (cell.modal && cell.modal.fields.length > 0) { - cell.modal.fields = cell.modal.fields.map(m => { - m.uuid = this.getuuid() - return m - }) - } - } + + this.resetBtn(cell, commonId) } else { cell.uuid = this.getuuid() } @@ -850,14 +835,7 @@ col.elements = col.elements.map(cell => { cell.uuid = md5(commonId + cell.uuid) if (cell.eleType === 'button') { - if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { - if (cell.modal && cell.modal.fields.length > 0) { - cell.modal.fields = cell.modal.fields.map(m => { - m.uuid = this.getuuid() - return m - }) - } - } + this.resetBtn(cell, commonId) } return cell }) @@ -902,14 +880,7 @@ } item.action = item.action.map(cell => { cell.uuid = md5(commonId + cell.uuid) - if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { - if (cell.modal && cell.modal.fields.length > 0) { - cell.modal.fields = cell.modal.fields.map(m => { - m.uuid = this.getuuid() - return m - }) - } - } + this.resetBtn(cell, commonId) return cell }) @@ -3089,6 +3060,13 @@ item.$menuname = (config.MenuName || '') + label + '-' + (item.name || '') if (item.type === 'tabs') { + if (config.Template === 'BaseTable') { + item.subtabs.forEach(tab => { + if (tab.permission !== 'true' && tab.components[0] && tab.components[0].wrap) { + tab.components[0].wrap.permission = 'false' + } + }) + } item.subtabs.forEach(tab => { let _mainSearch = mainSearch || [] @@ -3099,6 +3077,7 @@ _mainSearch = com.search || [] }) } + filterComponent(tab.components, _mainSearch, label, ispop) }) } else if (item.type === 'group') { @@ -3323,7 +3302,7 @@ } else if (form.type === 'popSelect') { let msg = getPopSelectSql(form) - sqls.push({uuid: form.uuid, type: 'popSource', ...msg}) + sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'popSource', ...msg}) } }) } @@ -3366,7 +3345,7 @@ } else if (form.type === 'popSelect') { let msg = getPopSelectSql(form) - sqls.push({uuid: form.uuid, type: 'popSource', ...msg}) + sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'popSource', ...msg}) } }) } @@ -4699,7 +4678,7 @@ } else if (['mk_address'].includes(s)) { decSql.push(`@mk_address nvarchar(100)`) } else if (['mk_deleted'].includes(s)) { - secSql.push(`@mk_deleted int`) + decSql.push(`@mk_deleted int`) } else { decSql.push(`@${s} nvarchar(50)`) } @@ -6442,5 +6421,30 @@ filterComponent(config.components, _mainSearch) + let keys = sqls.map(item => item.uuid) + if (keys.length > Array.from(new Set(keys)).length && !window.GLOB.syscheck) { + let m = new Map() + let n = new Map() + sqls.forEach(item => { + if (m.has(item.uuid)) { + if (!n.has(item.uuid)) { + window.mkInfo(m.get(item.uuid)) + n.set(item.uuid, true) + } + window.mkInfo(item) + } else { + m.set(item.uuid, item) + } + }) + + notification.warning({ + top: 92, + message: '瀛樺湪閲嶅鐨勫悗绔剼鏈琁D锛�', + duration: 5 + }) + + return [] + } + return sqls } \ No newline at end of file -- Gitblit v1.8.0