From be9b2f1f1192e20d5670bddac1a96b65aa9085c5 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 5 Aug 2025 10:10:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 15 +++-- pnpm-lock.yaml | 13 ++++ src/api/thirdSelf/thirdKeyManage.ts | 6 +- src/api/thirdSelf/thirdLog.ts | 10 +-- src/components/PreviewJson/index.vue | 55 ++++++++++++++++ src/components/index.ts | 4 ++ src/views/api/carLog/carLogViewDialog.vue | 19 ++++++ src/views/api/carLog/index.vue | 62 ++++++++++++++++-- .../api/deviceLog/deviceLogViewDialog.vue | 19 ++++++ src/views/api/deviceLog/index.vue | 64 +++++++++++++++++-- src/views/api/doorLog/doorLogViewDialog.vue | 19 ++++++ src/views/api/doorLog/index.vue | 62 ++++++++++++++++-- src/views/third/thirdKeyManage/form.vue | 18 +++--- src/views/third/thirdKeyManage/index.vue | 11 ++-- .../third/{thirdApiLog => thirdLog}/form.vue | 0 .../third/{thirdApiLog => thirdLog}/index.vue | 56 ++++++++++++---- 16 files changed, 369 insertions(+), 64 deletions(-) create mode 100644 src/components/PreviewJson/index.vue create mode 100644 src/views/api/carLog/carLogViewDialog.vue create mode 100644 src/views/api/deviceLog/deviceLogViewDialog.vue create mode 100644 src/views/api/doorLog/doorLogViewDialog.vue rename src/views/third/{thirdApiLog => thirdLog}/form.vue (100%) rename src/views/third/{thirdApiLog => thirdLog}/index.vue (60%) diff --git a/package.json b/package.json index e679c94..c2d527a 100644 --- a/package.json +++ b/package.json @@ -16,17 +16,12 @@ "@axolo/json-editor-vue": "^0.3.2", "@chenfengyuan/vue-qrcode": "^2.0.0", "@element-plus/icons-vue": "^2.0.10", + "@form-create/element-ui": "3.2.16", + "@microsoft/fetch-event-source": "^2.0.1", "@popperjs/core": "2.11.8", "@vueuse/core": "^10.4.1", "@wangeditor/editor": "5.1.23", "@wangeditor/editor-for-vue": "5.1.12", - "@microsoft/fetch-event-source": "^2.0.1", - "marked": "^12.0.2", - "markmap-common": "0.15.6", - "markmap-lib": "0.15.8", - "markmap-view": "0.15.8", - "@form-create/element-ui": "3.2.16", - "form-create-designer": "3.2.10-oem", "autoprefixer": "^10.4.7", "axios": "^1.3.3", "codemirror": "5.65.5", @@ -35,11 +30,16 @@ "driver.js": "^0.9.8", "echarts": "^5.4.1", "element-plus": "2.5.5", + "form-create-designer": "3.2.10-oem", "highlight.js": "^11.7.0", "js-base64": "^3.7.7", "js-cookie": "^3.0.1", "json-editor-vue3": "^1.1.1", "lodash": "^4.17.21", + "marked": "^12.0.2", + "markmap-common": "0.15.6", + "markmap-lib": "0.15.8", + "markmap-view": "0.15.8", "mitt": "^3.0.0", "nprogress": "^0.2.0", "pinia": "2.0.32", @@ -56,6 +56,7 @@ "vue-clipboard3": "^2.0.0", "vue-echarts": "6.6.1", "vue-i18n": "9.2.2", + "vue-json-pretty": "^2.5.0", "vue-router": "^4.1.6", "vue3-tree-org": "^4.2.2", "vue3-video-play": "1.3.1-beta.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a84da1b..435398c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,6 +137,9 @@ importers: vue-i18n: specifier: 9.2.2 version: 9.2.2(vue@3.4.15(typescript@4.9.5)) + vue-json-pretty: + specifier: ^2.5.0 + version: 2.5.0(vue@3.4.15(typescript@4.9.5)) vue-router: specifier: ^4.1.6 version: 4.5.1(vue@3.4.15(typescript@4.9.5)) @@ -2951,6 +2954,12 @@ packages: peerDependencies: vue: ^3.0.0 + vue-json-pretty@2.5.0: + resolution: {integrity: sha512-nZA6qXYaiMaE2J0HkKtkrLcPJoN03SDSBdZWEPiRwoOVySWOfoZCyadhBwBN6wAHTga+c/R49ExGWoKFXnu37A==} + engines: {node: '>= 10.0.0', npm: '>= 5.0.0'} + peerDependencies: + vue: '>=3.0.0' + vue-router@4.5.1: resolution: {integrity: sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==} peerDependencies: @@ -5905,6 +5914,10 @@ snapshots: '@vue/devtools-api': 6.6.4 vue: 3.4.15(typescript@4.9.5) + vue-json-pretty@2.5.0(vue@3.4.15(typescript@4.9.5)): + dependencies: + vue: 3.4.15(typescript@4.9.5) + vue-router@4.5.1(vue@3.4.15(typescript@4.9.5)): dependencies: '@vue/devtools-api': 6.6.4 diff --git a/src/api/thirdSelf/thirdKeyManage.ts b/src/api/thirdSelf/thirdKeyManage.ts index 632ab42..26c8b46 100644 --- a/src/api/thirdSelf/thirdKeyManage.ts +++ b/src/api/thirdSelf/thirdKeyManage.ts @@ -41,9 +41,9 @@ export function putObj(obj?: Object) { export function getUrl(obj: any) { return request({ - url: '/admin/thirdSelf/getUrl', - method: 'post', - data: obj + url: '/admin/thirdSelf/openApi/getUrl', + method: 'get', + params: obj }) } diff --git a/src/api/thirdSelf/thirdLog.ts b/src/api/thirdSelf/thirdLog.ts index feee423..4d0faad 100644 --- a/src/api/thirdSelf/thirdLog.ts +++ b/src/api/thirdSelf/thirdLog.ts @@ -2,7 +2,7 @@ import request from "/@/utils/request" export function fetchList(query?: Object) { return request({ - url: '/third/thirdLog/page', + url: '/admin/thirdSelf/thirdLog/page', method: 'get', params: query }) @@ -10,7 +10,7 @@ export function fetchList(query?: Object) { export function addObj(obj?: Object) { return request({ - url: '/third/thirdLog', + url: '/admin/thirdSelf/thirdLog', method: 'post', data: obj }) @@ -18,14 +18,14 @@ export function addObj(obj?: Object) { export function getObj(id?: string) { return request({ - url: '/third/thirdLog/' + id, + url: '/admin/thirdSelf/thirdLog/' + id, method: 'get' }) } export function delObjs(ids?: Object) { return request({ - url: '/third/thirdLog', + url: '/admin/thirdSelf/thirdLog', method: 'delete', data: ids }) @@ -33,7 +33,7 @@ export function delObjs(ids?: Object) { export function putObj(obj?: Object) { return request({ - url: '/third/thirdLog', + url: '/admin/thirdSelf/thirdLog', method: 'put', data: obj }) diff --git a/src/components/PreviewJson/index.vue b/src/components/PreviewJson/index.vue new file mode 100644 index 0000000..ae78d0b --- /dev/null +++ b/src/components/PreviewJson/index.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/src/components/index.ts b/src/components/index.ts index 5179fd9..623746c 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -27,6 +27,8 @@ import SelectDevice from "/@/components/Select/SelectDevice.vue" import ColumnBtn from "/@/components/Column/ColumnBtn.vue" +import PreviewJson from "/@/components/PreviewJson/index.vue" + // import DictSelect from "/@/components/DictSelect/index.vue" // 第三方组件 @@ -80,6 +82,8 @@ export default { app.component('ColumnBtn', ColumnBtn); + app.component('PreviewJson', PreviewJson); + // 导入全部的elmenet-plus的图标 for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component); diff --git a/src/views/api/carLog/carLogViewDialog.vue b/src/views/api/carLog/carLogViewDialog.vue new file mode 100644 index 0000000..ede9dfa --- /dev/null +++ b/src/views/api/carLog/carLogViewDialog.vue @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/src/views/api/carLog/index.vue b/src/views/api/carLog/index.vue index 0856301..53f6faf 100644 --- a/src/views/api/carLog/index.vue +++ b/src/views/api/carLog/index.vue @@ -3,20 +3,27 @@
- - + + + + + + + + + + + - - {{ $t('common.queryBtn') }} {{ $t('common.resetBtn') }} - +
@@ -27,11 +34,46 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -43,6 +85,10 @@ import { useDict } from '/@/hooks/dict'; import * as ComDhLogApi from "/@/api/com/comDhLog"; +const CarLogViewDialog = defineAsyncComponent(() => import('./carLogViewDialog.vue')); + +const carLogViewDialogRef = ref() + // 搜索变量 const queryRef = ref() const showSearch = ref(true) @@ -52,7 +98,9 @@ const selectObjs = ref([]) as any const multiple = ref(true) const state: BasicTableProps = reactive({ - queryForm: {}, + queryForm: { + typeList: ["车辆进出数据", "过车数据"] + }, pageList: ComDhLogApi.fetchList }) diff --git a/src/views/api/deviceLog/deviceLogViewDialog.vue b/src/views/api/deviceLog/deviceLogViewDialog.vue new file mode 100644 index 0000000..08fff0f --- /dev/null +++ b/src/views/api/deviceLog/deviceLogViewDialog.vue @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/src/views/api/deviceLog/index.vue b/src/views/api/deviceLog/index.vue index a37ed18..cd2e4e7 100644 --- a/src/views/api/deviceLog/index.vue +++ b/src/views/api/deviceLog/index.vue @@ -3,20 +3,27 @@
- - + + + + + + + + + + + - - {{ $t('common.queryBtn') }} {{ $t('common.resetBtn') }} - +
@@ -27,11 +34,48 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -43,6 +87,10 @@ import { useDict } from '/@/hooks/dict'; import * as ComDhLogApi from "/@/api/com/comDhLog"; +const DeviceLogViewDialog = defineAsyncComponent(() => import('./deviceLogViewDialog.vue')); + +const deviceLogViewDialogRef = ref() + // 搜索变量 const queryRef = ref() const showSearch = ref(true) @@ -52,7 +100,9 @@ const selectObjs = ref([]) as any const multiple = ref(true) const state: BasicTableProps = reactive({ - queryForm: {}, + queryForm: { + typeList: ["设备分页查询", "设备通道分页查询"] + }, pageList: ComDhLogApi.fetchList }) diff --git a/src/views/api/doorLog/doorLogViewDialog.vue b/src/views/api/doorLog/doorLogViewDialog.vue new file mode 100644 index 0000000..709c3d0 --- /dev/null +++ b/src/views/api/doorLog/doorLogViewDialog.vue @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/src/views/api/doorLog/index.vue b/src/views/api/doorLog/index.vue index 95ba407..6ed0fcb 100644 --- a/src/views/api/doorLog/index.vue +++ b/src/views/api/doorLog/index.vue @@ -3,20 +3,27 @@
- - + + + + + + + + + + + - - {{ $t('common.queryBtn') }} {{ $t('common.resetBtn') }} - +
@@ -27,11 +34,46 @@ - + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -43,6 +85,10 @@ import { useDict } from '/@/hooks/dict'; import * as ComDhLogApi from "/@/api/com/comDhLog"; +const DoorLogViewDialog = defineAsyncComponent(() => import('./doorLogViewDialog.vue')); + +const doorLogViewDialogRef = ref() + // 搜索变量 const queryRef = ref() const showSearch = ref(true) @@ -52,7 +98,9 @@ const selectObjs = ref([]) as any const multiple = ref(true) const state: BasicTableProps = reactive({ - queryForm: {}, + queryForm: { + typeList: ["刷卡记录分页"] + }, pageList: ComDhLogApi.fetchList }) diff --git a/src/views/third/thirdKeyManage/form.vue b/src/views/third/thirdKeyManage/form.vue index 59a3a23..c1f27da 100644 --- a/src/views/third/thirdKeyManage/form.vue +++ b/src/views/third/thirdKeyManage/form.vue @@ -1,6 +1,6 @@