版权信息修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
277881a8d1
commit
b5b4db84fc
|
@ -0,0 +1,8 @@
|
||||||
|
const config = {
|
||||||
|
hospital: '复旦大学附属肿瘤医院',
|
||||||
|
hospitalEN: '',
|
||||||
|
company: '上海展影医疗科技有限公司',
|
||||||
|
companyEN: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
|
@ -103,8 +103,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === "/hir_test/dist";
|
// this.show = process.env.VUE_APP_OSS_PATH === "/hir_test/dist";
|
||||||
// this.show = false;
|
this.show = true;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<!-- IRC Management System -->
|
<!-- IRC Management System -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{ $t("login:title:system") }}
|
{{ $t('login:title:system') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
size="medium"
|
size="medium"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
{{ $t("login:button:login") }}
|
{{ $t('login:button:login') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<!-- Forget password? -->
|
<!-- Forget password? -->
|
||||||
|
@ -109,14 +109,14 @@
|
||||||
size="medium"
|
size="medium"
|
||||||
@click.native.prevent="handleResetPwd"
|
@click.native.prevent="handleResetPwd"
|
||||||
>
|
>
|
||||||
{{ $t("login:button:forgetPassword") }}
|
{{ $t('login:button:forgetPassword') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="language === 'zh'" class="login-footer">
|
<div v-if="language === 'zh'" class="login-footer">
|
||||||
<span>Copyright © 2024 上海展影医疗科技有限公司 版权所有</span>
|
<!-- <span>Copyright © 2024 上海展影医疗科技有限公司 版权所有</span>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a target="_blank" href="https://beian.miit.gov.cn/">
|
<a target="_blank" href="https://beian.miit.gov.cn/">
|
||||||
<span> 沪ICP备2021037850-2 </span>
|
<span> 沪ICP备2021037850-2 </span>
|
||||||
|
@ -128,7 +128,22 @@
|
||||||
>
|
>
|
||||||
<img src="@/assets/filing.png" />
|
<img src="@/assets/filing.png" />
|
||||||
<span>沪公网安备 31011002005859号</span>
|
<span>沪公网安备 31011002005859号</span>
|
||||||
</a>
|
</a> -->
|
||||||
|
<span
|
||||||
|
>{{ $t('login:copyright:title:construct') }}{{ config.hospital }}</span
|
||||||
|
>
|
||||||
|
<span> | </span>
|
||||||
|
<span>{{ $t('login:copyright:title:support') }}{{ config.company }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<span
|
||||||
|
>{{ $t('login:copyright:title:construct')
|
||||||
|
}}{{ config.hospitalEN }}</span
|
||||||
|
>
|
||||||
|
<span> | </span>
|
||||||
|
<span
|
||||||
|
>{{ $t('login:copyright:title:support') }}{{ config.companyEN }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<Vcode
|
<Vcode
|
||||||
:show="isShow"
|
:show="isShow"
|
||||||
|
@ -140,32 +155,34 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations } from "vuex";
|
import { mapGetters, mapMutations } from 'vuex'
|
||||||
import TopLang from "./topLang";
|
import TopLang from './topLang'
|
||||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||||
import Vcode from "vue-puzzle-vcode";
|
import Vcode from 'vue-puzzle-vcode'
|
||||||
import Img1 from "@/assets/pic-1.png";
|
import Img1 from '@/assets/pic-1.png'
|
||||||
import logoImg from "@/assets/zzlogo2.png";
|
import logoImg from '@/assets/zzlogo2.png'
|
||||||
import { getHospital } from "@/api/hospital.js";
|
import { getHospital } from '@/api/hospital.js'
|
||||||
|
import config from '/public/config.js'
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: 'Login',
|
||||||
components: { TopLang, Vcode },
|
components: { TopLang, Vcode },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
logoImg,
|
logoImg,
|
||||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: '',
|
||||||
password: "",
|
password: '',
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("login:formRule:userName"),
|
message: this.$t('login:formRule:userName'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
// {
|
// {
|
||||||
|
@ -175,14 +192,14 @@ export default {
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("login:formRule:password"),
|
message: this.$t('login:formRule:password'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
passwordType: "password",
|
passwordType: 'password',
|
||||||
loginType: null,
|
loginType: null,
|
||||||
location: null,
|
location: null,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
|
@ -191,19 +208,20 @@ export default {
|
||||||
HospitalLogoPath: null,
|
HospitalLogoPath: null,
|
||||||
HospitalName: null,
|
HospitalName: null,
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["asyncRoutes", "routes", "language"]),
|
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getInfo();
|
this.getInfo()
|
||||||
|
console.log(this.config)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType
|
||||||
this.location = this.$route.query.location;
|
this.location = this.$route.query.location
|
||||||
zzSessionStorage.setItem("loginType", this.loginType);
|
zzSessionStorage.setItem('loginType', this.loginType)
|
||||||
localStorage.setItem("location", this.location);
|
localStorage.setItem('location', this.location)
|
||||||
// if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
// if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
||||||
// this.$i18n.locale = "en";
|
// this.$i18n.locale = "en";
|
||||||
// this.setLanguage("en");
|
// this.setLanguage("en");
|
||||||
|
@ -214,104 +232,104 @@ export default {
|
||||||
// this.setLanguage("en");
|
// this.setLanguage("en");
|
||||||
// this.$updateDictionary();
|
// this.$updateDictionary();
|
||||||
// } else {
|
// } else {
|
||||||
this.$i18n.locale = "zh";
|
this.$i18n.locale = 'zh'
|
||||||
this.setLanguage("zh");
|
this.setLanguage('zh')
|
||||||
this.$updateDictionary();
|
this.$updateDictionary()
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||||
// 获取医院信息
|
// 获取医院信息
|
||||||
async getInfo() {
|
async getInfo() {
|
||||||
try {
|
try {
|
||||||
let res = await getHospital();
|
let res = await getHospital()
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
Object.keys(this.hospital).forEach((key) => {
|
Object.keys(this.hospital).forEach((key) => {
|
||||||
this.hospital[key] = res.Result[key];
|
this.hospital[key] = res.Result[key]
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === "password") {
|
if (this.passwordType === 'password') {
|
||||||
this.passwordType = "";
|
this.passwordType = ''
|
||||||
} else {
|
} else {
|
||||||
this.passwordType = "password";
|
this.passwordType = 'password'
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.password.focus();
|
this.$refs.password.focus()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType
|
||||||
this.$refs.loginForm.validate((valid) => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// this.isShow = true
|
// this.isShow = true
|
||||||
this.loginIn();
|
this.loginIn()
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
loginIn() {
|
loginIn() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("user/login", this.loginForm)
|
.dispatch('user/login', this.loginForm)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
// 当前用户为首次登录,请先修改密码之后再次登录
|
// 当前用户为首次登录,请先修改密码之后再次登录
|
||||||
this.$message.success(this.$t("login:message:login1"));
|
this.$message.success(this.$t('login:message:login1'))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `/recompose?userName=${this.loginForm.username}`,
|
path: `/recompose?userName=${this.loginForm.username}`,
|
||||||
});
|
})
|
||||||
}, 500);
|
}, 500)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
this.$store.dispatch("permission/generateRoutes").then((res) => {
|
this.$store.dispatch('permission/generateRoutes').then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
if (res && res.length > 0) {
|
if (res && res.length > 0) {
|
||||||
this.$store.dispatch("global/getNoticeList");
|
this.$store.dispatch('global/getNoticeList')
|
||||||
this.$router.addRoutes(res);
|
this.$router.addRoutes(res)
|
||||||
if (this.loginType === "DevOps") {
|
if (this.loginType === 'DevOps') {
|
||||||
this.$router.replace({ path: res[0].path });
|
this.$router.replace({ path: res[0].path })
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:radmin"])) {
|
if (this.hasPermi(['role:radmin'])) {
|
||||||
this.$router.replace({ path: res[0].path });
|
this.$router.replace({ path: res[0].path })
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.hasPermi(["role:pm", "role:oa", "role:admin", "role:dev"])
|
this.hasPermi(['role:pm', 'role:oa', 'role:admin', 'role:dev'])
|
||||||
) {
|
) {
|
||||||
this.$router.replace({ path: "/trials/trials-inspection" });
|
this.$router.replace({ path: '/trials/trials-inspection' })
|
||||||
} else if (this.hasPermi(["role:oa"])) {
|
} else if (this.hasPermi(['role:oa'])) {
|
||||||
this.$router.replace({ path: "/system" });
|
this.$router.replace({ path: '/system' })
|
||||||
} else {
|
} else {
|
||||||
this.$router.replace({ path: "/trials" });
|
this.$router.replace({ path: '/trials' })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||||
this.$message.warning(this.$t("login:message:login2"));
|
this.$message.warning(this.$t('login:message:login2'))
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
onSuccess() {
|
onSuccess() {
|
||||||
this.isShow = false;
|
this.isShow = false
|
||||||
this.loginIn();
|
this.loginIn()
|
||||||
},
|
},
|
||||||
handleResetPwd() {
|
handleResetPwd() {
|
||||||
this.$router.push({ name: "Resetpassword" });
|
this.$router.push({ name: 'Resetpassword' })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
Loading…
Reference in New Issue