diff --git a/publish.ps1 b/publish.ps1 index 3dde00a..8435f5e 100644 --- a/publish.ps1 +++ b/publish.ps1 @@ -1,20 +1,32 @@ -# build project -yarn build -# rename dist to current time, like 20221215121300 -$now = Get-Date -Format "yyyyMMddHHmmss" -Rename-Item -Path ./dist -NewName $now -# compress dist to app.zip -Compress-Archive -Path ./$now -DestinationPath ./app.zip -Force -# upload app.zip to server -scp app.zip root@192.168.8.12:/frontend/ -# unzip app.zip -ssh root:zwsd@192.168.8.12 "cd /frontend && unzip app.zip" -# remove old link -ssh root:zwsd@192.168.8.12 "cd /frontend && rm -f dist" -# create link -ssh root:zwsd@192.168.8.12 "cd /frontend && ln -s /frontend/$now /frontend/dist" -# remove app.zip -ssh root:zwsd@192.168.8.12 "cd /frontend && rm -f app.zip" -Remove-Item -Path ./app.zip -# remove folder -Remove-Item -Path ./$now -Recurse +Param( + [String]$Exec="Deplay" +) + +if ( $Exec -eq "DevDisable" ) { + ssh root:zwsd@192.168.8.12 "rm /var/zapp_flag/chrome_in_test_mode"; + ssh root:zwsd@192.168.8.12 "reboot" +} elseif ( $Exec -eq "DevEnable" ) { + ssh root:zwsd@192.168.8.12 "touch /var/zapp_flag/chrome_in_test_mode"; + ssh root:zwsd@192.168.8.12 "reboot" +} elseif ( $Exec -eq "Deplay" ) { + # build project + yarn build + # rename dist to current time, like 20221215121300 + $now = Get-Date -Format "yyyyMMddHHmmss" + Rename-Item -Path ./dist -NewName $now + # compress dist to app.zip + Compress-Archive -Path ./$now -DestinationPath ./app.zip -Force + # upload app.zip to server + scp app.zip root@192.168.8.12:/frontend/ + # unzip app.zip + ssh root:zwsd@192.168.8.12 "cd /frontend && unzip app.zip" + # remove old link + ssh root:zwsd@192.168.8.12 "cd /frontend && rm -f dist" + # create link + ssh root:zwsd@192.168.8.12 "cd /frontend && ln -s /frontend/$now /frontend/dist" + # remove app.zip + ssh root:zwsd@192.168.8.12 "cd /frontend && rm -f app.zip" + Remove-Item -Path ./app.zip + # remove folder + Remove-Item -Path ./$now -Recurse +} diff --git a/src/components/SealTest.vue b/src/components/SealTest.vue index 9996247..151b9c5 100644 --- a/src/components/SealTest.vue +++ b/src/components/SealTest.vue @@ -405,7 +405,7 @@ onMounted(() => { valueAnimation: true, fontSize: 40, color: '#3442aa', - formatter: '{value} Pa', + formatter: '{value} kp', offsetCenter: [0, '70%'], }, data: [ diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue index dbc76ce..804d348 100644 --- a/src/components/Setting/components/Device.vue +++ b/src/components/Setting/components/Device.vue @@ -238,6 +238,7 @@ import { setSettingValJSON, changeDisinfectionParameterJSON, updateSettingInRunInfectionJSON, + getAllSettingJSON, } from '@/mock/command' @@ -812,45 +813,8 @@ async function actionDefaultSetting() { } if ( !props.runInfection ) { - // 注射蠕动泵速率(g/min) - settingStore.changeSprayLiquidConfigVal(0); - await webSocketStore.call('setSettingVal',{settingName:'injection_pump_speed', settingVal:0}); - - // 消毒停止过氧化氢浓度(ppm) - settingStore.updateStopedGs(0); - await webSocketStore.call('setSettingVal',{settingName:'stoped_gs', settingVal:0}); - - // 消毒继续过氧化氢浓度(ppm) - settingStore.updateContinuedGs(0); - await webSocketStore.call('setSettingVal',{settingName:'continued_gs', settingVal:0}); - - // 消毒停止相对湿度(%RH) - settingStore.updateStopedHumi(0); - await webSocketStore.call('setSettingVal',{settingName:'stoped_humi', settingVal:0}); - - // 消毒继续相对湿度(%RH) - settingStore.updateContinuedHumi(0); - await webSocketStore.call('setSettingVal',{settingName:'continued_humi', settingVal:0}); - - // 消毒停止过氧化氢相对饱和度(%RS) - settingStore.updateStopedSatur(0); - await webSocketStore.call('setSettingVal',{settingName:'stoped_satur', settingVal:0}); - - // 消毒继续过氧化氢相对饱和度(%RS) - settingStore.updateContinuedSatur(0); - await webSocketStore.call('setSettingVal',{settingName:'continued_satur', settingVal:0}); - - // 正负压默认开合比例 - settingStore.updateProportionalValveDefaultValue(0); - await webSocketStore.call('setSettingVal',{settingName:'proportional_valve_default_value', settingVal:0}); - - // 允许消毒最大湿度(%RH) - settingStore.updateMaxHumidity(0); - await webSocketStore.call('setSettingVal',{settingName:'max_humidity', settingVal:0}); - - // 预热时间(s) - settingStore.updatePre_heat_time_s(0); - await webSocketStore.call('setSettingVal',{settingName:'pre_heat_time_s', settingVal:0}); + await webSocketStore.call('factoryResetSettings'); + webSocketStore.sendCommandMsg(getAllSettingJSON); } showSuccessToast('设置成功') }