diff --git a/src/api/product.ts b/src/api/product.ts index 8261e21..83297da 100644 --- a/src/api/product.ts +++ b/src/api/product.ts @@ -81,6 +81,12 @@ export function addAttachments(data: any) { // 删除设备预览图或图标 -export function deleteDeviceAttachment(id: string) { - return axios.delete(`/api/rest/device/attachment/${id}`); +export function deleteDeviceAttachment(productId: string, id: string) { + return axios({ + method: 'delete', + url: `/api/rest/device/attachment/${productId}`, + params: { + attachmentId: id, + }, + }); } \ No newline at end of file diff --git a/src/views/dashboard/workplace/components/content-publishing-source.vue b/src/views/dashboard/workplace/components/content-publishing-source.vue index f1f7c1d..08c7b82 100644 --- a/src/views/dashboard/workplace/components/content-publishing-source.vue +++ b/src/views/dashboard/workplace/components/content-publishing-source.vue @@ -329,7 +329,7 @@ return { legend: { left: 'center', - data: ['注意', '告警', '严重'], + data: ['上报数', '下发数'], bottom: 0, icon: 'circle', itemWidth: 8, @@ -351,7 +351,7 @@ left: 'center', top: 'center', style: { - text: '告警类型', + text: '设备情况', ...graphicElementStyle, }, } @@ -372,26 +372,19 @@ }, data: [ { - value: props.alarmInfo.firstWarningCount, - name: '注意', + value: props.alarmInfo.recordCount, + name: '上报数', itemStyle: { color: '#249EFF', }, }, { - value: props.alarmInfo.secondWarningCount, - name: '告警', + value: props.alarmInfo.dataCount, + name: '下发数', itemStyle: { color: '#846BCE', }, }, - { - value: props.alarmInfo.thirdWarningCount, - name: '严重', - itemStyle: { - color: '#ff2121', - }, - } ], }, ], diff --git a/src/views/dashboard/workplace/components/data-panel.vue b/src/views/dashboard/workplace/components/data-panel.vue index 6e21d73..36e9f74 100644 --- a/src/views/dashboard/workplace/components/data-panel.vue +++ b/src/views/dashboard/workplace/components/data-panel.vue @@ -77,7 +77,7 @@ @@ -156,7 +156,7 @@ }]; const alarmData = [{ label: '今日新增', - value: props.alarmInfo.todayWarningCount, + value: props.deviceInfo.todayWarningCount, }]; diff --git a/src/views/iot/product/components/product-edit.vue b/src/views/iot/product/components/product-edit.vue index 7c52037..36d944d 100644 --- a/src/views/iot/product/components/product-edit.vue +++ b/src/views/iot/product/components/product-edit.vue @@ -304,7 +304,7 @@ Message.error('无法获取图片 ID'); } // 调用删除接口 - const res = await deleteDeviceAttachment(fileId); + const res = await deleteDeviceAttachment(formData.value.id,fileId); if (res.data === true) { // 删除成功后 Message.success('删除成功');