| | |
| | | reviewstatusWait: item.state == 'WaitAudit', |
| | | }" |
| | | >{{ |
| | | item.state == "WaitAudit" |
| | | ? "审核中" |
| | | : item.state == "Normal" |
| | | ? "通过" |
| | | : "拒绝" |
| | | item.state == 'WaitAudit' ? '审核中' : item.state == 'Normal' ? '通过' : '拒绝' |
| | | }}</span |
| | | > |
| | | </div> |
| | |
| | | 试用期限:<span>{{ item.updateDate }}</span> -- |
| | | <span>{{ item.feedBack.endDate }}</span> |
| | | </div> |
| | | <div style="color: orangered" v-if="item.isExpiry"> |
| | | 阅读期限:<span>已过期</span> |
| | | </div> |
| | | <div style="color: orangered" v-if="item.isExpiry">阅读期限:<span>已过期</span></div> |
| | | <div class="time">申请时间:{{ item.updateDate }}</div> |
| | | </div> |
| | | <div |
| | | class="reasonForFailure" |
| | | style="margin: 10px 0" |
| | | v-if="item.state == 'Reject'" |
| | | > |
| | | <div class="reasonForFailure" style="margin: 10px 0" v-if="item.state == 'Reject'"> |
| | | <div class="centerVertically">未通过原因:</div> |
| | | <div |
| | | style="flex: 1" |
| | | class="ellipsis-3" |
| | | :title="item.feedBack.reason ? item.feedBack.reason : ' - '" |
| | | > |
| | | {{ item.feedBack.reason ? item.feedBack.reason : " - " }} |
| | | {{ item.feedBack.reason ? item.feedBack.reason : ' - ' }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, onMounted, inject } from "vue"; |
| | | import { getPublicImage } from "@/assets/js/middleGround/tool"; |
| | | import { useRouter } from "vue-router"; |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | const router = useRouter(); |
| | | let listData = ref([]); |
| | | let loading = ref(false); |
| | | import { reactive, ref, onMounted, inject } from 'vue' |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool' |
| | | import { useRouter } from 'vue-router' |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | const router = useRouter() |
| | | let listData = ref([]) |
| | | let loading = ref(false) |
| | | let paginationData = reactive({ |
| | | page: 1, |
| | | limit: 10, |
| | | totalCount: 0, |
| | | totalPage: 0, |
| | | }); |
| | | let inputPage = ref(1); |
| | | }) |
| | | let inputPage = ref(1) |
| | | |
| | | const getTextBookList = () => { |
| | | loading.value = true; |
| | | let { page, limit } = paginationData; |
| | | loading.value = true |
| | | let { page, limit } = paginationData |
| | | const data = { |
| | | start: limit * page - limit, |
| | | size: limit, |
| | | topicIdOrRefCode: "applyDigitalBook", |
| | | topicIdOrRefCode: 'applyDigitalBook', |
| | | appRefCode: config.appRefCode, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | }; |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res) => { |
| | | loading.value = false; |
| | | loading.value = false |
| | | res.datas.forEach((item) => { |
| | | item.icon = item.icon ? item.icon : getPublicImage(null); |
| | | item.updateDate = item.updateDate.split("T")[0]; |
| | | item.icon = item.icon ? item.icon : getPublicImage(null) |
| | | item.updateDate = item.updateDate.split('T')[0] |
| | | if (item.feedBack) { |
| | | item.feedBack = JSON.parse(item.feedBack); |
| | | item.feedBack = JSON.parse(item.feedBack) |
| | | if (item.feedBack.endDate) { |
| | | let times = new Date(item.feedBack.endDate + " 23:59:59").getTime(); |
| | | let times = new Date(item.feedBack.endDate + ' 23:59:59').getTime() |
| | | if (times < sessionStorage.currentDate) { |
| | | item.isExpiry = true; |
| | | item.isExpiry = true |
| | | } |
| | | } |
| | | } |
| | | if (item.content) { |
| | | item.content = JSON.parse(item.content)[0] ?? {}; |
| | | item.content = JSON.parse(item.content)[0] ?? {} |
| | | if (!item.content?.icon) { |
| | | item.content.icon = require("@/assets/images/default-book-img.png"); |
| | | item.content.icon = defaultImg |
| | | } |
| | | } |
| | | }); |
| | | paginationData.totalCount = res.totalSize; |
| | | paginationData.totalPage = Math.ceil(res.totalSize / limit); |
| | | listData.value = res.datas; |
| | | }); |
| | | }; |
| | | }) |
| | | paginationData.totalCount = res.totalSize |
| | | paginationData.totalPage = Math.ceil(res.totalSize / limit) |
| | | listData.value = res.datas |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | getTextBookList(); |
| | | }); |
| | | getTextBookList() |
| | | }) |
| | | |
| | | const toDetail = (item: any) => { |
| | | router.push({ |
| | | name: "digitalTextbooks-textbooksDetail", |
| | | name: 'digitalTextbooks-textbooksDetail', |
| | | query: { |
| | | id: item.id, |
| | | rootCmsItemId: item.rootCmsItemId, |
| | | }, |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | const read = (pItem: any) => { |
| | | let token = MG.tool.getCookie(config.tokenKey); |
| | | window.open(config.textReaderUrl + "?bookId=" + pItem.refCode + "&token=" + token); |
| | | }; |
| | | let token = MG.tool.getCookie(config.tokenKey) |
| | | window.open(config.textReaderUrl + '?bookId=' + pItem.refCode + '&token=' + token) |
| | | } |
| | | const handleSizeChange = (val: number) => { |
| | | paginationData.limit = val; |
| | | getTextBookList(); |
| | | }; |
| | | paginationData.limit = val |
| | | getTextBookList() |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | paginationData.page = val; |
| | | getTextBookList(); |
| | | }; |
| | | paginationData.page = val |
| | | getTextBookList() |
| | | } |
| | | const jumpFun = (event: any) => { |
| | | event.target.blur(); |
| | | event.target.blur() |
| | | if (inputPage.value <= 0) { |
| | | inputPage.value = 1; |
| | | inputPage.value = 1 |
| | | } |
| | | if (inputPage.value > paginationData.totalPage) { |
| | | inputPage.value = paginationData.totalPage; |
| | | inputPage.value = paginationData.totalPage |
| | | } |
| | | paginationData.page = inputPage.value; |
| | | getTextBookList(); |
| | | }; |
| | | paginationData.page = inputPage.value |
| | | getTextBookList() |
| | | } |
| | | </script> |
| | | <style scoped lang="less"> |
| | | .myCarTopPage { |