diff --git a/src/assets/img/icon/exclamation-cricle-red-fill.svg b/src/assets/img/icon/exclamation-cricle-red-fill.svg
new file mode 100644
index 0000000..62fc034
--- /dev/null
+++ b/src/assets/img/icon/exclamation-cricle-red-fill.svg
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/src/components/MyModal.vue b/src/components/MyModal.vue
new file mode 100644
index 0000000..6fec489
--- /dev/null
+++ b/src/components/MyModal.vue
@@ -0,0 +1,133 @@
+
+
+
+
+

+
+
+
+
+
+
+ {{ props.content }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue
index 2d6e43a..174eb2c 100644
--- a/src/components/Setting/components/Device.vue
+++ b/src/components/Setting/components/Device.vue
@@ -107,6 +107,12 @@
>
+
@@ -119,10 +125,15 @@ import Down from '@/assets/img/arrow/down.png'
import Top from '@/assets/img/arrow/top.png'
import {
setSettingValJSON,
+ getAllSettingJSON,
changeDisinfectionParameterJSON,
updateSettingInRunInfectionJSON,
} from '@/mock/command'
+
+import MyModal from '../../../utils/MyModal'
+
+
const topContainer = () => {
const ele = document.getElementById('set_device_container')
ele.scrollTop = ele.scrollTop - 100 < 100 ? 0 : ele.scrollTop - 100
@@ -681,6 +692,20 @@ const setSprayLiquidVal = () => {
}
showSuccessToast('设置成功')
}
+
+// 恢复到默认设置
+async function actionDefaultSetting() {
+ let isConfirmed = await MyModal.confirm('是否恢复到默认设置?');
+ if (!isConfirmed) {
+ return;
+ }
+
+ if ( !props.runInfection ) {
+ await webSocketStore.call('factoryResetSettings');
+ webSocketStore.sendCommandMsg(getAllSettingJSON);
+ }
+ showSuccessToast('设置成功')
+}