Compare commits
5 Commits
2ba5ebaddb
...
hainan
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4189eea278 | ||
|
|
d3fef49af2 | ||
|
|
12d40a5c6e | ||
|
|
6748490c3f | ||
|
|
2c19fc43de |
@@ -115,4 +115,10 @@ activate:
|
|||||||
private-key: "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCcUyYhVqczGxblL+o/xZzF/8nf+LjrfUE/dS1aRHM7uMDD0cgCArhjtfneFePrMxt+Z7W8yNBzSarub8qsfhaVNikV7Es7oaeTygfjQXTi2n4AFkir3fM07J08RpWhl5M8f8uWTCuvFUYAw00gq55typqmnbkmJa2VIUy/iQf+cMCP7abz4/jNhUzUR3qA7TV4oMRgTdIEDUp63YF8dOC+JH8XxYrCVeHXV6fLCwmesdMzl0lB2VTEKMfLbXhOmF5g7P9y/16VCcN8UBuZlbyYfn+GAxJOSbeHi5HshOKfoSuD7Jz+3WQZpNavOWjIFExKIU38/CvnJCOP7XBCqpSTAgMBAAECggEAYeWokWRE3TpvwiOZnUpR/aVMdVi75a3ROL5XIpqPV61B+t/bU3cEpl0GF9C5pUeiRi0IoStZb3mI9D1KPW/REKyUWkhabQO1gFYbTnRlkNOn6MILzKX4cwJjDaZeeo4EBPU7N+qHyOOXrU6hdH5FfxhMdV983ajm5eeuupxER1C2kAcIklTeVpTX6EKOgZb5LBp5ssOVm2P42pOauvcRozRcvZmqnErXmukv0H4l3EVNt4rHpTn9riHUC63e8JfiYzVaF6zuNUxv6nHEft0/SRMw11XSTnNfDzcKqgjz6ksFBS/6eQQYKESk+ONC53HUuYHFAknkwsPupDCT2W8FIQKBgQDLHT/xCU3nxGr4vFKBDNaO2D5oK20ECbBO4oDvLWWmQG7f+6TsMy8PgVdMnoL4RfqGlwFAKEpS6KVFHnBVqnNEhcdy9uCI7x7Xx8UnyUtxj1EDTm76uta9Ki9OrlqB6tImDM9+Ya3vGktW37ht4WOx2OsJRhG1dbf6RLwFlH7DWw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Bw2cAFk3vM97WY06TSldGA8ajVHx3BYRjj+zl62NTQthy8fw3tqxb3c5e8toOmZWKjZvDhg2TRLhsDDQWEYg3LZG87REqVIjgEPcpjNLidjygGX8n3JF2o0O5I/EMvl0s/+LVQONfduOBvhwDqr8QNisbLsyneiAq7umewMolo="
|
||||||
public-key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFMmIVanMxsW5S/qP8Wcxf/J3/i4631BP3UtWkRzO7jAw9HIAgK4Y7X53hXj6zMbfme1vMjQc0mq7m/KrH4WlTYpFexLO6Gnk8oH40F04tp+ABZIq93zNOydPEaVoZeTPH/LlkwrrxVGAMNNIKuebcqapp25JiWtlSFMv4kH/nDAj+2m8+P4zYVM1Ed6gO01eKDEYE3SBA1Ket2BfHTgviR/F8WKwlXh11enywsJnrHTM5dJQdlUxCjHy214TpheYOz/cv9elQnDfFAbmZW8mH5/hgMSTkm3h4uR7ITin6Erg+yc/t1kGaTWrzloyBRMSiFN/Pwr5yQjj+1wQqqUkwIDAQAB"
|
public-key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFMmIVanMxsW5S/qP8Wcxf/J3/i4631BP3UtWkRzO7jAw9HIAgK4Y7X53hXj6zMbfme1vMjQc0mq7m/KrH4WlTYpFexLO6Gnk8oH40F04tp+ABZIq93zNOydPEaVoZeTPH/LlkwrrxVGAMNNIKuebcqapp25JiWtlSFMv4kH/nDAj+2m8+P4zYVM1Ed6gO01eKDEYE3SBA1Ket2BfHTgviR/F8WKwlXh11enywsJnrHTM5dJQdlUxCjHy214TpheYOz/cv9elQnDfFAbmZW8mH5/hgMSTkm3h4uR7ITin6Erg+yc/t1kGaTWrzloyBRMSiFN/Pwr5yQjj+1wQqqUkwIDAQAB"
|
||||||
|
|
||||||
|
freq-converter:
|
||||||
|
schedule-period: 200 #定时器运行间隔
|
||||||
|
tolerant: 1 #耐受状态
|
||||||
|
dt: 200 #延迟时间ms
|
||||||
|
direction: 0 #0为横向1为纵向
|
||||||
|
allow-error-duration: 6 #暂态持续时间允许最大误差ms
|
||||||
|
allow-error-residual-voltage: 2.0 #暂态幅值允许最多误差%
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo40
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo40
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo41
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo41
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
|||||||
11900
|
42428
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/extraResources/mysql/data/binlog.000036
Normal file
BIN
build/extraResources/mysql/data/binlog.000036
Normal file
Binary file not shown.
@@ -1,13 +1,3 @@
|
|||||||
.\binlog.000023
|
|
||||||
.\binlog.000024
|
|
||||||
.\binlog.000025
|
|
||||||
.\binlog.000026
|
|
||||||
.\binlog.000027
|
|
||||||
.\binlog.000028
|
|
||||||
.\binlog.000029
|
|
||||||
.\binlog.000030
|
|
||||||
.\binlog.000031
|
|
||||||
.\binlog.000032
|
|
||||||
.\binlog.000033
|
|
||||||
.\binlog.000034
|
.\binlog.000034
|
||||||
.\binlog.000035
|
.\binlog.000035
|
||||||
|
.\binlog.000036
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,28 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="footer flx-align-center pl10">
|
<div class="footer flx-align-center pl10">
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<div class="change_mode">
|
<div class="change_mode">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
<el-icon class="el-icon--right change_mode_down"><arrow-down /></el-icon>
|
<el-icon class="el-icon--right change_mode_down"><arrow-down /></el-icon>
|
||||||
<el-icon class="el-icon--right change_mode_up"><arrow-up /></el-icon>
|
<el-icon class="el-icon--right change_mode_up"><arrow-up /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-for="item in modeList"
|
v-for="item in modeList"
|
||||||
:key="item.key"
|
:key="item.key"
|
||||||
:disabled="!item.activated"
|
:disabled="!item.activated"
|
||||||
@click="handelOpen(item.code, item.key)"
|
@click="handelOpen(item.code, item.key)"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<p style="margin: 0">
|
<p style="margin: 0">
|
||||||
<a href="http://www.shining-electric.com/" target="_blank">2024 © 南京灿能电力自动化股份有限公司</a>
|
<a href="http://www.shining-electric.com/" target="_blank">2024 © 南京灿能电力自动化股份有限公司</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
@@ -39,97 +39,97 @@ const modeStore = useModeStore()
|
|||||||
const tabsStore = useTabsStore()
|
const tabsStore = useTabsStore()
|
||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return modeStore.currentMode === '' ? '选择模块' : modeStore.currentMode + '模块'
|
return modeStore.currentMode === '' ? '选择模块' : modeStore.currentMode + '模块'
|
||||||
})
|
})
|
||||||
const activateInfo = authStore.activateInfo
|
const activateInfo = authStore.activateInfo
|
||||||
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
|
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
|
||||||
const modeList = [
|
const modeList = [
|
||||||
{
|
{
|
||||||
name: '模拟式模块',
|
name: '模拟式模块',
|
||||||
code: '模拟式',
|
code: '模拟式',
|
||||||
key: 'simulate',
|
key: 'simulate',
|
||||||
activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true
|
activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '数字式模块',
|
name: '数字式模块',
|
||||||
code: '数字式',
|
code: '数字式',
|
||||||
key: 'digital',
|
key: 'digital',
|
||||||
activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true
|
activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '比对式模块',
|
name: '比对式模块',
|
||||||
code: '比对式',
|
code: '比对式',
|
||||||
key: 'contrast',
|
key: 'contrast',
|
||||||
activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true
|
activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const handelOpen = async (item: string, key: string) => {
|
const handelOpen = async (item: string, key: string) => {
|
||||||
if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) {
|
if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) {
|
||||||
ElMessage.warning(`${item}模块未激活`)
|
ElMessage.warning(`${item}模块未激活`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await authStore.setShowMenu()
|
await authStore.setShowMenu()
|
||||||
modeStore.setCurrentMode(item) // 将模式code存入 store
|
modeStore.setCurrentMode(item) // 将模式code存入 store
|
||||||
// 强制刷新页面
|
// 强制刷新页面
|
||||||
await tabsStore.closeMultipleTab()
|
await tabsStore.closeMultipleTab()
|
||||||
await initDynamicRouter()
|
await initDynamicRouter()
|
||||||
|
|
||||||
// 只有当目标路径与当前路径不同时才跳转
|
// 只有当目标路径与当前路径不同时才跳转
|
||||||
if (router.currentRoute.value.path !== HOME_URL) {
|
if (router.currentRoute.value.path !== HOME_URL) {
|
||||||
await router.push({ path: HOME_URL })
|
await router.push({ path: HOME_URL })
|
||||||
} else {
|
} else {
|
||||||
// 如果已在目标页面,手动触发组件更新
|
// 如果已在目标页面,手动触发组件更新
|
||||||
window.location.reload() // 或者采用其他方式刷新数据
|
window.location.reload() // 或者采用其他方式刷新数据
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@use './index.scss';
|
@use './index.scss';
|
||||||
.footer {
|
.footer {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: var(--el-color-primary);
|
background-color: var(--el-color-primary);
|
||||||
// .el-button:hover {
|
// .el-button:hover {
|
||||||
// background-color: var(--el-color-primary) !important;
|
// background-color: var(--el-color-primary) !important;
|
||||||
// border: none !important;
|
// border: none !important;
|
||||||
// outline: none !important;
|
// outline: none !important;
|
||||||
// }
|
// }
|
||||||
.change_mode {
|
.change_mode {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: auto;
|
width: auto;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
.change_mode_down {
|
.change_mode_down {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
|
||||||
.change_mode_up {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.change_mode:hover {
|
.change_mode_up {
|
||||||
.change_mode_down {
|
display: none;
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.change_mode_up {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.el-dropdown {
|
}
|
||||||
z-index: 1001;
|
.change_mode:hover {
|
||||||
|
.change_mode_down {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
p {
|
.change_mode_up {
|
||||||
position: absolute;
|
display: block;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
text-align: right;
|
|
||||||
line-height: 40px;
|
|
||||||
a {
|
|
||||||
color: #fff;
|
|
||||||
margin-right: 25px; // 增加右边距
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.el-dropdown {
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
text-align: right;
|
||||||
|
line-height: 40px;
|
||||||
|
a {
|
||||||
|
color: #fff;
|
||||||
|
margin-right: 25px; // 增加右边距
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -22,14 +22,6 @@
|
|||||||
<el-icon><Edit /></el-icon>
|
<el-icon><Edit /></el-icon>
|
||||||
{{ t('header.changePassword') }}
|
{{ t('header.changePassword') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click="changeMode" v-if="authStore.showMenuFlag">
|
|
||||||
<el-icon><Switch /></el-icon>
|
|
||||||
{{ t('header.changeMode') }}
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item @click="openDialog('versionRegisterRef')">
|
|
||||||
<el-icon><SetUp /></el-icon>
|
|
||||||
{{ t('header.versionRegister') }}
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown trigger="hover" placement="left-start" v-if="userStore.userInfo.loginName == 'root'">
|
<el-dropdown trigger="hover" placement="left-start" v-if="userStore.userInfo.loginName == 'root'">
|
||||||
<div class="custom-dropdown-trigger">
|
<div class="custom-dropdown-trigger">
|
||||||
<el-icon><Tools /></el-icon>
|
<el-icon><Tools /></el-icon>
|
||||||
@@ -62,24 +54,20 @@
|
|||||||
<InfoDialog ref="infoRef"></InfoDialog>
|
<InfoDialog ref="infoRef"></InfoDialog>
|
||||||
<!-- passwordDialog -->
|
<!-- passwordDialog -->
|
||||||
<PasswordDialog ref="passwordRef"></PasswordDialog>
|
<PasswordDialog ref="passwordRef"></PasswordDialog>
|
||||||
<!-- versionRegisterDialog -->
|
|
||||||
<VersionDialog ref="versionRegisterRef"></VersionDialog>
|
|
||||||
<!-- ThemeDialog -->
|
<!-- ThemeDialog -->
|
||||||
<ThemeDialog ref="themeRef"></ThemeDialog>
|
<ThemeDialog ref="themeRef"></ThemeDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { HOME_URL, LOGIN_URL } from '@/config'
|
import { LOGIN_URL } from '@/config'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import InfoDialog from './InfoDialog.vue'
|
import InfoDialog from './InfoDialog.vue'
|
||||||
import PasswordDialog from './PasswordDialog.vue'
|
import PasswordDialog from './PasswordDialog.vue'
|
||||||
import ThemeDialog from './ThemeDialog.vue'
|
import ThemeDialog from './ThemeDialog.vue'
|
||||||
import VersionDialog from '@/views/system/versionRegister/index.vue'
|
import { Avatar, Sunny, Tools } from '@element-plus/icons-vue'
|
||||||
import { Avatar, Sunny, Switch, Tools } from '@element-plus/icons-vue'
|
|
||||||
import { useAuthStore } from '@/stores/modules/auth'
|
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import { useAppSceneStore } from '@/stores/modules/mode'
|
import { useAppSceneStore } from '@/stores/modules/mode'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
@@ -90,7 +78,6 @@ const dictStore = useDictStore()
|
|||||||
const username = computed(() => userStore.userInfo.name)
|
const username = computed(() => userStore.userInfo.name)
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const authStore = useAuthStore()
|
|
||||||
|
|
||||||
// 初始化 i18n
|
// 初始化 i18n
|
||||||
const { t } = useI18n() // 使用 t 方法替代 $t
|
const { t } = useI18n() // 使用 t 方法替代 $t
|
||||||
@@ -111,12 +98,10 @@ const logout = () => {
|
|||||||
// 打开修改密码和个人信息弹窗
|
// 打开修改密码和个人信息弹窗
|
||||||
const infoRef = ref<InstanceType<typeof InfoDialog> | null>(null)
|
const infoRef = ref<InstanceType<typeof InfoDialog> | null>(null)
|
||||||
const passwordRef = ref<InstanceType<typeof PasswordDialog> | null>(null)
|
const passwordRef = ref<InstanceType<typeof PasswordDialog> | null>(null)
|
||||||
const versionRegisterRef = ref<InstanceType<typeof VersionDialog> | null>(null)
|
|
||||||
const themeRef = ref<InstanceType<typeof ThemeDialog> | null>(null)
|
const themeRef = ref<InstanceType<typeof ThemeDialog> | null>(null)
|
||||||
const openDialog = (ref: string) => {
|
const openDialog = (ref: string) => {
|
||||||
if (ref == 'infoRef') infoRef.value?.openDialog()
|
if (ref == 'infoRef') infoRef.value?.openDialog()
|
||||||
if (ref == 'passwordRef') passwordRef.value?.openDialog()
|
if (ref == 'passwordRef') passwordRef.value?.openDialog()
|
||||||
if (ref == 'versionRegisterRef') versionRegisterRef.value?.openDialog()
|
|
||||||
if (ref == 'themeRef') themeRef.value?.openDialog()
|
if (ref == 'themeRef') themeRef.value?.openDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,10 +115,6 @@ const changeScene = async (value: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//模式切换
|
//模式切换
|
||||||
const changeMode = async () => {
|
|
||||||
authStore.changeModel()
|
|
||||||
await router.push(HOME_URL)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
// src/stores/modules/mode.ts
|
// src/stores/modules/mode.ts
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
|
export const DEFAULT_MODE = '模拟式'
|
||||||
|
|
||||||
export const useModeStore = defineStore('mode', {
|
export const useModeStore = defineStore('mode', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
currentMode: localStorage.getItem('currentMode') || ('' as string)
|
currentMode: localStorage.getItem('currentMode') || DEFAULT_MODE
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
setCurrentMode(modeName: string) {
|
setCurrentMode(modeName: string) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import piniaPersistConfig from '@/stores/helper/persist'
|
|||||||
import { USER_STORE_KEY } from '@/stores/constant'
|
import { USER_STORE_KEY } from '@/stores/constant'
|
||||||
import { logoutApi } from '@/api/user/login'
|
import { logoutApi } from '@/api/user/login'
|
||||||
import { useAuthStore } from '@/stores/modules/auth'
|
import { useAuthStore } from '@/stores/modules/auth'
|
||||||
import { useAppSceneStore, useModeStore } from '@/stores/modules/mode'
|
import { DEFAULT_MODE, useAppSceneStore, useModeStore } from '@/stores/modules/mode'
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
|
|
||||||
export const useUserStore = defineStore(USER_STORE_KEY, {
|
export const useUserStore = defineStore(USER_STORE_KEY, {
|
||||||
@@ -48,7 +48,7 @@ export const useUserStore = defineStore(USER_STORE_KEY, {
|
|||||||
this.setUserInfo({ id: '', name: '', loginName: '' })
|
this.setUserInfo({ id: '', name: '', loginName: '' })
|
||||||
this.setIsRefreshToken(false)
|
this.setIsRefreshToken(false)
|
||||||
dictStore.setDictData([])
|
dictStore.setDictData([])
|
||||||
modeStore.setCurrentMode('')
|
modeStore.setCurrentMode(DEFAULT_MODE)
|
||||||
appSceneStore.setCurrentMode('')
|
appSceneStore.setCurrentMode('')
|
||||||
await authStore.resetAuthStore()
|
await authStore.resetAuthStore()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,8 +126,8 @@ const sortedChartPoints = computed(() => {
|
|||||||
const sortedCharacteristicCurveData = computed(() => {
|
const sortedCharacteristicCurveData = computed(() => {
|
||||||
return [...characteristicCurveData.value].sort((a, b) => {
|
return [...characteristicCurveData.value].sort((a, b) => {
|
||||||
// 保留1位小数
|
// 保留1位小数
|
||||||
let aResidualVoltage = Math.floor(a.residualVoltage * 10) / 10
|
let aResidualVoltage = Math.floor(a.residualVoltage)
|
||||||
let bResidualVoltage = Math.floor(b.residualVoltage * 10) / 10
|
let bResidualVoltage = Math.floor(b.residualVoltage)
|
||||||
if (aResidualVoltage != bResidualVoltage) {
|
if (aResidualVoltage != bResidualVoltage) {
|
||||||
return a.residualVoltage - b.residualVoltage;
|
return a.residualVoltage - b.residualVoltage;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user