logo更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d6f9b5cc7d
commit
b8279e1f4c
|
@ -278,7 +278,7 @@ async function VueInit() {
|
|||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||
setInterval(() => {
|
||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || path === '/' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
return
|
||||
}
|
||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||
|
|
|
@ -7,15 +7,12 @@
|
|||
<div class="login-l">
|
||||
<div class="login-logo">
|
||||
<img
|
||||
v-if="language === 'zh'"
|
||||
:src="
|
||||
hospital.HospitalLogoPath
|
||||
? OSSclientConfig.basePath + hospital.HospitalLogoPath
|
||||
: logoImg
|
||||
"
|
||||
v-if="language === 'zh' && hospital.HospitalLogoPath"
|
||||
:src="OSSclientConfig.basePath + hospital.HospitalLogoPath"
|
||||
crossOrigin="anonymous"
|
||||
alt=""
|
||||
/>
|
||||
<img v-else src="@/assets/zzlogo3.png" alt="" />
|
||||
<!-- <img v-else src="@/assets/zzlogo3.png" alt="" /> -->
|
||||
</div>
|
||||
<div class="login-image">
|
||||
<img src="@/assets/login-bg.png" />
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
<div class="trials-navbar" style="position: relative">
|
||||
<div class="leftMenu">
|
||||
<img
|
||||
v-if="language === 'zh'"
|
||||
:src="
|
||||
hospital.HospitalLogoPath
|
||||
? OSSclientConfig.basePath + hospital.HospitalLogoPath
|
||||
: logoImg
|
||||
"
|
||||
v-if="language === 'zh' && hospital.HospitalLogoPath"
|
||||
:src="OSSclientConfig.basePath + hospital.HospitalLogoPath"
|
||||
crossOrigin="anonymous"
|
||||
alt=""
|
||||
style="min-width: 170px;"
|
||||
/>
|
||||
<img v-else src="@/assets/zzlogo3.png" alt="" />
|
||||
<div v-else style="width: 170px;"></div>
|
||||
<!-- <img v-else src="@/assets/zzlogo3.png" alt="" /> -->
|
||||
<span style="white-space: nowrap">
|
||||
<!-- 中心影像系统(EICS) -->
|
||||
{{ $t("trials:trials:title:eics") }}
|
||||
{{ $t('trials:trials:title:eics') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="center-menu">
|
||||
|
@ -38,7 +37,7 @@
|
|||
>
|
||||
<i class="el-icon-odometer" />
|
||||
<!-- 检查 -->
|
||||
<span slot="title">{{ $t("trials:menuTitle:inspection") }}</span>
|
||||
<span slot="title">{{ $t('trials:menuTitle:inspection') }}</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
v-if="!hasPermi(['role:zys'])"
|
||||
|
@ -48,7 +47,7 @@
|
|||
<i class="el-icon-box" />
|
||||
<!-- 我的项目 -->
|
||||
<span slot="title">
|
||||
{{ $t("trials:tab:trials") }}
|
||||
{{ $t('trials:tab:trials') }}
|
||||
</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
|
@ -67,7 +66,7 @@
|
|||
>
|
||||
<i class="el-icon-chat-dot-square" />
|
||||
<!-- 通知消息 -->
|
||||
<span slot="title">{{ $t("trials:tab:notice") }}</span>
|
||||
<span slot="title">{{ $t('trials:tab:notice') }}</span>
|
||||
</el-menu-item>
|
||||
|
||||
<el-submenu index="4" class="my_info">
|
||||
|
@ -79,17 +78,17 @@
|
|||
</span>
|
||||
<!-- 账户信息 -->
|
||||
<el-menu-item v-if="!hasPermi(['role:air'])" index="4-2">{{
|
||||
$t("trials:trials-myinfo:title:accountInfo")
|
||||
$t('trials:trials-myinfo:title:accountInfo')
|
||||
}}</el-menu-item>
|
||||
<!-- 管理后台 -->
|
||||
<el-menu-item
|
||||
v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])"
|
||||
index="4-4"
|
||||
>{{ $t("trials:trials-myinfo:title:system") }}</el-menu-item
|
||||
>{{ $t('trials:trials-myinfo:title:system') }}</el-menu-item
|
||||
>
|
||||
<!-- 退出 -->
|
||||
<el-menu-item index="4-3">{{
|
||||
$t("trials:trials-myinfo:button:loginout")
|
||||
$t('trials:trials-myinfo:button:loginout')
|
||||
}}</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
|
@ -99,128 +98,128 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { loginOut } from "@/api/user";
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import TopLang from "./topLang";
|
||||
import NoticeMarquee from "./noticeMarquee";
|
||||
import { getHospital } from "@/api/hospital.js";
|
||||
import logoImg from "@/assets/zzlogo2.png";
|
||||
import { loginOut } from '@/api/user'
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import TopLang from './topLang'
|
||||
import NoticeMarquee from './noticeMarquee'
|
||||
import { getHospital } from '@/api/hospital.js'
|
||||
import logoImg from '@/assets/zzlogo2.png'
|
||||
export default {
|
||||
components: { TopLang, NoticeMarquee },
|
||||
data() {
|
||||
return {
|
||||
logoImg,
|
||||
activeIndex: "2",
|
||||
activeIndex: '2',
|
||||
isReviewer: false,
|
||||
userTypeShortName: zzSessionStorage.getItem("userTypeShortName"),
|
||||
notice: "",
|
||||
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
||||
notice: '',
|
||||
hospital: {
|
||||
HospitalLogoPath: null,
|
||||
HospitalName: null,
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
"sidebar",
|
||||
"name",
|
||||
"userName",
|
||||
"device",
|
||||
"TotalNeedSignSystemDocCount",
|
||||
"language",
|
||||
'sidebar',
|
||||
'name',
|
||||
'userName',
|
||||
'device',
|
||||
'TotalNeedSignSystemDocCount',
|
||||
'language',
|
||||
]),
|
||||
},
|
||||
watch: {
|
||||
$route(v) {
|
||||
this.changeRoute(v);
|
||||
this.changeRoute(v)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.isReviewer = JSON.parse(zzSessionStorage.getItem("IsReviewer"));
|
||||
this.changeRoute(this.$route);
|
||||
this.getInfo();
|
||||
this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
||||
this.changeRoute(this.$route)
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
// 获取医院信息
|
||||
async getInfo() {
|
||||
try {
|
||||
let res = await getHospital();
|
||||
let res = await getHospital()
|
||||
if (res.IsSuccess) {
|
||||
Object.keys(this.hospital).forEach((key) => {
|
||||
this.hospital[key] = res.Result[key];
|
||||
});
|
||||
this.hospital[key] = res.Result[key]
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
changeRoute(v) {
|
||||
if (v.path === "/trials/trials-inspection") {
|
||||
this.activeIndex = "1";
|
||||
if (v.path === '/trials/trials-inspection') {
|
||||
this.activeIndex = '1'
|
||||
}
|
||||
if (
|
||||
v.path === "/trials/trials-list" ||
|
||||
~v.path.indexOf("/trials/trials-panel")
|
||||
v.path === '/trials/trials-list' ||
|
||||
~v.path.indexOf('/trials/trials-panel')
|
||||
) {
|
||||
this.activeIndex = "2";
|
||||
this.activeIndex = '2'
|
||||
}
|
||||
if (v.path === "/trials/trials-notice") {
|
||||
this.activeIndex = "3";
|
||||
if (v.path === '/trials/trials-notice') {
|
||||
this.activeIndex = '3'
|
||||
}
|
||||
if (v.path === "/trials/trials-myinfo") {
|
||||
this.activeIndex = "4-2";
|
||||
if (v.path === '/trials/trials-myinfo') {
|
||||
this.activeIndex = '4-2'
|
||||
}
|
||||
},
|
||||
handleSelect(key, keyPath) {
|
||||
switch (key) {
|
||||
case "4-2":
|
||||
this.go("/trials/trials-myinfo");
|
||||
break;
|
||||
case "4-3":
|
||||
this.logout();
|
||||
break;
|
||||
case "4-4":
|
||||
this.go("/system");
|
||||
break;
|
||||
case "1":
|
||||
this.go("/trials/trials-inspection");
|
||||
break;
|
||||
case "2":
|
||||
if (~this.$route.path.indexOf("/trials/trials-panel")) {
|
||||
return;
|
||||
case '4-2':
|
||||
this.go('/trials/trials-myinfo')
|
||||
break
|
||||
case '4-3':
|
||||
this.logout()
|
||||
break
|
||||
case '4-4':
|
||||
this.go('/system')
|
||||
break
|
||||
case '1':
|
||||
this.go('/trials/trials-inspection')
|
||||
break
|
||||
case '2':
|
||||
if (~this.$route.path.indexOf('/trials/trials-panel')) {
|
||||
return
|
||||
}
|
||||
var lastWorkbench = zzSessionStorage.getItem("lastWorkbench");
|
||||
var lastWorkbench = zzSessionStorage.getItem('lastWorkbench')
|
||||
if (lastWorkbench) {
|
||||
this.go(lastWorkbench);
|
||||
this.go(lastWorkbench)
|
||||
} else {
|
||||
this.go("/trials/trials-list");
|
||||
this.go('/trials/trials-list')
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
this.go("/trials/trials-notice");
|
||||
break;
|
||||
break
|
||||
case '3':
|
||||
this.go('/trials/trials-notice')
|
||||
break
|
||||
}
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch("app/toggleSideBar");
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
await loginOut();
|
||||
await this.$store.dispatch("user/logout");
|
||||
this.$router.push(`/login`);
|
||||
this.$i18n.locale = "zh";
|
||||
this.setLanguage("zh");
|
||||
this.$updateDictionary();
|
||||
await loginOut()
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push(`/login`)
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
},
|
||||
go(value) {
|
||||
this.$router.push({ path: value });
|
||||
this.$router.push({ path: value })
|
||||
},
|
||||
account() {
|
||||
this.$router.push({ name: "Account" });
|
||||
this.$router.push({ name: 'Account' })
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in New Issue