From 26b0ef43fada54e4b06d835630afa02895014ad6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 13 十一月 2024 16:02:16 +0800 Subject: [PATCH] 2024-11-13 --- src/menu/components/table/normal-table/options.jsx | 89 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 85 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..3781664 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}, @@ -286,6 +306,21 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], + controlFields: [ + {field: 'empSign', values: ['show']}, + ] + }, + { + type: 'radio', + field: 'empSign', + label: '绌哄�煎浘鏍�', + initval: wrap.empSign || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛屾槸鍚︽樉绀虹┖鍊兼彁绀哄浘鏍囥��', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ], }, { type: 'radio', @@ -299,6 +334,22 @@ {value: 'false', label: '蹇界暐'}, ], forbid: isprint + }, + { + 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', @@ -346,6 +397,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