Showing
3 changed files
with
26 additions
and
7 deletions
@@ -7,7 +7,7 @@ import { | @@ -7,7 +7,7 @@ import { | ||
7 | } from '../DetailModal/config'; | 7 | } from '../DetailModal/config'; |
8 | import { TaskStatusEnum, TaskTargetEnum, TaskTargetNameEnum } from '../../config'; | 8 | import { TaskStatusEnum, TaskTargetEnum, TaskTargetNameEnum } from '../../config'; |
9 | import { h } from 'vue'; | 9 | import { h } from 'vue'; |
10 | -import { Tag, Textarea } from 'ant-design-vue'; | 10 | +import { Tag, Input } from 'ant-design-vue'; |
11 | import { TaskStatusNameEnum } from '../../config'; | 11 | import { TaskStatusNameEnum } from '../../config'; |
12 | import { TaskRecordType } from '/@/api/task/model'; | 12 | import { TaskRecordType } from '/@/api/task/model'; |
13 | import { TaskTypeNameEnum } from '../../config'; | 13 | import { TaskTypeNameEnum } from '../../config'; |
@@ -105,7 +105,12 @@ export const schemas: DescItem[] = [ | @@ -105,7 +105,12 @@ export const schemas: DescItem[] = [ | ||
105 | field: 'rpcCommand', | 105 | field: 'rpcCommand', |
106 | label: '命令内容', | 106 | label: '命令内容', |
107 | render(_val: any, data: TaskRecordType) { | 107 | render(_val: any, data: TaskRecordType) { |
108 | - return h(Textarea, { value: data.executeContent.pushContent.rpcCommand } as Recordable); | 108 | + const value = data.executeContent.pushContent.rpcCommand; |
109 | + return h(Input.TextArea, { | ||
110 | + value: typeof value == 'object' ? JSON.stringify(value) : value, | ||
111 | + autoSize: true, | ||
112 | + style: { border: 'none', padding: 0 }, | ||
113 | + } as Recordable); | ||
109 | }, | 114 | }, |
110 | }, | 115 | }, |
111 | { | 116 | { |
@@ -275,15 +275,12 @@ | @@ -275,15 +275,12 @@ | ||
275 | const { getNumberValue } = useReceiveValue(); | 275 | const { getNumberValue } = useReceiveValue(); |
276 | const updateFn: MultipleDataFetchUpdateFn = (message, deviceId, attribute) => { | 276 | const updateFn: MultipleDataFetchUpdateFn = (message, deviceId, attribute) => { |
277 | forEachGroupMessage(message, deviceId, attribute, (attribute, value) => { | 277 | forEachGroupMessage(message, deviceId, attribute, (attribute, value) => { |
278 | - console.log(value, 'value'); | ||
279 | series.value.forEach((item) => { | 278 | series.value.forEach((item) => { |
280 | if (item.id === deviceId && item.attribute === attribute) { | 279 | if (item.id === deviceId && item.attribute === attribute) { |
281 | item.value = getNumberValue(value); | 280 | item.value = getNumberValue(value); |
282 | } | 281 | } |
283 | }); | 282 | }); |
284 | - console.log(value); | ||
285 | }); | 283 | }); |
286 | - console.log(series, 'series'); | ||
287 | unref(chartInstance)?.setOption({ | 284 | unref(chartInstance)?.setOption({ |
288 | series: [{ data: unref(series), pointer: { show: false } }], | 285 | series: [{ data: unref(series), pointer: { show: false } }], |
289 | color: unref(series).map((item) => item.title.color), | 286 | color: unref(series).map((item) => item.title.color), |
@@ -33,8 +33,8 @@ | @@ -33,8 +33,8 @@ | ||
33 | const defaultValue: PercentType[] = [ | 33 | const defaultValue: PercentType[] = [ |
34 | { | 34 | { |
35 | value: 20, | 35 | value: 20, |
36 | - fontColor: '#19eff', | ||
37 | - backgroundColor: '#19eff', | 36 | + fontColor: '#377dff', |
37 | + backgroundColor: '#377dff', | ||
38 | unit: '℃', | 38 | unit: '℃', |
39 | deviceName: '温度', | 39 | deviceName: '温度', |
40 | attribute: '1', | 40 | attribute: '1', |
@@ -122,6 +122,13 @@ | @@ -122,6 +122,13 @@ | ||
122 | </div> | 122 | </div> |
123 | <div> | 123 | <div> |
124 | <Progress :strokeColor="item.backgroundColor" :percent="item.value" :showInfo="false" /> | 124 | <Progress :strokeColor="item.backgroundColor" :percent="item.value" :showInfo="false" /> |
125 | + <!-- <Slider | ||
126 | + :style="{ '--slider-color': item.backgroundColor }" | ||
127 | + v-model:value="item.value" | ||
128 | + :disabled="true" | ||
129 | + :min="0" | ||
130 | + :max="index == 0 ? 100 : 1000" | ||
131 | + /> --> | ||
125 | </div> | 132 | </div> |
126 | </div> | 133 | </div> |
127 | </main> | 134 | </main> |
@@ -130,4 +137,14 @@ | @@ -130,4 +137,14 @@ | ||
130 | // :deep(.ant-progress-success-bg, .ant-progress-bg) { | 137 | // :deep(.ant-progress-success-bg, .ant-progress-bg) { |
131 | // background: '#2196F3' !important; | 138 | // background: '#2196F3' !important; |
132 | // } | 139 | // } |
140 | + // :deep(.ant-slider-handle) { | ||
141 | + // all: unset; | ||
142 | + // } | ||
143 | + // :deep(.ant-slider-track) { | ||
144 | + // background: var(--slider-color) !important; | ||
145 | + // height: 8px; | ||
146 | + // } | ||
147 | + // :deep(.ant-slider-rail) { | ||
148 | + // height: 8px; | ||
149 | + // } | ||
133 | </style> | 150 | </style> |