From e491cdb48129752324c4e3764f99bd9203c56dec Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期二, 31 三月 2026 09:48:44 +0800
Subject: [PATCH] 1.新增VF205门禁机代码
---
vf205_access/src/view/config/menu/deviceInfoView.js | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 110 insertions(+), 0 deletions(-)
diff --git a/vf205_access/src/view/config/menu/deviceInfoView.js b/vf205_access/src/view/config/menu/deviceInfoView.js
new file mode 100644
index 0000000..cfe5b67
--- /dev/null
+++ b/vf205_access/src/view/config/menu/deviceInfoView.js
@@ -0,0 +1,110 @@
+import dxui from '../../../../dxmodules/dxUi.js'
+import viewUtils from "../../viewUtils.js"
+import topView from "../../topView.js"
+import configView from '../configView.js'
+import systemInfoView from './deviceInfo/systemInfoView.js'
+import dataCapacityInfoView from './deviceInfo/dataCapacityInfoView.js'
+import i18n from "../../i18n.js"
+import screen from '../../../screen.js'
+
+const deviceInfoView = {}
+deviceInfoView.init = function () {
+ /**************************************************鍒涘缓灞忓箷*****************************************************/
+ const screenMain = dxui.View.build('deviceInfoView', dxui.Utils.LAYER.MAIN)
+ deviceInfoView.screenMain = screenMain
+ screenMain.scroll(false)
+ screenMain.bgColor(0xffffff)
+ screenMain.on(dxui.Utils.ENUM.LV_EVENT_SCREEN_LOADED, () => {
+ topView.changeTheme(true)
+ let config = screen.getConfig()
+ dxui.Utils.GG.NativeBasicComponent.lvQrcodeUpdate(deviceInfoView.sysInfo[2].qrcodeObj, config["sys.sn"])
+ })
+
+ const titleBox = viewUtils.title(screenMain, configView.screenMain, 'deviceInfoViewTitle', 'deviceInfoView.title')
+ titleBox.align(dxui.Utils.ALIGN.TOP_MID, 0, 70)
+
+ deviceInfoView.sysInfo = [
+ {
+ title: 'deviceInfoView.systemInfo',
+ type: 'menu',
+ view: systemInfoView,
+ obj: null,
+ },
+ {
+ title: 'deviceInfoView.dataCapacityInfo',
+ type: 'menu',
+ view: dataCapacityInfoView,
+ obj: null,
+ },
+ {
+ title: 'deviceInfoView.deviceQrCode',
+ value: '123',
+ type: 'qrcode',
+ obj: null,
+ },
+ ]
+
+
+ const deviceInfoBox = dxui.View.build('deviceInfoBox', screenMain)
+ viewUtils._clearStyle(deviceInfoBox)
+ deviceInfoBox.setSize(screen.screenSize.width, screen.screenSize.height - 140)
+ deviceInfoBox.align(dxui.Utils.ALIGN.TOP_MID, 0, 140)
+ deviceInfoBox.bgColor(0xf7f7f7)
+ deviceInfoBox.flexFlow(dxui.Utils.FLEX_FLOW.ROW_WRAP)
+ deviceInfoBox.flexAlign(dxui.Utils.FLEX_ALIGN.CENTER, dxui.Utils.FLEX_ALIGN.START, dxui.Utils.FLEX_ALIGN.START)
+ deviceInfoBox.obj.lvObjSetStylePadGap(10, dxui.Utils.ENUM._LV_STYLE_STATE_CMP_SAME)
+ deviceInfoBox.padTop(10)
+ deviceInfoBox.padBottom(10)
+
+ deviceInfoView.sysInfo.forEach(item => {
+ item.obj = dxui.View.build(item.title, deviceInfoBox)
+ viewUtils._clearStyle(item.obj)
+ item.obj.setSize(760, 76)
+ item.obj.bgColor(0xffffff)
+ item.obj.radius(10)
+ item.obj.on(dxui.Utils.ENUM.LV_EVENT_PRESSED, () => {
+ item.obj.bgColor(0xEAEAEA)
+ })
+ item.obj.on(dxui.Utils.ENUM.LV_EVENT_RELEASED, () => {
+ item.obj.bgColor(0xffffff)
+ })
+
+ const titleLbl = dxui.Label.build(item.title + 'Label', item.obj)
+ titleLbl.dataI18n = item.title
+ titleLbl.align(dxui.Utils.ALIGN.LEFT_MID, 20, 0)
+ titleLbl.textFont(viewUtils.font(26))
+
+ switch (item.type) {
+ case 'menu':
+ const image = dxui.Image.build(item.title + 'Image', item.obj)
+ image.align(dxui.Utils.ALIGN.RIGHT_MID, -15, 0)
+ image.source('/app/code/resource/image/right.png')
+ item.obj.on(dxui.Utils.EVENT.CLICK, () => {
+ dxui.loadMain(item.view.screenMain)
+ })
+ break
+ case 'qrcode':
+ item.obj.height(350)
+ if (item.title == "deviceInfoView.miniProgramCode") {
+ const qrcodeImage = dxui.Image.build(item.title + 'qrcodeImage', item.obj)
+ deviceInfoView.qrcodeImage = qrcodeImage
+ qrcodeImage.source('/app/code/resource/image/app_qrcode.png')
+ qrcodeImage.obj.lvImgSetZoom(256 * 0.6)
+ qrcodeImage.obj.lvImgSetSizeMode(dxui.Utils.ENUM.LV_IMG_SIZE_MODE_REAL)
+ qrcodeImage.align(dxui.Utils.ALIGN.RIGHT_MID, -20, 0)
+ } else {
+ const qrcodeBox = dxui.View.build(item.title + 'QrCode', item.obj)
+ viewUtils._clearStyle(qrcodeBox)
+ qrcodeBox.setSize(220, 220)
+ qrcodeBox.align(dxui.Utils.ALIGN.RIGHT_MID, -20, 0)
+ const qrcodeObj = dxui.Utils.GG.NativeBasicComponent.lvQrcodeCreate(qrcodeBox.obj, 220, 0x000000, 0xffffff)
+ dxui.Utils.GG.NativeBasicComponent.lvQrcodeUpdate(qrcodeObj, item.value)
+ item.qrcodeObj = qrcodeObj
+ }
+ break
+ }
+ })
+
+}
+
+export default deviceInfoView
--
Gitblit v1.9.3