From b8e1395f02c929eaa96b949cf6027ee2a43856a6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 19:03:37 +0800 Subject: [PATCH] 2022-09-06 --- src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 86 ++++++++++++++++++++++++++---------------- 1 files changed, 53 insertions(+), 33 deletions(-) diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx index 4398460..937165d 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -13,7 +13,7 @@ if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { @@ -31,7 +31,7 @@ if (menulist) { try { menulist = JSON.parse(menulist) - } catch { + } catch (e) { menulist = [] } } else { @@ -59,6 +59,9 @@ }, { value: 'colspan', text: '鍚堝苟鍒�' + }, { + value: 'formula', + text: '鍏紡' }, { value: 'index', text: '搴忓彿' @@ -149,9 +152,8 @@ type: 'radio', key: 'IsSort', label: Formdict['model.sort'], - initVal: card.IsSort || 'true', + initVal: card.IsSort || (card.isSub ? 'false' : 'true'), required: true, - forbidden: card.isSub, options: [{ value: 'true', text: Formdict['model.true'] @@ -215,7 +217,7 @@ decimal: 0, label: Formdict['header.form.decimal'], initVal: card.decimal || 0, - required: true + required: false }, { type: 'select', @@ -224,13 +226,16 @@ initVal: card.format || 'none', options: [{ value: 'none', - text: Formdict['model.empty'] + text: '鏃�' }, { value: 'thdSeparator', - text: Formdict['header.form.thdSeparator'] + text: '鍗冨垎浣�' }, { value: 'percent', text: '鐧惧垎姣�' + }, { + value: 'abs', + text: '缁濆鍊�' }], required: false }, @@ -241,7 +246,10 @@ initVal: card.textFormat || 'none', options: [{ value: 'none', - text: Formdict['model.empty'] + text: '鏃�' + }, { + value: 'encryption', + text: '鍔犲瘑' }, { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' @@ -268,7 +276,18 @@ readonly: false }, { - type: 'radio', + type: 'number', + key: 'span', + min: 1, + max: 24, + precision: 0, + label: '鍥剧墖瀹藉害', + initVal: card.span || 24, + tooltip: '鏍呮牸甯冨眬锛岀瓑鍒嗕负24浠姐��', + required: true + }, + { + type: 'select', key: 'lenWidRadio', label: '闀垮姣�', initVal: card.lenWidRadio || '1:1', @@ -294,30 +313,9 @@ }, { type: 'radio', - key: 'picSort', - label: '鍥剧墖鎺掑垪', - initVal: card.picSort || '1', - tooltip: '鍚屼竴鍗曞厓鏍煎唴锛屽惈鏈夊寮犲浘鐗囨椂鐨勫垪鏁般��', - required: false, - options: [{ - value: '1', - text: '1' - }, { - value: '2', - text: '2' - }, { - value: '3', - text: '3' - }, { - value: '4', - text: '4' - }] - }, - { - type: 'radio', key: 'scale', - label: Formdict['header.form.clickscale'], - initVal: card.scale || 'false', + label: '鐐瑰嚮缂╂斁', + initVal: card.scale || 'true', required: false, options: [{ value: 'true', @@ -383,12 +381,34 @@ ] }, { + 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: '鍏紡', + initVal: card.formula || '', + tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�', + placeholder: '渚嬪锛欯price@ * @number@', + required: true + }, + { type: 'multiselect', key: 'blacklist', label: Formdict['header.form.blacklist'], initVal: card.blacklist || [], required: false, - options: roleList + options: roleList, + forbidden: appType === 'mob' } ] } -- Gitblit v1.8.0