|
@@ -1,6 +1,17 @@
|
|
|
<template>
|
|
|
<Layout v-loading="loading" class="demand-detail">
|
|
|
- <div class="proposed-detail">
|
|
|
+ <div class="empty-content" v-if="emptyContent">
|
|
|
+ <empty>
|
|
|
+ <div class="empty-text-content">
|
|
|
+ <p>{{ emptyReasonText }}</p>
|
|
|
+ <div class="empty-content-actions">
|
|
|
+ <p class="empty-content-actions-text">5s后自动跳转到剑鱼官网首页</p>
|
|
|
+ <button class="empty-content-actions-button" @click="goToJyHome">前往剑鱼官网首页</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </empty>
|
|
|
+ </div>
|
|
|
+ <div class="proposed-detail" v-else>
|
|
|
<div class="head">
|
|
|
<div class="action-right-container" v-if="loginIn">
|
|
|
<WorkspaceButtonGroup></WorkspaceButtonGroup>
|
|
@@ -107,6 +118,7 @@ import InformationSummary from './components/InformationSummary.vue'
|
|
|
import projectDebriefing from './components/projectDebriefing.vue'
|
|
|
import ProjectPerson from './components/ProjectPerson.vue'
|
|
|
import Credentials from './components/Credentials.vue'
|
|
|
+import Empty from '@/components/empty/Empty.vue'
|
|
|
import WorkspaceButtonGroup from '@/components/dialog/WorkspaceButtonGroup.vue'
|
|
|
import { getLoginStatus } from '@/api/modules/front'
|
|
|
import { getCommonAdList } from '@/api/modules/ad'
|
|
@@ -116,6 +128,7 @@ export default {
|
|
|
name: 'proposed-detail',
|
|
|
components: {
|
|
|
Layout,
|
|
|
+ Empty,
|
|
|
InformationSummary,
|
|
|
ProjectPerson,
|
|
|
projectDebriefing,
|
|
@@ -124,6 +137,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ emptyContent: false,
|
|
|
+ emptyReasonText: '该页面信息不存在',
|
|
|
isVisible: false,
|
|
|
loading: false,
|
|
|
loginIn: false,
|
|
@@ -161,6 +176,14 @@ export default {
|
|
|
}
|
|
|
this.tab = index
|
|
|
},
|
|
|
+ goToJyHome() {
|
|
|
+ window.top.location.href = '/'
|
|
|
+ },
|
|
|
+ startEmptyAutoGoHome() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.goToJyHome()
|
|
|
+ }, 5000)
|
|
|
+ },
|
|
|
initdata() {
|
|
|
this.pid = this.$route.query.pid
|
|
|
details({ pid: this.pid }).then((res) => {
|
|
@@ -191,6 +214,13 @@ export default {
|
|
|
.setAttribute('content', '拟在建详情')
|
|
|
}
|
|
|
} catch (e) {}
|
|
|
+ } else {
|
|
|
+ const msg = res.error_msg || ''
|
|
|
+ if (msg.includes('不存在')) {
|
|
|
+ this.emptyReasonText = '由于相关部门要求,该信息已下架,敬请原谅'
|
|
|
+ }
|
|
|
+ this.emptyContent = true
|
|
|
+ this.startEmptyAutoGoHome()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -249,6 +279,31 @@ export default {
|
|
|
.mt-8 {
|
|
|
margin-top: 8px;
|
|
|
}
|
|
|
+.empty-content {
|
|
|
+ width: 100%;
|
|
|
+ background-color: #fff;
|
|
|
+ p {
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.empty-text-content {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.empty-content-actions {
|
|
|
+ margin-top: 6px;
|
|
|
+}
|
|
|
+.empty-content-actions-text {
|
|
|
+ margin-bottom: 6px;
|
|
|
+}
|
|
|
+.empty-content-actions-button {
|
|
|
+ width: 180px;
|
|
|
+ height: 40px;
|
|
|
+ font-size: 16px;
|
|
|
+ background-color: $main;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+
|
|
|
.proposed-detail {
|
|
|
padding-bottom: 20px;
|
|
|
.head {
|
|
@@ -413,6 +468,8 @@ export default {
|
|
|
}
|
|
|
.demand-detail {
|
|
|
width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding: 32px 0;
|
|
|
::v-deep {
|
|
|
.content-main {
|
|
|
display: flex;
|