fix: 主页sn号读取配置

This commit is contained in:
TsMask
2023-12-22 15:54:38 +08:00
parent 04754a022f
commit 0f3df3a80b
2 changed files with 9 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ type AppStore = {
/**服务版本 */ /**服务版本 */
version: string, version: string,
buildTime: string, buildTime: string,
// 序列号
serialNum: string,
/**应用版权声明 */ /**应用版权声明 */
copyright: string; copyright: string;
/**LOGO显示类型 */ /**LOGO显示类型 */
@@ -46,6 +48,7 @@ const useAppStore = defineStore('app', {
version: `-`, version: `-`,
buildTime: `-`, buildTime: `-`,
serialNum: `-`,
copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`, copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`,
logoType: 'icon', logoType: 'icon',
filePathIcon: '', filePathIcon: '',
@@ -77,6 +80,7 @@ const useAppStore = defineStore('app', {
if (res.code === RESULT_CODE_SUCCESS && res.data) { if (res.code === RESULT_CODE_SUCCESS && res.data) {
this.version = res.data.version; this.version = res.data.version;
this.buildTime = res.data.buildTime; this.buildTime = res.data.buildTime;
this.serialNum = res.data.serialNum;
this.appName = res.data.title; this.appName = res.data.title;
this.copyright = res.data.copyright; this.copyright = res.data.copyright;
this.logoType = res.data.logoType; this.logoType = res.data.logoType;

View File

@@ -109,7 +109,7 @@ let nfInfo: any = reactive({
version: appStore.version, version: appStore.version,
status: t('views.index.normal'), status: t('views.index.normal'),
outTimeDate: '', outTimeDate: '',
serialNum: '-', serialNum: appStore.serialNum,
}); });
/**表格状态类型 */ /**表格状态类型 */
@@ -163,7 +163,7 @@ function fnGetList(one: boolean) {
tableState.loading = false; tableState.loading = false;
var rightNum = 0; var rightNum = 0;
var errorNum = 0; var errorNum = 0;
if (res.length) nfInfo.serialNum = res[0].serialNum; // if (res.length) nfInfo.serialNum = res[0].serialNum;
for (let i = 0; i < res.length; i++) { for (let i = 0; i < res.length; i++) {
if (res[i].status == '正常' || res[i].status == 'Normal') { if (res[i].status == '正常' || res[i].status == 'Normal') {
rightNum++; rightNum++;
@@ -400,15 +400,15 @@ onBeforeUnmount(() => {
nfInfo.obj nfInfo.obj
}}</a-descriptions-item> }}</a-descriptions-item>
<template v-if="nfInfo.obj === 'OMC'"> <template v-if="nfInfo.obj === 'OMC'">
<a-descriptions-item :label="t('views.index.serialNum')">{{
nfInfo.serialNum
}}</a-descriptions-item>
<a-descriptions-item :label="t('views.index.versionNum')">{{ <a-descriptions-item :label="t('views.index.versionNum')">{{
nfInfo.version nfInfo.version
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item :label="t('views.index.systemStatus')">{{ <a-descriptions-item :label="t('views.index.systemStatus')">{{
nfInfo.status nfInfo.status
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item :label="t('views.index.serialNum')">{{
nfInfo.serialNum
}}</a-descriptions-item>
</template> </template>
<template v-else> <template v-else>
<a-descriptions-item :label="t('views.index.serialNum')">{{ <a-descriptions-item :label="t('views.index.serialNum')">{{