diff --git a/src/views/home/widgets/index.vue b/src/views/home/widgets/index.vue
index 8931ffe9..5908c19c 100644
--- a/src/views/home/widgets/index.vue
+++ b/src/views/home/widgets/index.vue
@@ -133,7 +133,8 @@
return allCompsList
},
myCompsList(){
- return this.allCompsList.filter(item => !item.disabled )
+ var myGrid = this.$TOOL.data.get("DASHBOARDGRID")
+ return this.allCompsList.filter(item => !item.disabled && myGrid.includes(item.key))
},
nowCompsList(){
return this.grid.copmsList.reduce(function(a, b){return a.concat(b)})
diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue
index db827088..2fdf6a7a 100644
--- a/src/views/login/components/passwordForm.vue
+++ b/src/views/login/components/passwordForm.vue
@@ -106,6 +106,7 @@
}
this.$TOOL.data.set("MENU", menu.data.menu)
this.$TOOL.data.set("PERMISSIONS", menu.data.permissions)
+ this.$TOOL.data.set("DASHBOARDGRID", menu.data.dashboardGrid)
}else{
this.islogin = false
this.$message.warning(menu.message)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 9ae30177..2fa9a63e 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -121,6 +121,7 @@
this.$TOOL.data.remove("USER_INFO")
this.$TOOL.data.remove("MENU")
this.$TOOL.data.remove("PERMISSIONS")
+ this.$TOOL.data.remove("DASHBOARDGRID")
this.$TOOL.data.remove("grid")
this.$store.commit("clearViewTags")
this.$store.commit("clearKeepLive")
diff --git a/src/views/setting/role/permission.vue b/src/views/setting/role/permission.vue
index c8f2b8c0..0a2773a0 100644
--- a/src/views/setting/role/permission.vue
+++ b/src/views/setting/role/permission.vue
@@ -28,6 +28,11 @@
+
+
+
+
+
@@ -65,6 +70,15 @@
}
}
},
+ grid: {
+ list: [],
+ checked: ["welcome", "ver", "time", "progress", "echarts", "about"],
+ props: {
+ label: (data)=>{
+ return data.title
+ }
+ }
+ },
data: {
dataType :"1",
list: [],
@@ -91,6 +105,7 @@
mounted() {
this.getMenu()
this.getDept()
+ this.getGrid()
},
methods: {
open(){
@@ -132,6 +147,34 @@
let filterKeys = this.data.checked.filter(key => this.$refs.dept.getNode(key).isLeaf)
this.$refs.dept.setCheckedKeys(filterKeys, true)
})
+ },
+ getGrid(){
+ this.grid.list = [
+ {
+ key: "welcome",
+ title: "欢迎"
+ },
+ {
+ key: "ver",
+ title: "版本信息"
+ },
+ {
+ key: "time",
+ title: "时钟"
+ },
+ {
+ key: "progress",
+ title: "进度环"
+ },
+ {
+ key: "echarts",
+ title: "实时收入"
+ },
+ {
+ key: "about",
+ title: "关于项目"
+ }
+ ]
}
}
}