Files
aida_front/src/component/Administrator/allUser.vue

224 lines
5.2 KiB
Vue
Raw Normal View History

2024-03-08 16:51:24 +08:00
<template>
2024-04-22 13:15:18 +08:00
<div class="admin_page">
<div class="admin_table_search">
2024-03-08 16:51:24 +08:00
</div>
<div class="allUser_table_content" ref="historyTable">
<a-table
:columns="columns"
2024-03-15 09:21:17 +08:00
:data-source="dataList"
:scroll="{ y: historyTableHeight}"
2024-03-08 16:51:24 +08:00
@change="changePage"
2024-05-28 11:22:16 +08:00
@resizeColumn="handleResizeColumn"
2024-03-08 16:51:24 +08:00
:pagination="{
showSizeChanger: true,
current: currentPage,
pageSize: pageSize,
total: total,
showQuickJumper: true,
bordered: false,
}"
>
2024-03-15 09:21:17 +08:00
<!-- <template
2024-03-08 16:51:24 +08:00
#bodyCell="{ column, text, record, index }"
>
2024-03-15 09:21:17 +08:00
</template> -->
2024-03-08 16:51:24 +08:00
</a-table>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https";
2024-05-28 11:22:16 +08:00
import type { TableColumnsType } from 'ant-design-vue';
2024-03-21 10:49:21 +08:00
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
2024-03-08 16:51:24 +08:00
export default defineComponent({
components: {
},
setup() {
let renameData: any = ref({}); //修改名字选中的数据
2024-05-28 11:22:16 +08:00
const columns: any = ref<TableColumnsType>([
2024-03-08 16:51:24 +08:00
{
title: 'Email',
align: "center",
ellipsis: true,
2024-05-28 11:22:16 +08:00
width: 50,
2024-03-08 16:51:24 +08:00
dataIndex: "email",
key: "email",
},
2024-03-15 09:21:17 +08:00
{
title: 'User Id',
2024-03-08 16:51:24 +08:00
align: "center",
2024-05-28 11:22:16 +08:00
width: 50,
2024-03-15 09:21:17 +08:00
dataIndex: "id",
key: "id",
2024-03-08 16:51:24 +08:00
},
{
2024-03-15 09:21:17 +08:00
title: 'User Name',
2024-03-08 16:51:24 +08:00
align: "center",
ellipsis: true,
2024-05-28 11:22:16 +08:00
width: 50,
2024-03-15 09:21:17 +08:00
dataIndex: "userName",
key: "userName",
2024-03-08 16:51:24 +08:00
},
2024-03-15 09:21:17 +08:00
{
title: 'Given Name',
2024-03-08 16:51:24 +08:00
align: "center",
ellipsis: true,
2024-05-28 11:22:16 +08:00
width: 50,
2024-03-15 09:21:17 +08:00
dataIndex: "givenName",
key: "givenName",
2024-03-08 16:51:24 +08:00
},
2024-03-15 09:21:17 +08:00
{
title: 'Create Time',
2024-03-08 16:51:24 +08:00
align: "center",
2024-05-28 11:22:16 +08:00
width: 50,
2024-03-15 09:21:17 +08:00
dataIndex: "createTime",
key: "createTime",
2024-03-08 16:51:24 +08:00
},
{
2024-03-15 09:21:17 +08:00
title: 'Title',
2024-03-08 16:51:24 +08:00
align: "center",
ellipsis: true,
2024-05-28 11:22:16 +08:00
width: 50,
//
2024-03-15 09:21:17 +08:00
dataIndex: "title",
key: "title",
2024-03-08 16:51:24 +08:00
},
2024-03-15 09:21:17 +08:00
{
title: 'Country',
2024-03-08 16:51:24 +08:00
align: "center",
2024-06-21 10:30:09 +08:00
width: 50,
2024-03-15 09:21:17 +08:00
ellipsis: true,
dataIndex: "country",
key: "country",
2024-03-08 16:51:24 +08:00
},
2024-03-15 09:21:17 +08:00
2024-05-28 11:22:16 +08:00
]
);
2024-03-15 09:21:17 +08:00
let dataList: any = ref([]);
2024-03-08 16:51:24 +08:00
let userInfo: any = {};
return {
columns,
2024-03-15 09:21:17 +08:00
dataList,
2024-03-08 16:51:24 +08:00
renameData,
userInfo,
2024-05-28 11:22:16 +08:00
handleResizeColumn: (w:any, col:any) => {
col.width = w;
},
2024-03-08 16:51:24 +08:00
};
},
data() {
return {
currentPage: 1,
pageSize: 10,
total: 0,
historyTableHeight: 0,
newCollectionName: "",
renameVisivle: false, //修改名字弹窗
collectionName: "", //选中的名字
searchCollectionName: "",
};
},
mounted() {
let historyTable: any = this.$refs.historyTable;
2024-04-22 13:15:18 +08:00
this.historyTableHeight = historyTable.clientHeight - 200;
2024-03-08 16:51:24 +08:00
this.gettrialList();
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
},
methods: {
//改变页码
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
2024-03-15 09:21:17 +08:00
// this.gettrialList();
2024-03-08 16:51:24 +08:00
},
//查询列表
searchHistoryList() {
this.currentPage = 1;
this.gettrialList();
},
//获取列表
gettrialList() {
2024-03-15 09:21:17 +08:00
Https.axiosGet(Https.httpUrls.inquiryGetTrial).then((rv)=>{
this.dataList = rv
})
2024-03-08 16:51:24 +08:00
},
},
});
</script>
<style lang="less">
2024-04-22 13:15:18 +08:00
.admin_page {
2024-03-08 16:51:24 +08:00
width: 100%;
height: 100%;
overflow: hidden;
// min-width: 1440px;
position: relative;
.allUser_table_content {
margin-top: 2.6rem;
width: 100%;
height: calc(100% - 13.7rem);
padding-bottom: 3rem;
background: #fff;
border-radius: 2rem;
overflow: hidden;
.ant-table {
background: transparent;
}
.ant-table-body {
overflow-y: auto !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
&::-webkit-scrollbar {
width: 0 !important;
}
}
.ant-table-thead > tr > th {
background: #ffffff00;
border-bottom: none;
backdrop-filter: blur(1rem);
}
.ant-table-tbody > tr > td {
border: none;
background: transparent;
// color: #fff;
}
.ant-table-tbody > tr {
&:hover > td {
background: #ffffff3a;
}
}
.ant-table-pagination-right {
padding-right: 3.5rem;
}
.operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
.operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
}
}
}
</style>