From 5e67a19e049afab384d52acf83b461ec15c5dc86 Mon Sep 17 00:00:00 2001
From: WangHao <43278047@qq.com>
Date: Sat, 22 Aug 2020 17:42:06 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B9=A6=E7=AD=BE=E8=8F=9C=E5=8D=95=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E5=9B=9E=E6=98=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/views/bookmark/index/index.vue | 39 ++++++++++++++-------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/ruoyi-ui/src/views/bookmark/index/index.vue b/ruoyi-ui/src/views/bookmark/index/index.vue
index afc2fe1eb..837cfbb9c 100644
--- a/ruoyi-ui/src/views/bookmark/index/index.vue
+++ b/ruoyi-ui/src/views/bookmark/index/index.vue
@@ -320,6 +320,19 @@
this.open = true;
this.title = "添加书签菜单";
},
+ // /** 修改按钮操作 */
+ // handleUpdate(row) {
+ // this.reset();
+ // this.getTreeselect(); //树
+ // if (row != undefined) {
+ // this.form.parentId = row.menuId;
+ // }
+ // getMenu(row.menuId).then(response => {
+ // this.form = response.data;
+ // this.open = true;
+ // this.title = "修改书签菜单";
+ // });
+ // },
// 表单重置
reset() {
this.form = {
@@ -363,7 +376,7 @@
//if (treeNode.parentNode && treeNode.parentNode.id!=1) return;
var switchObjspan = $("#" + treeNode.tId + "_span");
- var editStr = "";
+ var editStr = "";
switchObjspan.after(editStr);
$("." + treeNode.tId + "_count").unbind().remove();
@@ -426,31 +439,33 @@
editBookmark:function(e){
- var that=this;
-
- //console.log("menuid:"+e.srcElement.dataset.menuId)
+ this.reset();
+ this.getTreeselect();
+ if (e.getAttribute("data-menuId")!=null&&e.getAttribute("data-parentId")!=null) {
+ this.form.parentId = e.getAttribute("data-parentId");
+ }
+ getMenu(e.getAttribute("data-menuId")).then(response => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "修改书签菜单";
+ });
- that.handleAdd();//新增
+ //阻止冒泡事件
if ( e && e.stopPropagation )
//因此它支持W3C的stopPropagation()方法
e.stopPropagation();
else
//否则,我们需要使用IE的方式来取消事件冒泡
window.event.cancelBubble = true;
-
return false;
-
-
},
},
mounted(){
-
- window['editBookmark'] = () => {
- this.editBookmark()
+ window['editBookmark'] = (e) => {
+ this.editBookmark(e)
}
-
},
handleCommand(command) {
this.$message('click on item ' + command);