From 6273f9f65b743cc86623d4fb9a83bb695004092a Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 03 七月 2024 16:41:13 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/views/IndexView.vue | 18 +++++++++++++-----
zy-asrs-admin/src/assets/main.css | 2 +-
zy-asrs-admin/src/views/system/menu/index.vue | 10 ++++++----
zy-asrs-admin/src/config.js | 11 +++++++++--
4 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/zy-asrs-admin/src/assets/main.css b/zy-asrs-admin/src/assets/main.css
index af93371..4b00c73 100644
--- a/zy-asrs-admin/src/assets/main.css
+++ b/zy-asrs-admin/src/assets/main.css
@@ -6,7 +6,7 @@
}
.trigger {
- font-size: 18px;
+ font-size: 16px;
line-height: 64px;
padding: 0 6px;
cursor: pointer;
diff --git a/zy-asrs-admin/src/config.js b/zy-asrs-admin/src/config.js
index 6051ddd..272741c 100644
--- a/zy-asrs-admin/src/config.js
+++ b/zy-asrs-admin/src/config.js
@@ -4,8 +4,16 @@
url: 'http://127.0.0.1:8081/wms',
token: '',
user: null,
- locale: 'zhCN',
+ locale: 'zhCN', // 榛樿璇█
currentHost: null,
+ localeList: {//璇█鍒楄〃
+ 'enUS': {
+ desc: 'English'
+ },
+ 'zhCN': {
+ desc: '绠�浣撲腑鏂�'
+ }
+ }
});
export const logout = () => {
@@ -14,5 +22,4 @@
globalState.currentHost = null;
localStorage.removeItem('token')
localStorage.removeItem('user')
-
}
\ No newline at end of file
diff --git a/zy-asrs-admin/src/views/IndexView.vue b/zy-asrs-admin/src/views/IndexView.vue
index 13eb79d..abf58d4 100644
--- a/zy-asrs-admin/src/views/IndexView.vue
+++ b/zy-asrs-admin/src/views/IndexView.vue
@@ -164,6 +164,10 @@
})
}
+const windowReload = () => {
+ window.location.reload();
+}
+
</script>
<template>
@@ -200,6 +204,7 @@
<div class="header-top-left">
<MenuUnfoldOutlined v-if="collapsed" class="trigger" @click="() => (collapsed = !collapsed)" />
<MenuFoldOutlined v-else class="trigger" @click="() => (collapsed = !collapsed)" />
+ <RedoOutlined class="trigger" @click="windowReload()" />
</div>
<div class="header-top-right">
<div class="trigger" v-if="globalState.currentHost">
@@ -218,13 +223,16 @@
</div>
<div class="trigger">
<a-dropdown>
- <TranslationOutlined />
+ <div>
+ <TranslationOutlined />
+ {{ globalState.localeList[globalState.locale].desc }}
+ </div>
<template #overlay>
<a-menu>
- <a-menu-item @click="switchLocale('enUS')"
- :class="globalState.locale == 'enUS' ? 'active' : ''">English</a-menu-item>
- <a-menu-item @click="switchLocale('zhCN')"
- :class="globalState.locale == 'zhCN' ? 'active' : ''">绠�浣撲腑鏂�</a-menu-item>
+ <div v-for="(item, key) in globalState.localeList" :key="key">
+ <a-menu-item @click="switchLocale(key)" :class="globalState.locale == key ? 'active' : ''">{{
+ item.desc }}</a-menu-item>
+ </div>
</a-menu>
</template>
</a-dropdown>
diff --git a/zy-asrs-admin/src/views/system/menu/index.vue b/zy-asrs-admin/src/views/system/menu/index.vue
index 130104d..1bc9659 100644
--- a/zy-asrs-admin/src/views/system/menu/index.vue
+++ b/zy-asrs-admin/src/views/system/menu/index.vue
@@ -1,6 +1,6 @@
<script setup>
import { getCurrentInstance, ref, computed, reactive, onMounted } from 'vue';
-import { get, post } from '@/utils/request.js'
+import { get, post, postBlob } from '@/utils/request.js'
import * as Icons from "@ant-design/icons-vue";
import EditView from './edit.vue'
import { message, Modal } from 'ant-design-vue';
@@ -98,7 +98,7 @@
}
const handleExport = async (intl) => {
- post('/api/menu/export', {}).then(result => {
+ postBlob('/api/menu/export', {}).then(result => {
const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
window.location.href = window.URL.createObjectURL(blob);
return true;
@@ -149,10 +149,12 @@
<component :is="components[ref(record.icon).value]" />
</template>
</a-table-column>
- <a-table-column :title="formatMessage('db.sys_menu.language_id', '鍥介檯鍖朓D')" key="languageId" data-index="languageId" />
+ <a-table-column :title="formatMessage('db.sys_menu.language_id', '鍥介檯鍖朓D')" key="languageId"
+ data-index="languageId" />
<a-table-column :title="formatMessage('db.sys_menu.sort', '鎺掑簭')" key="sort" data-index="sort" />
<a-table-column :title="formatMessage('db.sys_menu.status', '鐘舵��')" key="status$" data-index="status$" />
- <a-table-column :title="formatMessage('db.sys_menu.update_time', '淇敼鏃堕棿')" key="updateTime$" data-index="updateTime$" />
+ <a-table-column :title="formatMessage('db.sys_menu.update_time', '淇敼鏃堕棿')" key="updateTime$"
+ data-index="updateTime$" />
<a-table-column :title="formatMessage('common.operation', '鎿嶄綔')" key="oper" data-index="oper">
<template #default="{ record }">
<div style="display: flex;justify-content: space-evenly;">
--
Gitblit v1.9.1