diff --git a/src/pages/Index/Regular/Emergency.vue b/src/pages/Index/Regular/Emergency.vue
index 248c751..5320845 100644
--- a/src/pages/Index/Regular/Emergency.vue
+++ b/src/pages/Index/Regular/Emergency.vue
@@ -18,6 +18,7 @@
@focus="showKeyboard('sampleBarcode')"
style="width: 400px"
:value="emergencyPosition.sampleBarcode"
+ readonly
/>
diff --git a/src/pages/Index/Settings/Device.vue b/src/pages/Index/Settings/Device.vue
index f9b0710..c071a3c 100644
--- a/src/pages/Index/Settings/Device.vue
+++ b/src/pages/Index/Settings/Device.vue
@@ -5,91 +5,186 @@
{{ formattedDate }}
+
+
-
日期格式
+
语言
-
-
-
时间
-
{{ time }}
+
孵育温度
+
+
+ {{ t }}
+
+
-
-
语言
+
DHCP
-
- {{ lang.label }}
+
+ 开启
+
+
+ 关闭
+
+
+
+
-
-
-
注销时间
+
自动登出
-
+
+ 开启
+
+
+ 关闭
+
+
+
+
+
登出时间
+
+
{{ time.label }}
+
+
+
+
+
+
@@ -218,11 +339,6 @@ onMounted(async () => {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
- &:hover {
- transform: translateY(-2px);
- box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
- }
-
.label {
font-size: 28px;
font-weight: 500;
@@ -233,6 +349,14 @@ onMounted(async () => {
font-size: 28px;
color: #606266;
}
+ input {
+ padding: 8px;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ font-size: 30px;
+ transition: box-shadow 0.2s ease;
+ border-radius: 10px;
+ }
.options {
display: flex;
@@ -254,72 +378,35 @@ onMounted(async () => {
align-items: center;
justify-content: center;
- &:hover {
- color: #409eff;
- border-color: #c6e2ff;
- background-color: #ecf5ff;
- }
-
&.active {
color: #fff;
background-color: #409eff;
border-color: #409eff;
box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
-
- &:hover {
- background-color: #66b1ff;
- border-color: #66b1ff;
- }
}
}
}
-
- // 针对日期格式按钮的特殊样式
- &:nth-child(2) {
- .options button {
- min-width: 160px;
- font-family: monospace;
- letter-spacing: 1px;
- }
- }
-
- // 针对语言按钮的特殊样式
- &:nth-child(4) {
- .options button {
- min-width: 140px;
- }
- }
-
- // 针对打印按钮的特殊样式
- &:nth-child(5) {
- .options button {
- min-width: 100px;
- }
- }
-
- // 针对注销时间按钮的特殊样式
- &:nth-child(6) {
- .options button {
- min-width: 100px;
- font-family: monospace;
- }
- }
}
}
-
-// 添加响应式设计
-@media screen and (max-width: 768px) {
- .device-management {
- .setting-item {
- flex-direction: column;
- align-items: flex-start;
- gap: 16px;
-
- .options {
- width: 100%;
- justify-content: flex-start;
- }
- }
+.keyboard {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 300px;
+ background-color: #f5f7fa;
+ border-top-left-radius: 16px;
+ border-top-right-radius: 16px;
+ box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
+ z-index: 1000;
+ }
+ // 键盘动画
+ .slide-up-enter-active,
+ .slide-up-leave-active {
+ transition: transform 0.3s ease;
+ }
+ .slide-up-enter-from,
+ .slide-up-leave-to {
+ transform: translateY(100%);
}
-}
diff --git a/src/pages/Index/Settings/Lis.vue b/src/pages/Index/Settings/Lis.vue
index 40c4c48..db01465 100644
--- a/src/pages/Index/Settings/Lis.vue
+++ b/src/pages/Index/Settings/Lis.vue
@@ -53,8 +53,14 @@
>
Host's IP
-
- 设置
+
+ 设置
+
+
+
+
+
+
diff --git a/src/services/Index/settings/settings.ts b/src/services/Index/settings/settings.ts
index efaab6a..a655db1 100644
--- a/src/services/Index/settings/settings.ts
+++ b/src/services/Index/settings/settings.ts
@@ -25,6 +25,40 @@ export const setLanguage = async (language: 'zh_CN' | 'en_US') => {
}
}
+export const setDHCP = async (enable: boolean) => {
+ try {
+ const res = await apiClient.post(
+ `/api/v1/app/DeviceSetting/setDHCCP?val=${enable}`,
+ )
+ return res.data
+ } catch (error) {
+ console.log('修改DHCP出错', error)
+ }
+}
+
+// data : number[]
+export const getTemperatureRange = async () => {
+ try {
+ const res = await apiClient.post(
+ `/api/v1/app/DeviceSetting/getTemperatureAvailableRange`,
+ )
+ return res.data
+ } catch (error) {
+ console.log('修改DHCP出错', error)
+ }
+}
+
+export const setLocalIP = async (ip: string) => {
+ try {
+ const res = await apiClient.post(
+ `/api/v1/app/DeviceSetting/setLocalIp?val=${ip}`,
+ )
+ return res.data
+ } catch (error) {
+ console.log('修改localIP出错', error)
+ }
+}
+
// 设置自动打印报告
export const setAutoPrint = async (data: any) => {
try {
@@ -38,7 +72,7 @@ export const setAutoPrint = async (data: any) => {
}
// 设置自动登出
-export const setAutoLogout = async (data: any) => {
+export const setAutoLogout = async (data: boolean) => {
try {
const res = await apiClient.post(
`/api/v1/app/DeviceSetting/setAutoLogout?val=${data}`,
@@ -48,6 +82,16 @@ export const setAutoLogout = async (data: any) => {
console.log('设置自动登出出错', error)
}
}
+export const setAutoLogoutTime = async (data: number) => {
+ try {
+ const res = await apiClient.post(
+ `/api/v1/app/DeviceSetting/setAutoLogoutTimeout?val=${data}`,
+ )
+ return res.data
+ } catch (error) {
+ console.log('设置自动登出出错', error)
+ }
+}
//获取系统设置
export const getSystemSettings = async () => {