From a94b0a4d15b26ecf8fe99f0a1c3e60d60b97766d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 15 八月 2023 14:22:03 +0800 Subject: [PATCH] 2023-08-15 --- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 149 +++++++++++++++++++++++++++---------------------- 1 files changed, 82 insertions(+), 67 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 bd69d85..c9f7736 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -14,7 +14,7 @@ roleList = [] } - if (['picture', 'link', 'colspan'].includes(card.type)) { + if (['picture', 'link'].includes(card.type)) { card.type = 'text' } @@ -31,8 +31,8 @@ value: 'custom', text: '鑷畾涔夊垪' }, { - value: 'action', - text: '鎿嶄綔' + value: 'colspan', + text: '鍚堝苟鍒�' }, { value: 'formula', text: '鍏紡' @@ -55,13 +55,30 @@ label: '鏃犲姩浣�' } ] - columns.forEach(col => { - if (col.editable === 'true' && col.uuid !== card.uuid) { - editCols.push({ - field: col.uuid, - label: col.label - }) - } + + let cols = [] + let getcols = (columns, suplabel = '') => { + columns.forEach(col => { + if (col.editable === 'true' && col.uuid !== card.uuid) { + cols.push({ + field: col.uuid, + label: suplabel + col.label + }) + } else if (col.type === 'colspan') { + getcols(col.subcols, col.label + '-') + } + }) + } + + getcols(columns) + + editCols.push(...cols) + + cols.forEach(col => { + editCols.push({ + field: '$next_' + col.field, + label: col.label + '锛堜笅涓�琛岋級' + }) }) return [ @@ -116,7 +133,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || 'false', + initVal: card.IsSort || (card.isSub ? 'false' : 'true'), required: true, options: [{ value: 'true', @@ -124,6 +141,24 @@ }, { value: 'false', text: '鍚�' + }] + }, + { + type: 'radio', + key: 'eval', + label: '瑙f瀽鏂瑰紡', + initVal: card.eval || 'false', + tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滆绠椻�濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃瓧娈垫浛鎹⑩�濓紝浣跨敤鍑芥暟鏃跺叆鍙備负data锛堟暟缁勶級銆�', + required: false, + options: [{ + value: 'false', + text: '瀛楁鏇挎崲' + }, { + value: 'true', + text: '璁$畻' + }, { + value: 'func', + text: '鍑芥暟' }] }, { @@ -141,21 +176,6 @@ }, { value: 'right', text: '鍙冲榻�' - }] - }, - { - type: 'radio', - key: 'sum', - label: '鏄剧ず鍚堣', - initVal: card.sum || 'false', - tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' }] }, { @@ -240,16 +260,6 @@ }] }, { - type: 'select', - key: 'editField', - label: '缂栬緫瀛楁', - initVal: card.editField || '', - tooltip: '褰撳�间笌鎻愮ず鏂囧瓧涓嶅悓鏃讹紝鍙澶栨坊鍔犵紪杈戝瓧娈碉紝浣滀负瀹為檯鍊肩殑褰曞叆瀛楁銆�', - allowClear: true, - required: false, - options: fields - }, - { type: 'options', key: 'options', label: '閫夐」', @@ -261,6 +271,7 @@ key: 'dataSource', label: '鏁版嵁婧�', initVal: card.dataSource || '', + placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆�', required: true, }, { @@ -350,27 +361,28 @@ type: 'select', key: 'enter', label: '鍥炶溅鍒囨崲', - initVal: card.enter || '$next', + initVal: card.enter || '$noAct', tooltip: '鍖呮嫭鏂囨湰鎴栨暟鍊煎洖杞︿簨浠躲�佷笅鎷夎彍鍗曢�変腑浜嬩欢銆佸紑鍏冲垏鎹簨浠躲��', options: editCols }, - // { - // type: 'radio', - // key: 'footEnter', - // label: '鏈鍥炶溅', - // initVal: card.footEnter || 'false', - // tooltip: '鏂板鍔熻兘浠呭湪琛ㄦ牸鍙柊澧炴椂鏈夋晥銆�', - // options: [{ - // value: 'sub', - // text: '鎻愪氦' - // }, { - // value: 'add', - // text: '鏂板' - // }, { - // value: 'false', - // text: '鏃犲姩浣�' - // }] - // }, + { + type: 'select', + key: 'ctrlField', + label: '绂佺敤瀛楁', + initVal: card.ctrlField || '', + tooltip: '鎺у埗鍗曞厓鏍兼槸鍚﹀彲浠ョ紪杈戙��', + allowClear: true, + required: false, + options: fields + }, + { + type: 'text', + key: 'ctrlValue', + label: '绂佺敤鍊�', + initVal: card.ctrlValue || '', + tooltip: '澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + required: false + }, { type: 'number', key: 'decimal', @@ -378,7 +390,7 @@ max: 18, precision: 0, label: '灏忔暟浣�', - initVal: card.decimal || 0, + initVal: card.decimal, required: false }, { @@ -452,18 +464,6 @@ required: false, }, { - type: 'radio', - key: 'eval', - label: '瑙f瀽', - initVal: card.eval || 'true', - tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��', - required: false, - options: [ - { value: 'true', text: '鏄�' }, - { value: 'false', text: '鍚�' } - ] - }, - { type: 'textarea', key: 'formula', label: '鍏紡', @@ -481,6 +481,21 @@ options: fields }, { + type: 'radio', + key: 'noValue', + label: '绌哄��', + initVal: card.noValue || 'show', + tooltip: '褰撳�间负0鏃舵槸鍚︽樉绀�', + required: false, + options: [{ + value: 'show', + text: '鏄剧ず' + }, { + value: 'hide', + text: '闅愯棌' + }] + }, + { type: 'multiselect', key: 'blacklist', label: '榛戝悕鍗�', -- Gitblit v1.8.0