From 1f5c6ac307a134dfa45b64c5723f2481ead9f213 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 16 七月 2023 16:23:09 +0800 Subject: [PATCH] 2023-07-16 --- src/templates/modalconfig/index.jsx | 52 +++++++++++++++++++++++----------------------------- 1 files changed, 23 insertions(+), 29 deletions(-) diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index 7ec9759..5e51140 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -126,6 +126,7 @@ } componentDidMount() { + window.GLOB.formId = '' MKEmitter.addListener('submitStyle', this.getStyle) document.onkeydown = (event) => { let e = event || window.event @@ -249,56 +250,51 @@ let index = null uniq.set(card.field, true) - let _inputIndex = 1 - let _tabIndex = 1 - let _linkIndex = 1 config.fields.forEach((item, i) => { if (card.uuid === item.uuid) { index = i } - let label = `${item.field || ''}锛�${item.label}锛塦 + if (!item.field) return if (['text', 'number', 'textarea', 'color'].includes(item.type) && card.field !== item.field) { _inputfields.push({ field: item.field, - label: _inputIndex + '銆�' + label + label: item.label }) - _inputIndex++ } if (card.field !== item.field && item.hidden !== 'true' && ['text', 'number', 'select', 'link'].includes(item.type)) { _tabfields.push({ field: item.field, - label: _tabIndex + '銆�' + label + label: item.label }) - _tabIndex++ } - if (item.type === 'switch') { + if (item.type === 'switch' || item.type === 'check') { _linksupFields.push({ field: item.field, - label: _linkIndex + '銆�' + label + label: item.label }) } - if (!['select', 'link', 'radio', 'checkcard'].includes(item.type)) return - if (item.type === 'checkcard' && item.multiple === 'true') return // 閫夐」鍗″閫� - if (item.field && !uniq.has(item.field)) { + if (!['select', 'link', 'radio', 'checkcard', 'multiselect'].includes(item.type)) return + + _linksupFields.push({ + field: item.field, + label: item.label + }) + + if (item.type === 'multiselect' || (item.type === 'checkcard' && item.multiple === 'true')) return + + if (!uniq.has(item.field)) { uniq.set(item.field, true) _linkableFields.push({ field: item.field, - label: _linkIndex + '銆�' + item.label + ' (琛ㄥ崟)' + label: item.label + '-琛ㄥ崟' }) - _linksupFields.push({ - field: item.field, - label: _linkIndex + '銆�' + label - }) - _linkIndex++ } }) - - _tabfields.unshift({field: '', label: '鍘熻〃鍗�'}) if (index !== null) { if (index === 0) { @@ -315,9 +311,8 @@ _linkableFields.push({ field: col.field, - label: _linkIndex + '銆�' + col.label + ' (鏄剧ず鍒�)' + label: col.label + '-鏄剧ず鍒�' }) - _linkIndex++ } }) } else if (tabConfig) { @@ -327,9 +322,8 @@ _linkableFields.push({ field: col.field, - label: _linkIndex + '銆�' + col.label + ' (鏄剧ず鍒�)' + label: col.label + '-鏄剧ず鍒�' }) - _linkIndex++ } }) } else if (menu.LongParam) { @@ -339,9 +333,8 @@ _linkableFields.push({ field: col.field, - label: _linkIndex + '銆�' + col.label + ' (鏄剧ず鍒�)' + label: col.label + '-鏄剧ず鍒�' }) - _linkIndex++ } }) } @@ -404,6 +397,8 @@ _config.fields = _config.fields.filter(item => !item.origin) + window.GLOB.formId = res.uuid + if (['select', 'multiselect', 'link', 'checkbox', 'radio', 'checkcard'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { this.setState({ sqlVerifing: true @@ -412,7 +407,7 @@ let param = { func: 's_debug_sql', exec_type: 'y', - LText: `declare @mk_organization nvarchar(512) + LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) ${res.dataSource}` } @@ -745,7 +740,6 @@ onCancel() {} }) } - render () { const { editAction } = this.props -- Gitblit v1.8.0