From b20a4d7c75c2ff8951e93d9c0394df9277fc6093 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 五月 2023 21:05:17 +0800 Subject: [PATCH] 2023-05-15 --- src/menu/components/table/base-table/columns/editColumn/formconfig.jsx | 101 +++++++++++++++++++++++++++++--------------------- 1 files changed, 58 insertions(+), 43 deletions(-) diff --git a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx index 7630d36..fb51dad 100644 --- a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx @@ -3,7 +3,6 @@ * @param {object} card // 鎼滅储鏉′欢瀵硅薄 */ export function getColumnForm (card, fields = []) { - let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { try { @@ -15,13 +14,7 @@ roleList = [] } - let menulist = [] - - if (appType === 'pc') { - menulist = sessionStorage.getItem('appMenus') - } else if (!appType) { - menulist = sessionStorage.getItem('fstMenuList') - } + let menulist = sessionStorage.getItem('fstMenuList') if (menulist) { try { @@ -42,6 +35,9 @@ }, { value: 'picture', text: '鍥剧墖' + }, { + value: 'video', + text: '瑙嗛' }, { value: 'link', text: '閾炬帴' @@ -69,10 +65,6 @@ }) } - if (!card.linkurl && (!card.linkmenu || card.linkmenu.length === 0)) { - card.perspective = '' - } - return [ { type: 'text', @@ -90,20 +82,19 @@ options: options }, { - type: 'select', + type: card.isSub ? 'select' : 'text', key: 'field', label: '瀛楁', initVal: card.field, required: true, - options: fields + options: card.isSub ? fields : [] }, { - type: 'select', + type: 'text', key: 'nameField', label: '鍚嶇О瀛楁', initVal: card.nameField || '', - required: false, - options: [{uuid: 'empty', field: '', label: '绌�'}, ...fields] + required: false }, { type: 'number', @@ -175,6 +166,26 @@ }] }, { + type: 'number', + key: 'startTime', + precision: 0, + label: '寮�濮嬫椂闂�', + initVal: card.startTime || 0, + tooltip: '瑙嗛寮�濮嬫挱鏀剧殑鏃堕棿锛岀敤浜庤皟鏁磋棰戝垵濮嬪寲灞曠ず鐨勭晫闈€��', + required: false + }, + { + type: 'select', + key: 'aspectRatio', + label: '闀垮姣�', + initVal: card.aspectRatio || '16:9', + required: true, + options: [ + { value: '4:3', text: '4:3' }, + { value: '16:9', text: '16:9' } + ] + }, + { type: 'radio', key: 'rowspan', label: '琛屽悎骞�', @@ -202,7 +213,16 @@ }, { value: 'false', text: '鍚�' - }] + }], + forbid: card.isSub + }, + { + type: 'number', + key: 'fieldlength', + label: '瀛楁闀垮害', + initVal: card.fieldlength || 50, + required: true, + forbid: card.isSub }, { type: 'number', @@ -211,8 +231,8 @@ max: 18, decimal: 0, label: '灏忔暟浣�', - initVal: card.decimal || 0, - required: true + initVal: card.decimal === undefined ? 0 : card.decimal, + required: !card.isSub }, { type: 'select', @@ -308,6 +328,18 @@ }, { type: 'radio', + key: 'backgroundSize', + label: '鍥惧儚澶у皬', + initVal: card.backgroundSize || 'cover', + required: false, + options: [ + { value: 'cover', text: '瑕嗙洊' }, + { value: 'contain', text: '鍖呭惈' }, + { value: 'auto', text: '鑷�傚簲' }, + ] + }, + { + type: 'radio', key: 'scale', label: '鐐瑰嚮缂╂斁', initVal: card.scale || 'true', @@ -335,24 +367,21 @@ value: 'linkurl', text: '閾炬帴' }], - forbidden: appType === 'mob' }, { - type: appType === 'pc' ? 'select' : 'cascader', + type: 'cascader', key: 'linkmenu', label: '鑿滃崟', - initVal: card.linkmenu || (appType === 'pc' ? '' : []), + initVal: card.linkmenu || [], required: true, - options: menulist, - forbidden: appType === 'mob' + options: menulist }, { type: 'textarea', key: 'linkurl', label: '閾炬帴鍦板潃', initVal: card.linkurl || '', - required: true, - forbidden: appType === 'mob' + required: true }, { type: 'multiselect', @@ -361,25 +390,12 @@ initVal: card.linkfields || [], required: false, options: fields, - forbidden: appType === 'mob' - }, - { - type: 'radio', - key: 'open', - label: '鎵撳紑鏂瑰紡', - initVal: card.open || 'blank', - required: false, - forbid: appType !== 'pc', - options: [ - { value: 'blank', text: '鏂扮獥鍙�' }, - { value: 'self', text: '褰撳墠绐楀彛' } - ] }, { type: 'radio', key: 'eval', label: '瑙f瀽', - initVal: card.eval || 'true', + initVal: card.eval || 'false', tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��', required: false, options: [ @@ -402,8 +418,7 @@ label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, - options: roleList, - forbidden: appType === 'mob' + options: roleList } ] } -- Gitblit v1.8.0