From eba06cc3df5f5736d3310b3b57dfc7243f41134a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 01 八月 2024 15:39:12 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/zshare/mutilform/index.jsx | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index d7d6c61..24f5748 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -69,11 +69,18 @@ let fieldMap = new Map() let check = action.setting.formType === 'check' - if (this.props.data) { + if (this.props.data && !this.props.data.$$empty) { Object.keys(this.props.data).forEach(key => { data[key.toLowerCase()] = this.props.data[key] }) + } else if (action.uuid && sessionStorage.getItem('local_' + action.uuid)) { + let _data = JSON.parse(sessionStorage.getItem('local_' + action.uuid)) + + Object.keys(_data).forEach(key => { + data[key.toLowerCase()] = _data[key] + }) } + if (this.props.BData) { Object.keys(this.props.BData).forEach(key => { BData[key.toLowerCase()] = this.props.BData[key] @@ -146,6 +153,7 @@ // 鏁版嵁鑷姩濉厖 let readin = item.readin !== 'false' + item.local = item.readin === 'local' item.readin = item.readin !== 'false' && item.readin !== 'top' item.readonly = check || item.readonly === 'true' item.writein = item.writein !== 'false' @@ -1379,6 +1387,7 @@ } handleConfirm = (formId) => { + const { action } = this.props const { formlist, send_type, timestamp, n_id } = this.state // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� @@ -1390,6 +1399,7 @@ } let forms = [] let record = {...this.record, ...values} + let locals = null formlist.forEach(item => { if (!item.field || ['hint', 'split', 'formula'].includes(item.type)) return @@ -1486,12 +1496,21 @@ value: n_id || '' }) } + + if (item.local) { + locals = locals || {} + locals[item.field] = _item.value + } forms.push(_item) }) this.submitId = formId || '' + if (locals) { + sessionStorage.setItem('local_' + action.uuid, JSON.stringify(locals)) + } + resolve(forms) }) }) -- Gitblit v1.8.0