From f4b9504cad034ddcdef21c2081d14a4984fcd2d3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 七月 2024 17:14:48 +0800 Subject: [PATCH] 2024-07-15 --- src/menu/components/table/base-table/columns/editColumn/formconfig.jsx | 165 +++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 112 insertions(+), 53 deletions(-) diff --git a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx index 29bf27a..9c10aac 100644 --- a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx @@ -33,6 +33,12 @@ value: 'number', text: '鏁板瓧' }, { + value: 'custom', + text: '鑷畾涔夊垪' + }, { + value: 'formula', + text: '鍏紡' + }, { value: 'picture', text: '鍥剧墖' }, { @@ -45,24 +51,16 @@ value: 'textarea', text: '澶氳鏂囨湰' }, { - value: 'custom', - text: '鑷畾涔夊垪' - }, { value: 'colspan', text: '鍚堝苟鍒�' - }, { - value: 'formula', - text: '鍏紡' }, { value: 'index', text: '搴忓彿' }] - if (!card.isSub) { - options.push({ - value: 'action', - text: '鎿嶄綔' - }) + let decimal = card.decimal === undefined ? 0 : card.decimal + if (card.type === 'formula' && typeof(card.decimal) !== 'number') { + decimal = '' } return [ @@ -71,7 +69,11 @@ key: 'label', label: '鍒楀ご鏂囧瓧', initVal: card.label, - required: true + required: true, + rules: [{ + max: 100, + message: '鏈�澶�100涓瓧绗︺��' + }] }, { type: 'select', @@ -87,14 +89,27 @@ label: '瀛楁', initVal: card.field, required: true, - options: card.isSub ? fields : [] + options: card.isSub ? fields : [], + rules: [{ + pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, + message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶃�佹眽瀛椾互鍙奯' + }, { + max: 100, + message: '鏈�澶�100涓瓧绗︺��' + }] }, { type: 'text', key: 'nameField', label: '鍚嶇О瀛楁', initVal: card.nameField || '', - required: false + tooltip: '鍚嶇О瀛楁涓洪摼鎺ュ湪鐣岄潰涓樉绀虹殑鍐呭锛屽湪閾炬帴涓互@***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, + required: false, + rules: [{ + max: 100, + message: '鏈�澶�100涓瓧绗︺��' + }] }, { type: 'number', @@ -105,20 +120,6 @@ label: '鍒楀', initVal: card.Width || 120, required: true - }, - { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: true, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] }, { type: 'radio', @@ -138,7 +139,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || (card.isSub ? 'false' : 'true'), + initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), required: true, options: [{ value: 'true', @@ -146,6 +147,32 @@ }, { value: 'false', text: '鍚�' + }] + }, + { + type: 'select', + key: 'sortField', + label: '鎺掑簭瀛楁', + initVal: card.sortField || '', + required: true, + options: fields + }, + { + type: 'radio', + key: 'eval', + label: '瑙f瀽鏂瑰紡', + initVal: card.eval || 'false', + tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滆绠椻�濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃瓧娈垫浛鎹⑩�濓紝浣跨敤鍑芥暟鏃跺叆鍙備负data锛堟暟缁勶級銆�', + required: false, + options: [{ + value: 'false', + text: '瀛楁鏇挎崲' + }, { + value: 'true', + text: '璁$畻' + }, { + value: 'func', + text: '鍑芥暟' }] }, { @@ -214,7 +241,7 @@ value: 'false', text: '鍚�' }], - forbid: card.isSub + forbid: card.isSub || card.sum !== 'true' }, { type: 'number', @@ -231,7 +258,7 @@ max: 18, decimal: 0, label: '灏忔暟浣�', - initVal: card.decimal === undefined ? 0 : card.decimal, + initVal: decimal, required: !card.isSub }, { @@ -280,7 +307,11 @@ label: '鍓嶇紑', initVal: card.prefix || '', required: false, - readonly: false + readonly: false, + rules: [{ + max: 100, + message: '鏈�澶�100涓瓧绗︺��' + }] }, { type: 'text', @@ -288,7 +319,11 @@ label: '鍚庣紑', initVal: card.postfix || '', required: false, - readonly: false + readonly: false, + rules: [{ + max: 100, + message: '鏈�澶�100涓瓧绗︺��' + }] }, { type: 'number', @@ -354,6 +389,18 @@ }, { type: 'radio', + key: 'lostTip', + label: '鍥剧墖缂哄け', + initVal: card.lostTip || 'true', + tooltip: '鍥剧墖鍦板潃涓嶅瓨鍦ㄦ椂锛屾槸鍚︽彁绀哄浘鐗囦涪澶便��', + required: false, + options: [ + { value: 'true', text: '鎻愮ず' }, + { value: 'false', text: '涓嶆彁绀�' } + ] + }, + { + type: 'radio', key: 'perspective', label: '瀛楁閫忚', initVal: card.perspective || '', @@ -381,27 +428,9 @@ key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true - }, - { - type: 'multiselect', - key: 'linkfields', - label: '鍏宠仈瀛楁', - initVal: card.linkfields || [], - required: false, - options: fields, - }, - { - type: 'radio', - key: 'eval', - label: '瑙f瀽', - initVal: card.eval || 'true', - tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��', - required: false, - options: [ - { value: 'true', text: '鏄�' }, - { value: 'false', text: '鍚�' } - ] }, { type: 'textarea', @@ -413,6 +442,36 @@ required: true }, { + type: 'checkbox', + key: 'evalchars', + label: '鏇挎崲瀛楃', + initVal: card.evalchars || ['enter', 'space'], + tooltip: '鍏紡瑙f瀽鍚庯紝鍙浛鎹㈠洖杞︺�佺┖鏍肩瓑瀛楃锛屽疄鐜版崲琛屻�佸瓧闂磋窛鎺у埗绛夐〉闈㈡晥鏋溿��', + required: false, + options: [{ + value: 'enter', + text: '鍥炶溅绗�' + }, { + value: 'space', + text: '绌烘牸' + }] + }, + { + type: 'radio', + key: 'noValue', + label: '绌哄��', + initVal: card.noValue || 'show', + tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず', + required: false, + options: [{ + value: 'show', + text: '鏄剧ず' + }, { + value: 'hide', + text: '闅愯棌' + }] + }, + { type: 'multiselect', key: 'blacklist', label: '榛戝悕鍗�', -- Gitblit v1.8.0