Browse Source

修改头部导航显示

pull/139/head
zq 5 days ago
parent
commit
4f18ca0bb7
  1. 5
      src/App.vue
  2. 40
      src/components/HeaderClientSet.vue
  3. 2
      src/components/SetLeftMenu.vue
  4. 2
      src/components/clientSet/reviewBtn.vue
  5. 12
      src/router/index.js
  6. 9
      src/store/index.js
  7. 2
      src/views/super/clientSet/catalogPage.vue
  8. 3
      src/views/super/clientSet/coverInfoPage.vue
  9. 2
      src/views/super/clientSet/headerPage.vue
  10. 2
      src/views/super/clientSet/mainTextPage.vue
  11. 2
      src/views/super/clientSet/referencePage.vue
  12. 2
      src/views/super/clientSet/summaryPage.vue
  13. 2
      src/views/super/clientSet/switchPage.vue
  14. 2
      src/views/super/clientSet/thanksPage.vue

5
src/App.vue

@ -43,7 +43,7 @@ export default {
data() {
return {
isCollapse: true,
clientHeaderFlag:false,// true false state
// clientHeaderFlag:false,// true false state
};
},
components: {
@ -57,7 +57,7 @@ export default {
Breadcrumb
},
computed: {
...mapState(['showSidebar','showSecondSide','secondMenu','showHeader','showHeaderRight','slidermenu','customize']) // VuexshowSidebar
...mapState(['showSidebar','showSecondSide','secondMenu','showHeader','showHeaderRight','slidermenu','customize','clientHeaderFlag']) // VuexshowSidebar
},
mounted() {
window.addEventListener('beforeunload', this.clearStorage);
@ -85,7 +85,6 @@ export default {
flex-direction: column;
}
#app {
font-family: var(--font-chinese);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;

40
src/components/HeaderClientSet.vue

@ -2,11 +2,11 @@
<div class="header-wrap ">
<div class="header-logo" @click="toHome">
<!-- 管理员端logo -->
<img v-if="headerShow" src="../assets/clientSet/clientSet_h_logo_admin.png" alt="">
<img v-if="showHeaderRight" src="../assets/clientSet/clientSet_h_logo_admin.png" alt="">
<!-- 创建模板logo -->
<img v-else src="../assets/clientSet/clientSet_h_logo_tpl.png" alt="">
</div>
<div class="header-right flex" v-if="headerShow">
<div class="header-right flex" v-if="showHeaderRight">
<div
:class="['right-item','flex', currentPath == item.path ? 'right-item-active' :'']"
v-for="(item,index) in routerNavList"
@ -22,6 +22,8 @@
</template>
<script>
import { mapState } from 'vuex';
export default {
data(){
return{
@ -47,6 +49,9 @@ export default {
]
}
},
computed: {
...mapState(['showHeaderRight'])
},
mounted(){
//
// this.user = localStorage.getItem('user_name')
@ -56,20 +61,46 @@ export default {
// }else{
// if(user_type && user_type != 'undefined') this.user = (user_type == 1?'':'') + this.user
// }
// this.doctor_id = localStorage.getItem('doctor_id')
// this.authtoken = localStorage.getItem('authtoken')
// if(this.authtoken){
// this.headerShow = true
// //
// this.updateCurrentPath()
this.updateCurrentPath()
// //
// this.watchRouteChange()
// }else{
// this.headerShow = false
// }
this.getReviewList()
},
watch: {
'$route.path': {
immediate: true, //
handler() {
this.updateCurrentPath()
}
}
},
methods: {
getReviewList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_review_list', {//ok
school: '0',
degree: '0',
review_status:'-1',
page: this.currentPage,
}).then(response => {
this.$nextTick(() => {
this.total = response.data.count
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
//
getList() {
try {
@ -95,6 +126,7 @@ export default {
})
},
goToPage(path) {
console.log(this.currentPath ,path,'===0000');
if(this.currentPath == path) return;
this.currentPath = path;
this.$router.push({

2
src/components/SetLeftMenu.vue

@ -54,7 +54,7 @@ export default {
store.dispatch('fetchPaibanTemplateOption');
}
if(newPath.includes('/super/clientSet')){
store.dispatch('fetchClientConfig',{id:this.$route.query.id});
store.dispatch('fetchClientConfig',{id:this.$route.query.id || localStorage.getItem('template_id')});
store.commit('SET_CLIENTTEMTYPE', this.$route.query.type);
}
this.updateActiveMenu(newPath);

2
src/components/clientSet/reviewBtn.vue

@ -34,7 +34,7 @@ export default {
//
try {
this.$http('POST', '/supernew/ajax_update_paiban_template_review_status', {
template_id: this.client_tpl_id,
template_id: this.client_tpl_id || localStorage.getItem('template_id'),
review_status: '2',
refuse_reason:''
}).then(response => {

12
src/router/index.js

@ -717,12 +717,13 @@ router.beforeEach((to, from, next) => {
if (to.path.includes('/super/paiban/')) { //匹配包含此路径的 侧边栏数据
store.commit('SET_SIDEBAR', false);
store.commit('SET_CLIENTHEADERFLAG', true);
}
if (to.path.includes('/super/clientSet/')) { //匹配包含此路径的 侧边栏数据
store.commit('SET_CLIENTHEADERFLAG', true);
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU', 'lunyiData');
}
}
if (blackFooterList.includes(to.path)) {
@ -740,6 +741,13 @@ router.beforeEach((to, from, next) => {
} else {
store.commit('SET_HEADER_RIGHT', true); // 其他页面显示顶部信息
}
if (to.path.includes('/super/paiban/')) {
store.commit('SET_HEADER_RIGHT', true);
}
if (to.path.includes('/super/clientSet/')) {
store.commit('SET_HEADER_RIGHT', false);
}
store.dispatch('showLoading')
next();
});

9
src/store/index.js

@ -29,6 +29,7 @@ export default new Vuex.Store({
client_tpl_review_status: '',//排版-模板收录状态
client_tpl_options:{},//排版-模板选项
client_tpl_config:{},//排版-模板选项
clientHeaderFlag: false,
paibanRequestStatus: {
isLoading: false,
hasLoaded: false,
@ -975,6 +976,11 @@ export default new Vuex.Store({
}) {
commit('SET_SHOWSECONDSIDE');
},
SET_CLIENTHEADERFLAG({
commit
}) {
commit('SET_CLIENTHEADERFLAG');
},
SET_FOOTER({
commit
}) {
@ -1099,6 +1105,9 @@ export default new Vuex.Store({
SET_SHOWSECONDSIDE(state, show) {
state.showSecondSide = show;
},
SET_CLIENTHEADERFLAG(state, show) {
state.clientHeaderFlag = show;
},
SET_FOOTER(state, show) {
state.showFooter = show;
},

2
src/views/super/clientSet/catalogPage.vue

@ -103,7 +103,7 @@ export default {
}
await store.dispatch('updateClientConfig',{
id: this.client_tpl_id || this.$route.query.id,
id: this.client_tpl_id || this.$route.query.id || localStorage.getItem('template_id'),
config_json:JSON.stringify(data),
message: this.$Message
});

3
src/views/super/clientSet/coverInfoPage.vue

@ -315,7 +315,8 @@ export default {
degree_id:this.coverInfo.degree}))
this.template_id = response.data.template_id
}
localStorage.setItem('template_id',this.template_id)
store.dispatch('fetchClientConfig',{id:this.template_id});
store.commit('SET_CLIENTTEMID', this.template_id);

2
src/views/super/clientSet/headerPage.vue

@ -106,7 +106,7 @@ export default {
}
await store.dispatch('updateClientConfig',{
id: this.client_tpl_id || this.$route.query.id,
id: this.client_tpl_id || this.$route.query.id || localStorage.getItem('template_id'),
config_json:JSON.stringify(data),
message: this.$Message
});

2
src/views/super/clientSet/mainTextPage.vue

@ -167,7 +167,7 @@ export default {
}
await store.dispatch('updateClientConfig',{
id: this.client_tpl_id || this.$route.query.id,
id: this.client_tpl_id || this.$route.query.id || localStorage.getItem('template_id'),
config_json:JSON.stringify(data),
message: this.$Message
});

2
src/views/super/clientSet/referencePage.vue

@ -97,7 +97,7 @@ export default {
}
await store.dispatch('updateClientConfig',{
id: this.client_tpl_id || this.$route.query.id,
id: this.client_tpl_id || this.$route.query.id || localStorage.getItem('template_id'),
config_json:JSON.stringify(data),
message: this.$Message
});

2
src/views/super/clientSet/summaryPage.vue

@ -150,7 +150,7 @@ export default {
}
await store.dispatch('updateClientConfig',{
id: this.client_tpl_id || this.$route.query.id,
id: this.client_tpl_id || this.$route.query.id || localStorage.getItem('template_id'),
config_json:JSON.stringify(data),
message: this.$Message
});

2
src/views/super/clientSet/switchPage.vue

@ -55,7 +55,7 @@ export default {
}).then(response => {
this.$nextTick(() => {
if (response.status) {
store.dispatch('fetchClientConfig',{id:this.$route.query.id});
store.dispatch('fetchClientConfig',{id:this.$route.query.id || localStorage.getItem('template_id')});
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);

2
src/views/super/clientSet/thanksPage.vue

@ -82,7 +82,7 @@ export default {
}
await store.dispatch('updateClientConfig',{
id: this.client_tpl_id || this.$route.query.id,
id: this.client_tpl_id || this.$route.query.id || localStorage.getItem('template_id'),
config_json:JSON.stringify(data),
message: this.$Message
});

Loading…
Cancel
Save