From c62cad45fc6e5eda8da4c248f41ae96eb434717e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 16 四月 2025 16:35:48 +0800 Subject: [PATCH] 2025-04-16 --- src/templates/zshare/formconfig.jsx | 4 + src/utils/option.js | 90 +++++++++++++++--------------- src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 48 ++++++++-------- 3 files changed, 72 insertions(+), 70 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index c4b4b9e..ea1a41e 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -21,18 +21,18 @@ label: '鏃�', children: [ {value: '0', label: '褰撳ぉ'}, - {value: 1, label: '鏄ㄥぉ'}, - {value: 2, label: '鍓嶅ぉ'}, - {value: 3, label: '鍓嶄笁澶�'}, - {value: 7, label: '鍓嶄竷澶�'}, - {value: 30, label: '鍓�30澶�'}, - {value: 90, text: '鍓�90澶�'}, - {value: -1, text: '鏄庡ぉ'}, - {value: -2, text: '鍚庡ぉ'}, - {value: -3, text: '鍚庝笁澶�'}, - {value: -7, text: '鍚庝竷澶�'}, - {value: -30, text: '鍚�30澶�'}, - {value: -90, text: '鍚�90澶�'}, + {value: '1', label: '鏄ㄥぉ'}, + {value: '2', label: '鍓嶅ぉ'}, + {value: '3', label: '鍓嶄笁澶�'}, + {value: '7', label: '鍓嶄竷澶�'}, + {value: '30', label: '鍓�30澶�'}, + {value: '90', text: '鍓�90澶�'}, + {value: '-1', text: '鏄庡ぉ'}, + {value: '-2', text: '鍚庡ぉ'}, + {value: '-3', text: '鍚庝笁澶�'}, + {value: '-7', text: '鍚庝竷澶�'}, + {value: '-30', text: '鍚�30澶�'}, + {value: '-90', text: '鍚�90澶�'}, ] }, { @@ -40,10 +40,10 @@ label: '鍛�', children: [ {value: '0', label: '鏈懆'}, - {value: 1, label: '涓婂懆'}, - {value: 3, label: '鍓嶄笁鍛�'}, - {value: 7, label: '鍓嶄竷鍛�'}, - {value: -1, label: '涓嬪懆'} + {value: '1', label: '涓婂懆'}, + {value: '3', label: '鍓嶄笁鍛�'}, + {value: '7', label: '鍓嶄竷鍛�'}, + {value: '-1', label: '涓嬪懆'} ] }, { @@ -51,10 +51,10 @@ label: '鏈�', children: [ {value: '0', label: '鏈湀'}, - {value: 1, label: '涓婃湀'}, - {value: 3, label: '鍓嶄笁鏈�'}, - {value: 7, label: '鍓嶄竷鏈�'}, - {value: -1, label: '涓嬫湀'} + {value: '1', label: '涓婃湀'}, + {value: '3', label: '鍓嶄笁鏈�'}, + {value: '7', label: '鍓嶄竷鏈�'}, + {value: '-1', label: '涓嬫湀'} ] }, { @@ -62,8 +62,8 @@ label: '瀛�', children: [ {value: '0', label: '鏈搴�'}, - {value: 1, label: '涓婂搴�'}, - {value: -1, label: '涓嬪搴�'} + {value: '1', label: '涓婂搴�'}, + {value: '-1', label: '涓嬪搴�'} ] }, { @@ -71,8 +71,8 @@ label: '骞�', children: [ {value: '0', label: '鏈勾'}, - {value: 1, label: '鍘诲勾'}, - {value: -1, label: '鏄庡勾'} + {value: '1', label: '鍘诲勾'}, + {value: '-1', label: '鏄庡勾'} ] }, { diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 2dacf15..6ca0a75 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -169,7 +169,7 @@ type: 'text', key: 'initval', label: '鍒濆鍊�', - initVal: card.initval, + initVal: card.initval !== undefined ? card.initval + '' : '', required: false }, { @@ -1031,6 +1031,8 @@ let initval = card.initval || '' if (card.type === 'switch' || card.type === 'check') { initval = card.initval === true + } else if (['date', 'datemonth'].includes(card.type)) { + initval = card.initval === undefined ? '' : card.initval + '' } else if (card.type === 'number') { initval = card.initval || 0 } diff --git a/src/utils/option.js b/src/utils/option.js index b311e85..8d52262 100644 --- a/src/utils/option.js +++ b/src/utils/option.js @@ -79,41 +79,41 @@ date: [ {value: '', text: '绌�'}, {value: '0', text: '浠婂ぉ'}, - {value: 1, text: '鏄ㄥぉ'}, - {value: 2, text: '鍓嶅ぉ'}, - {value: 3, text: '鍓嶄笁澶�'}, - {value: 7, text: '鍓嶄竷澶�'}, - {value: 30, text: '鍓�30澶�'}, - {value: 90, text: '鍓�90澶�'}, - {value: 7300, text: '鍓�20骞�'}, - {value: -1, text: '鏄庡ぉ'}, - {value: -2, text: '鍚庡ぉ'}, - {value: -3, text: '鍚庝笁澶�'}, - {value: -7, text: '鍚庝竷澶�'}, - {value: -30, text: '鍚�30澶�'}, - {value: -90, text: '鍚�90澶�'}, - {value: -180, text: '鍚庡崐骞�'}, - {value: -365, text: '鍚�1骞�'}, - {value: -1095, text: '鍚�3骞�'}, - {value: -1825, text: '鍚�5骞�'}, - {value: -3650, text: '鍚�10骞�'}, - {value: -7300, text: '鍚�20骞�'}, + {value: '1', text: '鏄ㄥぉ'}, + {value: '2', text: '鍓嶅ぉ'}, + {value: '3', text: '鍓嶄笁澶�'}, + {value: '7', text: '鍓嶄竷澶�'}, + {value: '30', text: '鍓�30澶�'}, + {value: '90', text: '鍓�90澶�'}, + {value: '7300', text: '鍓�20骞�'}, + {value: '-1', text: '鏄庡ぉ'}, + {value: '-2', text: '鍚庡ぉ'}, + {value: '-3', text: '鍚庝笁澶�'}, + {value: '-7', text: '鍚庝竷澶�'}, + {value: '-30', text: '鍚�30澶�'}, + {value: '-90', text: '鍚�90澶�'}, + {value: '-180', text: '鍚庡崐骞�'}, + {value: '-365', text: '鍚�1骞�'}, + {value: '-1095', text: '鍚�3骞�'}, + {value: '-1825', text: '鍚�5骞�'}, + {value: '-3650', text: '鍚�10骞�'}, + {value: '-7300', text: '鍚�20骞�'}, ], dateweek: [ {value: '', text: '绌�'}, {value: '0', text: '鏈懆'}, - {value: 1, text: '涓婂懆'}, - {value: 3, text: '鍓嶄笁鍛�'}, - {value: 7, text: '鍓嶄竷鍛�'}, - {value: -1, text: '涓嬪懆'} + {value: '1', text: '涓婂懆'}, + {value: '3', text: '鍓嶄笁鍛�'}, + {value: '7', text: '鍓嶄竷鍛�'}, + {value: '-1', text: '涓嬪懆'} ], datemonth: [ {value: '', text: '绌�'}, {value: '0', text: '鏈湀'}, - {value: 1, text: '涓婃湀'}, - {value: 3, text: '鍓嶄笁鏈�'}, - {value: 7, text: '鍓嶄竷鏈�'}, - {value: -1, text: '涓嬫湀'} + {value: '1', text: '涓婃湀'}, + {value: '3', text: '鍓嶄笁鏈�'}, + {value: '7', text: '鍓嶄竷鏈�'}, + {value: '-1', text: '涓嬫湀'} ], daterange: [ {value: '', text: '绌�'}, @@ -139,24 +139,24 @@ datetime: [ {value: '', text: '绌�'}, {value: '0', text: '褰撳墠'}, - {value: 1, text: '鏄ㄥぉ'}, - {value: 3, text: '鍓嶄笁澶�'}, - {value: 7, text: '鍓嶄竷澶�'}, - {value: 30, text: '鍓�30澶�'}, - {value: 90, text: '鍓�90澶�'}, - {value: 7300, text: '鍓�20骞�'}, - {value: -1, text: '鏄庡ぉ'}, - {value: -2, text: '鍚庡ぉ'}, - {value: -3, text: '鍚庝笁澶�'}, - {value: -7, text: '鍚庝竷澶�'}, - {value: -30, text: '鍚�30澶�'}, - {value: -90, text: '鍚�90澶�'}, - {value: -180, text: '鍚庡崐骞�'}, - {value: -365, text: '鍚�1骞�'}, - {value: -1095, text: '鍚�3骞�'}, - {value: -1825, text: '鍚�5骞�'}, - {value: -3650, text: '鍚�10骞�'}, - {value: -7300, text: '鍚�20骞�'}, + {value: '1', text: '鏄ㄥぉ'}, + {value: '3', text: '鍓嶄笁澶�'}, + {value: '7', text: '鍓嶄竷澶�'}, + {value: '30', text: '鍓�30澶�'}, + {value: '90', text: '鍓�90澶�'}, + {value: '7300', text: '鍓�20骞�'}, + {value: '-1', text: '鏄庡ぉ'}, + {value: '-2', text: '鍚庡ぉ'}, + {value: '-3', text: '鍚庝笁澶�'}, + {value: '-7', text: '鍚庝竷澶�'}, + {value: '-30', text: '鍚�30澶�'}, + {value: '-90', text: '鍚�90澶�'}, + {value: '-180', text: '鍚庡崐骞�'}, + {value: '-365', text: '鍚�1骞�'}, + {value: '-1095', text: '鍚�3骞�'}, + {value: '-1825', text: '鍚�5骞�'}, + {value: '-3650', text: '鍚�10骞�'}, + {value: '-7300', text: '鍚�20骞�'}, ] } -- Gitblit v1.8.0