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/card/double-data-card/options.jsx | 181 ++++++++++++++++++++++++++++++-------------- 1 files changed, 122 insertions(+), 59 deletions(-) diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx index ae1d112..5cb3395 100644 --- a/src/menu/components/card/double-data-card/options.jsx +++ b/src/menu/components/card/double-data-card/options.jsx @@ -1,17 +1,12 @@ /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, columns = [], setting) { +export default function (wrap, columns = [], setting, buttons = []) { let appType = sessionStorage.getItem('appType') - // let MenuType = '' - // let menu = window.GLOB.customMenu let laypage = setting && setting.laypage !== 'false' - - // if (menu.parentId === 'BillPrintTemp') { - // MenuType = 'billPrint' - // } - let roleList = sessionStorage.getItem('sysRoles') + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' if (roleList) { try { @@ -65,22 +60,18 @@ precision: 0, required: true }, - // { - // type: 'radio', - // field: 'layout', - // label: '鍗$墖甯冨眬', - // initval: wrap.layout || 'grid', - // tooltip: appType === 'mob' ? '寮规�у竷灞�鏃讹紝婊戝姩鍔犺浇鏃犳晥' : '', - // required: false, - // options: [ - // {value: 'grid', label: '鏍呮牸甯冨眬'}, - // {value: 'flex', label: '寮规�у竷灞�'}, - // ], - // controlFields: [ - // {field: 'printHeight', values: ['flex']}, - // {field: 'cardFloat', values: ['grid']}, - // ] - // }, + { + type: 'number', + field: 'zHeight', + label: '鏈�澶ч珮搴�', + initval: wrap.zHeight || '', + tooltip: '鍗$墖鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚爣棰樸�佺炕椤电瓑鍏冪礌锛夛紝娣诲姞楂樺害鍚庣粍浠朵腑绗竴涓睘鎬у崱灏嗗浐瀹氫簬澶撮儴銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��', + min: -1000, + max: 3000, + precision: 0, + required: false, + forbid: appType === 'mob' + }, { type: 'radio', field: 'pagestyle', @@ -91,11 +82,12 @@ disabled: !laypage, options: [ {value: 'page', label: '椤电爜'}, - {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'}, + {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || ispop}, {value: 'more', label: '鏌ョ湅鏇村'}, ], controlFields: [ {field: 'slidetip', values: ['slide']}, + {field: 'maxPageSize', values: ['page']}, ], }, { @@ -112,6 +104,7 @@ controlFields: [ {field: 'selected', values: ['radio', 'checkbox']}, {field: 'selStyle', values: ['radio', 'checkbox']}, + {field: 'pickup', values: ['radio', 'checkbox']}, ], }, { @@ -132,52 +125,43 @@ type: 'select', field: 'selStyle', label: '閫変腑椋庢牸', - initval: wrap.selStyle || 'active', - tooltip: '瀛樺湪杈规鏃讹紝杈规浼氫娇鐢ㄧ郴缁熻壊銆�', + initval: wrap.selStyle || 'check', + // tooltip: '瀛樺湪杈规鏃讹紝杈规浼氫娇鐢ㄧ郴缁熻壊銆�', required: false, options: [ {value: 'none', label: '鏃�'}, - {value: 'active', label: '澶栭槾褰�'}, - {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'}, - {value: 'font', label: '鏂囧瓧'}, + // {value: 'active', label: '澶栭槾褰�'}, + // {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'}, + // {value: 'font', label: '鏂囧瓧'}, {value: 'check', label: '鍕鹃�夛紙鍦嗘锛�'}, {value: 'check square', label: '鍕鹃�夛紙鏂规锛�'} ] }, - // { - // type: 'radio', - // field: 'cardFloat', - // label: '瀵归綈鏂瑰紡', - // initval: wrap.cardFloat || 'left', - // tooltip: '璁剧疆鍗$墖鐨勫榻愭柟寮忋��', - // required: false, - // options: [ - // {value: 'left', label: '宸﹀榻�'}, - // {value: 'center', label: '灞呬腑'}, - // {value: 'right', label: '鍙冲榻�'}, - // ], - // }, + { + type: 'radio', + field: 'pickup', + label: '鏀惰捣寮�鍏�', + initval: wrap.pickup || 'false', + tooltip: '鏁版嵁鍗″彸涓婅浼氭樉绀烘敹璧峰紑鍏炽��', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: appType === 'mob' + }, { type: 'radio', field: 'parity', - label: '濂囧伓鑳屾櫙', + label: '濂囧伓寮傝壊', initval: wrap.parity || 'false', - tooltip: '鍋舵暟琛屼細娣诲姞鑳屾櫙鑹层��', + tooltip: '瀛愯〃鍋舵暟琛屼細娣诲姞鑳屾櫙鑹层��', required: false, options: [ - {value: 'false', label: '鏃�'}, - {value: 'true', label: '鏈�'}, + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, ], }, - // { - // type: 'number', - // field: 'printHeight', - // label: '鎹㈢畻楂樺害', - // initval: wrap.printHeight || '', - // tooltip: '褰撳墠鏁版嵁鍗¢珮搴︾浉褰撲簬鍑犳潯鏁版嵁銆�', - // required: false, - // forbid: MenuType !== 'billPrint' - // }, { type: 'radio', field: 'empty', @@ -198,6 +182,7 @@ tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�', required: false, allowClear: true, + joint: true, options: columns, controlFields: [ {field: 'controlVal', notNull: true}, @@ -212,16 +197,94 @@ required: false }, { + type: 'select', + field: 'autoExec', + label: '鑷姩鎵ц', + initval: wrap.autoExec || '', + tooltip: '鍒濆鍖栬嚜鍔ㄦ墽琛屾寜閽��', + required: false, + options: buttons + }, + { + type: 'number', + field: 'minWidth', + label: '鏈�灏忓搴�', + min: 0, + max: 5000, + precision: 0, + initval: wrap.minWidth, + tooltip: '璁剧疆鍗$墖鍖哄煙鐨勬渶灏忓搴︼紝鏄剧ず鍖哄煙灏忎簬姝ゅ�煎皢鍑虹幇妯悜婊氬姩銆�', + required: false + }, + // { + // type: 'color', + // field: 'zBColor', + // label: '杈规棰滆壊', + // initval: wrap.zBColor || 'transparent', + // tooltip: '鍗$墖鍖哄煙璁剧疆楂樺害鎴栨渶灏忓搴︽椂锛屾粴鍔ㄥ尯鍩熻竟妗嗙殑棰滆壊銆�', + // required: false + // }, + { type: 'radio', field: 'permission', label: '鏉冮檺楠岃瘉', - initval: wrap.permission || 'false', + initval: wrap.permission || (!appType ? 'true' : 'false'), + required: false, + options: [ + {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: ispop || isprint + }, + { + type: 'radio', + field: 'cacheLocal', + label: '鏈湴缂撳瓨', + initval: wrap.cacheLocal || 'true', + required: false, + options: [ + {value: 'true', label: '缁ф壙鑿滃崟'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: ispop || isprint + }, + { + type: 'radio', + field: 'cacheSearch', + label: '鎼滅储缂撳瓨', + initval: wrap.cacheSearch || 'false', + tooltip: '鍚敤鎼滅储鏉′欢缂撳瓨鍚庯紝鍦ㄨ彍鍗曞埛鏂版椂鎼滅储鏉′欢涓嶅彉銆�', required: false, options: [ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' + forbid: !!appType || isprint + }, + { + type: 'radio', + field: 'shifting', + label: '鎸夐挳鍋忕Щ', + initval: wrap.shifting || 'false', + tooltip: '鍚敤鏃讹紝宸ュ叿鏍忔寜閽皢鏄剧ず鍦ㄦ爣棰樻爮鍙充笂瑙掋��', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !!appType || isprint + }, + { + type: 'number', + field: 'maxPageSize', + label: '姣忛〉鏈�澶ф暟', + initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', + min: 10, + max: 500, + precision: 0, + required: false, + forbid: !laypage || appType === 'mob' }, { type: 'multiselect', @@ -230,7 +293,7 @@ initval: wrap.blacklist || [], required: false, options: roleList, - forbid: !!appType + forbid: !!appType || isprint }, { type: 'text', -- Gitblit v1.8.0