Compare commits
7 Commits
0d4dc2d2bf
...
hainan
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4189eea278 | ||
|
|
d3fef49af2 | ||
|
|
12d40a5c6e | ||
|
|
6748490c3f | ||
|
|
2c19fc43de | ||
|
|
2ba5ebaddb | ||
|
|
448687115c |
@@ -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+Ya3vGkt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NemD0dee951qhJyRmqVOZOQDUuoeECgYEAqBw2cAFk3vM97WY06TSldGA8ajVHx3BYRjj+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.
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ const CHARACTERISTIC_POINT_COLOR = '#ff4d4f'
|
|||||||
|
|
||||||
const chartPoints = ref<ChartPoint[]>([])
|
const chartPoints = ref<ChartPoint[]>([])
|
||||||
const characteristicCurveData = ref<CharacteristicCurvePoint[]>([])
|
const characteristicCurveData = ref<CharacteristicCurvePoint[]>([])
|
||||||
const drawnCharacteristicCurveData = ref<CharacteristicCurvePoint[]>([])
|
|
||||||
const characteristicCurveVisible = ref(false)
|
const characteristicCurveVisible = ref(false)
|
||||||
const chartRef = ref<any>(null)
|
const chartRef = ref<any>(null)
|
||||||
|
|
||||||
@@ -127,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 {
|
||||||
@@ -152,35 +151,12 @@ const sortedCharacteristicCurveData = computed(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const sortedDrawnCharacteristicCurveData = computed(() => {
|
|
||||||
return [...drawnCharacteristicCurveData.value].sort((a, b) => {
|
|
||||||
if (a.timeMs !== null && b.timeMs !== null && a.timeMs !== b.timeMs) {
|
|
||||||
return a.timeMs - b.timeMs
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.timeMs !== null && b.timeMs === null) {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.timeMs === null && b.timeMs !== null) {
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.duration !== b.duration) {
|
|
||||||
return a.duration - b.duration
|
|
||||||
}
|
|
||||||
|
|
||||||
return a.residualVoltage - b.residualVoltage
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
const solidCharacteristicCurveSeriesData = computed(() => {
|
const solidCharacteristicCurveSeriesData = computed(() => {
|
||||||
if (!characteristicCurveVisible.value) {
|
if (!characteristicCurveVisible.value) {
|
||||||
return [] as Array<[number, number, string]>
|
return [] as Array<[number, number, string]>
|
||||||
}
|
}
|
||||||
|
|
||||||
const curveSource = props.autoDrawCurve ? sortedCharacteristicCurveData.value : sortedDrawnCharacteristicCurveData.value
|
return sortedCharacteristicCurveData.value.map(item => [item.duration, item.residualVoltage, '特性曲线'])
|
||||||
return curveSource.map(item => [item.duration, item.residualVoltage, '特性曲线'])
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const characteristicCurvePointSeriesData = computed(() => {
|
const characteristicCurvePointSeriesData = computed(() => {
|
||||||
@@ -517,13 +493,11 @@ const updateCharacteristicCurveVisibility = () => {
|
|||||||
|
|
||||||
const drawCharacteristicCurve = () => {
|
const drawCharacteristicCurve = () => {
|
||||||
if (!sortedCharacteristicCurveData.value.length) {
|
if (!sortedCharacteristicCurveData.value.length) {
|
||||||
drawnCharacteristicCurveData.value = []
|
|
||||||
characteristicCurveVisible.value = false
|
characteristicCurveVisible.value = false
|
||||||
ElMessage.warning('暂无特性曲线点')
|
ElMessage.warning('暂无特性曲线点')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
drawnCharacteristicCurveData.value = [...sortedCharacteristicCurveData.value]
|
|
||||||
characteristicCurveVisible.value = true
|
characteristicCurveVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,9 +715,8 @@ watch(
|
|||||||
() => props.autoDrawCurve,
|
() => props.autoDrawCurve,
|
||||||
newValue => {
|
newValue => {
|
||||||
characteristicCurveVisible.value = newValue ? characteristicCurveData.value.length > 0 : false
|
characteristicCurveVisible.value = newValue ? characteristicCurveData.value.length > 0 : false
|
||||||
drawnCharacteristicCurveData.value = newValue ? [...characteristicCurveData.value] : []
|
|
||||||
},
|
},
|
||||||
{immediate: true}
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
@@ -792,7 +765,6 @@ watch(
|
|||||||
() => {
|
() => {
|
||||||
chartPoints.value = []
|
chartPoints.value = []
|
||||||
characteristicCurveData.value = []
|
characteristicCurveData.value = []
|
||||||
drawnCharacteristicCurveData.value = []
|
|
||||||
characteristicCurveVisible.value = false
|
characteristicCurveVisible.value = false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -123,6 +123,30 @@ const normalizeFormalRealPayload = (payload: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const extractResultArray = (payload: any) => {
|
||||||
|
if (Array.isArray(payload)) {
|
||||||
|
return payload
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(payload?.data)) {
|
||||||
|
return payload.data
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(payload?.data?.records)) {
|
||||||
|
return payload.data.records
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(payload?.records)) {
|
||||||
|
return payload.records
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(payload?.list)) {
|
||||||
|
return payload.list
|
||||||
|
}
|
||||||
|
|
||||||
|
return [] as any[]
|
||||||
|
}
|
||||||
|
|
||||||
const handleSocketMessage = (payload: any) => {
|
const handleSocketMessage = (payload: any) => {
|
||||||
const requestId = `${payload?.requestId ?? ''}`
|
const requestId = `${payload?.requestId ?? ''}`
|
||||||
const normalizedRequestId = requestId.trim().toLowerCase()
|
const normalizedRequestId = requestId.trim().toLowerCase()
|
||||||
@@ -289,7 +313,7 @@ const handleStart = async () => {
|
|||||||
const historyResult = await getFreqConverterResult({
|
const historyResult = await getFreqConverterResult({
|
||||||
converterId: mapping.freqConverterId
|
converterId: mapping.freqConverterId
|
||||||
})
|
})
|
||||||
historyResultData.value = historyResult?.data ?? historyResult
|
historyResultData.value = extractResultArray(historyResult?.data ?? historyResult)
|
||||||
} else {
|
} else {
|
||||||
historyResultData.value = null
|
historyResultData.value = null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user