From b5e70973340bf912b733acd737f55f90653dece8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 03 七月 2021 09:48:25 +0800 Subject: [PATCH] 2021-07-03 --- src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 37 +++++++++++++++++++++++++++++++++---- 1 files changed, 33 insertions(+), 4 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..2aa32ce 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -6,9 +6,8 @@ /** * @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) { @@ -19,6 +18,24 @@ } } 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 { + menulist = [] + } + } else { + menulist = [] } let options = [{ @@ -329,10 +346,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 +372,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