From 876a5e6657d67df66bb525d02dd6d147ba81cae5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 05 一月 2023 09:53:37 +0800 Subject: [PATCH] 2023-01-05 --- src/menu/components/module/voucher/options.jsx | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/menu/components/module/voucher/options.jsx b/src/menu/components/module/voucher/options.jsx index a837e93..343594e 100644 --- a/src/menu/components/module/voucher/options.jsx +++ b/src/menu/components/module/voucher/options.jsx @@ -4,21 +4,21 @@ * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ export default function (wrap, id) { - let roleList = sessionStorage.getItem('sysRoles') - let appType = sessionStorage.getItem('appType') - let menu = window.GLOB.customMenu let modules = MenuUtils.getSupModules(menu.components, id, menu.interfaces) - - if (roleList) { - try { - roleList = JSON.parse(roleList) - } catch (e) { - roleList = [] + let books = [] + let bookids = [] + menu.components.forEach(item => { + if (item.subtype === 'account') { + books.push({ + value: item.uuid, + label: item.name + }) + bookids.push(item.uuid) } - } else { - roleList = [] - } + }) + + modules = modules.filter(item => !bookids.includes(item.value)) const wrapForm = [ // { @@ -59,6 +59,15 @@ required: true }, { + type: 'select', + field: 'supBook', + label: '璐﹀', + initval: wrap.supBook || '', + required: true, + options: books, + allowClear: true + }, + { type: 'cascader', field: 'supModule', label: '涓婄骇缁勪欢', @@ -66,15 +75,6 @@ required: false, options: modules, allowClear: true, - }, - { - type: 'multiselect', - field: 'blacklist', - label: '榛戝悕鍗�', - initval: wrap.blacklist || [], - required: false, - options: roleList, - forbid: !!appType }, ] -- Gitblit v1.8.0