From e44ecb571bb2df6390503f4303282e18db5d60ef Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期一, 20 四月 2026 13:43:52 +0800
Subject: [PATCH] 1.修复安全入仓联动控制按钮无权限问题 2.增加安全入仓联动控制配置项,默认不启用 3.修改气体浓度验证选项默认不启用 4.增加门禁web页面源码 Changes to be committed: new file: "face_webserver/ modified: vf107/src/config.json modified: vf107/src/service/grainService.js modified: vf107/src/view/config/menu/doorControlView.js modified: vf107/src/view/mainView.js
---
vf107/src/view/config/menu/doorControlView.js | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/vf107/src/view/config/menu/doorControlView.js b/vf107/src/view/config/menu/doorControlView.js
index 89cb8a7..4cf5e58 100644
--- a/vf107/src/view/config/menu/doorControlView.js
+++ b/vf107/src/view/config/menu/doorControlView.js
@@ -26,6 +26,8 @@
mqttPwdSettingInput.text(configAll['mqtt.password'])
onlineCheckingSettingSwitch.select(configAll['mqtt.onlinecheck'] == 1)
onlineCheckingTimeoutSettingInput.text(configAll['mqtt.timeout'] + '')
+ gasVerificationSwitch.select(configAll['gas.verification'] == 1)
+ safeInputControlSwitch.select(configAll['safeInputControl'] == 1)
})
const titleBox = viewUtils.title(screenMain, configView.screenMain, 'doorControlViewTitle', 'doorControlView.title')
@@ -224,6 +226,43 @@
onlineCheckingTimeoutSettingInput.align(dxui.Utils.ALIGN.RIGHT_MID, -screen.screenSize.width * (60 / 600), 0)
onlineCheckingTimeoutSettingInput.setSize(screen.screenSize.width * (150 / 600), screen.screenSize.height * (60 / 1280))
+ const gasVerificationBox = dxui.View.build('gasVerificationBox', screenMain)
+ viewUtils._clearStyle(gasVerificationBox)
+ gasVerificationBox.align(dxui.Utils.ALIGN.TOP_MID, 0, screen.screenSize.height * (880 / 1280))
+ gasVerificationBox.setSize(screen.screenSize.width * (550 / 600), screen.screenSize.height * (76 / 1280))
+ gasVerificationBox.borderWidth(1)
+ gasVerificationBox.setBorderColor(0xDEDEDE)
+ gasVerificationBox.obj.setStyleBorderSide(dxui.Utils.ENUM.LV_BORDER_SIDE_BOTTOM, 0)
+
+ const gasVerificationLbl = dxui.Label.build('gasVerificationLbl', gasVerificationBox)
+ gasVerificationLbl.text('姘斾綋娴撳害楠岃瘉')
+ gasVerificationLbl.align(dxui.Utils.ALIGN.LEFT_MID, 0, 0)
+ gasVerificationLbl.textFont(viewUtils.font(26))
+
+ const gasVerificationSwitch = dxui.Switch.build('gasVerificationSwitch', gasVerificationBox)
+ gasVerificationSwitch.align(dxui.Utils.ALIGN.RIGHT_MID, 0, 0)
+ gasVerificationSwitch.setSize(screen.screenSize.width * (70 / 600), screen.screenSize.height * (35 / 1280))
+ gasVerificationSwitch.bgColor(0x000000, NativeObject.APP.NativeComponents.NativeEnum.LV_PART_INDICATOR | NativeObject.APP.NativeComponents.NativeEnum.LV_STATE_CHECKED)
+
+ // 瀹夊叏鍏ヤ粨鑱斿姩鎺у埗璁剧疆
+ const safeInputControlBox = dxui.View.build('safeInputControlBox', screenMain)
+ viewUtils._clearStyle(safeInputControlBox)
+ safeInputControlBox.align(dxui.Utils.ALIGN.TOP_MID, 0, screen.screenSize.height * (956 / 1280))
+ safeInputControlBox.setSize(screen.screenSize.width * (550 / 600), screen.screenSize.height * (76 / 1280))
+ safeInputControlBox.borderWidth(1)
+ safeInputControlBox.setBorderColor(0xDEDEDE)
+ safeInputControlBox.obj.setStyleBorderSide(dxui.Utils.ENUM.LV_BORDER_SIDE_BOTTOM, 0)
+
+ const safeInputControlLbl = dxui.Label.build('safeInputControlLbl', safeInputControlBox)
+ safeInputControlLbl.text('瀹夊叏鍏ヤ粨鑱斿姩鎺у埗')
+ safeInputControlLbl.align(dxui.Utils.ALIGN.LEFT_MID, 0, 0)
+ safeInputControlLbl.textFont(viewUtils.font(26))
+
+ const safeInputControlSwitch = dxui.Switch.build('safeInputControlSwitch', safeInputControlBox)
+ safeInputControlSwitch.align(dxui.Utils.ALIGN.RIGHT_MID, 0, 0)
+ safeInputControlSwitch.setSize(screen.screenSize.width * (70 / 600), screen.screenSize.height * (35 / 1280))
+ safeInputControlSwitch.bgColor(0x000000, NativeObject.APP.NativeComponents.NativeEnum.LV_PART_INDICATOR | NativeObject.APP.NativeComponents.NativeEnum.LV_STATE_CHECKED)
+
const saveBtn = viewUtils.bottomBtn(screenMain, screenMain.id + 'saveBtn', 'doorControlView.save', () => {
const saveConfigData = {
access: {
@@ -235,6 +274,10 @@
},
houseName: houseNameSettingInput.text(),
GranaryName: granaryNameSettingInput.text(),
+ gas: {
+ verification: gasVerificationSwitch.isSelect() ? 1 : 0
+ },
+ safeInputControl: safeInputControlSwitch.isSelect() ? 1 : 0,
mqtt: {
addr: mqttSettingInput.text(),
username: mqttUserSettingInput.text(),
--
Gitblit v1.9.3