<template>
|
<div class="content" v-loading="orderLoading">
|
<el-empty
|
description="暂无数据"
|
class="empty"
|
:image-size="200"
|
v-if="orderList.length == 0"
|
></el-empty>
|
<div v-for="(item, index) in orderList" :key="index">
|
<div class="headerInformation">
|
<span>
|
<div class="examine" v-if="item.state == 'WaitAudit'">
|
<img
|
src="@/assets/images/personalCenter/examine.png"
|
alt=""
|
srcset=""
|
/>
|
状态:待审核
|
</div>
|
<div class="pass" v-else-if="item.state == 'Normal'">
|
<img src="@/assets/images/personalCenter/pass.png" alt="" />
|
状态:已通过
|
</div>
|
<div class="noPass" v-else-if="item.state == 'Reject'">
|
<img src="@/assets/images/personalCenter/noPass.png" alt="" />
|
状态:已拒绝
|
</div>
|
</span>
|
<span class="applicationTime">
|
申请时间:{{ moment(item.createDate).format("YYYY-MM-DD") }}</span
|
>
|
</div>
|
<div class="bookItem">
|
<div class="wrapImg">
|
<img
|
class="autoImg"
|
:src="
|
item.icon
|
? item.icon
|
: require('@/assets/images/default-book-img.png')
|
"
|
alt=""
|
/>
|
</div>
|
<div class="information">
|
<div>
|
<span
|
class="name"
|
v-if="item.state == 'Normal'"
|
:title="item.name"
|
>{{ item.name }}</span
|
>
|
<span class="name" title="资源通过审核后方可查看" v-else>{{
|
item.name
|
}}</span>
|
</div>
|
<p class="author" v-if="item.content.author">
|
作者:{{ item.content.author ? item.content.author : "未知作者" }}
|
</p>
|
<p class="author" v-if="item.content.isdn">
|
ISBN:{{ item.content.isdn ? item.content.isdn : "未知ISBN号" }}
|
</p>
|
<div class="succeeded" v-if="item.state == 'Normal'">
|
<el-button size="medium" @click="toDetail(item)"
|
>查看详情</el-button
|
>
|
</div>
|
<div class="reason mt14" v-else-if="item.state == 'Reject'">
|
<div>理由:</div>
|
<div style="flex: 1">{{ item.feedBack.reason }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!-- 分页 -->
|
<div class="pageinateBox" v-if="orderList.length > 0">
|
<el-pagination
|
@size-change="
|
(val) => {
|
paginationData.limit = val;
|
getData();
|
}
|
"
|
@current-change="
|
(val) => {
|
paginationData.page = val;
|
getData();
|
}
|
"
|
background=""
|
:current-page="paginationData.page - 0"
|
:page-size="paginationData.limit"
|
prev-text="上一页"
|
next-text="下一页"
|
layout="total, prev, pager, next, slot, jumper"
|
:total="paginationData.totalCount"
|
>
|
</el-pagination>
|
</div>
|
</div>
|
</template>
|
<script>
|
export default {
|
data() {
|
return {
|
orderList: [],
|
orderLoading: true,
|
paginationData: {
|
page: 1,
|
totalCount: 0,
|
limit: 5,
|
totalPage: 0,
|
},
|
};
|
},
|
created() {
|
this.getData();
|
},
|
methods: {
|
// 获取申请下载
|
getData() {
|
this.orderLoading = true;
|
let { limit, page } = this.paginationData;
|
|
let query = {
|
start: limit * page - limit,
|
size: limit,
|
sort: {
|
field: "createDate",
|
type: "Desc",
|
},
|
appRefCode: this.config.appRefCode,
|
topicIdOrRefCode: this.config.refCodes.productDownLoad,
|
};
|
this.MG.ugc.getTopicMessageList(query).then((res) => {
|
this.orderLoading = false;
|
res.datas.map((data) => {
|
data.content = JSON.parse(data.content);
|
data.feedBack = data.feedBack ? JSON.parse(data.feedBack) : "";
|
});
|
this.paginationData.totalCount = res.totalSize;
|
this.orderList = res.datas;
|
});
|
},
|
// 跳转至详情
|
toDetail(item) {
|
let routeData = this.$router.resolve({
|
name: "bookStore-detail",
|
query: {
|
id: item.content.id,
|
cmsPath: item.content.rootCmsItemId,
|
},
|
});
|
window.open(routeData.href, "_blank");
|
},
|
},
|
};
|
</script>
|
<style lang="less" scoped>
|
.content {
|
padding: 40px 40px 0 40px;
|
min-height: 600px;
|
.headerInformation {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
.pass {
|
align-items: center;
|
font-size: 18px;
|
font-weight: 700;
|
color: #00873c;
|
}
|
.examine {
|
font-size: 18px;
|
font-weight: 700;
|
color: #8b4513;
|
}
|
.noPass {
|
font-size: 18px;
|
font-weight: 700;
|
color: #e50021;
|
}
|
.applicationTime {
|
font-size: 14px;
|
color: #666666;
|
}
|
}
|
.bookItem {
|
display: flex;
|
justify-content: space-between;
|
border-bottom: 1px solid #eeeeee;
|
padding-top: 40px;
|
padding-bottom: 40px;
|
margin-bottom: 40px;
|
.wrapImg {
|
position: relative;
|
border: 1px solid #e6e6e6;
|
background: #ffffff;
|
width: 150px;
|
height: 200px;
|
}
|
.information {
|
width: 520px;
|
font-size: 16px;
|
.name {
|
cursor: pointer;
|
display: inline-block;
|
font-size: 24px;
|
font-weight: 700;
|
line-height: 24px;
|
padding-bottom: 10px;
|
color: #333333;
|
}
|
.adopt {
|
float: right;
|
color: #00873c;
|
}
|
.author {
|
color: #666666;
|
padding: 7px 0;
|
}
|
.reason {
|
display: flex;
|
line-height: 28px;
|
& > :first-child {
|
width: 50px;
|
}
|
}
|
.succeeded {
|
margin-top: 66px;
|
:deep(.el-button--medium) {
|
padding: 11px 27px;
|
border: 1px solid #00873c;
|
color: #00873c;
|
font-size: 16px;
|
}
|
}
|
.mt14 {
|
margin-top: 14px;
|
}
|
}
|
}
|
.pageinateBox {
|
text-align: center;
|
padding: 40px 0;
|
:deep(.el-pagination.is-background .btn-next) {
|
padding: 0 10px;
|
}
|
:deep(.el-pagination.is-background .btn-prev) {
|
padding: 0 10px;
|
}
|
}
|
}
|
</style>
|