From b26252d4e842e2561b5295b0d07ae98a4eaa3fe6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 三月 2023 14:17:57 +0800 Subject: [PATCH] 2023-03-16 --- src/utils/utils-custom.js | 61 ++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 1 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 87f5cee..823cb11 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -674,6 +674,14 @@ * @description 鎸夐挳閲嶇疆 */ static resetBtn (btn, commonId) { + if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.execMode === 'pop')) { + if (btn.modal && btn.modal.fields.length > 0) { + btn.modal.fields = btn.modal.fields.map(m => { + m.uuid = this.getuuid() + return m + }) + } + } if (btn.switchTab && btn.switchTab.length > 0) { btn.switchTab = btn.switchTab.map(m => md5(commonId + m)) } @@ -701,7 +709,7 @@ * @description 閲嶇疆缁勪欢閰嶇疆 * @return {String} item 缁勪欢淇℃伅 */ - static resetComponentConfig = (item) => { + static resetComponentConfig = (item, appType) => { if (item.type === 'navbar') { return item } @@ -735,6 +743,16 @@ if (item.wrap.autoExec) { item.wrap.autoExec = md5(commonId + item.wrap.autoExec) } + + if (appType !== 'mob') { + if (item.wrap.pagestyle === 'slide') { + item.wrap.pagestyle = 'page' + } + } else { + if (item.wrap.pagestyle === 'switch') { + item.wrap.pagestyle = 'page' + } + } item.subcards.forEach(card => { card.uuid = this.getuuid() @@ -750,6 +768,15 @@ card.elements = card.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 + }) + } + } } else { cell.uuid = this.getuuid() } @@ -763,6 +790,14 @@ 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 + }) + } + } } else { cell.uuid = this.getuuid() } @@ -781,6 +816,14 @@ 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 + }) + } + } } else { cell.uuid = this.getuuid() } @@ -822,6 +865,14 @@ } col.elements = col.elements.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 + }) + } + } return cell }) @@ -858,6 +909,14 @@ } 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 + }) + } + } return cell }) -- Gitblit v1.8.0