|
@@ -7,8 +7,11 @@
|
|
|
<div class="logo-bar" @click="handleClick">
|
|
|
<img src="@/assets/logo-3.png" class="logo">
|
|
|
</div>
|
|
|
- <div v-if="showProjectName" class="projectName">
|
|
|
+ <!-- <div v-if="showProjectName" class="projectName">
|
|
|
<p><span>专利数据库名称:</span>{{ projectName }}</p>
|
|
|
+ </div> -->
|
|
|
+ <div class="projectName">
|
|
|
+ <p>{{ projectName }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="header-right">
|
|
@@ -58,13 +61,11 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
$route() {
|
|
|
+ this.getProjectName()
|
|
|
this.button = this.$route.meta.button || []
|
|
|
- this.showProjectName = this.$route.meta.showProjectName
|
|
|
this.guide()
|
|
|
},
|
|
|
- showProjectName(val){
|
|
|
- this.projectName = this.$s.getSession('projectName')
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(['projectId', 'userinfo','webSocket']),
|
|
@@ -74,8 +75,8 @@ export default {
|
|
|
this.connectWebSocket(this.userinfo.id)
|
|
|
},
|
|
|
async mounted() {
|
|
|
+ this.getProjectName()
|
|
|
this.$store.commit('SET_PREFIX', '/')
|
|
|
-
|
|
|
this.getRouter()
|
|
|
if (this.id) {
|
|
|
this.$store.commit('SET_PROJECT_ID', parseInt(this.id))
|
|
@@ -89,6 +90,23 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ getProjectName(){
|
|
|
+ var params = this.$route.query
|
|
|
+ if(params.projectName && params.projectType){
|
|
|
+ var obj = {
|
|
|
+ 1:'专题库',
|
|
|
+ 2:'报告',
|
|
|
+ 3:'产品',
|
|
|
+ // 4:'标注库'
|
|
|
+ }
|
|
|
+ if(obj[params.projectType]){
|
|
|
+ this.projectName = obj[params.projectType] + '名称:' + params.projectName
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.projectName = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
guide(){
|
|
|
if(this.$route.meta.sign == 'home'){
|
|
|
this.openGuide(this.$route.meta.sign)
|