From 22c3f4756cd117db0c33dd997ffb3b3ae5fb663d Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Tue, 10 Oct 2023 16:51:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/history.png | Bin 0 -> 4874 bytes src/components/Setting/components/History.vue | 97 +++++++++++++++++++++++--- src/components/Setting/index.vue | 10 ++- src/mock/command.js | 9 +++ src/store/modules/history.js | 20 ++++++ 5 files changed, 125 insertions(+), 11 deletions(-) create mode 100644 src/assets/img/history.png create mode 100644 src/store/modules/history.js diff --git a/src/assets/img/history.png b/src/assets/img/history.png new file mode 100644 index 0000000000000000000000000000000000000000..d7f850c4e12e40b15622344da6d4561c10a470eb GIT binary patch literal 4874 zcmeHL|4&<06n`sqAdJD(xG7L(bSx1}#E0!rMuoINvTT}3RMG--qpw-E@}(V=(yjv* zhX%3ugC#E%(CNa=q%ew>LS12G!=(?1F1BDT1xjgH3#=^#N=xxxHvb5d_mY=$&OPUy z_qq3;dq27N%MVZG#YVpzjUY&D{`;)c2txfGK`5-Ky`aT@@sJXTJ)+ZjxrllqaS0ey zQEq-g6nJD&rC%V(bN%_OoPrwFvNiqIk;tURxgFKeMhZ2;l=Djb3+(uP)a#!{(SM>Q zFdMM+>o-1UN5@!hwk)Ln_-4!fjBg5Fr*hLMIYsdlQ%r;V_>l9fdn?ysr(bJ&Ff*c` z{HQ&XzgO-z5;$+=VIUANxAFoWPfcjOFRkPlP0`6QSBVYg2!LrgqJO1&XonySN?yQM zrj>fu*494Q5Y2fjkGeO4$uz}SXOd#9M?Q~(Xrv;iddSKIZw#N$H*DYZWoNW>yS6sv zhAWPWV_E*CNtm>*sZuEPwrVt*}X4m=p0d+Y{KO75k@L}6Rf{>Gy{B?dXq zU@N&}UQHgj>JEiM&M~{E)iv0WwJCvN73oS|CU@}C(!s8-E<>$tL!1my85>9E81si< zKquSSmpCyoAs2!_&P#39K(E^Mycs0!Q@eh!5W8?9%L|oPn4!m`wgF#f>FRdmG{DPF zguYo#S&=z!Be*oZS7XK)l;L_`{QA%sk>0;nEgxLjnE!`(NuN0 zmVqh+$Enb!d#6@vvaM}_2KO2I6$KrUK z%k(Oo#WShKK{e$is20+0!|6YK@-Qq$QjkMHRsp#X$i0Bv4oOBJ*^p#Ik_|~VB-xN; z!>4R0V4w^wZ4X!zNPnIiN%`}+!&4nHoDv)+QPY^jq_YjvXQm(-+3}0Oj>Z+Vm zk>RuMj{1ujR%9OIFHYluKL}a4{v=!-b&<}$|EbM%oDefVmT2Q*OT|CCwyby{OvuWy zJDca#Pl6UeZv|L!kXty kDnVFKpNY`xz$gWEn}*BhAEm@~(CH9&KKm3)oqML?U%`)7(f|Me literal 0 HcmV?d00001 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 + }, + }, +})