From 1c1dc56be93441e39da19d8de2e65ebb7f6704c2 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期一, 09 十二月 2024 23:06:54 +0800 Subject: [PATCH] ll --- h5/pages/operation/device.vue | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/h5/pages/operation/device.vue b/h5/pages/operation/device.vue index d9b13df..b9a4c5f 100644 --- a/h5/pages/operation/device.vue +++ b/h5/pages/operation/device.vue @@ -6,7 +6,7 @@ <view class="line"> <view class="sel_wrap" @click="showModal = true"> <view class="left" :class="(param.deviceName || param.deviceCode) ? '' : 'placeholder9'"> - {{ (param.deviceName || param.deviceCode) ? `[${param.deviceCode}] ` + param.deviceName : '璇烽�夋嫨璁惧' }} + {{ (param.deviceName || param.deviceCode) ? param.deviceName ? `[${param.deviceCode}] ` + param.deviceName : `[${param.deviceCode}]` : '璇烽�夋嫨璁惧' }} </view> <u-icon name="arrow-right" color="#999999" size="17"></u-icon> </view> @@ -118,6 +118,25 @@ } = this if (!param.deviceId) return this.showToast('璇峰厛閫夋嫨瑕佺淮鎶ょ殑璁惧') + if (param.status != 0) { + uni.showModal({ + title: '娓╅Θ鎻愮ず', + content: '璁惧杩愮淮缁撴灉寮傚父锛屾槸鍚﹀墠寰�鎻愪氦宸ュ崟?', + success: function(res) { + if (res.confirm) { + this.handleP() + } else if (res.cancel) {} + } + }); + }else{ + this.handleP() + } + }, + handleP() { + const { + param, + fileList + } = this ywDeviceCreate({ ...param, userId: uni.getStorageSync('userInfo').id, @@ -144,7 +163,7 @@ activeDevice } = this if (!activeDevice.id) return this.showToast('璇峰厛閫夋嫨璁惧') - this.$set(this.param, 'deviceId', activeDevice.id) + this.$set(this.param, 'deviceId', activeDevice.id) this.$set(this.param, 'deviceCode', activeDevice.code) this.$set(this.param, 'deviceName', activeDevice.name) this.showModal = false @@ -413,7 +432,7 @@ // bottom: 68rpx; // left: 40rpx; width: 670rpx; - height: 88rpx; + height: 88rpx; margin-top: 80rpx; background: $primaryColor; box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3); @@ -458,8 +477,9 @@ } .modal_list { - height: calc(100% - 360rpx); + height: calc(100% - 360rpx); margin-bottom: -20rpx; + .item { display: flex; align-items: center; -- Gitblit v1.9.3