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. 10
      src/router/index.js
  6. 9
      src/store/index.js
  7. 2
      src/views/super/clientSet/catalogPage.vue
  8. 1
      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() { data() {
return { return {
isCollapse: true, isCollapse: true,
clientHeaderFlag:false,// true false state // clientHeaderFlag:false,// true false state
}; };
}, },
components: { components: {
@ -57,7 +57,7 @@ export default {
Breadcrumb Breadcrumb
}, },
computed: { computed: {
...mapState(['showSidebar','showSecondSide','secondMenu','showHeader','showHeaderRight','slidermenu','customize']) // VuexshowSidebar ...mapState(['showSidebar','showSecondSide','secondMenu','showHeader','showHeaderRight','slidermenu','customize','clientHeaderFlag']) // VuexshowSidebar
}, },
mounted() { mounted() {
window.addEventListener('beforeunload', this.clearStorage); window.addEventListener('beforeunload', this.clearStorage);
@ -85,7 +85,6 @@ export default {
flex-direction: column; flex-direction: column;
} }
#app { #app {
font-family: var(--font-chinese);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
text-align: center; text-align: center;

40
src/components/HeaderClientSet.vue

@ -2,11 +2,11 @@
<div class="header-wrap "> <div class="header-wrap ">
<div class="header-logo" @click="toHome"> <div class="header-logo" @click="toHome">
<!-- 管理员端logo --> <!-- 管理员端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 --> <!-- 创建模板logo -->
<img v-else src="../assets/clientSet/clientSet_h_logo_tpl.png" alt=""> <img v-else src="../assets/clientSet/clientSet_h_logo_tpl.png" alt="">
</div> </div>
<div class="header-right flex" v-if="headerShow"> <div class="header-right flex" v-if="showHeaderRight">
<div <div
:class="['right-item','flex', currentPath == item.path ? 'right-item-active' :'']" :class="['right-item','flex', currentPath == item.path ? 'right-item-active' :'']"
v-for="(item,index) in routerNavList" v-for="(item,index) in routerNavList"
@ -22,6 +22,8 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
export default { export default {
data(){ data(){
return{ return{
@ -47,6 +49,9 @@ export default {
] ]
} }
}, },
computed: {
...mapState(['showHeaderRight'])
},
mounted(){ mounted(){
// //
// this.user = localStorage.getItem('user_name') // this.user = localStorage.getItem('user_name')
@ -56,20 +61,46 @@ export default {
// }else{ // }else{
// if(user_type && user_type != 'undefined') this.user = (user_type == 1?'':'') + this.user // 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') // this.authtoken = localStorage.getItem('authtoken')
// if(this.authtoken){ // if(this.authtoken){
// this.headerShow = true // this.headerShow = true
// // // //
// this.updateCurrentPath() this.updateCurrentPath()
// // // //
// this.watchRouteChange() // this.watchRouteChange()
// }else{ // }else{
// this.headerShow = false // this.headerShow = false
// } // }
this.getReviewList()
},
watch: {
'$route.path': {
immediate: true, //
handler() {
this.updateCurrentPath()
}
}
}, },
methods: { 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() { getList() {
try { try {
@ -95,6 +126,7 @@ export default {
}) })
}, },
goToPage(path) { goToPage(path) {
console.log(this.currentPath ,path,'===0000');
if(this.currentPath == path) return; if(this.currentPath == path) return;
this.currentPath = path; this.currentPath = path;
this.$router.push({ this.$router.push({

2
src/components/SetLeftMenu.vue

@ -54,7 +54,7 @@ export default {
store.dispatch('fetchPaibanTemplateOption'); store.dispatch('fetchPaibanTemplateOption');
} }
if(newPath.includes('/super/clientSet')){ 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); store.commit('SET_CLIENTTEMTYPE', this.$route.query.type);
} }
this.updateActiveMenu(newPath); this.updateActiveMenu(newPath);

2
src/components/clientSet/reviewBtn.vue

@ -34,7 +34,7 @@ export default {
// //
try { try {
this.$http('POST', '/supernew/ajax_update_paiban_template_review_status', { 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', review_status: '2',
refuse_reason:'' refuse_reason:''
}).then(response => { }).then(response => {

10
src/router/index.js

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

9
src/store/index.js

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

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

@ -103,7 +103,7 @@ export default {
} }
await store.dispatch('updateClientConfig',{ 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), config_json:JSON.stringify(data),
message: this.$Message message: this.$Message
}); });

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

@ -316,6 +316,7 @@ export default {
this.template_id = response.data.template_id this.template_id = response.data.template_id
} }
localStorage.setItem('template_id',this.template_id)
store.dispatch('fetchClientConfig',{id:this.template_id}); store.dispatch('fetchClientConfig',{id:this.template_id});
store.commit('SET_CLIENTTEMID', 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',{ 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), config_json:JSON.stringify(data),
message: this.$Message message: this.$Message
}); });

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

@ -167,7 +167,7 @@ export default {
} }
await store.dispatch('updateClientConfig',{ 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), config_json:JSON.stringify(data),
message: this.$Message message: this.$Message
}); });

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

@ -97,7 +97,7 @@ export default {
} }
await store.dispatch('updateClientConfig',{ 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), config_json:JSON.stringify(data),
message: this.$Message message: this.$Message
}); });

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

@ -150,7 +150,7 @@ export default {
} }
await store.dispatch('updateClientConfig',{ 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), config_json:JSON.stringify(data),
message: this.$Message message: this.$Message
}); });

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

@ -55,7 +55,7 @@ export default {
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
if (response.status) { 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); this.$Message.success(response.info);
} else { } else {
this.$Message.error(response.info); this.$Message.error(response.info);

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

@ -82,7 +82,7 @@ export default {
} }
await store.dispatch('updateClientConfig',{ 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), config_json:JSON.stringify(data),
message: this.$Message message: this.$Message
}); });

Loading…
Cancel
Save