-
{{ index === 0 ? '首先DNS' : '备选DNS' }}
-
-
openKeyboard(e, index)"
- readonly
- >
-
-
+
+
{{ index === 0 ? 'DNS' : '' }}
+
@@ -185,11 +194,11 @@ const defaultDnsData = ref()
const networkModeList = [
{
- label: '固定IP地址',
+ label: '静态IP',
value: 'STATIC_IP',
},
{
- label: '动态获取IP地址',
+ label: '动态IP',
value: 'DYNAMIC_IP',
},
]
@@ -498,4 +507,23 @@ onUnmounted(() => {
color: #fff;
background-color: #409eff;
}
+
+.dns-list{
+ background-color: #ffffff;
+ padding: 10px;
+ .dns-item{
+ box-shadow: none;
+ padding: 10px 1.5rem;
+ }
+}
+.dns-title{
+ font-size: 1.5rem;
+ color: #888888;
+ padding-right: 8px;
+}
+
+.dns-input{
+ display: flex;
+ align-items: center;
+}
diff --git a/src/pages/Index/Settings/Version.vue b/src/pages/Index/Settings/Version.vue
index d41cc75..fd7fead 100644
--- a/src/pages/Index/Settings/Version.vue
+++ b/src/pages/Index/Settings/Version.vue
@@ -1,7 +1,7 @@
- SN
+ 设备ID
{{ info?.sn }}
@@ -9,12 +9,12 @@
{{ info?.assetId }}
- App
+ 应用软件版本
{{ info?.appVersion }}
- MCU
- {{ info?.mcuVersion }}
+ MCU软件版本
+ {{ info?.mcuVersion }}
Local IP
@@ -24,16 +24,43 @@
系统版本号
v{{ version}}
+
+
+
+
+
+ 名称 |
+ 版本号 |
+
+
+
+
+ {{ item.boardName }} |
+ {{ item.version }} |
+
+
+
+
+
+
+
+
diff --git a/src/services/osControl/os.ts b/src/services/osControl/os.ts
index bcdb147..5395797 100644
--- a/src/services/osControl/os.ts
+++ b/src/services/osControl/os.ts
@@ -155,4 +155,12 @@ export const disableDevice = async () => {
}
}
-
+// MCU详细版本信息
+export const getMcuVersionDetailInfo = async () => {
+ try {
+ const res = await apiClient.post('/api/v1/app/DeviceInfo/getMcuVersionDetail')
+ return res.data
+ } catch (error) {
+ console.log('MCU详细版本信息获取报错', error)
+ }
+}
diff --git a/src/store/modules/useSystemStore.ts b/src/store/modules/useSystemStore.ts
index e613c84..a564377 100644
--- a/src/store/modules/useSystemStore.ts
+++ b/src/store/modules/useSystemStore.ts
@@ -1,5 +1,6 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
+import { SystemInfo } from '@/types/Index/System.ts'
export const useSystemStore = defineStore('system', () => {
const isDebug = ref(false)
@@ -23,6 +24,24 @@ export const useSystemStore = defineStore('system', () => {
const updateStatusList = (status) => {
statusList.value.push(status)
}
+
+ const systemInfo = ref
({
+ language: 'zh-CN',
+ autoPrint: true,
+ autoLogout: false,
+ autoLogoutTimeout: 10,
+ allTemperature: 20,
+ incubateBoxTemperature: 20,
+ plateBoxTemperature: 20,
+ DHCP: true,
+ localIp: '',
+ })
+ const updateSystemInfo = (data) => {
+ systemInfo.value = {
+ ...systemInfo.value,
+ ...data,
+ }
+ }
return {
isDebug,
@@ -34,5 +53,8 @@ export const useSystemStore = defineStore('system', () => {
statusList,
updateStatusList,
+
+ systemInfo,
+ updateSystemInfo,
}
})
diff --git a/src/types/Index/Settings.ts b/src/types/Index/Settings.ts
index e6e56ca..b133627 100644
--- a/src/types/Index/Settings.ts
+++ b/src/types/Index/Settings.ts
@@ -26,3 +26,11 @@ export interface ResponseData {
timestamp: number
success: boolean
}
+
+
+export interface McuVersionInfo {
+ boardName: string
+ mid: string
+ version: string
+ versionCode: string
+}
\ No newline at end of file
diff --git a/src/types/Index/System.ts b/src/types/Index/System.ts
new file mode 100644
index 0000000..a8c7366
--- /dev/null
+++ b/src/types/Index/System.ts
@@ -0,0 +1,11 @@
+export interface SystemInfo {
+ language: string
+ autoPrint: boolean
+ autoLogout: boolean
+ autoLogoutTimeout: number
+ allTemperature: number | undefined
+ incubateBoxTemperature: number
+ plateBoxTemperature: number
+ DHCP: boolean
+ localIp: string
+}
diff --git a/src/utils/getServerInfo.ts b/src/utils/getServerInfo.ts
index 96bd3d6..c44bfb7 100644
--- a/src/utils/getServerInfo.ts
+++ b/src/utils/getServerInfo.ts
@@ -5,15 +5,15 @@ export function getServerInfo(wsPath: string = '/api/v1/app/ws/state') {
// 获取主机名(IP 或域名)和端口号
// const host = url.hostname // 例如: "192.168.1.100" 或 "localhost"
- const host = window.location.hostname;
+ // const host = window.location.hostname;
// const host = window.location.host;
- // const host = "192.168.8.175";
+ const host = "127.0.0.1";
// const port = '8082' // 使用固定的后端端口;由于本地开发时,8080被占用导致ws连接失败,所以使用8082
const port = "80"
// 构建 WebSocket URL
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
- // const wsUrl = `${wsProtocol}//${host}:${port}${wsPath}`
- const wsUrl = `${wsProtocol}//${host}${wsPath}`
+ const wsUrl = `${wsProtocol}//${host}:${port}${wsPath}`
+ // const wsUrl = `${wsProtocol}//${host}${wsPath}`
// 构建 HTTP URL
const httpUrl = `${window.location.protocol}//${host}:${port}` // 例如: "http://192.168.1.100:8082" 或 "http://localhost:8082"
diff --git a/src/websocket/socket.ts b/src/websocket/socket.ts
index 73fa2b9..5aa5672 100644
--- a/src/websocket/socket.ts
+++ b/src/websocket/socket.ts
@@ -255,6 +255,7 @@ interface TubeHolderStateMessage extends BaseMessage {
projIds: number[]
state: RunningTubeState
errors: string[]
+ erroInfo: string
}>
state: string
}