|
@@ -8,6 +8,9 @@
|
|
|
<template #status="{ record }">
|
|
|
{{ renderStatus(record.status) }}
|
|
|
</template>
|
|
|
+ <template #createTime="{ record }">
|
|
|
+ <Time :value="record.createTime" mode="datetime" />
|
|
|
+ </template>
|
|
|
<template #action="{ record }">
|
|
|
<TableAction
|
|
|
:actions="[
|
|
@@ -43,9 +46,10 @@
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
// import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
|
import { useGo } from '/@/hooks/web/usePage';
|
|
|
+ import { Time } from '/@/components/Time';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- components: { BasicTable, TableAction },
|
|
|
+ components: { BasicTable, TableAction, Time },
|
|
|
setup() {
|
|
|
const { createMessage } = useMessage();
|
|
|
const go = useGo();
|
|
@@ -53,29 +57,29 @@
|
|
|
const columns: BasicColumn[] = [
|
|
|
{
|
|
|
title: 'ID',
|
|
|
- dataIndex: 'id',
|
|
|
+ dataIndex: 'userId',
|
|
|
fixed: 'left',
|
|
|
width: 60,
|
|
|
},
|
|
|
{
|
|
|
title: '所属公司',
|
|
|
- dataIndex: 'company',
|
|
|
+ dataIndex: 'deptName',
|
|
|
width: 160,
|
|
|
},
|
|
|
{
|
|
|
title: '员工名称',
|
|
|
- dataIndex: 'name',
|
|
|
+ dataIndex: 'username',
|
|
|
width: 80,
|
|
|
},
|
|
|
{
|
|
|
title: '手机',
|
|
|
- dataIndex: 'phone',
|
|
|
+ dataIndex: 'mobile',
|
|
|
width: 80,
|
|
|
},
|
|
|
{
|
|
|
title: '角色',
|
|
|
- dataIndex: 'role',
|
|
|
- slots: { customRender: 'role' },
|
|
|
+ dataIndex: 'roleName',
|
|
|
+ // slots: { customRender: 'role' },
|
|
|
sorter: true,
|
|
|
width: 80,
|
|
|
},
|
|
@@ -90,6 +94,7 @@
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
dataIndex: 'createTime',
|
|
|
+ slots: { customRender: 'createTime' },
|
|
|
width: 130,
|
|
|
},
|
|
|
// {
|
|
@@ -131,8 +136,8 @@
|
|
|
fetchSetting: {
|
|
|
pageField: 'pageSize',
|
|
|
sizeField: 'pageNum',
|
|
|
- // listField: 'list',
|
|
|
- // totalField: 'totalCount',
|
|
|
+ listField: 'list',
|
|
|
+ totalField: 'totalCount',
|
|
|
},
|
|
|
});
|
|
|
|
|
@@ -148,9 +153,9 @@
|
|
|
}
|
|
|
function renderStatus(type: number): string {
|
|
|
switch (type) {
|
|
|
- case 0:
|
|
|
- return '正常';
|
|
|
case 1:
|
|
|
+ return '正常';
|
|
|
+ case 0:
|
|
|
return '非正常';
|
|
|
default:
|
|
|
return '';
|