From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/menu/components/card/balcony/options.jsx | 175 +++++++++++++++++++++++++--------------------------------- 1 files changed, 75 insertions(+), 100 deletions(-) diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx index da00fcc..c73bf93 100644 --- a/src/menu/components/card/balcony/options.jsx +++ b/src/menu/components/card/balcony/options.jsx @@ -4,8 +4,10 @@ /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, buttons) { +export default function (wrap, buttons, columns) { let menu = window.GLOB.customMenu + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' let modules = MenuUtils.getLinkModules(menu.components) || [] let supmodules = MenuUtils.getSupModules(menu.components, '', menu.interfaces) @@ -69,6 +71,7 @@ controlFields: [ {field: 'empty', values: ['dynamic']}, {field: 'publicId', values: ['public']}, + {field: 'bgField', values: ['dynamic', 'public']}, ] }, { @@ -77,7 +80,27 @@ label: '鏁版嵁婧�', initval: wrap.publicId || '', required: true, - options: interfaces + options: interfaces, + reset_source: true, + callback: (map, record) => { + if (!record.publicId) return + + let interfaces = window.GLOB.customMenu.interfaces || [] + + let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0] + + if (!d || !d.columns) return + + let columns = JSON.parse(JSON.stringify(d.columns)) + + let _bgField = map.get('bgField') + + if (_bgField && !_bgField.forbid) { + _bgField.options = columns + _bgField.oriOptions = columns + map.set('bgField', _bgField) + } + } }, { type: 'radio', @@ -90,6 +113,7 @@ <div>2銆佸悓姝ョ被鍨嬩腑鍏紡銆佹寜閽互鍙婂叏閫夊厓绱犳瘮杈冪壒娈婏紝鎿嶄綔鏁版嵁涓哄叾鍚屾缁勪欢鐨勬暟鎹��</div> <div>3銆佷笂绾х被鍨嬮渶娣诲姞褰撳墠缁勪欢鐨勪笂绾х粍浠讹紝骞跺彲璁剧疆褰撳墠缁勪欢涓哄缁堟樉绀猴紝杩樻槸鍙湁鍦ㄤ笂绾х粍浠堕�夎鍚庢墠鏄剧ず銆�</div> </div>, + toolWidth: 400, required: false, options: [ {value: 'static', label: '鐙珛'}, @@ -101,7 +125,8 @@ {field: 'supControl', values: ['sup']}, {field: 'syncModule', values: ['sync']}, {field: 'checkAll', values: ['sync']}, - ] + ], + forbid: isprint }, { type: 'cascader', @@ -110,7 +135,8 @@ initval: wrap.supModule || [], // tooltip: '褰撲笂绾х粍浠朵笉瀛樺湪鎴栨病鏈夋潈闄愭椂锛屽綋鍓嶇粍浠朵笉鏄剧ず銆�', required: true, - options: supmodules + options: supmodules, + forbid: isprint }, { type: 'radio', @@ -122,7 +148,8 @@ options: [ {value: 'hidden', label: '閫夎'}, {value: 'show', label: '濮嬬粓'}, - ] + ], + forbid: isprint }, { type: 'cascader', @@ -131,7 +158,8 @@ initval: wrap.syncModule || '', tooltip: '褰撳悓姝ョ粍浠朵笉瀛樺湪鎴栨病鏈夋潈闄愭椂锛屽綋鍓嶇粍浠朵笉鏄剧ず銆�', required: true, - options: modules + options: modules, + forbid: isprint }, { type: 'radio', @@ -143,96 +171,8 @@ options: [ {value: 'hidden', label: '闅愯棌'}, {value: 'show', label: '鏄剧ず'}, - ] - }, - { - type: 'radio', - field: 'position', - label: '浣嶇疆', - initval: wrap.position || 'relative', - tooltip: '鐩稿瀹氫綅鏄浉瀵瑰叾姝e父浣嶇疆鐨勫亸绉伙紱缁濆瀹氫綅鏄浉瀵逛簬鍘熺粍浠剁殑鍋忕Щ锛屽師缁勪欢楂樺害鍙涓�0锛涘浐瀹氬畾浣嶆槸鐩稿浜庣獥鍙g殑浣嶇疆锛屽畾浣嶆晥鏋滄祴璇曠幆澧冧腑鏌ョ湅銆�', - required: false, - options: [ - {value: 'relative', label: '鐩稿瀹氫綅'}, - {value: 'absolute', label: '缁濆瀹氫綅'}, - {value: 'fixed', label: '鍥哄畾瀹氫綅'}, ], - controlFields: [ - {field: 'quick', values: ['fixed']}, - {field: 'realwidth', values: ['fixed', 'absolute']}, - {field: 'transform', values: ['fixed', 'absolute']}, - ] - }, - { - type: 'select', - field: 'quick', - label: '蹇嵎閫夋嫨', - initval: '', - required: false, - subFields: ['top', 'left', 'right', 'bottom', 'transform'], - options: [ - {value: 'top', label: '涓�', top: '0px', left: '0px', right: '0px', bottom: '', transform: ''}, - {value: 'top-left', label: '宸︿笂', top: '0px', left: '0px', right: '', bottom: '', transform: ''}, - {value: 'top-right', label: '鍙充笂', top: '0px', left: '', right: '0px', bottom: '', transform: ''}, - {value: 'left-middle', label: '宸︿腑', top: '50%', left: '0px', right: '', bottom: '', transform: 'translateY(-50%)'}, - {value: 'right-middle', label: '鍙充腑', top: '50%', left: '', right: '0px', bottom: '', transform: 'translateY(-50%)'}, - {value: 'bottom-left', label: '宸︿笅', top: '', left: '0px', right: '', bottom: '0px', transform: ''}, - {value: 'bottom-right', label: '鍙充笅', top: '', left: '', right: '0px', bottom: '0px', transform: ''}, - {value: 'bottom', label: '涓�', top: '', left: '0px', right: '0px', bottom: '0px', transform: ''}, - {value: 'middle', label: '涓棿', top: '50%', left: '50%', right: '', bottom: '', transform: 'translate(-50%, -50%)'} - ] - }, - { - type: 'styleInput', - field: 'top', - label: '璺濅笂', - initval: wrap.top || '', - required: false - }, - { - type: 'styleInput', - field: 'right', - label: '璺濆彸', - initval: wrap.right || '', - required: false - }, - { - type: 'styleInput', - field: 'bottom', - label: '璺濅笅', - initval: wrap.bottom || '', - required: false - }, - { - type: 'styleInput', - field: 'left', - label: '璺濆乏', - initval: wrap.left || '', - required: false - }, - { - type: 'styleInput', - field: 'realwidth', - label: '瀹為檯瀹藉害', - initval: wrap.realwidth || '', - required: false - }, - { - type: 'select', - field: 'transform', - label: '鍙樻崲', - initval: wrap.transform || '', - required: false, - options: [ - {value: 'translateY(-50%)', label: '涓婄Щ50%'}, - {value: 'translateY(50%)', label: '涓嬬Щ50%'}, - {value: 'translateX(-50%)', label: '宸︾Щ50%'}, - {value: 'translateX(50%)', label: '鍙崇Щ50%'}, - {value: 'translate(-50%, -50%)', label: '宸︿笂绉�50%'}, - {value: 'translate(-50%, 50%)', label: '宸︿笅绉�50%'}, - {value: 'translate(50%, -50%)', label: '鍙充笂绉�50%'}, - {value: 'translate(50%, 50%)', label: '鍙充笅绉�50%'}, - ] + forbid: isprint }, { type: 'radio', @@ -248,16 +188,50 @@ ], }, { + type: 'select', + field: 'bgField', + label: '鑳屾櫙鍥�', + initval: wrap.bgField || '', + tooltip: '鍔ㄦ�佽儗鏅紝鑳屾櫙鍥剧墖鐢卞瓧娈靛�兼帶鍒躲�傝娉ㄦ剰璋冩暣鑳屾櫙鏍峰紡銆�', + required: false, + options: columns + }, + { + type: 'radio', + field: 'printType', + label: '缁勪欢绫诲瀷', + initval: wrap.printType || 'content', + tooltip: '閫夋嫨绫诲瀷涓恒�婇〉鐪�/椤佃剼銆嬫椂锛屾墦鍗扮殑姣忛〉閲岄兘浼氬甫鏈夎缁勪欢銆傛敞锛氶〉鐪夐〉鑴氫腑鏂囨湰鍏冪礌灏嗘浛鎹� @pageIndex@锛堥〉鐮侊級銆丂total@锛堟�绘暟锛夈�丂date@锛堝綋鍓嶆棩鏈燂級銆丂datetime@锛堝綋鍓嶆椂闂达級锛屼娇鐢ㄥ垎椤靛弬鏁版椂娉ㄦ剰鎵撳嵃妯℃澘鐨勯〉闈㈠竷灞�浣跨敤鍒嗛〉銆�', + required: false, + options: [ + {value: 'content', label: '娴姩鍗�'}, + {value: 'headerOrfooter', label: '椤电湁/椤佃剼'}, + ], + forbid: !isprint + }, + { type: 'radio', field: 'permission', label: '鏉冮檺楠岃瘉', - initval: wrap.permission || 'false', + initval: wrap.permission || (!appType ? 'true' : 'false'), required: false, options: [ - {value: 'true', label: '鍚敤'}, + {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' + 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: 'select', @@ -265,7 +239,8 @@ label: '鍏宠仈鎸夐挳', initval: wrap.linkbtn || '', required: false, - options: buttons + options: buttons, + forbid: isprint }, { type: 'multiselect', @@ -274,7 +249,7 @@ initval: wrap.blacklist || [], required: false, options: roleList, - forbid: !!appType + forbid: !!appType || isprint }, ] -- Gitblit v1.8.0