更新笔触和管理员页面

This commit is contained in:
X1627315083
2024-03-15 09:21:17 +08:00
parent bc314a2f83
commit b15d2e467f
29 changed files with 2792 additions and 1385 deletions

View File

@@ -0,0 +1,338 @@
<template>
<div class="allOrder_page">
<div class="allOrder_table_search">
<!-- <a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker> -->
<!-- <div class="content_search_block">
<input
class="search_input"
:placeholder="
$t('HistoryPage.inputContent1')
"
v-model="searchCollectionName"
@keydown.enter="searchAllOrderList()"
/>
<div
class="search_icon_block"
@click="searchAllOrderList()"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div> -->
</div>
<div class="allOrder_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
:pagination="{
showSizeChanger: true,
current: currentPage,
pageSize: pageSize,
total: total,
showQuickJumper: true,
bordered: false,
}"
>
<template
#bodyCell="{ column, text, record, index }"
>
<div
class="operate_list"
v-if="column?.Operations"
>
<!-- <div
v-if="record.orderStatus == '支付成功'"
class="operate_item"
@click="refund(record)"
>
refund
</div> -->
<div class="operate_item">{{ $t('HistoryPage.Delete') }}</div>
</div>
</template>
</a-table>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https";
import { useI18n } from "vue-i18n";
export default defineComponent({
components: {
},
setup() {
let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => {
return [
{
title: "Serial",
align: "center",
ellipsis: true,
dataIndex: "orderNo",
key: "orderNo",
},
{
title: "Title",
align: "center",
ellipsis: true,
dataIndex: "title",
key: "title",
},
{
title: "Money",
align: "center",
ellipsis: true,
dataIndex: "totalFee",
key: "totalFee",
},
{
title: "Payment",
align: "center",
ellipsis: true,
dataIndex: "paymentType",
key: "paymentType",
},
{
title: "State",
align: "center",
ellipsis: true,
dataIndex: "orderStatus",
key: "orderStatus",
},
// {
// title: useI18n().t("HistoryPage.Operations"),
// key: "operation",
// align: "center",
// // slots:{customRender:'action'}
// Operations: true,
// },
];
});
let dataList: any = ref([]);
let rangePickerValue: any = ref([]);
let collectionList: any = ref([]);
let allDataList: any = ref([]);
let userInfo: any = {};
return {
columns,
dataList,
renameData,
rangePickerValue,
collectionList,
allDataList,
userInfo,
};
},
data() {
return {
currentPage: 1,
pageSize: 10,
total: 0,
historyTableHeight: 0,
searchCollectionName: "",
};
},
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
},
methods: {
init(){
this.currentPage = 1
this.pageSize = 10
this.getAllOrderList()
},
//改变页码
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
},
//查询列表
searchAllOrderList() {
this.currentPage = 1;
this.getAllOrderList();
},
//获取列表
getAllOrderList() {
let startDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[0]).getTime()
: "";
let endDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[1]).getTime()
: "";
Https.axiosGet(Https.httpUrls.orderInfoList).then((rv: any) => {
this.total = rv.length;
this.allDataList = rv
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
});
},
},
});
</script>
<style lang="less">
.allOrder_page {
width: 100%;
height: 100%;
overflow: hidden;
// min-width: 1440px;
position: relative;
display: flex;
flex-direction: column;
.allOrder_table_search {
display: flex;
margin-top: 2rem;
padding: 2rem 3.5rem 5rem 2.8rem;
background: #fff;
display: flex;
justify-content: space-between;
.allOrder_search{
width: 40%;
.allOrder_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;
}
}
.allOrder_state {
position: relative;
cursor: pointer;
width: 60%;
.allOrder_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;
}
}
.allOrder_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;
}
}
}
}
.allOrder_table_content {
width: 100%;
// height: 100%;
flex: 1;
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>