diff --git a/src/components/Setting/components/History.vue b/src/components/Setting/components/History.vue
index 2553de3..636517a 100644
--- a/src/components/Setting/components/History.vue
+++ b/src/components/Setting/components/History.vue
@@ -111,7 +111,12 @@
返回
-
+
+
@@ -121,19 +126,28 @@ import Down from '@/assets/img/arrow/down.png'
import Top from '@/assets/img/arrow/top.png'
import Right from '@/assets/img/arrow/right.png'
import Left from '@/assets/img/arrow/left.png'
-import ClearRecordByKeysModal from 'cpns/dialogs/ClearRecordByKeysModal'
import { useHistoryStore, useWebSocketStore, useSettingStore } from '@/store'
-import { getDetailInfoById, exportDisinfectionRecordByKeyListJSON } from '@/mock/command'
+import { getDetailInfoById, exportDisinfectionRecordByKeyListJSON, getAllLocalHistoryData } from '@/mock/command'
+import MyModal from 'cpns/MyModal.vue';
+/** @var {Object} */
+const webSocketStore = useWebSocketStore();
+// 选中的数据
+const checkedItems = ref([])
+/** @var {Boolean} */
+const clearRecordByKeysModalVisible = ref(false);
+
+// clear record by keys
+async function actionClearRecordByKeysExecute() {
+ await webSocketStore.call('cleanDisinfectionRecord',{keys:checkedItems.value});
+ webSocketStore.sendCommandMsg(getAllLocalHistoryData);
+}
const showDetailVisible = ref(false)
const historyStore = useHistoryStore()
-const webSocketStore = useWebSocketStore()
const settingStore = useSettingStore()
// 清除记录对话框
const clearRecordByKeys = ref(null)
-// 选中的数据
-const checkedItems = ref([])
// 历史数据列表
const historyDataList = computed(() => {
return historyStore.historyDataList.sort((a, b) => b.localeCompare(a));
@@ -149,7 +163,8 @@ function actionOperationExecute( action ) {
settingStore.updateExportLoading(true)
webSocketStore.sendCommandMsg(exportDisinfectionRecordByKeyListJSON(checkedItems.value));
} else if ( 'delete' === action ) {
- clearRecordByKeys.value.showDialog();
+ // clearRecordByKeys.value.showDialog();
+ clearRecordByKeysModalVisible.value = true;
}
}
diff --git a/src/components/dialogs/ClearRecordByKeysModal.vue b/src/components/dialogs/ClearRecordByKeysModal.vue
index d6c12a3..2ee1e9c 100644
--- a/src/components/dialogs/ClearRecordByKeysModal.vue
+++ b/src/components/dialogs/ClearRecordByKeysModal.vue
@@ -1,32 +1,10 @@
-
-
-
-
- 确定要所选消毒记录吗!
-
-
-
-
+