Commit a778a386c72cc2b8f08a37b4766c9c6e22cf6588

Authored by loveumiko
1 parent 395714dd

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

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