From 997487c934abd2f480161a040235df26396f5ad6 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 17 Apr 2025 14:23:40 +0800
Subject: [PATCH] =?UTF-8?q?feat:json=E6=9F=A5=E7=9C=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/hard/hard-door-flow.ts | 4 +-
src/components/PreviewJson/index.vue | 55 +++++++++++++++++++
src/components/index.ts | 2 +
src/views/hard/hard-door-flow/index.vue | 73 +++++++++++++++++++------
src/views/hard/third-door-log/index.vue | 35 +++---------
5 files changed, 123 insertions(+), 46 deletions(-)
create mode 100644 src/components/PreviewJson/index.vue
diff --git a/src/api/hard/hard-door-flow.ts b/src/api/hard/hard-door-flow.ts
index 4810f1f..988c84a 100644
--- a/src/api/hard/hard-door-flow.ts
+++ b/src/api/hard/hard-door-flow.ts
@@ -1,8 +1,8 @@
import request from "/@/utils/request"
-export function fetchList(query?: Object) {
+export function pageJoin(query?: Object) {
return request({
- url: "/hard/hard-door-flow/page",
+ url: "/hard/hard-door-flow/page-join",
method: "get",
params: query,
})
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 @@
+
+
+
+ {{ jsonView }}
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
diff --git a/src/components/index.ts b/src/components/index.ts
index 3e7ad0f..8c7316c 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -12,6 +12,7 @@ import Tip from "/@/components/Tip/index.vue"
import TagList from "/@/components/TagList/index.vue"
import SvgIcon from "/@/components/SvgIcon/index.vue"
import PreviewImage from "/@/components/PreviewImage/index.vue"
+import PreviewJson from "/@/components/PreviewJson/index.vue"
import DraggableDepTree from "/@/components/DraggableDepTree/index.vue"
// 业务组件
@@ -66,6 +67,7 @@ export default {
app.component("TagList", TagList)
app.component("SvgIcon", SvgIcon)
app.component("PreviewImage", PreviewImage)
+ app.component("PreviewJson", PreviewJson)
app.component("DraggableDepTree", DraggableDepTree)
app.component("TreeMultipleSelect", TreeMultipleSelect)
app.component("SelectHard", SelectHard)
diff --git a/src/views/hard/hard-door-flow/index.vue b/src/views/hard/hard-door-flow/index.vue
index e5adedb..bbca6ea 100644
--- a/src/views/hard/hard-door-flow/index.vue
+++ b/src/views/hard/hard-door-flow/index.vue
@@ -23,21 +23,60 @@
@sort-change="sortChangeHandle"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -53,7 +92,7 @@ import { useDict } from "/@/hooks/dict"
// 引入组件
// 定义查询字典
-
+const { yes_no_type } = useDict("yes_no_type")
// 定义变量内容
// 搜索变量
const queryRef = ref()
@@ -64,7 +103,7 @@ const multiple = ref(true)
const state: BasicTableProps = reactive({
queryForm: {},
- pageList: hardDoorFlow.fetchList,
+ pageList: hardDoorFlow.pageJoin,
})
// table hook
diff --git a/src/views/hard/third-door-log/index.vue b/src/views/hard/third-door-log/index.vue
index bea0b3f..d3574d8 100644
--- a/src/views/hard/third-door-log/index.vue
+++ b/src/views/hard/third-door-log/index.vue
@@ -39,20 +39,18 @@
-
-
+
+
- 查看
- null
+
-
+
- 查看
- null
+
-
+
null
-
-
+
+
@@ -76,14 +74,6 @@
-
-
-
-
- 关闭
-
-
-
@@ -94,8 +84,6 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
import * as thirdDoorLog from "/@/api/thirdparty/third-door-log"
import { useMessage, useMessageBox } from "/@/hooks/message"
import { useDict } from "/@/hooks/dict"
-import VueJsonPretty from "vue-json-pretty"
-import "vue-json-pretty/lib/styles.css"
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
const LogDetail = defineAsyncComponent(() => import("./detail.vue"))
@@ -108,7 +96,6 @@ const queryRef = ref()
// 多选变量
const selectObjs = ref([]) as any
const multiple = ref(true)
-const jsonViewVisible = ref()
const jsonData = ref()
const logDetailRef = ref()
@@ -140,12 +127,6 @@ const selectionChangHandle = (objs: { id: string }[]) => {
multiple.value = !objs.length
}
-// 点击查看json
-const handleClickJsonView = (json: any) => {
- jsonViewVisible.value = true
- jsonData.value = JSON.parse(json)
-}
-
// 删除操作
const handleDelete = async (ids: string[]) => {
try {