From fd2fc90bd3b73a406943ae5b7ddf2be20f002dcb Mon Sep 17 00:00:00 2001 From: sige Date: Wed, 15 May 2024 15:48:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E6=B7=B7=E4=B9=B1=E3=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=EF=BC=8C=E5=AF=BC=E5=87=BA=E6=97=B6=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E9=83=BD=E4=BC=9A=E5=AF=BC=E5=87=BA=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E6=8B=A9=E5=8D=95=E6=AC=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 +- README.md | 2 +- publish.ps1 | 20 ++++ src/components/Setting/components/History.vue | 82 +++++++++++--- src/components/Setting/index.vue | 4 +- src/components/dialogs/ClearRecordByKeysModal.vue | 131 ++++++++++++++++++++++ src/main.js | 8 ++ src/mock/command.js | 13 +++ 8 files changed, 247 insertions(+), 21 deletions(-) create mode 100644 publish.ps1 create mode 100644 src/components/dialogs/ClearRecordByKeysModal.vue diff --git a/.env b/.env index c4ae906..fe3f0dd 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -# VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ -# VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ +VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ +VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ -VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ -VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file +# VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ +# VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file diff --git a/README.md b/README.md index c35e212..d363fb5 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ https://tdesign.tencent.com/ │ └─modules // 分modules ├─views // 视图 ├─App.vue // 项目根组件 - ├─main.js // 项目入口 + ├─main.js // 项目入口yarn └─style.scss // 全局样式 ``` diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..ccf2df0 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,20 @@ +# build project +yarn build +# rename dist to current time, like 20221215121300 +$now = Get-Date -Format "yyyyMMddHHmmss" +Rename-Item -Path ./dist -NewName $now +# compress dist to app.zip +Compress-Archive -Path ./$now -DestinationPath ./app.zip -Force +# upload app.zip to server +scp app.zip root@192.168.8.10:/frontend/ +# unzip app.zip +ssh root:zwsd@192.168.8.10 "cd /frontend && unzip app.zip" +# remove old link +ssh root:zwsd@192.168.8.10 "cd /frontend && rm -f dist" +# create link +ssh root:zwsd@192.168.8.10 "cd /frontend && ln -s /frontend/$now /frontend/dist" +# remove app.zip +ssh root:zwsd@192.168.8.10 "cd /frontend && rm -f app.zip" +Remove-Item -Path ./app.zip +# remove folder +Remove-Item -Path ./$now -Recurse \ No newline at end of file diff --git a/src/components/Setting/components/History.vue b/src/components/Setting/components/History.vue index 1f6682b..f3b2b34 100644 --- a/src/components/Setting/components/History.vue +++ b/src/components/Setting/components/History.vue @@ -2,7 +2,14 @@

消毒名称

-

操作

+

+ + + +

-
-

{{ item }}

-
-
详情
+ +
+

  {{ item }}

+
+
详情
+
-
+
@@ -105,21 +110,47 @@
返回
+ - + diff --git a/src/main.js b/src/main.js index 6c8267c..80c1db2 100644 --- a/src/main.js +++ b/src/main.js @@ -11,6 +11,10 @@ import { NumberKeyboard, Toast, Overlay, + Checkbox, + CheckboxGroup, + DropdownMenu, + DropdownItem } from 'vant' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' @@ -28,6 +32,10 @@ createApp(App) .use(TimePicker) .use(Field) .use(Overlay) + .use(Checkbox) + .use(CheckboxGroup) + .use(DropdownMenu) + .use(DropdownItem) .use(ElementPlus) .use(Toast) .use(store) diff --git a/src/mock/command.js b/src/mock/command.js index de2b1ea..fbb61bd 100644 --- a/src/mock/command.js +++ b/src/mock/command.js @@ -223,11 +223,24 @@ export const exportDisinfectionRecordJSON = { messageId: 'exportDisinfectionRecord', } +export const exportDisinfectionRecordByKeyListJSON = ( keys ) => ({ + command: 'exportDisinfectionRecord', + messageId: 'exportDisinfectionRecord', + keys, +}); + export const cleanDisinfectionRecordJSON = { command: 'cleanDisinfectionRecord', messageId: 'cleanDisinfectionRecord', } +export const cleanDisinfectionRecordByKeysJSON = ( keys ) => ({ + command: 'cleanDisinfectionRecord', + messageId: 'cleanDisinfectionRecord', + keys, + +}); + export const cleanUserBehaviorRecordJSON = { command: 'cleanUserBehaviorRecord', messageId: 'cleanUserBehaviorRecord',