代码推送
This commit is contained in:
267
yq/src/views/subscriptionLetter/index.js
Normal file
267
yq/src/views/subscriptionLetter/index.js
Normal file
@@ -0,0 +1,267 @@
|
||||
import * as echarts from "echarts";
|
||||
import { msgBoradTabel, msgBoradNum, responMsg } from "../../api/messageBoard"
|
||||
import { privateOrder } from "../../api/pay"
|
||||
import { Debounce } from "../../util/processingData"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
from: [{
|
||||
id: 0,
|
||||
title: "标题1",
|
||||
source: "来源1",
|
||||
date: "2023-12-8",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: "标题22",
|
||||
source: "来源222",
|
||||
date: "2023-12-7",
|
||||
},
|
||||
],
|
||||
successData: [{
|
||||
id: 0,
|
||||
userDate: "",
|
||||
userName: "",
|
||||
msgPage: "",
|
||||
userMsg: ""
|
||||
|
||||
|
||||
}],
|
||||
failData: [{
|
||||
id: 0,
|
||||
userDate: "",
|
||||
userName: "",
|
||||
msgPage: "",
|
||||
userMsg: ""
|
||||
|
||||
|
||||
}],
|
||||
params: {
|
||||
page: 1,
|
||||
limit: "300",
|
||||
status: ""
|
||||
},
|
||||
payHistories: false,
|
||||
activeName: "Unread",
|
||||
currentPage1: 1,
|
||||
pageSizes: [1, 50, 100,],
|
||||
totalLimit1: 3,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.params.status=2
|
||||
// this.fetchPrivateOrder2(this.params)
|
||||
// this.params.status=0
|
||||
// this.fetchPrivateOrder0(this.params)
|
||||
// this.params.status=1
|
||||
// this.fetchPrivateOrder1(this.params)
|
||||
},
|
||||
methods: {
|
||||
|
||||
//请求支付历史 待处理
|
||||
async fetchPrivateOrder2(params) {
|
||||
this.payHistories = true
|
||||
const { data } = await privateOrder(params)
|
||||
this.from = data.rows
|
||||
this.payHistories = false
|
||||
|
||||
},
|
||||
//请求支付历史 成功
|
||||
async fetchPrivateOrder1(params) {
|
||||
this.payHistories = true
|
||||
const { data } = await privateOrder(params)
|
||||
this.successData = data.rows
|
||||
this.payHistories = false
|
||||
|
||||
},
|
||||
//请求支付历史 失败
|
||||
async fetchPrivateOrder0(params) {
|
||||
this.payHistories = true
|
||||
const { data } = await privateOrder(params)
|
||||
this.failData = data.rows
|
||||
this.payHistories = false
|
||||
|
||||
},
|
||||
handelTime(time) {
|
||||
if (time) {
|
||||
return `${time.split("T")[0]} ${time.split("T")[1].split(".")[0]}`
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//点击刷新
|
||||
handelRefresh: Debounce(function () {
|
||||
this.params.status = 2
|
||||
this.fetchPrivateOrder2(this.params)
|
||||
this.params.status = 0
|
||||
this.fetchPrivateOrder0(this.params)
|
||||
this.params.status = 1
|
||||
this.fetchPrivateOrder1(this.params)
|
||||
}, 1000),
|
||||
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
this.params.limit = val
|
||||
this.params.page = 1
|
||||
switch (this.activeName) {
|
||||
case `pending`:
|
||||
this.params.status = 1
|
||||
this.fetchRepairList1(this.params)
|
||||
break;
|
||||
case `toBeSent`:
|
||||
this.params.status = 21
|
||||
this.fetchRepairList21(this.params)
|
||||
break;
|
||||
case `goodsToBeReceived`:
|
||||
this.params.status = 3
|
||||
this.fetchRepairList3(this.params)
|
||||
break;
|
||||
case `receivedGoods`:
|
||||
this.params.status = 4
|
||||
this.fetchRepairList4(this.params)
|
||||
break;
|
||||
case `Quoted`:
|
||||
this.params.status = 5
|
||||
this.fetchRepairList5(this.params)
|
||||
break;
|
||||
case `ConfirmPaid`:
|
||||
this.params.status = 20
|
||||
this.fetchRepairList20(this.params)
|
||||
break;
|
||||
case `Paid`:
|
||||
this.params.status = 6
|
||||
this.fetchRepairList6(this.params)
|
||||
break;
|
||||
case `service`:
|
||||
this.params.status = 7
|
||||
this.fetchRepairList7(this.params)
|
||||
break;
|
||||
case `toBeSentBack`:
|
||||
this.params.status = 8
|
||||
this.fetchRepairList8(this.params)
|
||||
break;
|
||||
case `remand`:
|
||||
this.params.status = 9
|
||||
this.fetchRepairList9(this.params)
|
||||
break;
|
||||
case `Completed`:
|
||||
this.params.status = 10
|
||||
this.fetchRepairList10(this.params)
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.currentPage1 = 1,
|
||||
this.currentPage3 = 1,
|
||||
this.currentPage4 = 1,
|
||||
this.currentPage5 = 1,
|
||||
this.currentPage6 = 1,
|
||||
this.currentPage7 = 1,
|
||||
this.currentPage8 = 1,
|
||||
this.currentPage9 = 1,
|
||||
this.currentPage10 = 1,
|
||||
this.currentPage20 = 1,
|
||||
this.currentPage21 = 1,
|
||||
|
||||
|
||||
|
||||
|
||||
this.currentPage = 1
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(`当前页: ${val}`);
|
||||
this.params.page = val
|
||||
|
||||
switch (this.activeName) {
|
||||
case `pending`:
|
||||
this.params.status = 1
|
||||
this.fetchRepairList1(this.params)
|
||||
break;
|
||||
case `toBeSent`:
|
||||
this.params.status = 21
|
||||
this.fetchRepairList21(this.params)
|
||||
break;
|
||||
case `goodsToBeReceived`:
|
||||
this.params.status = 3
|
||||
this.fetchRepairList3(this.params)
|
||||
break;
|
||||
case `receivedGoods`:
|
||||
this.params.status = 4
|
||||
this.fetchRepairList4(this.params)
|
||||
break;
|
||||
case `Quoted`:
|
||||
this.params.status = 5
|
||||
this.fetchRepairList5(this.params)
|
||||
break;
|
||||
case `ConfirmPaid`:
|
||||
this.params.status = 20
|
||||
this.fetchRepairList20(this.params)
|
||||
break;
|
||||
case `Paid`:
|
||||
this.params.status = 6
|
||||
this.fetchRepairList6(this.params)
|
||||
break;
|
||||
case `service`:
|
||||
this.params.status = 7
|
||||
this.fetchRepairList7(this.params)
|
||||
break;
|
||||
case `toBeSentBack`:
|
||||
this.params.status = 8
|
||||
this.fetchRepairList8(this.params)
|
||||
break;
|
||||
case `remand`:
|
||||
this.params.status = 9
|
||||
this.fetchRepairList9(this.params)
|
||||
break;
|
||||
case `Completed`:
|
||||
this.params.status = 10
|
||||
this.fetchRepairList10(this.params)
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
168
yq/src/views/subscriptionLetter/index.vue
Normal file
168
yq/src/views/subscriptionLetter/index.vue
Normal file
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<!-- 支付历史 转账记录-->
|
||||
<div class="payHistories" v-loading="payHistories">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="display: flex; align-items: center">
|
||||
<h2>{{ $t(`login.subscriptionLetter`) }}</h2>
|
||||
<i @click="handelRefresh" class="i ishuaxin1 Refresh"></i>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 标签页 -->
|
||||
<el-tabs v-model="activeName">
|
||||
<!-- 未读通知 style="width: 100%;min-height: 500px;"-->
|
||||
<el-tab-pane label="未读通知" name="Unread">
|
||||
<el-table
|
||||
class="table"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
:data="from"
|
||||
|
||||
max-height="600"
|
||||
|
||||
:default-sort = "{prop: 'date', order: 'descending'}"
|
||||
>
|
||||
<el-table-column prop="title" label="消息标题" > </el-table-column>
|
||||
<el-table-column prop="source" label="消息来源" width="150"> </el-table-column>
|
||||
<el-table-column prop="date" sortable label="发布时间" width="180">
|
||||
<!-- <template slot-scope="scope">
|
||||
<span>{{ handelTime(scope.row.createTime) }}</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-row type="flex" justify="center" style="margin-top: 15px">
|
||||
<el-col :span="10">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="currentPage1"
|
||||
:page-sizes="pageSizes"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="totalLimit1"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<!-- 全部通知 style="width: 100%;min-height: 500px;"-->
|
||||
<el-tab-pane label="全部通知" name="whole">
|
||||
<el-table
|
||||
class="table"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
:data="from"
|
||||
|
||||
max-height="600"
|
||||
|
||||
:default-sort = "{prop: 'date', order: 'descending'}"
|
||||
>
|
||||
<el-table-column prop="title" label="消息标题" > </el-table-column>
|
||||
<el-table-column prop="source" label="消息来源" width="150"> </el-table-column>
|
||||
<el-table-column prop="date" sortable label="发布时间" width="180">
|
||||
<!-- <template slot-scope="scope">
|
||||
<span>{{ handelTime(scope.row.createTime) }}</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-row type="flex" justify="center" style="margin-top: 15px">
|
||||
<el-col :span="10">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="currentPage1"
|
||||
:page-sizes="pageSizes"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="totalLimit1"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import IndexJs from "./index";
|
||||
export default {
|
||||
mixins: [IndexJs],
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Refresh {
|
||||
// outline: 1px solid red;
|
||||
// height: 20px;
|
||||
// position: absolute;
|
||||
// left: 100px;
|
||||
// top: 0px;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.Refresh:hover {
|
||||
color: #f7931a;
|
||||
}
|
||||
.payHistories {
|
||||
// outline: 1px solid red;
|
||||
// background:#fef4e8 ;
|
||||
padding: 20px 100px;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
.chart {
|
||||
outline: 1px solid rgba(0, 0, 0, 0.5);
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
.table {
|
||||
// outline: 1px solid red;
|
||||
// margin-top: 10px;
|
||||
outline: 1px solid rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
//留言数量
|
||||
.information {
|
||||
// outline: 1px solid rgba(0,0,0,0.5);
|
||||
padding: 5px 10px;
|
||||
// outline: 1px solid red;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
font-weight: 600;
|
||||
// span{
|
||||
|
||||
// display: inline-block;
|
||||
// width: 100px;
|
||||
// // outline: 1px solid red;
|
||||
// text-align: right;
|
||||
|
||||
// }
|
||||
span:nth-of-type(1) {
|
||||
display: inline-block;
|
||||
// outline: 1px solid red;
|
||||
width: 150px;
|
||||
}
|
||||
.num {
|
||||
color: #21a0ff;
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
text-align: left;
|
||||
// outline: 1px solid red;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.replyDialog {
|
||||
// border: 1px solid red;
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
<style >
|
||||
</style>
|
||||
Reference in New Issue
Block a user