|
|
@@ -717,6 +717,8 @@ const targetArea = ref(null)
|
|
|
|
|
|
const { toggle, isFullscreen } = useFullscreen(targetArea)
|
|
|
|
|
|
+const message = useMessage()
|
|
|
+
|
|
|
async function handleSave(item: Dimensions) {
|
|
|
const body = {
|
|
|
minValue: item.minValue,
|
|
|
@@ -731,6 +733,8 @@ async function handleSave(item: Dimensions) {
|
|
|
const res = await IotDeviceApi.saveMaxMin(body)
|
|
|
|
|
|
if (res.id) item.id = res.id
|
|
|
+
|
|
|
+ message.success('设置成功')
|
|
|
}
|
|
|
async function handleReset(item: Dimensions) {
|
|
|
item.minValue = undefined
|
|
|
@@ -738,6 +742,8 @@ async function handleReset(item: Dimensions) {
|
|
|
|
|
|
await IotDeviceApi.deleteMaxMin({ id: item.id })
|
|
|
item.id = undefined
|
|
|
+
|
|
|
+ message.success('清除重置成功')
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
@@ -867,7 +873,7 @@ async function handleReset(item: Dimensions) {
|
|
|
|
|
|
<div class="flex justify-end gap-2 pt-1">
|
|
|
<el-button size="small" text bg @click="handleReset(item)">
|
|
|
- 重置
|
|
|
+ 清除重置
|
|
|
</el-button>
|
|
|
<el-button size="small" type="primary" @click="handleSave(item)">
|
|
|
保存
|