Commit a778a386c72cc2b8f08a37b4766c9c6e22cf6588

Authored by loveumiko
1 parent 395714dd

fix: 修改看板组件添加是否显示时间选项

@@ -44,7 +44,6 @@ @@ -44,7 +44,6 @@
44 ]); 44 ]);
45 45
46 const getDesign = computed(() => { 46 const getDesign = computed(() => {
47 - console.log(props.config.option, 'option');  
48 const { persetOption = {}, option } = props.config; 47 const { persetOption = {}, option } = props.config;
49 const { dataSource = [] } = option || {}; 48 const { dataSource = [] } = option || {};
50 const { 49 const {
@@ -75,7 +74,6 @@ @@ -75,7 +74,6 @@
75 74
76 const { loading, sendCommand } = useSendCommand(); 75 const { loading, sendCommand } = useSendCommand();
77 const handleChange = async (index: number, checked: Boolean) => { 76 const handleChange = async (index: number, checked: Boolean) => {
78 - console.log(props.config.option);  
79 const { heightPx, itemHeightRatio, itemWidthRatio, mode, widthPx, dataSource } = 77 const { heightPx, itemHeightRatio, itemWidthRatio, mode, widthPx, dataSource } =
80 props.config.option; 78 props.config.option;
81 79
@@ -87,7 +85,6 @@ @@ -87,7 +85,6 @@
87 mode, 85 mode,
88 widthPx, 86 widthPx,
89 } as DataSource; 87 } as DataSource;
90 - console.log(data, 'data', checked);  
91 88
92 const flag = await sendCommand(data, checked); 89 const flag = await sendCommand(data, checked);
93 if (!flag) controlList.value[index].checked = !checked; 90 if (!flag) controlList.value[index].checked = !checked;
@@ -105,10 +102,7 @@ @@ -105,10 +102,7 @@
105 ); 102 );
106 103
107 const updateFn: MultipleDataFetchUpdateFn = async (message, deviceId, attribute) => { 104 const updateFn: MultipleDataFetchUpdateFn = async (message, deviceId, attribute) => {
108 - console.log(unref(getDesign).dataSource, 'dataSource');  
109 -  
110 - forEachGroupMessage(message, deviceId, attribute, (attribute, value, time) => {  
111 - console.log(attribute, value, time); 105 + forEachGroupMessage(message, deviceId, attribute, (attribute, value) => {
112 controlList.value.forEach((item) => { 106 controlList.value.forEach((item) => {
113 if (item.id === deviceId && item.attribute === attribute) { 107 if (item.id === deviceId && item.attribute === attribute) {
114 item.checked = Boolean(getNumberValue(value)); 108 item.checked = Boolean(getNumberValue(value));
@@ -91,7 +91,6 @@ @@ -91,7 +91,6 @@
91 return { 91 return {
92 dataSource: dataSource?.map((item) => { 92 dataSource: dataSource?.map((item) => {
93 const { unit, showDeviceName, fontColor } = item.componentInfo || {}; 93 const { unit, showDeviceName, fontColor } = item.componentInfo || {};
94 - console.log(item, 'item');  
95 const { attribute, attributeRename, deviceId, attributeName, deviceName, deviceRename } = 94 const { attribute, attributeRename, deviceId, attributeName, deviceName, deviceRename } =
96 item; 95 item;
97 return { 96 return {
@@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
3 import { ComponentPropsConfigType } from '../../../index.type'; 3 import { ComponentPropsConfigType } from '../../../index.type';
4 import { Progress } from 'ant-design-vue'; 4 import { Progress } from 'ant-design-vue';
5 import { DeviceName } from '/@/views/visual/commonComponents/DeviceName'; 5 import { DeviceName } from '/@/views/visual/commonComponents/DeviceName';
6 - import { UpdateTime } from '/@/views/visual/commonComponents/UpdateTime';  
7 import { useReceiveMessage } from '../../../hook/useReceiveMessage'; 6 import { useReceiveMessage } from '../../../hook/useReceiveMessage';
8 import { buildUUID } from '/@/utils/uuid'; 7 import { buildUUID } from '/@/utils/uuid';
9 import { useReceiveValue } from '../../../hook/useReceiveValue'; 8 import { useReceiveValue } from '../../../hook/useReceiveValue';
@@ -127,7 +126,7 @@ @@ -127,7 +126,7 @@
127 <Progress :strokeColor="item.backgroundColor" :percent="item.value" :showInfo="false" /> 126 <Progress :strokeColor="item.backgroundColor" :percent="item.value" :showInfo="false" />
128 </div> 127 </div>
129 </div> 128 </div>
130 - <UpdateTime :time="time" /> 129 + <!-- <UpdateTime :time="time" /> -->
131 </main> 130 </main>
132 </template> 131 </template>
133 <style lang="less" scoped> 132 <style lang="less" scoped>
@@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
3 import { option } from './config'; 3 import { option } from './config';
4 import { ref, unref } from 'vue'; 4 import { ref, unref } from 'vue';
5 import { SvgIcon } from '/@/components/Icon'; 5 import { SvgIcon } from '/@/components/Icon';
6 - import { UpdateTime } from '/@/views/visual/commonComponents/UpdateTime';  
7 import { computed } from 'vue'; 6 import { computed } from 'vue';
8 import { DeviceName } from '/@/views/visual/commonComponents/DeviceName'; 7 import { DeviceName } from '/@/views/visual/commonComponents/DeviceName';
9 import { useReceiveMessage } from '../../../hook/useReceiveMessage'; 8 import { useReceiveMessage } from '../../../hook/useReceiveMessage';
@@ -118,6 +117,6 @@ @@ -118,6 +117,6 @@
118 <span>{{ item.unit }} </span> 117 <span>{{ item.unit }} </span>
119 </h1> 118 </h1>
120 </div> 119 </div>
121 - <UpdateTime :time="time" /> 120 + <!-- <UpdateTime :time="time" /> -->
122 </main> 121 </main>
123 </template> 122 </template>