-
-
-
- 新建
-
-
- 删除
-
-
-
-
+
+
+
+ 新建
+ 删除
+
+
+
@@ -18,9 +24,8 @@
import dataTable from '@/components/DataTable/index.vue'
import TableAction from '@/components/DataTable/tools/Action.vue'
import { getDeptList } from '@/api/system/index.js'
-import { h, onMounted } from 'vue'
+import { h, onMounted, unref } from 'vue'
import { reactive } from 'vue'
-import { toTreeData } from '@/utils/handleData.js'
export default {
name: 'MenuPage',
components: { dataTable },
@@ -52,7 +57,6 @@ export default {
title: '排序',
key: 'sort',
align: 'center'
-
},
{
title: '备注',
@@ -124,24 +128,30 @@ export default {
limit: 10
}
const res = await getDeptList(params)
- const dataList = toTreeData(res.data.map(d => {
- d.index = d.id
- return d
- }), 'id', 'pid')
- data.data = dataList
+ data.data = res.data
+ }
+ const params = reactive({
+ name: 'xiaoMa'
+ })
+
+ const loadDataTable = async(res) => {
+ const _params = {
+ ...unref(params),
+ ...res
+ }
+ return await getDeptList(_params)
}
onMounted(() => {
fetchList()
})
- return { data }
+ return { data, loadDataTable }
}
}
-
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index c1d72a4..88688df 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -37,7 +37,8 @@ export default {
{
title: '用户编号',
key: 'code',
- align: 'center'
+ align: 'center',
+ minWidth: 80
},
{
title: '头像',
@@ -51,52 +52,56 @@ export default {
src: row.avatar
}
})
- }
+ },
+ minWidth: 80
},
{
title: '用户账号',
key: 'username',
- align: 'center'
+ align: 'center',
+ minWidth: 80
},
{
title: '用户姓名',
key: 'realname',
- align: 'center'
+ align: 'center',
+ minWidth: 80
},
{
title: '用户类型',
key: 'type',
align: 'center',
- width: 100
+ minWidth: 80
},
{
title: '角色',
key: 'roles',
- align: 'center'
-
+ align: 'center',
+ minWidth: 100
},
{
title: '状态',
key: 'status',
align: 'center',
- width: 100
+ minWidth: 80
},
{
title: '部门',
key: 'deptName',
- align: 'center'
+ align: 'center',
+ minWidth: 120
},
{
title: '创建时间',
key: 'createTime',
align: 'center',
- width: 160
+ minWidth: 160
},
{
title: '更新时间',
key: 'updateTime',
align: 'center',
- width: 160
+ minWidth: 160
},
{
title: '操作',
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 745a9ae..10f1fda 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1,16 +1,21 @@