Browse Source

更换登录界面

hella_online_20240829
王宇飞 8 months ago
parent
commit
978fe8c708
  1. 2
      index.html
  2. BIN
      src/assets/imgs/logo_white.png
  3. BIN
      src/assets/imgs/logo_white1.png
  4. BIN
      src/assets/imgs/logo_white_blue.png
  5. BIN
      src/assets/imgs/logo_white_btn.png
  6. 2
      src/layout/components/Logo/src/Logo.vue
  7. 5
      src/layout/components/UserInfo/src/UserInfo.vue
  8. 4
      src/layout/components/useRenderLayout.tsx
  9. 2
      src/locales/en-US.ts
  10. 2
      src/main.ts
  11. 22
      src/views/login/components/LoginForm.vue
  12. 8
      src/views/login/login.vue

2
index.html

@ -132,7 +132,7 @@
<div class="app-loading"> <div class="app-loading">
<div class="app-loading-wrap"> <div class="app-loading-wrap">
<div class="app-loading-title"> <div class="app-loading-title">
<img src="/src/assets/imgs/logo_white.png" class="app-loading-logo" alt="Logo" /> <img src="/src/assets/imgs/logo_white_blue.png" class="app-loading-logo" alt="Logo" />
<div class="app-loading-title" id="app-loading-title">%VITE_APP_TITLE%</div> <div class="app-loading-title" id="app-loading-title">%VITE_APP_TITLE%</div>
</div> </div>
<div class="app-loading-item"> <div class="app-loading-item">

BIN
src/assets/imgs/logo_white.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
src/assets/imgs/logo_white1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
src/assets/imgs/logo_white_blue.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
src/assets/imgs/logo_white_btn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

2
src/layout/components/Logo/src/Logo.vue

@ -78,7 +78,7 @@ watch(
to="/" to="/"
> >
<img <img
class="h-24px w-144px h-36px" class="h-24px ml-10px mr-10px h-40px" style="border-radius: 5px;"
src="@/assets/imgs/logo_white.png" src="@/assets/imgs/logo_white.png"
/> />
<!-- <img <!-- <img

5
src/layout/components/UserInfo/src/UserInfo.vue

@ -31,7 +31,10 @@ const avatar = user.user.avatar ? user.user.avatar : avatarImg
const userName = user.user.nickname ? user.user.nickname : 'Admin' const userName = user.user.nickname ? user.user.nickname : 'Admin'
const names =[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}] const names =[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]
const tenant = names.find(item=>item.value == getTenantId()) const tenant = names.find(item=>item.value == getTenantId())
const language = wsCache.get('lang')
if('en-US'==language){
tenant.text=tenant.text.replace('长春','ChangChun').replace('成都','ChengDu')
}
const loginOut = () => { const loginOut = () => {
ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), { ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {
confirmButtonText: t('common.ok'), confirmButtonText: t('common.ok'),

4
src/layout/components/useRenderLayout.tsx

@ -52,7 +52,7 @@ export const useRenderLayout = () => {
class={[ class={[
'h-[var(--top-category-height)]', 'h-[var(--top-category-height)]',
'bg-[var(--el-color-primary)] relative', 'bg-[var(--el-color-primary)] relative',
'w-[var(--left-menu-max-width)]',
{ {
'!pl-0': mobile.value && collapse.value, '!pl-0': mobile.value && collapse.value,
} }
@ -65,7 +65,7 @@ export const useRenderLayout = () => {
{ {
'layout-border__bottom': !tagsView.value 'layout-border__bottom': !tagsView.value
} }
]}></CategoryHeader>):undefined} ]} ></CategoryHeader>):undefined}
</div> </div>
<div <div
class={[ class={[

2
src/locales/en-US.ts

@ -1108,7 +1108,7 @@ export default {
:'Check the quality inspection report', :'Check the quality inspection report',
:'ChangChun', :'ChangChun',
:'ChengDu', :'ChengDu',
:'HELLA Smart Factory Management Platform', :'FAWAY HELLA Smart Factory Management Platform',
:'Purchase unreceived record', :'Purchase unreceived record',
:'Please select the desired shipment tracking number', :'Please select the desired shipment tracking number',
:'Not more in size', :'Not more in size',

2
src/main.ts

@ -78,7 +78,7 @@ const setupAll = async () => {
// 多语言相关 // 多语言相关
const localeStore = useLocaleStore() const localeStore = useLocaleStore()
if(localeStore&&localeStore.currentLocale&&localeStore.currentLocale.lang.indexOf('en')>-1&&document.querySelector('#app-loading-title')){ if(localeStore&&localeStore.currentLocale&&localeStore.currentLocale.lang.indexOf('en')>-1&&document.querySelector('#app-loading-title')){
document.querySelector('#app-loading-title').innerHTML = 'HELLA Smart Factory Management Platform' // 富维海拉智慧工厂管理平台 document.querySelector('#app-loading-title').innerHTML = 'FAWAY HELLA Smart Factory Management Platform' // 富维海拉智慧工厂管理平台
} }
setupAll() setupAll()

22
src/views/login/components/LoginForm.vue

@ -15,8 +15,8 @@
<el-option <el-option
v-for="item in tenantArray" v-for="item in tenantArray"
:key="item" :key="item"
:label="t(`ts.${item}`).replace('ts.','')" :label="t(`ts.${item.aliasName}`).replace('ts.','')"
:value="item" :value="item.name"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -119,8 +119,20 @@
// //
const captchaEnabled = ref(true) const captchaEnabled = ref(true)
const codeUrl = ref("") const codeUrl = ref("")
const tenantArray = JSON.parse(getTenant()) const tenantArray = ref(JSON.parse(getTenant()))
const { wsCache } = useCache()
const language = wsCache.get('lang')
if('en-US'==language){
tenantArray.value = tenantArray.value.map(item => ({
name: item,
aliasName:item.replace('长春','ChangChun').replace('成都','ChengDu')
}));
}else{
tenantArray.value = tenantArray.value.map(item => ({
name: item,
aliasName:item
}));
}
const LoginRules = { const LoginRules = {
tenantName: [required], tenantName: [required],
username: [required], username: [required],
@ -131,7 +143,7 @@
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: { loginForm: {
tenantName: tenantArray[0], tenantName: tenantArray.value[0].name,
username: 'admin', username: 'admin',
password: '123456', password: '123456',
captchaVerification: '', captchaVerification: '',

8
src/views/login/login.vue

@ -9,7 +9,7 @@
> >
<!-- 左上角的 logo + 系统标题 --> <!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center "> <div class="relative flex items-center ">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<!-- 左边的背景图 + 欢迎语 --> <!-- 左边的背景图 + 欢迎语 -->
@ -21,9 +21,9 @@
> >
<!-- <img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> --> <!-- <img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> -->
<!-- <div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> --> <!-- <div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> -->
<div key="3" class="mt-5 text-14px font-normal text-white"> <!-- <div key="3" class="mt-5 text-14px font-normal text-white">
{{ t('login.message') }} {{ t('login.message') }}
</div> </div> -->
</TransitionGroup> </TransitionGroup>
</div> </div>
</div> </div>
@ -33,7 +33,7 @@
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end" class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
> >
<div class="flex items-center at-2xl:hidden at-xl:hidden"> <div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<div class="flex items-center justify-end space-x-10px"> <div class="flex items-center justify-end space-x-10px">

Loading…
Cancel
Save