From 241f177ee649732c536b11da65972d5cca6f0f43 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 10 十二月 2023 19:20:19 +0800 Subject: [PATCH] 2023-12-10 --- src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 6bfcbce..2a87811 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -288,6 +288,25 @@ reLabel.field = '绫诲瀷瀛楁' } + reTooltip.initval = '' + if (type === 'select') { + if (this.record.resourceType === '0') { + reTooltip.initval = '鍒濆鍊煎簲涓烘暟鎹殑Value鍊硷紝鍙娇鐢ˊusername@銆丂fullName@' + } else if (this.record.resourceType === '1') { + reTooltip.initval = '鍒濆鍊煎簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷紝鍙娇鐢ˊusername@銆丂fullName@銆�$first銆傛敞锛氫娇鐢�$first鏃讹紝鎼滅储鏉′欢搴斾负蹇呭~銆�' + } + } else if (type === 'link') { + if (this.record.resourceType === '0') { + reTooltip.initval = '鍒濆鍊煎簲涓烘暟鎹殑Value鍊笺��' + } else if (this.record.resourceType === '1') { + reTooltip.initval = '鍒濆鍊煎簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷紝鍙娇鐢�$first銆傛敞锛氫娇鐢�$first鏃讹紝鎼滅储鏉′欢搴斾负蹇呭~銆�' + } + } else if (type === 'text') { + reTooltip.initval = '鍙娇鐢ˊusername@銆丂fullName@銆�' + } else if (type === 'range') { + reTooltip.initval = '浣跨敤閫楀彿鎷兼帴锛屼緥濡� 3,10' + } + return { shows, reOptions, @@ -690,6 +709,23 @@ values.field = values.field.join(',') } + if (['select', 'link'].includes(values.type)) { + if (values.resourceType === '1') { + if (/\$first/.test(values.initval) && values.initval.replace(/\s/g, '') === '$first') { + values.initval = '$first' + } + + if (values.initval === '$first' && values.required !== 'true') { + notification.warning({ + top: 92, + message: '浣跨敤$first鏃讹紝鎼滅储鏉′欢搴斾负蹇呭~锛�', + duration: 5 + }) + return + } + } + } + // 涓嬫媺鑿滃崟鎴栬仈鍔ㄨ彍鍗� if (['multiselect', 'select', 'link', 'radio'].includes(values.type)) { if (values.resourceType === '0') { -- Gitblit v1.8.0