From 98ac163404b27423a44e22d1ddcf7948d99a88f8 Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Thu, 15 Aug 2024 09:16:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=B3=BB=E7=BB=9F=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/menuManage/menuManage.vue | 159 ++++++++++--------
.../system/userManage/userManageList.vue | 6 +-
2 files changed, 89 insertions(+), 76 deletions(-)
diff --git a/src/views/system/menuManage/menuManage.vue b/src/views/system/menuManage/menuManage.vue
index e7b5694..758a1de 100644
--- a/src/views/system/menuManage/menuManage.vue
+++ b/src/views/system/menuManage/menuManage.vue
@@ -92,12 +92,10 @@
-
+
-
+
@@ -210,14 +208,13 @@
:props="defaultProps" @check-change="checkchange">
-->
-
+
-
+
+
|
@@ -320,6 +317,7 @@
data() {
return {
loading: false,
+ disabled: false,
activeName: 'roleList',
editDialog: false,
dialogTitle: '',
@@ -330,6 +328,7 @@
isShow: '1',
menuName: '',
menuUrl: '',
+ menuType: "0",
pageAliasName: '',
pageName: '',
pageUrl: '',
@@ -338,9 +337,9 @@
remarks: '',
sortNo: 0,
cid: '',
- sourceName: 'wms',
+ sourceName: '',
phoneFunction: "0",
- sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa44'
+ sourceSid: ''
},
tableData: [],
page: {
@@ -350,8 +349,8 @@
params: {
name: '',
psid: '',
- sourceName: 'wms',
- sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa44'
+ // sourceName: 'oms',
+ // sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa44'
}
},
rank: '1',
@@ -382,35 +381,21 @@
// })
},
methods: {
- departmentClick(data) {
- console.log("departmentClick", data);
- this.form.psid = data.sid
- this.form.pname = data.name
- this.$refs.Tree.visible = false
- },
- checkchange(data, checked) {
- console.log("checkchange", data);
- console.log("checkchange", checked);
-
-
- if (checked) {
-
- if (data.sid == 'd936f1ba-03c3-11ec-bf08-48452053aa44') {
- this.form.psid = '0'
- this.form.pname = '顶级菜单'
- } else {
- this.form.psid = data.psid
- this.form.pname = data.pname
- }
- let arr = []
- arr = [data.sid];
- this.$refs.Tree.setCheckedKeys(arr);
-
- console.log("checkchange", this.form.pname);
- console.log("checkchange", this.form.psid);
- return;
+ nodeClick(val) {
+ console.log("nodeClick", val);
+ if (val.isSource == '1') {
+ // 选择的是资源 最顶级的
+ this.form.psid = '0'
+ this.form.pname = '顶级菜单'
+ } else {
+ this.form.psid = val.sid
+ this.form.pname = val.name
}
+ this.form.sourceName = val.sourceName
+ this.form.sourceSid = val.sourceSid
+
+ this.$refs.treeSelect.visible = false
},
@@ -471,46 +456,74 @@
handleClick(tab, event) {
console.log("handleClick", event);
if (tab.name == 'addrole') {
- this.$refs.Tree.setCheckedKeys([]);
- this.form = {}
- this.dialogTitle = '新增'
- this.form.isShow = '1'
- this.form.menuType = '0'
- // this.form.psid = row.sid || 0
- this.form.sourceName = 'oms'
- this.form.sourceSid = 'd936f1ba-03c3-11ec-bf08-48452053aa44'
- this.form.pname = '顶级菜单'
- this.form.psid = '0'
- // this.sourceMenus()
+ // this.$refs.Tree.setCheckedKeys([]);
+ this.form = {
+ pname: '',
+ iconUrl: '',
+ isShow: '1',
+ menuName: '',
+ menuUrl: '',
+ menuType: "0",
+ pageAliasName: '',
+ pageName: '',
+ pageUrl: '',
+ pageUrlRedirect: '',
+ psid: '',
+ remarks: '',
+ sortNo: 0,
+ cid: '',
+ sourceName: '',
+ phoneFunction: "0",
+ sourceSid: ''
+ }
+ this.disabled = false
+ this.addMenuType = '0'
+ this.editMenuType = '0'
+ this.addPhoneFunction = "0"
+ this.editPhoneFunction = "0"
} else {
this.getPageList()
}
},
add(row) {
- console.log("editRow", row);
+ console.log("editRow22222222222", row);
+ this.form = {
+ pname: row.name,
+ iconUrl: '',
+ isShow: '1',
+ menuName: '',
+ menuUrl: '',
+ menuType: "0",
+ pageAliasName: '',
+ pageName: '',
+ pageUrl: '',
+ pageUrlRedirect: '',
+ psid: row.sid,
+ remarks: '',
+ sortNo: 0,
+ cid: '',
+ sourceName: row.sourceName,
+ phoneFunction: "0",
+ sourceSid: row.sourceSid
+ }
+ this.disabled = true
+ this.dialogTitle = '新增'
this.activeName = 'addrole'
- // if(row == 0){
- // this.isadd = false
- // }else{
- // this.isadd = true
- // }
- // this.dialogTitle = '新增'
- // this.editDialog = true
- this.form.isShow = '1'
- this.form.menuType = '0'
- // this.form.psid = row.sid || 0
- this.form.pname = row.name
- this.form.psid = row.sid
- this.form.sourceName = row.sourceName
- this.form.sourceSid = row.sourceSid
+
if (row.isSource == '1') {
this.form.psid = 0
+ this.form.pname = "顶级菜单"
} else {
this.form.psid = row.sid
+ this.form.pname = row.name
}
- let arr = []
- arr = [row.sid];
- this.$refs.Tree.setCheckedKeys(arr);
+ this.addMenuType = '0'
+ this.editMenuType = '0'
+ this.addPhoneFunction = "0"
+ this.editPhoneFunction = "0"
+ // let arr = []
+ // arr = [row.sid];
+ // this.$refs.Tree.setCheckedKeys(arr);
},
editRow(row) {
@@ -521,9 +534,9 @@
this.editShow = this.form.isShow
this.editMenuType = this.form.menuType
- let arr = []
- arr = [row.sid];
- this.$refs.Tree.setCheckedKeys(arr);
+ // let arr = []
+ // arr = [row.sid];
+ // this.$refs.Tree.setCheckedKeys(arr);
// this.form.isShow = 1
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
diff --git a/src/views/system/userManage/userManageList.vue b/src/views/system/userManage/userManageList.vue
index c3687a7..75262ff 100644
--- a/src/views/system/userManage/userManageList.vue
+++ b/src/views/system/userManage/userManageList.vue
@@ -33,16 +33,16 @@
-
+
设置角色
初始化密码
-
+
编辑
-
+
删除