diff --git a/src/assets/img/history.png b/src/assets/img/history.png new file mode 100644 index 0000000..d7f850c Binary files /dev/null and b/src/assets/img/history.png differ diff --git a/src/components/Setting/components/History.vue b/src/components/Setting/components/History.vue index 7526610..f432751 100644 --- a/src/components/Setting/components/History.vue +++ b/src/components/Setting/components/History.vue @@ -14,7 +14,55 @@
-
+
+

时间

+
+

2022-20-10

+

+
+
+
+

时间

+
+

2022-20-10

+
+
+
+

时间

+
+

2022-20-10

+
+
+
+

时间

+
+

2022-20-10

+
+
+
+

时间

+
+

2022-20-10

+
+
+
+

时间

+
+

2022-20-10

+
+
+
+

时间

+
+

2022-20-10

+
+
+
+

时间

+
+

2022-20-10

+
+
返回
@@ -123,16 +171,49 @@ const showDetailModal = () => { display: flex; flex-direction: column; overflow: hidden; + background: url(../../../assets/img/history.png) no-repeat; + background-size: 100% 100%; .table_wrap { flex: 1; display: flex; - flex-direction: column; - .table_title_wrap { - width: 1224px; - height: 80.29px; - box-sizing: border-box; - border-radius: 16px 16px 0px 0px; - background: #f6f6f6; + justify-content: space-evenly; + align-items: center; + .table_column { + height: 100%; + .title { + height: 80px; + display: flex; + align-items: center; + justify-content: center; + font-family: Source Han Sans CN; + font-size: 18px; + font-weight: normal; + line-height: normal; + letter-spacing: 0.07em; + color: #999999; + } + .first_box { + position: relative; + .content { + height: 60px; + display: flex; + align-items: center; + justify-content: center; + font-family: Source Han Sans CN; + font-size: 18px; + font-weight: normal; + line-height: normal; + letter-spacing: 0.07em; + color: #191919; + } + .line { + position: absolute; + left: -1000%; + width: 2000%; + height: 1px; + background: #f6f6f6; + } + } } } .bottom_line { diff --git a/src/components/Setting/index.vue b/src/components/Setting/index.vue index 3ad4936..842b1ec 100644 --- a/src/components/Setting/index.vue +++ b/src/components/Setting/index.vue @@ -33,8 +33,8 @@

-

历史记录

-
查看
+

历史记录

+
查看
@@ -57,7 +57,7 @@ import Device from './components/Device.vue' import User from './components/User.vue' import ExportExcel from './components/ExportExcel.vue' import History from './components/History.vue' -import { getAllUserJSON } from '@/mock/command' +import { getAllUserJSON, getAllLocalHistoryData } from '@/mock/command' import { useWebSocketStore } from '@/store' const webSocketStore = useWebSocketStore() @@ -69,6 +69,10 @@ const changeActiveTab = index => { if (index == 3) { webSocketStore.sendCommandMsg(getAllUserJSON) } + if (index == 7) { + // 查询历史记录 + webSocketStore.sendCommandMsg(getAllLocalHistoryData) + } } diff --git a/src/mock/command.js b/src/mock/command.js index 54d3e6e..d982c0d 100644 --- a/src/mock/command.js +++ b/src/mock/command.js @@ -302,3 +302,12 @@ export const updateAllFormulaJSON = data => { ...data, } } + +// 获取本机历史数据 +export const getAllLocalHistoryData = { + command: 'getAllLocalHistoryData', + messageId: 'getAllLocalHistoryData', +} + +// 根据消毒id获取本次消毒所有详细信息 +export const getDetailInfoById = id => {} diff --git a/src/store/modules/history.js b/src/store/modules/history.js new file mode 100644 index 0000000..1c6150b --- /dev/null +++ b/src/store/modules/history.js @@ -0,0 +1,20 @@ +import { defineStore } from 'pinia' +export const useHistoryStore = defineStore({ + id: 'history', // id必填,且需要唯一 + // state + state: () => { + return { + historyDataList: [], + detailData: [], + } + }, + // actions + actions: { + updateHistoryDataList(historyDataList) { + this.historyDataList = historyDataList + }, + updateDetailData(detailData) { + this.detailData = detailData + }, + }, +})