From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/menu/components/card/cardcellcomponent/formconfig.jsx | 42 ++++++++++++++++++------------------------ 1 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index 61c27e7..7b651e9 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -128,14 +128,13 @@ } let fields = [] - if (cards.subtype === 'propcard' && cards.wrap.datatype === 'static') { + let isStatic = (cards.subtype === 'propcard' || cards.type === 'balcony') && cards.wrap.datatype === 'static' + if (isStatic) { if (cards.wrap.supModule && cards.wrap.supModule.length) { let cell = MenuUtils.getComponent(cards.wrap.supModule[cards.wrap.supModule.length - 1]) if (cell && cell.columns) { fields = cell.columns.map(col => ({ value: col.field })) } - } else { - fields = cards.columns.map(col => ({ value: col.field })) } } @@ -172,12 +171,17 @@ ] }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', key: 'field', label: '瀛楁', initVal: card.field || '', + tooltip: isStatic ? '鍙粦瀹氫笂绾х粍浠跺瓧娈碉紝涓嶅瓨鍦ㄤ笂绾х粍浠舵椂鍙粦瀹歶rl鍙傛暟瀛楁銆�' : '', required: true, - options: fields + options: fields, + rules: [{ + pattern: /^[\u4E00-\u9FA50-9a-zA-Z_-]*$/ig, + message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶃�佹眽瀛椾互鍙奯-' + }] }, { type: 'icon', @@ -256,7 +260,7 @@ required: true }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', key: 'posterField', label: '棰勮鍦板潃', initVal: card.posterField || '', @@ -475,7 +479,7 @@ required: false }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', key: 'bgImage', label: '鍔ㄦ�佽儗鏅�', initVal: card.bgImage || '', @@ -641,6 +645,7 @@ key: 'linkmenu', label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || '', + tooltip: '琛屼俊鎭紙瀛楁闆嗕腑鍓�40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ��', required: true, options: appMenus || [], forbid: !['pc', 'mob'].includes(appType) @@ -650,17 +655,19 @@ key: 'linkmenu', label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || [], + tooltip: '琛屼俊鎭皢浼犻�掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ��', required: true, options: menulist, forbid: ['pc', 'mob'].includes(appType) }, { - type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', - defType: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select', + type: isStatic ? 'text' : 'select', + defType: isStatic ? 'text' : 'select', key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', - tooltip: ['pc', 'mob'].includes(appType) ? '褰撻摼鎺ョ被鍨嬩负鈥滃叾浠栤�濓紝涓旈摼鎺ュ湴鍧�浠menuid@寮�澶存椂锛屽叾鍚庡唴瀹瑰皢琚涓鸿彍鍗旾D銆�' : '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (['pc', 'mob'].includes(appType) ? '褰撻摼鎺ョ被鍨嬩负鈥滃叾浠栤�濓紝涓旈摼鎺ュ湴鍧�浠menuid@寮�澶存椂锛屽叾鍚庡唴瀹瑰皢琚涓鸿彍鍗旾D銆�' : ''), + toolWidth: 350, required: true, options: fields }, @@ -678,25 +685,12 @@ ] }, { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] - }, - { type: 'codemirror', key: 'formula', label: '鍏紡', initVal: card.formula || '', tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛夈�傛敞锛氫細鏇挎崲鍏紡涓殑@username@銆丂fullName@銆丂bid@銆�', + toolWidth: 450, placeholder: '渚嬪锛欯price@ * @number@', required: true }, -- Gitblit v1.8.0