|
|
@ -25,29 +25,29 @@ |
|
|
|
:data="tableData" |
|
|
|
row-key="menu_id" |
|
|
|
border |
|
|
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
|
|
|
:tree-props="{ children: 'Children', hasChildren: 'hasChildren' }" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
prop="title" |
|
|
|
prop="Menu-Title" |
|
|
|
label="菜单名称" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
width="180px" |
|
|
|
/> |
|
|
|
<el-table-column prop="icon" label="图标" align="center" width="100px"> |
|
|
|
<el-table-column prop="Menu-Icon" label="图标" align="center" width="100px"> |
|
|
|
<template #default="scope"> |
|
|
|
<svg-icon :icon-class="scope.row.icon" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="path" label="路径" :show-overflow-tooltip="true"> |
|
|
|
<el-table-column prop="Menu-Path" label="路径" :show-overflow-tooltip="true"> |
|
|
|
<template #default="scope"> |
|
|
|
<span v-if="scope.row.menu_type == 'A'">{{ scope.row.path }}</span> |
|
|
|
<span v-else>{{ scope.row.component }}</span> |
|
|
|
<span v-if="scope.row['Menu-MenuType'] == 'A'">{{ scope.row['Menu-Path'] }}</span> |
|
|
|
<span v-else>{{ scope.row['Menu-Component'] }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="创建时间" |
|
|
|
align="center" |
|
|
|
prop="create_by" |
|
|
|
prop="Menu-CreateTime" |
|
|
|
width="180" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
@ -81,31 +81,28 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { ListMixin } from "@/mixins/ListMixin"; |
|
|
|
import { getMenuDetails } from "@/server/system/menu"; |
|
|
|
import AddOrEdit from "./addOrEdit.vue"; |
|
|
|
import { getTreeMenu } from "@/server/system/menu"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
AddOrEdit |
|
|
|
}, |
|
|
|
mixins: [ListMixin], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
queryTableDataUrl: "/admin/menu/menulist", |
|
|
|
loading: false, |
|
|
|
isAddOrEdit:false |
|
|
|
isAddOrEdit:false, |
|
|
|
tableData:[], |
|
|
|
queryParams:{} |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索按钮操作 |
|
|
|
handleQuery() { |
|
|
|
this.pagination.pageNumber = 1; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
// 重置 |
|
|
|
resetQuery(){ |
|
|
|
this.queryParams={}; |
|
|
|
this.pagination.pageNumber = 1; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
// 新增菜单 |
|
|
@ -116,12 +113,18 @@ export default { |
|
|
|
handleUpdate() {}, |
|
|
|
// 删除 |
|
|
|
handleDelete() {}, |
|
|
|
// 菜单列表 |
|
|
|
getTreeMenu(){ |
|
|
|
getTreeMenu().then(({code,data=[]})=>{ |
|
|
|
if(code==200){ |
|
|
|
this.tableData=data; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
getMenuDetails({ id: 261 }).then((res) => { |
|
|
|
console.log(res); |
|
|
|
}); |
|
|
|
}, |
|
|
|
mounted(){ |
|
|
|
this.getTreeMenu(); |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="less" scoped> |
|
|
|