From 31871ca836e6fcbea9b1c54e2ec15f49667bf093 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 23 十二月 2022 14:14:04 +0800 Subject: [PATCH] 2022-12-23 --- src/menu/components/table/base-table/options.jsx | 218 ++++++++++++----------------------------------------- 1 files changed, 51 insertions(+), 167 deletions(-) diff --git a/src/menu/components/table/base-table/options.jsx b/src/menu/components/table/base-table/options.jsx index c6caecc..fb8b61e 100644 --- a/src/menu/components/table/base-table/options.jsx +++ b/src/menu/components/table/base-table/options.jsx @@ -2,58 +2,7 @@ * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ export default function (wrap, action = [], columns = []) { - let roleList = sessionStorage.getItem('sysRoles') - let appType = sessionStorage.getItem('appType') - - if (roleList) { - try { - roleList = JSON.parse(roleList) - } catch (e) { - roleList = [] - } - } else { - roleList = [] - } - const wrapForm = [ - { - type: 'text', - field: 'title', - label: '鏍囬', - initval: wrap.title || '', - required: false - }, - { - type: 'text', - field: 'name', - label: '缁勪欢鍚嶇О', - initval: wrap.name || '', - tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�', - required: true - }, - { - type: 'number', - field: 'width', - label: '瀹藉害', - initval: wrap.width || 24, - tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', - min: 1, - max: 24, - precision: 0, - required: true - }, - { - type: 'number', - field: 'height', - label: '楂樺害', - initval: wrap.height || '', - tooltip: '琛ㄦ牸楂樺害锛岀┖鍊兼椂楂樺害鑷�傚簲銆�', - min: 10, - max: 3000, - precision: 0, - required: false, - forbid: appType === 'mob' - }, { type: 'radio', field: 'tableType', @@ -82,26 +31,14 @@ }, { type: 'radio', - field: 'tableHeader', - label: '琛ㄥご', - initval: wrap.tableHeader || 'show', - required: false, - options: [ - {value: 'show', label: '鏄剧ず'}, - {value: 'hidden', label: '闅愯棌'}, - ] - }, - { - type: 'radio', - field: 'collapse', - label: '鍙敹璧�', - initval: wrap.collapse || 'false', + field: 'actionfixed', + label: '鎸夐挳鍥哄畾', + initval: wrap.actionfixed || 'false', required: false, options: [ {value: 'true', label: '鏄�'}, {value: 'false', label: '鍚�'}, - ], - forbid: appType === 'mob' || appType === 'pc' + ] }, { type: 'radio', @@ -119,17 +56,6 @@ }, { type: 'radio', - field: 'mode', - label: '妯″紡', - initval: wrap.mode || 'default', - required: false, - options: [ - {value: 'default', label: '甯歌'}, - {value: 'ghost', label: '閫忔槑'}, - ] - }, - { - type: 'radio', field: 'selected', label: '棣栬閫変腑', initval: wrap.selected || 'false', @@ -141,18 +67,30 @@ {value: 'always', label: '鏁版嵁鍔犺浇'}, ] }, - // { - // type: 'radio', - // field: 'show', - // label: '鎼滅储鎸夐挳', - // initval: wrap.show || 'true', - // tooltip: '鎼滅储鏉′欢瀛樺湪鏃讹紝鍙�夋嫨鏄惁鏄剧ず鎼滅储鎸夐挳銆�', - // required: false, - // options: [ - // {value: 'true', label: '鏄剧ず'}, - // {value: 'false', label: '闅愯棌'}, - // ] - // }, + { + type: 'radio', + field: 'tableMode', + label: '鍔犺浇妯″紡', + initval: wrap.tableMode || 'compatible', + tooltip: '浣跨敤鎬ラ�熸ā寮忔椂锛岃〃鏍间腑鐨勬爣璁般�佸弻鍑讳簨浠躲�佹牸寮忓寲銆佽鍚堝苟銆佸垪鍚堝苟銆佸墠缂�銆佸悗缂�銆佸瓧娈甸�忚绛夋晥鏋滃皢鏃犳晥锛屼笖鏁版嵁閮戒細浠ユ枃鏈牸寮忔樉绀恒��', + required: false, + options: [ + {value: 'compatible', label: '鍏煎'}, + {value: 'fast', label: '鎬ラ��'}, + ] + }, + { + type: 'radio', + field: 'mask', + label: '閬僵', + initval: wrap.mask || 'show', + tooltip: '鏁版嵁鍔犺浇鏃讹紝鏄惁鏄剧ず鍔犺浇涓殑閬僵銆�', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ] + }, { type: 'color', field: 'borderColor', @@ -161,36 +99,28 @@ tooltip: '榛樿鍊� #e8e8e8銆�', required: false }, - // { - // type: 'color', - // field: 'color', - // label: '瀛椾綋棰滆壊', - // initval: wrap.color || 'rgba(0, 0, 0, 0.65)', - // tooltip: '榛樿鍊� rgba(0, 0, 0, 0.65)銆�', - // required: false - // }, - // { - // type: 'number', - // field: 'fontSize', - // label: '瀛椾綋澶у皬', - // initval: wrap.fontSize || 14, - // min: 12, - // max: 30, - // precision: 0, - // required: false - // }, - // { - // type: 'number', - // field: 'advanceWidth', - // label: '楂樼骇鎼滅储', - // initval: wrap.advanceWidth || 1000, - // tooltip: '楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��', - // min: 10, - // max: 3000, - // precision: 0, - // required: false, - // forbid: appType === 'mob' - // }, + { + type: 'number', + field: 'btnlimit', + label: '鎸夐挳闄愬埗', + initval: wrap.btnlimit || '', + tooltip: '鎸夐挳鏁伴噺闄愬埗锛岃秴鍑虹殑鎸夐挳浼氬湪鏇村涓笅鎷夋樉绀猴紝娉細鏇村涓殑鎸夐挳涓嶈缁戝畾鍙屽嚮浜嬩欢銆�', + min: 3, + max: 3000, + precision: 0, + required: false + }, + { + type: 'number', + field: 'height', + label: '琛ㄦ牸楂樺害', + initval: wrap.height || '', + tooltip: '琛ㄦ牸楂樺害锛岀┖鍊兼椂楂樺害鑷�傚簲銆�', + min: 10, + max: 3000, + precision: 0, + required: false, + }, { type: 'select', field: 'doubleClick', @@ -200,7 +130,6 @@ required: false, allowClear: true, options: action.map(item => ({value: item.uuid, label: item.label})), - forbid: appType === 'mob' }, { type: 'select', @@ -222,52 +151,7 @@ initval: wrap.controlVal || '', tooltip: '褰撳瓧娈靛�间笌绂佺敤鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', required: false - }, - { - type: 'radio', - field: 'empty', - label: '绌哄�奸殣钘�', - initval: wrap.empty || 'show', - tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', - required: false, - options: [ - {value: 'show', label: '鍚�'}, - {value: 'hidden', label: '鏄�'}, - ], - }, - { - type: 'radio', - field: 'supKey', - label: '涓婄骇涓婚敭', - initval: wrap.supKey || 'true', - tooltip: '褰撹缃笂绾х粍浠舵椂锛屼笂绾т富閿�间负绌烘槸鍚﹁繘琛屾暟鎹煡璇€��', - required: false, - options: [ - {value: 'true', label: '楠岃瘉'}, - {value: 'false', label: '蹇界暐'}, - ], - }, - { - type: 'radio', - field: 'permission', - label: '鏉冮檺楠岃瘉', - initval: wrap.permission || 'false', - required: false, - options: [ - {value: 'true', label: '鍚敤'}, - {value: 'false', label: '绂佺敤'}, - ], - forbid: !appType - }, - { - type: 'multiselect', - field: 'blacklist', - label: '榛戝悕鍗�', - initval: wrap.blacklist || [], - required: false, - options: roleList, - forbid: !!appType - }, + } ] return wrapForm -- Gitblit v1.8.0