From 69b227ec7fc7dfb6fa4b7453020cbcd7ecd4099a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=A4=AA=E9=98=B3?= <5388403+zhaotaiyang@user.noreply.gitee.com> Date: Wed, 8 Apr 2026 23:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E8=AE=BE=E5=A4=87=E5=9E=8B=E5=8F=B7=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B8=8B=E6=8B=89=E6=A1=86=EF=BC=8C=E5=B9=B6=E4=B8=94?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=9A=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- package_a/device/device.vue | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 1729a0c..afd0a1b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "海驰24", - "appid" : "__UNI__C30329B", + "appid" : "__UNI__F8B45C3", "description" : "111", "versionName" : "1.2.6", "versionCode" : 106, diff --git a/package_a/device/device.vue b/package_a/device/device.vue index 3d9eb0a..c8ee2a5 100644 --- a/package_a/device/device.vue +++ b/package_a/device/device.vue @@ -17,7 +17,7 @@ 设备型号: - {{ item.deviceModel || '-' }} + {{ getDeviceModelLabel(item.deviceModel) || '-' }} @@ -62,7 +62,14 @@ 设备型号 - + + {{ modelIndex !== -1 ? deviceModels[modelIndex].label : '请选择设备型号' }} + + + + + 通道 + @@ -101,12 +108,19 @@ export default { ], typeIndex: -1, + deviceModels: [ + { label: '单机(IPC)', value: '1' }, + { label: '主机(NVR)', value: '2' } + ], + modelIndex: -1, + form: { deviceCode: '', deviceName: '', deviceType: '', deviceBrand: '', deviceModel: '', + channel: '', remark: '' } } @@ -129,6 +143,11 @@ export default { goBack() { uni.navigateBack(); }, + getDeviceModelLabel(modelValue) { + if (!modelValue && modelValue !== 0) return ''; + const match = this.deviceModels.find(m => m.value == modelValue); + return match ? match.label : modelValue; + }, fetchDeviceList() { this.loading = true; getDeviceList(this.storeId).then(res => { @@ -158,9 +177,11 @@ export default { deviceType: '', deviceBrand: '', deviceModel: '', + channel: '', remark: '' }; this.typeIndex = -1; + this.modelIndex = -1; this.$refs.addPopup.open(); }, closeAddDialog() { @@ -170,6 +191,10 @@ export default { this.typeIndex = e.detail.value; this.form.deviceType = this.deviceTypes[this.typeIndex].value; }, + onModelChange(e) { + this.modelIndex = e.detail.value; + this.form.deviceModel = this.deviceModels[this.modelIndex].value; + }, submitAdd() { if (!this.form.deviceCode) { return uni.showToast({ title: '请输入设备编号', icon: 'none' });