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

289 lines
6.5 KiB
Vue
Raw Normal View History

2024-03-08 16:51:24 +08:00
<template>
<div class="allUser_page">
<div class="allUser_table_search">
</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"
: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-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({}); //修改名字选中的数据
const columns: any = computed(() => {
return [
{
title: 'Email',
align: "center",
ellipsis: true,
2024-03-15 09:21:17 +08:00
width: 30,
2024-03-08 16:51:24 +08:00
dataIndex: "email",
key: "email",
2024-03-15 09:21:17 +08:00
fixed: 'left',
2024-03-08 16:51:24 +08:00
},
2024-03-15 09:21:17 +08:00
{
title: 'User Id',
2024-03-08 16:51:24 +08:00
align: "center",
2024-03-15 09:21:17 +08:00
width: 30,
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-03-15 09:21:17 +08:00
width: 30,
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-03-15 09:21:17 +08:00
width: 30,
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-03-15 09:21:17 +08:00
width: 30,
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-03-15 09:21:17 +08:00
width: 30,
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-03-15 09:21:17 +08:00
ellipsis: true,
width: 30,
dataIndex: "country",
key: "country",
fixed: 'right',
2024-03-08 16:51:24 +08:00
},
2024-03-15 09:21:17 +08:00
2024-03-08 16:51:24 +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,
};
},
data() {
return {
currentPage: 1,
pageSize: 10,
total: 0,
historyTableHeight: 0,
newCollectionName: "",
renameVisivle: false, //修改名字弹窗
collectionName: "", //选中的名字
searchCollectionName: "",
};
},
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
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)=>{
console.log(rv);
this.dataList = rv
})
2024-03-08 16:51:24 +08:00
},
},
});
</script>
<style lang="less">
.allUser_page {
width: 100%;
height: 100%;
overflow: hidden;
// min-width: 1440px;
position: relative;
.allUser_table_search {
display: flex;
margin-top: 2rem;
padding: 2rem 3.5rem 5rem 2.8rem;
background: #fff;
display: flex;
justify-content: space-between;
.allUser_search{
width: 40%;
.allUser_search_item{
background: #343579;
border-color: #343579;
height: 4rem;
padding: .64rem 1.5rem;
font-size: 1.6rem;
border-radius: 2px;
display: inline-block;
color: #fff;
cursor: pointer;
}
}
.allUser_state {
position: relative;
cursor: pointer;
width: 60%;
.allUser_state_item{
margin-right: 2rem;
margin-bottom: 2rem;
display: flex;
align-items: center;
>span{
font-size: 1.6rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 13rem;
text-align: right;
}
}
.allUser_current{
background: #fff;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.header_user_content {
position: absolute;
border: 2px solid;
border-radius: 1rem;
overflow: hidden;
top: 0;
transform: translateY(6rem);
z-index: 2;
display: none;
margin-left: -2rem;
.username{
padding: 0 2rem;
color: #000;
}
.username:hover{
background: #e1e1e1;
}
&.active{
display: block;
}
}
}
}
.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>