tijiao
This commit is contained in:
34
src/main.js
34
src/main.js
@@ -32,7 +32,7 @@ Vue.use(VueQuillEditor)
|
||||
|
||||
// 时间过滤器
|
||||
// 定义时间过滤器(不含时分秒)
|
||||
Vue.filter('formatDate', function(originVal) {
|
||||
Vue.filter('formatDate', function (originVal) {
|
||||
const dt = new Date(originVal * 1000)
|
||||
const y = dt.getFullYear()
|
||||
const m = (dt.getMonth() + 1 + '').padStart(2, '0')
|
||||
@@ -41,9 +41,9 @@ Vue.filter('formatDate', function(originVal) {
|
||||
const mm = (dt.getMinutes() + '').padStart(2, '0')
|
||||
const ss = (dt.getSeconds() + '').padStart(2, '0')
|
||||
return `${y}-${m}-${d}`
|
||||
})
|
||||
// 含时分秒
|
||||
Vue.filter('formatDatehms', function(originVal) {
|
||||
})
|
||||
// 含时分秒
|
||||
Vue.filter('formatDatehms', function (originVal) {
|
||||
const dt = new Date(originVal * 1000)
|
||||
const y = dt.getFullYear()
|
||||
const m = (dt.getMonth() + 1 + '').padStart(2, '0')
|
||||
@@ -52,7 +52,7 @@ Vue.filter('formatDate', function(originVal) {
|
||||
const mm = (dt.getMinutes() + '').padStart(2, '0')
|
||||
const ss = (dt.getSeconds() + '').padStart(2, '0')
|
||||
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
|
||||
})
|
||||
})
|
||||
// 引入wps文档编辑
|
||||
import mammoth from "mammoth";
|
||||
import commonJS from '@/common/js/commonJS.js'
|
||||
@@ -74,6 +74,8 @@ Vue.component("Editor", Editor);
|
||||
|
||||
import commonTable from '@/components/page/components/table/table.vue'
|
||||
Vue.component('common-table', commonTable);
|
||||
import commonLateX from '@/components/page/components/table/LateX.vue'
|
||||
Vue.component('common-late-x', commonLateX);
|
||||
import commonMajor from '@/components/page/components/major/index.vue'
|
||||
Vue.component('common-major', commonMajor);
|
||||
import commonMajorList from '@/components/page/components/major/list.vue'
|
||||
@@ -103,10 +105,10 @@ Vue.component('common-drag-word', commonDragWord);
|
||||
Vue.use(VueI18n);
|
||||
Vue.use(ElementUI, {
|
||||
size: 'small',
|
||||
locale
|
||||
locale
|
||||
});
|
||||
const i18n = new VueI18n({
|
||||
locale: localStorage.getItem('langs')||'en',
|
||||
locale: localStorage.getItem('langs') || 'en',
|
||||
messages
|
||||
});
|
||||
//使用钩子函数对路由进行权限跳转
|
||||
@@ -114,16 +116,16 @@ router.beforeEach((to, from, next) => {
|
||||
document.title = `${to.meta.title} | Traditional Medicine Research`;
|
||||
const role = localStorage.getItem('U_name');
|
||||
const userrole = localStorage.getItem('U_status');
|
||||
if (!role && to.path!='/register'&&to.path!=='/submission'&&to.path!=='/verification'&&to.path!=='/orcidLink'&&to.path!=='/img'&& to.path !=='/reviewer'&&to.path !=='/thanks' &&to.path !== '/login' &&to.path !== '/refuse' &&to.path !== '/managing'&&to.path.search(/retrieve/i)<0 ) {
|
||||
if (!role && to.path != '/register' && to.path !== '/submission' && to.path !== '/verification' && to.path !== '/orcidLink' && to.path !== '/img' && to.path !== '/reviewer' && to.path !== '/thanks' && to.path !== '/login' && to.path !== '/refuse' && to.path !== '/managing' && to.path.search(/retrieve/i) < 0) {
|
||||
next('/login');
|
||||
// } else if (to.meta.permission) {
|
||||
// // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
|
||||
// // role === 'admin' ? next() : next('/403');
|
||||
// if(userrole == to.meta.permission){
|
||||
// next();
|
||||
// }else{
|
||||
// next('/403');
|
||||
// }
|
||||
// } else if (to.meta.permission) {
|
||||
// // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
|
||||
// // role === 'admin' ? next() : next('/403');
|
||||
// if(userrole == to.meta.permission){
|
||||
// next();
|
||||
// }else{
|
||||
// next('/403');
|
||||
// }
|
||||
|
||||
} else {
|
||||
//审稿人导航
|
||||
|
||||
Reference in New Issue
Block a user