From 432b788acf901b0720184b8ee8bc81a2e6fa47e0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 28 九月 2021 18:22:02 +0800 Subject: [PATCH] 2021-09-28 --- src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 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 d745175..e2b4ae1 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -6,19 +6,36 @@ /** * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭� * @param {object} card // 鎼滅储鏉′欢瀵硅薄 - * @param {Array} menulist // 鑿滃崟鍒楄〃-鐢ㄤ簬瀛楁閫忚 */ -export function getColumnForm (card, menulist = [], fields = []) { +export function getColumnForm (card, fields = []) { let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { roleList = [] + } + + let menulist = [] + + if (appType === 'pc') { + menulist = sessionStorage.getItem('appMenus') + } else if (!appType) { + menulist = sessionStorage.getItem('fstMenuList') + } + + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] } let options = [{ @@ -247,12 +264,11 @@ key: 'postfix', label: Formdict['header.form.postfix'], initVal: card.postfix || '', - tooltipClass: 'middle', required: false, readonly: false }, { - type: 'radio', + type: 'select', key: 'lenWidRadio', label: '闀垮姣�', initVal: card.lenWidRadio || '1:1', @@ -329,10 +345,10 @@ forbidden: appType === 'mob' }, { - type: 'cascader', + type: appType === 'pc' ? 'select' : 'cascader', key: 'linkmenu', label: Formdict['model.menu'], - initVal: card.linkmenu || [], + initVal: card.linkmenu || (appType === 'pc' ? '' : []), required: true, options: menulist, forbidden: appType === 'mob' @@ -355,6 +371,18 @@ 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: 'multiselect', key: 'blacklist', label: Formdict['header.form.blacklist'], -- Gitblit v1.8.0