Commit a37e491a60be010b54b5788e0e08253258d7ef44
Merge branch 'local_devbranch_byft' into 'main_dev'
fix: 修改报表配置设备数限制5个 See merge request yunteng/thingskit-front!1080
Showing
1 changed file
with
3 additions
and
0 deletions
@@ -45,11 +45,14 @@ | @@ -45,11 +45,14 @@ | ||
45 | 45 | ||
46 | const deviceList: Ref<TDeviceList[]> = ref([]); | 46 | const deviceList: Ref<TDeviceList[]> = ref([]); |
47 | 47 | ||
48 | + const selectDeviceMaxCount = ref(5); // 限制设备数为5 | ||
49 | + | ||
48 | const getSelectAttributes = () => { | 50 | const getSelectAttributes = () => { |
49 | return unref(bindDeviceRef.deviceAttrRef)?.map((item: any) => item.emitChange()); | 51 | return unref(bindDeviceRef.deviceAttrRef)?.map((item: any) => item.emitChange()); |
50 | }; | 52 | }; |
51 | 53 | ||
52 | const handleDeviceChange = (_, options) => { | 54 | const handleDeviceChange = (_, options) => { |
55 | + if (options.length > selectDeviceMaxCount.value) return; | ||
53 | deviceList.value = options; | 56 | deviceList.value = options; |
54 | }; | 57 | }; |
55 | 58 |