From f1a4a2e83a5a3a3f8636c0d85a3a02471c5b07e7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 05 三月 2025 15:39:52 +0800 Subject: [PATCH] Merge branch 'positec' into dms --- src/templates/zshare/modalform/index.jsx | 97 +++++++++++++++++++++++++++--------------------- 1 files changed, 54 insertions(+), 43 deletions(-) diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index a860265..63636ae 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -41,7 +41,7 @@ hint: ['label', 'field', 'type', 'blacklist', 'supField', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField', 'opacity'], formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], - brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom', 'contHeidht'], + brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'encryption', 'marginTop', 'marginBottom', 'contHeidht'], funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom', 'verifyVal'], popSelect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'enter', 'dataSource', 'columns', 'primaryKey', 'order', 'controlField', 'laypage', 'onload', 'searchKey', 'showField', 'popWidth'], @@ -295,6 +295,10 @@ if (this.record.interception === 'func') { shows.push('func') } + } else if (type === 'brafteditor') { + if (this.record.interception === 'func') { + shows.push('func') + } } else if (type === 'popSelect') { if (this.record.enter === 'tab' || this.record.enter === 'sub') { shows.push('tabField') @@ -421,7 +425,9 @@ if (value === 'brafteditor') { this.record.encryption = 'true' + this.record.interception = 'false' _fieldval.encryption = 'true' + _fieldval.interception = 'false' } if (value === 'linkMain') { @@ -890,51 +896,51 @@ return fields } - transfer = (options) => { - if (options.length === 0) return options + // transfer = (options) => { + // if (options.length === 0) return options - let isNumber = true - options.forEach(item => { - if (!item.Value || isNaN(item.Value)) { - isNumber = false - } - }) + // let isNumber = true + // options.forEach(item => { + // if (!item.Value || isNaN(item.Value)) { + // isNumber = false + // } + // }) - if (isNumber) { - return options.map(item => { - item.Value = +item.Value - return item - }) - } else { - return options.map(item => { - item.Value = item.Value + '' - return item - }) - } - } + // if (isNumber) { + // return options.map(item => { + // item.Value = +item.Value + // return item + // }) + // } else { + // return options.map(item => { + // item.Value = item.Value + '' + // return item + // }) + // } + // } - transferCard = (options) => { - if (options.length === 0) return options + // transferCard = (options) => { + // if (options.length === 0) return options - let isNumber = true - options.forEach(item => { - if (!/^([0-9]|[1-9]\d{0,2})$/.test(item.$value)) { - isNumber = false - } - }) + // let isNumber = true + // options.forEach(item => { + // if (!/^([0-9]|[1-9]\d{0,2})$/.test(item.$value)) { + // isNumber = false + // } + // }) - if (isNumber) { - return options.map(item => { - item.$value = +item.$value - return item - }) - } else { - return options.map(item => { - item.$value = item.$value + '' - return item - }) - } - } + // if (isNumber) { + // return options.map(item => { + // item.$value = +item.$value + // return item + // }) + // } else { + // return options.map(item => { + // item.$value = item.$value + '' + // return item + // }) + // } + // } handleConfirm = () => { const { card, fields } = this.props @@ -970,13 +976,17 @@ if (['multiselect', 'select', 'link', 'radio', 'checkbox'].includes(values.type)) { if (values.resourceType === '0') { values.options = values.options || [] + values.options = values.options.map(item => { + item.Value = item.Value + '' + return item + }) values.dataSource = '' let type = values.type if (values.type === 'radio' && values.linkField) { type = 'link' } - values.options = this.transfer(values.options) + // values.options = this.transfer(values.options) if (values.options.filter(op => op.Text === '').length > 0) { notification.warning({ @@ -1024,6 +1034,7 @@ let linkSubFields = values.linkSubField || [] values.options = values.options.map(m => { m.ParentID = m.ParentID || '' + m.$value = m.$value + '' linkSubFields.forEach(n => { m[n] = m[n] || '' @@ -1031,7 +1042,7 @@ return m }) - values.options = this.transferCard(values.options) + // values.options = this.transferCard(values.options) let type = values.type if (values.linkField) { -- Gitblit v1.8.0