Browse Source

fix: 名称修改

master
betaqi 2 months ago
parent
commit
22b75781ef
  1. 2
      index.html
  2. 6
      src/pages/deviceInfo/components/TestInfo.vue
  3. 4
      src/pages/deviceInfo/index.vue
  4. 2
      src/pages/index.html
  5. 57
      src/pages/layout.vue
  6. 4
      src/pages/system/login/index.vue

2
index.html

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>设备管理平台</title> <title>储能边缘控制主机管理平台</title>
<style> <style>
body { body {
margin: 0; margin: 0;

6
src/pages/deviceInfo/components/TestInfo.vue

@ -55,12 +55,12 @@
/> />
</div> </div>
</div> </div>
<testSheetInfoDlg <!-- <testSheetInfoDlg
:info="sheetDetail" :info="sheetDetail"
:title="curSheetDetailName" :title="curSheetDetailName"
:isShow="isShowDetail" :isShow="isShowDetail"
@on-close="isShowDetail = false" @on-close="isShowDetail = false"
/> /> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
@ -128,7 +128,7 @@ async function loadDeviceTestSheet() {
} }
const isShowDetail = ref(false) const isShowDetail = ref(false)
const sheetDetail = ref<any>([]) const sheetDetail = ref<any>([])
const curSheetDetailName = ref<any>() const curSheetDetailName = ref<any>('')
async function loadSheetDetail(row: any) { async function loadSheetDetail(row: any) {
// const res = await getSheetDetail(row.id) // const res = await getSheetDetail(row.id)
// if (isResError(res)) return // if (isResError(res)) return

4
src/pages/deviceInfo/index.vue

@ -119,6 +119,10 @@ import { deviceTableCol, DeviceStatus } from './utils'
import { getCategoryTree, type ICategoryTree } from '@/api/module/eam/device/category' import { getCategoryTree, type ICategoryTree } from '@/api/module/eam/device/category'
import jsPDF from 'jspdf' import jsPDF from 'jspdf'
defineOptions({
name: 'DeviceList',
})
const loading = ref(true) const loading = ref(true)
const total = ref(0) const total = ref(0)
const list = ref<IDevice[]>([]) const list = ref<IDevice[]>([])

2
src/pages/index.html

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>设备管理平台</title> <title>储能边缘控制主机管理平台</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

57
src/pages/layout.vue

@ -3,16 +3,12 @@
<div class="menu-box"> <div class="menu-box">
<div class="logo"> <div class="logo">
<img :src="logoIcon" alt="" class="logo-icon" /> <img :src="logoIcon" alt="" class="logo-icon" />
<span class="logo-label">设备管理平台</span> <span class="logo-label"> 储能边缘控制主机管理</span>
</div> </div>
<el-scrollbar> <el-scrollbar>
<el-menu :default-active="activeMenu" class="menu" @select="menuClick"> <el-menu :default-active="activeMenu" class="menu" @select="menuClick">
<template v-for="(menu, idx) in menuData" :key="idx"> <template v-for="(menu, idx) in menuData" :key="idx">
<el-menu-item <el-menu-item :index="menu.path" class="menu-item" v-if="!menu?.children?.length">
:index="menu.path"
class="menu-item"
v-if="!menu?.children?.length"
>
<Icon :size="16" v-if="menu.meta.icon" :icon="menu.meta.icon" /> <Icon :size="16" v-if="menu.meta.icon" :icon="menu.meta.icon" />
<span class="menu-label">{{ menu.meta.title }}</span> <span class="menu-label">{{ menu.meta.title }}</span>
</el-menu-item> </el-menu-item>
@ -22,11 +18,7 @@
<span class="menu-label">{{ menu.meta.title }}</span> <span class="menu-label">{{ menu.meta.title }}</span>
</template> </template>
<template v-for="(child, index) in menu.children" :key="index"> <template v-for="(child, index) in menu.children" :key="index">
<el-menu-item <el-menu-item class="menu-item" :index="`${menu.path}/${child.path}`" v-if="!child?.children?.length">
class="menu-item"
:index="`${menu.path}/${child.path}`"
v-if="!child?.children?.length"
>
<Icon :size="16" v-if="child.meta.icon" :icon="child.meta.icon" /> <Icon :size="16" v-if="child.meta.icon" :icon="child.meta.icon" />
{{ child.meta.title }} {{ child.meta.title }}
@ -38,19 +30,9 @@
{{ child.meta.title }} {{ child.meta.title }}
</template> </template>
<template <template v-for="(subChild, subIndex) in child.children" :key="subIndex">
v-for="(subChild, subIndex) in child.children" <el-menu-item class="menu-item" :index="`${menu.path}/${child.path}/${subChild.path}`">
:key="subIndex" <Icon :size="16" v-if="subChild.meta.icon" :icon="subChild.meta.icon" />
>
<el-menu-item
class="menu-item"
:index="`${menu.path}/${child.path}/${subChild.path}`"
>
<Icon
:size="16"
v-if="subChild.meta.icon"
:icon="subChild.meta.icon"
/>
{{ subChild.meta.title }} {{ subChild.meta.title }}
</el-menu-item> </el-menu-item>
@ -69,10 +51,7 @@
{{ currentTime }} {{ currentTime }}
</div> </div>
<div class="right"> <div class="right">
<el-dropdown <el-dropdown style="width: 100%; height: 100%" @command="command => handleCommand(command)">
style="width: 100%; height: 100%"
@command="command => handleCommand(command)"
>
<div class="user-avatar"> <div class="user-avatar">
<img :src="Avatar" height="32" /> <img :src="Avatar" height="32" />
<div class="user-name" :title="userName">{{ userName }}</div> <div class="user-name" :title="userName">{{ userName }}</div>
@ -89,7 +68,11 @@
</el-header> </el-header>
<main class="layout-main"> <main class="layout-main">
<el-config-provider :locale="zhCn"> <el-config-provider :locale="zhCn">
<RouterView /> <RouterView v-slot="{ Component }">
<KeepAlive :include="['DeviceList']">
<component :is="Component" />
</KeepAlive>
</RouterView>
</el-config-provider> </el-config-provider>
<!-- </div> --> <!-- </div> -->
</main> </main>
@ -235,7 +218,7 @@ async function loginOut() {
}) })
await userStore.loginout() await userStore.loginout()
push('/login') push('/login')
} catch {} } catch { }
} }
onUnmounted(() => { onUnmounted(() => {
@ -245,19 +228,20 @@ onUnmounted(() => {
<style scoped lang="scss"> <style scoped lang="scss">
$header-height: 48px; $header-height: 48px;
.root { .root {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
.menu-box { .menu-box {
max-width: 216px;
height: 100%; height: 100%;
position: relative; position: relative;
transition: width 0.3s ease; transition: width 0.3s ease;
overflow: hidden; overflow: hidden;
background-color: var(--layout-menu-bg); background-color: var(--layout-menu-bg);
@include ResponsiveW(216); // @include ResponsiveW(168);
width: 224px;
.logo { .logo {
height: 48px; height: 48px;
@ -290,15 +274,18 @@ $header-height: 48px;
height: 20px; height: 20px;
} }
} }
:deep(.el-menu) { :deep(.el-menu) {
background-color: var(--layout-menu-bg); background-color: var(--layout-menu-bg);
border-right: none; border-right: none;
} }
.menu { .menu {
height: calc(100% - 48px); height: calc(100% - 48px);
width: 100%; width: 100%;
overflow: auto; overflow: auto;
background-color: var(--layout-menu-bg); background-color: var(--layout-menu-bg);
:deep(.el-menu-item:hover), :deep(.el-menu-item:hover),
:deep(.el-sub-menu__title:hover) { :deep(.el-sub-menu__title:hover) {
background: #272b35; background: #272b35;
@ -314,10 +301,12 @@ $header-height: 48px;
height: 40px; height: 40px;
border-left: 3px solid transparent; border-left: 3px solid transparent;
} }
:deep(.el-menu-item.is-active) { :deep(.el-menu-item.is-active) {
background-color: #2c342c; background-color: #2c342c;
border-left: 3px solid #619925; border-left: 3px solid #619925;
} }
.mr-5px { .mr-5px {
margin-right: 5px; margin-right: 5px;
font-size: 26px; font-size: 26px;
@ -379,6 +368,7 @@ $header-height: 48px;
outline: none; outline: none;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
.user-name { .user-name {
font-size: 14px; font-size: 14px;
color: var(--text-color); color: var(--text-color);
@ -404,15 +394,18 @@ $header-height: 48px;
background: var(--bg); background: var(--bg);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.layout-breadcrumb { .layout-breadcrumb {
height: 20px; height: 20px;
margin-bottom: 14px; margin-bottom: 14px;
} }
.layout-view { .layout-view {
flex: 1; flex: 1;
background: var(--bg); background: var(--bg);
border-radius: 4px; border-radius: 4px;
} }
// overflow: hidden; // overflow: hidden;
} }
} }

4
src/pages/system/login/index.vue

@ -3,8 +3,8 @@
<div class="header"> <div class="header">
<img :src="Logo" class="icon" /> <img :src="Logo" class="icon" />
<div class="sys-title"> <div class="sys-title">
<span class="title-cn">比特电科-设备管理系统</span> <span class="title-cn">比特电科-储能边缘控制主机管理平台</span>
<span class="title-en">BTDK-Equipment Management System</span> <span class="title-en">BTDK-ES Edge Control Host Management Platform</span>
</div> </div>
</div> </div>
<div class="body"> <div class="body">

Loading…
Cancel
Save