From 742f7d11557526038d332e60a8c8ca18177bc4e4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 十月 2023 15:51:58 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 150 insertions(+), 4 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index 0254d8b..da0ea0b 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -133,7 +133,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', @@ -142,6 +142,14 @@ value: 'false', text: '鍚�' }] + }, + { + type: 'select', + key: 'sortField', + label: '鎺掑簭瀛楁', + initVal: card.sortField || '', + required: true, + options: fields }, { type: 'radio', @@ -193,7 +201,7 @@ }] }, { - type: 'radio', + type: 'select', key: 'editType', label: '缂栬緫绫诲瀷', initVal: card.editType || 'text', @@ -210,6 +218,9 @@ }, { value: 'date', text: '鏃ユ湡锛堝ぉ锛�' + }, { + value: 'popSelect', + text: '閫夋嫨鍣�' }] }, { @@ -311,6 +322,141 @@ required: true, }, { + type: 'fields', + key: 'columns', + label: '瀛楁闆�', + initVal: card.columns || [], + required: true, + readonly: false, + columns: [ + { + title: '鍚嶇О', + dataIndex: 'label', + inputType: 'input', + editable: true, + initval: 'label', + width: '20%' + }, + { + title: '瀛楁', + dataIndex: 'field', + inputType: 'input', + editable: true, + unique: true, + strict: true, + copy: true, + initval: 'field', + rules: [{ + pattern: /^[\u4E00-\u9FA50-9a-zA-Z_-]*$/ig, + message: '璇蜂娇鐢ㄦ暟瀛椼�佸瓧姣嶃�佹眽瀛椾互鍙奯-' + }], + width: '20%' + }, + { + title: '闅愯棌', + dataIndex: 'Hide', + inputType: 'radio', + editable: true, + width: '20%', + initval: 'false', + options: [ + {value: 'true', text: '鏄�'}, + {value: 'false', text: '鍚�'}, + ], + render: (text, record) => { + if (text === 'true') { + return '鏄�' + } else { + return '鍚�' + } + } + }, + { + title: '鎺掑簭', + dataIndex: 'IsSort', + inputType: 'radio', + editable: true, + width: '20%', + initval: 'false', + options: [ + {value: 'true', text: '鏄�'}, + {value: 'false', text: '鍚�'}, + ], + render: (text, record) => { + if (text === 'true') { + return '鏄�' + } else { + return '鍚�' + } + } + }, + { + title: '鍒楀', + dataIndex: 'Width', + inputType: 'number', + editable: true, + width: '20%', + initval: 120 + } + ] + }, + { + type: 'select', + key: 'primaryKey', + label: '涓婚敭', + initVal: card.primaryKey || '', + required: true, + readonly: false, + options: 'columns' + }, + { + type: 'text', + key: 'order', + label: '榛樿鎺掑簭', + initVal: card.order || '', + placeholder: 'ID asc', + required: true + }, + { + type: 'select', + key: 'showField', + label: '鏄剧ず瀛楁', + initVal: card.showField || '', + tooltip: '鐢ㄤ簬鎺у埗閫夋嫨妗嗕腑鐨勬樉绀哄唴瀹广��', + required: true, + options: 'columns' + }, + { + type: 'select', + key: 'controlField', + label: '绂佺敤瀛楁', + initVal: card.controlField || '', + tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆傚瓧娈靛�间负true鏃讹紝閫夐」涓嶅彲閫夈��', + required: false, + allowClear: true, + options: 'columns' + }, + { + type: 'text', + key: 'searchKey', + label: '鎼滅储瀛楁', + initVal: card.searchKey || '', + tooltip: '澶氫釜鍊艰鐢ㄩ�楀彿鍒嗛殧銆�', + required: false, + rules: [{ + pattern: /^[0-9a-zA-Z,_-]*$/ig, + message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶄互鍙奯-', + }] + }, + { + type: 'number', + key: 'popWidth', + label: '寮圭獥瀹藉害', + initVal: card.popWidth || 60, + tooltip: '灏忎簬100鏃朵负鐧惧垎鐜囷紝澶т簬100鏃朵负缁濆鍊笺��', + required: true + }, + { type: 'text', key: 'valueField', label: '鍊悸峰瓧娈�', @@ -404,7 +550,7 @@ { type: 'select', key: 'ctrlField', - label: '绂佺敤瀛楁', + label: '绂佹缂栬緫', initVal: card.ctrlField || '', tooltip: '鎺у埗鍗曞厓鏍兼槸鍚﹀彲浠ョ紪杈戙��', allowClear: true, @@ -414,7 +560,7 @@ { type: 'text', key: 'ctrlValue', - label: '绂佺敤鍊�', + label: '绂佹鍊�', initVal: card.ctrlValue || '', tooltip: '澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', required: false -- Gitblit v1.8.0