From fbe8b1adf4b50323b7ea6ad09c810cb3e07a69b9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 04 二月 2020 11:47:38 +0800 Subject: [PATCH] 2020-02-04 --- src/templates/ushare/modalform/index.jsx | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/templates/ushare/modalform/index.jsx b/src/templates/ushare/modalform/index.jsx index d0a7029..4151053 100644 --- a/src/templates/ushare/modalform/index.jsx +++ b/src/templates/ushare/modalform/index.jsx @@ -39,7 +39,10 @@ } if (type === 'select') { - _options = [..._options, 'setAll', 'linkSubField'] + _options = [..._options, 'setAll'] + if (resourceType === '1') { + _options.push('linkSubField') + } } else if (type === 'link') { // 鍏宠仈绫诲瀷銆佸鍔犲叧鑱斿瓧娈� _options = [..._options, 'setAll', 'linkField'] } else if (type === 'funcvar') { // 璁剧疆涓哄嚱鏁板彉閲忔椂锛屼笉闇�瑕佸叾浠栦俊鎭� @@ -92,7 +95,10 @@ } if (value === 'select') { - _options = [..._options, 'setAll', 'linkSubField'] + _options = [..._options, 'setAll'] + if (this.state.resourceType === '1') { + _options.push('linkSubField') + } } else if (value === 'link') { _options = [..._options, 'setAll', 'linkField'] } else if (value === 'funcvar') { @@ -136,7 +142,7 @@ const { openType } = this.state let value = e.target.value if (key === 'resourceType') { - let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required'] + let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required', 'hidden'] if (value === '0') { _options = [..._options, 'options'] } else if (value === '1') { @@ -144,7 +150,10 @@ } if (openType === 'select') { - _options = [..._options, 'setAll', 'linkSubField'] + _options = [..._options, 'setAll'] + if (value === '1') { + _options.push('linkSubField') + } } else if (openType === 'link') { _options = [..._options, 'setAll', 'linkField'] } -- Gitblit v1.8.0