From 71d4765ba3cdc4a004687cd37a529b565e9ea9fd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 七月 2021 16:26:29 +0800 Subject: [PATCH] 2021-07-06 --- src/templates/zshare/formconfig.jsx | 77 ++++++++++++++++++++++++++++++++------ 1 files changed, 65 insertions(+), 12 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 4c77e23..6ce34b8 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -288,6 +288,7 @@ */ export function getSearchForm (card, linkableFields) { let roleList = sessionStorage.getItem('sysRoles') + let appType = sessionStorage.getItem('appType') if (roleList) { try { roleList = JSON.parse(roleList) @@ -300,10 +301,10 @@ let typeOptions = [] - if (sessionStorage.getItem('appType') === 'mob') { + if (appType === 'mob') { typeOptions = [{ - value: 'text', - text: Formdict['model.form.text'] + value: 'range', + text: '鏁板�硷紙鍖洪棿锛�' }, { value: 'checkcard', text: '閫夐」鍗�' @@ -313,10 +314,10 @@ }, { value: 'datemonth', text: Formdict['model.form.datemonth'] + }, { + value: 'daterange', + text: Formdict['model.form.daterange'] }] - if (!['text', 'checkcard', 'date', 'datemonth'].includes(card.type)) { - card.type = 'text' - } } else { typeOptions = [{ value: 'text', @@ -349,6 +350,18 @@ value: 'group', text: Formdict['model.form.dategroup'] }] + } + + if (card.focus) { + if (['text', 'multiselect'].includes(card.type)) { + card.match = 'like' + } else if (['select', 'link', 'checkcard'].includes(card.type)) { + card.match = '=' + } else if (card.type === 'date') { + card.match = '>=' + } else if (['datemonth', 'dateweek', 'daterange', 'range'].includes(card.type)) { + card.match = 'between' + } } return [ @@ -389,7 +402,7 @@ type: 'text', key: 'initval', label: Formdict['header.form.initval'], - tooltip: '绫诲瀷涓轰笅鎷夎彍鍗曟椂锛屽垵濮嬪�煎簲涓烘暟鎹殑Value鍊硷紙浣跨敤鏁版嵁婧愭椂锛屽簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷級', + tooltip: '绫诲瀷涓轰笅鎷夎彍鍗曟椂锛屽垵濮嬪�煎簲涓烘暟鎹殑Value鍊硷紙浣跨敤鏁版嵁婧愭椂锛屽簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷級;绫诲瀷涓烘暟鍊硷紙鍖洪棿锛夋椂锛屽垵濮嬪�间娇鐢ㄩ�楀彿鎷兼帴锛屼緥濡� 3,10', initVal: card.initval, required: false }, @@ -440,7 +453,7 @@ min: 1, max: 24, precision: 0, - label: '鍗$墖瀹藉害', + label: '鍏冪礌瀹藉害', initVal: card.width || 4, tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', required: true @@ -621,7 +634,8 @@ max: 24, label: Formdict['header.form.ratio'], tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', - initVal: card.ratio, + initVal: card.ratio || 6, + forbid: appType === 'mob', required: false }, { @@ -679,6 +693,31 @@ // }] // }, { + type: 'number', + key: 'maxValue', + label: '鏈�澶у��', + initVal: card.maxValue, + forbid: appType !== 'mob', + required: true + }, + { + type: 'number', + key: 'minValue', + label: '鏈�灏忓��', + initVal: card.minValue, + forbid: appType !== 'mob', + required: true + }, + { + type: 'number', + key: 'step', + label: '姝ラ暱', + initVal: card.step, + tooltip: '姝ラ暱鍙栧�煎繀椤诲ぇ浜� 0锛屽苟涓斿彲琚� (max - min) 鏁撮櫎', + forbid: appType !== 'mob', + required: true + }, + { type: 'radio', key: 'labelShow', label: '鏄剧ず鍚嶇О', @@ -696,7 +735,7 @@ key: 'advanced', label: '楂樼骇鎼滅储', initVal: card.advanced || 'false', - forbid: sessionStorage.getItem('appType') === 'mob', + forbid: appType === 'mob', options: [{ value: 'true', text: Formdict['model.true'] @@ -711,7 +750,7 @@ label: '杈撳叆鏍峰紡', initVal: card.inputType || 'input', required: false, - forbid: sessionStorage.getItem('appType') === null, + forbid: appType === null, options: [{ value: 'input', text: '杈撳叆妗�' @@ -2315,7 +2354,7 @@ min: 1, max: 24, precision: 0, - label: '鍗$墖瀹藉害', + label: '鍏冪礌瀹藉害', initVal: card.width || 4, tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', required: true @@ -2670,6 +2709,20 @@ }] }, { + type: 'radio', + key: 'arrange', + label: '鍏冪礌鎺掑垪', + initVal: card.arrange || 'adaptive', + forbid: appType !== 'mob', + options: [{ + value: 'line', + text: '鏁磋' + }, { + value: 'adaptive', + text: '鑷�傚簲' + }] + }, + { type: 'color', key: 'backgroundColor', label: '鑳屾櫙鑹�', -- Gitblit v1.8.0