|
@@ -90,7 +90,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { TreeSelect } from 'ant-design-vue'
|
|
|
-import { getMenu, getMenuList , addMenu, editMenu, delMenu } from '../../utils/api'
|
|
|
+import { getMenu, getMenuList , addMenu, editMenu, delMenu, getUserMenu } from '../../utils/api'
|
|
|
export default {
|
|
|
name: "MenuAdmin",
|
|
|
components: {
|
|
@@ -228,11 +228,17 @@ export default {
|
|
|
getMenu()
|
|
|
.then(res => {
|
|
|
if(res.code === 10000) {
|
|
|
- this.tableData = res.data;
|
|
|
+ // this.tableData = res.data;
|
|
|
+ console.log(res.data)
|
|
|
}
|
|
|
})
|
|
|
- getMenuList().then(res => {
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ userId: localStorage.getItem('UserId')
|
|
|
+ }
|
|
|
+ getUserMenu(params).then(res => {
|
|
|
if(res.code === 10000) {
|
|
|
+ this.tableData = res.data;
|
|
|
this.menuTreeData = [
|
|
|
{
|
|
|
id: -1,
|
|
@@ -246,6 +252,22 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
})
|
|
|
+ getMenuList().then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ // this.menuTreeData = [
|
|
|
+ // {
|
|
|
+ // id: -1,
|
|
|
+ // parentId: 0,
|
|
|
+ // title: '顶级',
|
|
|
+ // value: 0,
|
|
|
+ // pid: 0,
|
|
|
+ // weight: 0,
|
|
|
+ // children: res.data,
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|