From 83957eba1ad5bde31feced0bf07e28bd95389009 Mon Sep 17 00:00:00 2001 From: zhangyanpeng <bob.zhang@highdatas.com> Date: 星期一, 26 八月 2024 19:58:23 +0800 Subject: [PATCH] 调整 --- module/config/page/sys_menu_add.html | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/module/config/page/sys_menu_add.html b/module/config/page/sys_menu_add.html index 62289c6..cca28cc 100644 --- a/module/config/page/sys_menu_add.html +++ b/module/config/page/sys_menu_add.html @@ -50,6 +50,7 @@ dataRequestObj: {}, options_menumap: {}, options_menutree: [], + listoptions: [], //鎸夐敭鏉冮檺璁剧疆 isedit: false,//鎻愪氦鍓嶇紪杈戯紝淇濆瓨/鎻愪氦 @@ -80,6 +81,7 @@ if (this.popupParames.sceneCode) { if (this.popupParames.sceneCode == 'addmenu') { this.isAddMenu = true; + // this.pageid = createCode("M_P"); this.parent_menuobj = this.popupParames.data; if (this.parent_menuobj && this.parent_menuobj.id) { this.formData.parent_id = this.parent_menuobj.id @@ -159,7 +161,8 @@ var me = this; if(this.popupParames.callback) { let obj = { - options: this.treeoptions, + treeoptions: this.options_menutree, + listoptions: this.listoptions } this.popupParames.callback(obj, function() { me.closeDialog(); @@ -349,6 +352,9 @@ if (entity_.id) { entity.id = entity_.id } + else { + entity.id = createCode("M") + } let param = { dataname: this.dataname, @@ -360,6 +366,9 @@ if (me.pageid) { me.onRefreshCacheByPageId(me.pageid); } + else if (entity.id) { + me.onRefreshCacheByMenuId(entity.id); + } else { Root.message({ type: 'success', @@ -370,7 +379,7 @@ }); }, - // 鍒锋柊缂撳瓨 + // 鍒锋柊缂撳瓨椤甸潰 onRefreshCacheByPageId(PageId) { var me = this; let param_ = { @@ -383,6 +392,7 @@ filter: "page_id is null", } Server.call("root/data/getEntitySet", param_, function(result2){ + me.listoptions = clone(result2.data.entityset); let agm_category_ = ArrayToTree(clone(result2.data.entityset), "title", "parent_id"); me.options_menutree = agm_category_; Root.message({ @@ -395,6 +405,31 @@ }); }, + onRefreshCacheByMenuId(MenuId) { + var me = this; + let param_ = { + menu_id: MenuId + } + Server.call("root/system/reloadOneMenu", param_, function(result) { + if (result.success) { + let param_ = { + dataname: "sys_menu", + filter: "page_id is null", + } + Server.call("root/data/getEntitySet", param_, function(result2){ + me.listoptions = clone(result2.data.entityset); + let agm_category_ = ArrayToTree(clone(result2.data.entityset), "title", "parent_id"); + me.options_menutree = agm_category_; + Root.message({ + type: 'success', + message: '淇濆瓨鎴愬姛' + }); + me.saveAfter(); + }); + } + }); + } + } }); }; -- Gitblit v1.8.0