From c51f5e007a3e03c9d6731ab7f28f0080de009990 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 17 十一月 2021 18:38:32 +0800 Subject: [PATCH] 2021-11-17 --- src/templates/zshare/formconfig.jsx | 127 +++++++++++++++++------------------------- 1 files changed, 52 insertions(+), 75 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index a1c6394..ab0abab 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -854,19 +854,10 @@ } ] - // 鏍囩绫诲瀷锛屼富琛ㄦ墠浼氬瓨鍦ㄨ〃鍗曟爣绛鹃〉 - let tabTems = [{ - value: 'FormTab', - text: '琛ㄥ崟鏍囩椤�' - }] - if (type === 'subtable') { - tabTems = [] - } - if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh涓鸿〃鍗曟爣绛鹃〉 card.execSuccess = 'grid' } - if (card.execError === 'view' || card.execSuccess === 'refresh') { + if (card.execError === 'view' || card.execError === 'refresh') { card.execError = 'grid' } if (card.popClose === 'view') { @@ -890,6 +881,9 @@ if (card.OpenType === 'blank') { card.OpenType = 'tab' + } + if (!card.control && card.controlField) { + card.control = 'disabled' } return [ @@ -1157,20 +1151,6 @@ options: [] }, { - type: 'select', - key: 'tabTemplate', - label: '鏍囩绫诲瀷', - initVal: card.tabTemplate || '', - required: true, - options: [ - { - value: 'ThdMenu', - text: Formdict['model.menu.level3'] - }, - ...tabTems - ] - }, - { type: 'cascader', key: 'linkmenu', label: Formdict['model.form.linkmenu'], @@ -1187,45 +1167,21 @@ options: menulist }, { - type: 'radio', - key: 'afterExecSuccess', - label: Formdict['header.form.afterExecSuccess'], - initVal: card.afterExecSuccess || 'close', - required: true, - options: [{ - value: 'close', - text: Formdict['model.close'] - }, { - value: 'notclose', - text: Formdict['model.notclose'] - }] - }, - { - type: 'radio', - key: 'afterExecError', - label: Formdict['header.form.afterExecError'], - initVal: card.afterExecError || 'notclose', - required: true, - options: [{ - value: 'close', - text: Formdict['model.close'] - }, { - value: 'notclose', - text: Formdict['model.notclose'] - }] - }, - { type: refresh.length === 0 ? 'radio' : 'select', key: 'execSuccess', label: Formdict['model.form.afterSuccess'], initVal: card.execSuccess || 'never', + tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: Formdict['header.form.refresh.grid'] + text: '鍒锋柊琛ㄦ牸' + }, { + value: 'line', + text: '鍒锋柊琛�' }, ...refresh] }, @@ -1234,13 +1190,17 @@ key: 'execError', label: Formdict['model.form.afterError'], initVal: card.execError || 'never', + tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: Formdict['header.form.refresh.grid'] + text: '鍒锋柊琛ㄦ牸' + }, { + value: 'line', + text: '鍒锋柊琛�' }, ...refresh] }, @@ -1252,10 +1212,10 @@ required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: Formdict['header.form.refresh.grid'] + text: '鍒锋柊琛ㄦ牸' }, ...refresh] }, @@ -1356,23 +1316,6 @@ }] }, { - type: 'select', - key: 'controlField', - label: '鎺у埗瀛楁', - tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�', - initVal: card.controlField || '', - required: false, - options: [{label: '鏃�', field: ''}, ...columns] - }, - { - type: 'text', - key: 'controlVal', - label: '鎺у埗鍊�', - tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�', - initVal: card.controlVal || '', - required: false - }, - { type: 'radio', key: 'display', label: '鏄剧ず鏂瑰紡', @@ -1429,6 +1372,40 @@ required: false, readonly: false }, + { + type: 'radio', + key: 'control', + label: '鎸夐挳鎺у埗', + initVal: card.control || '', + required: false, + options: [{ + value: '', + text: '鏃�' + }, { + value: 'disabled', + text: '绂佺敤' + }, { + value: 'hidden', + text: '闅愯棌' + }] + }, + { + type: 'select', + key: 'controlField', + label: '鎺у埗瀛楁', + tooltip: '鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鐨勯殣钘忔垨绂佺敤銆�', + initVal: card.controlField || '', + required: true, + options: columns + }, + { + type: 'text', + key: 'controlVal', + label: '鎺у埗鍊�', + tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + initVal: card.controlVal || '', + required: false + }, ] } -- Gitblit v1.8.0