From 8040a18c4b2a848d252bf01838f06c7aec1be9f3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 07 六月 2024 15:16:11 +0800 Subject: [PATCH] 2024-06-07 --- src/menu/components/table/normal-table/options.jsx | 74 +++++++++++++++++++++++++++++++++++-- 1 files changed, 70 insertions(+), 4 deletions(-) diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index 413b0cd..1806ca8 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -1,7 +1,9 @@ +import MenuUtils from '@/utils/utils-custom.js' + /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, action = [], columns = [], toolBtns) { +export default function (wrap, action = [], columns = [], toolBtns, supNodes, id = '') { let roleList = sessionStorage.getItem('sysRoles') let appType = sessionStorage.getItem('appType') let isprint = sessionStorage.getItem('MenuType') === 'billPrint' @@ -16,6 +18,9 @@ } else { roleList = [] } + + let menu = window.GLOB.customMenu + let modules = MenuUtils.getSupModules(menu.components, id, menu.interfaces) const wrapForm = [ { @@ -47,10 +52,10 @@ { type: 'number', field: 'height', - label: '楂樺害', + label: '鏈�澶ч珮搴�', initval: wrap.height || '', - tooltip: '琛ㄦ牸楂樺害锛岀┖鍊兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮銆�', - min: 10, + tooltip: '琛ㄦ牸鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚〃澶达級锛岀┖鍊兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��', + min: -1000, max: 3000, precision: 0, required: false, @@ -156,6 +161,19 @@ }, { type: 'radio', + field: 'searchSize', + label: '鎼滅储闂磋窛', + initval: wrap.searchSize || 'middle', + tooltip: '鎼滅储鏉′欢鐨勪笂涓嬮棿璺濄��', + required: false, + options: [ + {value: 'middle', label: '榛樿'}, + {value: 'small', label: '灏�'}, + ], + forbid: appType === 'mob' + }, + { + type: 'radio', field: 'mode', label: '妯″紡', initval: wrap.mode || 'default', @@ -228,6 +246,7 @@ tooltip: '榧犳爣鎮诞浜庤涓婃柟鏃剁殑鎻愮ず淇℃伅銆�', required: false, allowClear: true, + joint: true, options: columns }, { @@ -238,6 +257,7 @@ tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�', required: false, allowClear: true, + joint: true, options: columns, controlFields: [ {field: 'controlVal', notNull: true}, @@ -302,6 +322,22 @@ }, { type: 'radio', + field: 'supType', + label: '涓婄骇绫诲瀷', + initval: wrap.supType || 'single', + tooltip: '涓婄骇缁勪欢涓哄崟涓�缁勪欢鎴栧涓粍浠躲��', + required: false, + forbid: appType === 'mob' || isprint, + options: [ + {value: 'single', label: '鍗曠粍浠�'}, + {value: 'multi', label: '澶氱粍浠�'}, + ], + controlFields: [ + {field: 'supNodes', values: ['multi']}, + ] + }, + { + type: 'radio', field: 'permission', label: '鏉冮檺楠岃瘉', initval: wrap.permission || (!appType ? 'true' : 'false'), @@ -346,6 +382,36 @@ options: roleList, forbid: !!appType || isprint }, + { + type: 'table', + field: 'supNodes', + label: '涓婄骇缁勪欢', + initval: supNodes, + required: true, + forbid: appType === 'mob' || isprint, + span: 24, + actions: ['edit', 'del', 'add', 'move'], + columns: [ + { + title: '搴忓彿', + dataIndex: '$index', + editable: false, + required: false, + width: '20%' + }, + { + title: '缁勪欢', + dataIndex: 'nodes', + inputType: 'cascader', + editable: true, + required: true, + extends: [{key: 'label', value: 'label'}], + width: '50%', + render: (text, record) => record.label, + options: modules + } + ] + } ] return wrapForm -- Gitblit v1.8.0