Showing
3 changed files
with
26 additions
and
7 deletions
| ... | ... | @@ -7,7 +7,7 @@ import { |
| 7 | 7 | } from '../DetailModal/config'; |
| 8 | 8 | import { TaskStatusEnum, TaskTargetEnum, TaskTargetNameEnum } from '../../config'; |
| 9 | 9 | import { h } from 'vue'; |
| 10 | -import { Tag, Textarea } from 'ant-design-vue'; | |
| 10 | +import { Tag, Input } from 'ant-design-vue'; | |
| 11 | 11 | import { TaskStatusNameEnum } from '../../config'; |
| 12 | 12 | import { TaskRecordType } from '/@/api/task/model'; |
| 13 | 13 | import { TaskTypeNameEnum } from '../../config'; |
| ... | ... | @@ -105,7 +105,12 @@ export const schemas: DescItem[] = [ |
| 105 | 105 | field: 'rpcCommand', |
| 106 | 106 | label: '命令内容', |
| 107 | 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 | 275 | const { getNumberValue } = useReceiveValue(); |
| 276 | 276 | const updateFn: MultipleDataFetchUpdateFn = (message, deviceId, attribute) => { |
| 277 | 277 | forEachGroupMessage(message, deviceId, attribute, (attribute, value) => { |
| 278 | - console.log(value, 'value'); | |
| 279 | 278 | series.value.forEach((item) => { |
| 280 | 279 | if (item.id === deviceId && item.attribute === attribute) { |
| 281 | 280 | item.value = getNumberValue(value); |
| 282 | 281 | } |
| 283 | 282 | }); |
| 284 | - console.log(value); | |
| 285 | 283 | }); |
| 286 | - console.log(series, 'series'); | |
| 287 | 284 | unref(chartInstance)?.setOption({ |
| 288 | 285 | series: [{ data: unref(series), pointer: { show: false } }], |
| 289 | 286 | color: unref(series).map((item) => item.title.color), | ... | ... |
| ... | ... | @@ -33,8 +33,8 @@ |
| 33 | 33 | const defaultValue: PercentType[] = [ |
| 34 | 34 | { |
| 35 | 35 | value: 20, |
| 36 | - fontColor: '#19eff', | |
| 37 | - backgroundColor: '#19eff', | |
| 36 | + fontColor: '#377dff', | |
| 37 | + backgroundColor: '#377dff', | |
| 38 | 38 | unit: '℃', |
| 39 | 39 | deviceName: '温度', |
| 40 | 40 | attribute: '1', |
| ... | ... | @@ -122,6 +122,13 @@ |
| 122 | 122 | </div> |
| 123 | 123 | <div> |
| 124 | 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 | 132 | </div> |
| 126 | 133 | </div> |
| 127 | 134 | </main> |
| ... | ... | @@ -130,4 +137,14 @@ |
| 130 | 137 | // :deep(.ant-progress-success-bg, .ant-progress-bg) { |
| 131 | 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 | 150 | </style> | ... | ... |