From ef37c59e055a990ce247b265b27d3fcef430a243 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期五, 15 八月 2025 10:19:18 +0800 Subject: [PATCH] first submit --- src/views/personalCenter/components/downloadApplication.vue | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 254 insertions(+), 0 deletions(-) diff --git a/src/views/personalCenter/components/downloadApplication.vue b/src/views/personalCenter/components/downloadApplication.vue new file mode 100644 index 0000000..b93a75f --- /dev/null +++ b/src/views/personalCenter/components/downloadApplication.vue @@ -0,0 +1,254 @@ +<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> -- Gitblit v1.9.1