From 4237875453cdfd19a10d68a880f84cbdfbc7c546 Mon Sep 17 00:00:00 2001 From: huliang <1539398430@qq.com> Date: Wed, 19 Nov 2025 14:01:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A1=E6=AA=A2=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E5=88=87=E7=89=88=20|=20=E5=85=AC=E7=94=A8=E7=B5=84=E4=BB=B6:?= =?UTF-8?q?=20Alert=E3=80=81PaginatedTable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 29 +- package.json | 3 +- src/App.vue | 10 +- src/components.d.ts | 9 + src/components/Common/GlobalAlerts.vue | 55 ++++ src/components/Common/PaginatedTable.vue | 120 ++++++++ .../PatrolSetting/AddTaskDialog.vue | 109 +++++++ .../PatrolSetting/AddTemplateDialog.vue | 284 ++++++++++++++++++ .../PatrolSetting/DutyLogItemDialog.vue | 50 +++ .../PatrolSetting/HandoverItemDialog.vue | 48 +++ .../PatrolSetting/InspectionItemDialog.vue | 128 ++++++++ src/components/PatrolSetting/TaskManager.vue | 239 +++++++++++++++ .../PatrolSetting/TemplateManager.vue | 235 +++++++++++++++ .../PatrolSetting/TemplateSelectDialog.vue | 77 +++++ .../VerificationSettingDialog.vue | 44 +++ src/components/Sidebar.vue | 17 +- src/composables/useAlert.js | 54 ++++ src/constants/menuConfig.js | 118 ++++---- src/constants/templateList.js | 72 +++++ src/main.js | 4 +- src/styles/style.css | 17 +- src/views/PatrolMission.vue | 80 ++++- src/views/PatrolSetting.vue | 11 +- vite.config.js | 3 + 24 files changed, 1735 insertions(+), 81 deletions(-) create mode 100644 src/components/Common/GlobalAlerts.vue create mode 100644 src/components/Common/PaginatedTable.vue create mode 100644 src/components/PatrolSetting/AddTaskDialog.vue create mode 100644 src/components/PatrolSetting/AddTemplateDialog.vue create mode 100644 src/components/PatrolSetting/DutyLogItemDialog.vue create mode 100644 src/components/PatrolSetting/HandoverItemDialog.vue create mode 100644 src/components/PatrolSetting/InspectionItemDialog.vue create mode 100644 src/components/PatrolSetting/TaskManager.vue create mode 100644 src/components/PatrolSetting/TemplateManager.vue create mode 100644 src/components/PatrolSetting/TemplateSelectDialog.vue create mode 100644 src/components/PatrolSetting/VerificationSettingDialog.vue create mode 100644 src/composables/useAlert.js create mode 100644 src/constants/templateList.js diff --git a/package-lock.json b/package-lock.json index 0dbe629..d5236a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,8 @@ "leaflet-tilelayer-mbtiles": "^1.4.1", "pinia": "^3.0.3", "vue": "^3.5.22", - "vue-router": "^4.5.1" + "vue-router": "^4.5.1", + "vue3-signature": "^0.4.0" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.1", @@ -1759,6 +1760,12 @@ } } }, + "node_modules/default-passive-events": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-passive-events/-/default-passive-events-2.0.0.tgz", + "integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==", + "license": "MIT" + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3081,6 +3088,12 @@ "dev": true, "license": "MIT" }, + "node_modules/signature_pad": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/signature_pad/-/signature_pad-5.1.2.tgz", + "integrity": "sha512-zYmjddQDolKgJnzYRoaMYaGezKaZbwjNBBwk1W7uVY0cyNWW30Izeu9BNVAGEgXvqB6APDJmf783oWTU7W67LQ==", + "license": "MIT" + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -3474,6 +3487,20 @@ "vue": "^3.2.0" } }, + "node_modules/vue3-signature": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/vue3-signature/-/vue3-signature-0.4.0.tgz", + "integrity": "sha512-RvU0AqmFmZ/kTc90qbCPCGO5oavr8hidtcstLFwBZMyEpYKOvujHGzX9JO0eKkTVMEhV2gNzqtl/D9mOIHQctg==", + "license": "MIT", + "dependencies": { + "default-passive-events": "^2.0.0", + "signature_pad": "^5.1.1", + "vue": "^3.2.37" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/webpack-virtual-modules": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", diff --git a/package.json b/package.json index 4d908db..e851258 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "leaflet-tilelayer-mbtiles": "^1.4.1", "pinia": "^3.0.3", "vue": "^3.5.22", - "vue-router": "^4.5.1" + "vue-router": "^4.5.1", + "vue3-signature": "^0.4.0" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.1", diff --git a/src/App.vue b/src/App.vue index faa0f67..4320fed 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,6 +2,8 @@ import { ref, onMounted, onUnmounted } from "vue"; import { useRouter, useRoute } from "vue-router"; import { ElConfigProvider } from "element-plus"; +import zhTW from 'element-plus/es/locale/lang/zh-tw' +import GlobalAlerts from './components/Common/GlobalAlerts.vue'; import Navbar from "./components/Navbar.vue"; import Sidebar from "./components/Sidebar.vue"; const router = useRouter(); @@ -30,24 +32,24 @@ onUnmounted(() => { - + diff --git a/src/views/PatrolSetting.vue b/src/views/PatrolSetting.vue index de05712..807a33c 100644 --- a/src/views/PatrolSetting.vue +++ b/src/views/PatrolSetting.vue @@ -7,14 +7,13 @@ +
- -

這裡是樣板管理

+
- +
- -

這裡是任務管理

+
@@ -23,6 +22,8 @@ diff --git a/vite.config.js b/vite.config.js index c07e45d..2b3d23c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -11,6 +11,9 @@ export default defineConfig({ outDir: "../dist", emptyOutDir: true, }, + server: { + port: 3000, + }, plugins: [ vue(), AutoImport({