|
|
@@ -38,63 +38,20 @@ |
|
|
|
<script> |
|
|
|
import headSearch from '@/components/Search/index.vue' |
|
|
|
import dataTable from '@/components/DataTable/index.vue' |
|
|
|
import TableAction from '@/components/DataTable/tools/Action.vue' |
|
|
|
import TableImage from '@/components/DataTable/tools/Image.vue' |
|
|
|
import TableTags from '@/components/DataTable/tools/Tags.vue' |
|
|
|
import TableSwitch from '@/components/DataTable/tools/Switch.vue' |
|
|
|
import TableAction from '@/components/DataTable/tools/Action.vue' |
|
|
|
import { getUserList, resetPassword, deleteUser, setUserStatus } from '@/api/system/user/index.js' |
|
|
|
import { h, unref, ref, toRefs, reactive } from 'vue' |
|
|
|
import UserModal from './components/UserModal.vue' |
|
|
|
import info from './info.js' |
|
|
|
import table from './table.js' |
|
|
|
export default { |
|
|
|
name: 'MenuPage', |
|
|
|
components: { dataTable, UserModal, headSearch }, |
|
|
|
setup() { |
|
|
|
const data = reactive({ |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
type: 'selection' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '用户编号', |
|
|
|
key: 'code', |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '头像', |
|
|
|
key: 'avatar', |
|
|
|
align: 'center', |
|
|
|
render(row) { |
|
|
|
return h(TableImage, { |
|
|
|
images: { |
|
|
|
width: 36, |
|
|
|
height: 36, |
|
|
|
src: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQiKrYt-fEfJ4SZhF9KfLLaX9f15KV6Ve1ptA&usqp=CAU' |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '用户账号', |
|
|
|
key: 'username', |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '用户姓名', |
|
|
|
key: 'realname', |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '角色', |
|
|
|
key: 'roleList', |
|
|
|
align: 'center', |
|
|
|
render(row) { |
|
|
|
return h(TableTags, { |
|
|
|
data: row.roleList, |
|
|
|
rowKey: 'name' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
...table.columns, |
|
|
|
{ |
|
|
|
title: '状态', |
|
|
|
key: 'status', |
|
|
@@ -110,23 +67,6 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '部门', |
|
|
|
key: 'deptName', |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '创建时间', |
|
|
|
key: 'createTime', |
|
|
|
align: 'center', |
|
|
|
width: 160 |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '更新时间', |
|
|
|
key: 'updateTime', |
|
|
|
align: 'center', |
|
|
|
width: 160 |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
align: 'center', |