Commit 0ec49a0a2864f16ea76a1827be35225f39da103f

Authored by xp.Huang
2 parents cfc9d9f2 04e5a2bb

Merge branch 'perf/report' into 'main_dev'

perf: 优化报表配置选择设备,超出数量提示信息

See merge request yunteng/thingskit-front!1310
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
25 import SelectAttributes from './SelectAttributes.vue'; 25 import SelectAttributes from './SelectAttributes.vue';
26 import { TDeviceList, TSelectOption } from '../type'; 26 import { TDeviceList, TSelectOption } from '../type';
27 import { createPickerSearch } from '/@/utils/pickerSearch'; 27 import { createPickerSearch } from '/@/utils/pickerSearch';
  28 + import { useMessage } from '/@/hooks/web/useMessage';
28 29
29 const props = defineProps({ 30 const props = defineProps({
30 selectOptions: { 31 selectOptions: {
@@ -37,6 +38,8 @@ @@ -37,6 +38,8 @@
37 }, 38 },
38 }); 39 });
39 40
  41 + const { createMessage } = useMessage();
  42 +
40 const selectValue = ref([]); 43 const selectValue = ref([]);
41 44
42 const bindDeviceRef = { 45 const bindDeviceRef = {
@@ -52,7 +55,7 @@ @@ -52,7 +55,7 @@
52 }; 55 };
53 56
54 const handleDeviceChange = (_, options) => { 57 const handleDeviceChange = (_, options) => {
55 - if (options.length > selectDeviceMaxCount.value) return; 58 + if (options.length > selectDeviceMaxCount.value) return createMessage.warn('最大限制选择5个');
56 deviceList.value = options; 59 deviceList.value = options;
57 }; 60 };
58 61