#
Junjie
2024-07-03 6273f9f65b743cc86623d4fb9a83bb695004092a
#
4个文件已修改
41 ■■■■ 已修改文件
zy-asrs-admin/src/assets/main.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-admin/src/config.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-admin/src/views/IndexView.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-admin/src/views/system/menu/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
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')
}
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>
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', '国际化ID')" key="languageId" data-index="languageId" />
      <a-table-column :title="formatMessage('db.sys_menu.language_id', '国际化ID')" 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;">