From 4a50e0ef48738db4a600f1800e41a0ee06c42c18 Mon Sep 17 00:00:00 2001
From: chenjunyi <314298729@qq.com>
Date: Mon, 2 Feb 2026 17:34:03 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BD=AF=E4=BB=B6=E6=A6=82?=
=?UTF-8?q?=E8=BF=B0=EF=BC=9B=E6=96=B0=E5=A2=9E=E5=85=A8=E5=B1=80loading?=
=?UTF-8?q?=E6=8F=92=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cdTMP/package-lock.json | 16 +--
cdTMP/package.json | 4 +-
cdTMP/src/api/project/project.js | 22 ++++
cdTMP/src/components/GlobalLoading/index.vue | 64 ++++++++++
.../projectModal/hooks/useTable.tsx | 33 +++--
.../projectInfoOther/projectModal/index.vue | 45 ++++++-
.../projectModal/wordLikeTable/index.vue | 114 +++++++++++++++++-
cdTMP/src/main.ts | 4 +
cdTMP/src/plugins/loading.js | 16 +++
9 files changed, 291 insertions(+), 27 deletions(-)
create mode 100644 cdTMP/src/components/GlobalLoading/index.vue
create mode 100644 cdTMP/src/plugins/loading.js
diff --git a/cdTMP/package-lock.json b/cdTMP/package-lock.json
index c8cf46b..9f43e29 100644
--- a/cdTMP/package-lock.json
+++ b/cdTMP/package-lock.json
@@ -32,7 +32,7 @@
"vue": "^3.5.27",
"vue-clipboard3": "^2.0.0",
"vue-color-kit": "^1.0.6",
- "vue-data-ui": "^3.13.7",
+ "vue-data-ui": "^3.14.1",
"vue-router": "^5.0.1",
"vuedraggable": "^2.24.3"
},
@@ -40,7 +40,7 @@
"@tailwindcss/postcss": "^4.1.18",
"@tailwindcss/vite": "^4.1.18",
"@types/lodash-es": "^4.17.12",
- "@types/node": "^25.1.0",
+ "@types/node": "^25.2.0",
"@types/nprogress": "^0.2.3",
"@types/qs": "^6.14.0",
"@vitejs/plugin-vue": "^6.0.3",
@@ -1900,9 +1900,9 @@
}
},
"node_modules/@types/node": {
- "version": "25.1.0",
- "resolved": "https://registry.npmmirror.com/@types/node/-/node-25.1.0.tgz",
- "integrity": "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA==",
+ "version": "25.2.0",
+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-25.2.0.tgz",
+ "integrity": "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5707,9 +5707,9 @@
}
},
"node_modules/vue-data-ui": {
- "version": "3.13.7",
- "resolved": "https://registry.npmmirror.com/vue-data-ui/-/vue-data-ui-3.13.7.tgz",
- "integrity": "sha512-tFz+sN5CaDUl1/VotE35lV3hvJPurkhE6j/e3DldOMDbDCunOYvwqGuMglmGxQ8n/w1N/iqnEWVTmhIJHYdd8Q==",
+ "version": "3.14.1",
+ "resolved": "https://registry.npmmirror.com/vue-data-ui/-/vue-data-ui-3.14.1.tgz",
+ "integrity": "sha512-i7GNaNtw39Avy9VuDHGdLdDpH2sRsr2ZFRpiilOvQ0XA5887KCvd7J5IUQRpVNTQSaT7pFSSEMPwcQ7NfPHuVw==",
"license": "MIT",
"peerDependencies": {
"jspdf": ">=3.0.1",
diff --git a/cdTMP/package.json b/cdTMP/package.json
index bcf53e9..f05ae92 100644
--- a/cdTMP/package.json
+++ b/cdTMP/package.json
@@ -35,7 +35,7 @@
"vue": "^3.5.27",
"vue-clipboard3": "^2.0.0",
"vue-color-kit": "^1.0.6",
- "vue-data-ui": "^3.13.7",
+ "vue-data-ui": "^3.14.1",
"vue-router": "^5.0.1",
"vuedraggable": "^2.24.3"
},
@@ -43,7 +43,7 @@
"@tailwindcss/postcss": "^4.1.18",
"@tailwindcss/vite": "^4.1.18",
"@types/lodash-es": "^4.17.12",
- "@types/node": "^25.1.0",
+ "@types/node": "^25.2.0",
"@types/nprogress": "^0.2.3",
"@types/qs": "^6.14.0",
"@vitejs/plugin-vue": "^6.0.3",
diff --git a/cdTMP/src/api/project/project.js b/cdTMP/src/api/project/project.js
index cb1f4aa..965f0c0 100644
--- a/cdTMP/src/api/project/project.js
+++ b/cdTMP/src/api/project/project.js
@@ -110,5 +110,27 @@ export default {
id: projectId
}
})
+ },
+ /**
+ * 新增或者修改软件概述
+ * @returns 返回新增或修改是否成功
+ */
+ postSoftSummary(data) {
+ return request({
+ url: "/testmanage/project/soft_summary/",
+ method: "post",
+ data: data
+ })
+ },
+ /**
+ * 获取项目的软件概述
+ * @returns 返回软件概述数据
+ */
+ getSoftSummary(id) {
+ return request({
+ url: "/testmanage/project/get_soft_summary/",
+ method: "get",
+ params: { id: id }
+ })
}
}
diff --git a/cdTMP/src/components/GlobalLoading/index.vue b/cdTMP/src/components/GlobalLoading/index.vue
new file mode 100644
index 0000000..2afb015
--- /dev/null
+++ b/cdTMP/src/components/GlobalLoading/index.vue
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
diff --git a/cdTMP/src/layout/components/projectInfoOther/projectModal/hooks/useTable.tsx b/cdTMP/src/layout/components/projectInfoOther/projectModal/hooks/useTable.tsx
index fa5e84a..6ac4d97 100644
--- a/cdTMP/src/layout/components/projectInfoOther/projectModal/hooks/useTable.tsx
+++ b/cdTMP/src/layout/components/projectInfoOther/projectModal/hooks/useTable.tsx
@@ -1,5 +1,5 @@
import { TableColumnData } from "@arco-design/web-vue"
-import { ref, reactive } from "vue"
+import { ref, reactive, onUnmounted } from "vue"
// 粘贴图片组件
import ImageInput from "../ImageInput/index.vue"
// wordlike组件
@@ -44,7 +44,7 @@ export default function useTable() {
case "image":
return
case "table":
- return
+ return
}
}
},
@@ -66,14 +66,19 @@ export default function useTable() {
}
])
+ // 卸载时清空数据
+ const handleOnClose = () => {
+ data.value = [{ ...initalRowData }]
+ }
+
// 数据定义 - 测试
- const data = ref([
+ const data = ref<
{
- type: "text",
- content: "这是数据内容",
- fontnote: ""
- }
- ])
+ type: string
+ content: string | string[][]
+ fontnote: string
+ }[]
+ >([])
// 单行初始内容-并设置数据类型
const initalRowData = {
@@ -104,8 +109,16 @@ export default function useTable() {
// 新增表格
const addTableRow = () => {
- data.value.push({ type: "table", content: "", fontnote: "" })
+ data.value.push({
+ type: "table",
+ content: [
+ ["", "", ""],
+ ["", "", ""],
+ ["", "", ""]
+ ],
+ fontnote: ""
+ })
}
- return { columns, data, handleChange, addTextRow, addPicRow, addTableRow }
+ return { columns, data, handleChange, addTextRow, addPicRow, addTableRow, handleOnClose }
}
diff --git a/cdTMP/src/layout/components/projectInfoOther/projectModal/index.vue b/cdTMP/src/layout/components/projectInfoOther/projectModal/index.vue
index c8de32b..82ead43 100644
--- a/cdTMP/src/layout/components/projectInfoOther/projectModal/index.vue
+++ b/cdTMP/src/layout/components/projectInfoOther/projectModal/index.vue
@@ -1,7 +1,17 @@
-
- {{ "软件概述" }}
+
+ {{ title }}
@@ -23,17 +33,44 @@
\ No newline at end of file
+.arco-textarea {
+ min-width: 120px;
+}
+
+.arco-table-cell {
+ padding: 5px;
+}
+
diff --git a/cdTMP/src/main.ts b/cdTMP/src/main.ts
index ad88365..6b90e44 100644
--- a/cdTMP/src/main.ts
+++ b/cdTMP/src/main.ts
@@ -25,6 +25,10 @@ app.use(router)
app.use(pinia)
app.use(globalComponents)
+// 全局loading插件
+import loadingPlugin from "./plugins/loading"
+app.use(loadingPlugin)
+
// 使用服务端请求数据管理库
import { VueQueryPlugin } from "@tanstack/vue-query"
app.use(VueQueryPlugin)
diff --git a/cdTMP/src/plugins/loading.js b/cdTMP/src/plugins/loading.js
new file mode 100644
index 0000000..f5ef225
--- /dev/null
+++ b/cdTMP/src/plugins/loading.js
@@ -0,0 +1,16 @@
+import { createVNode, render } from "vue"
+import LoadingComponent from "@/components/GlobalLoading/index.vue"
+
+export default {
+ install(app) {
+ // 创建虚拟节点并渲染
+ const vnode = createVNode(LoadingComponent)
+ render(vnode, document.body)
+
+ // 挂载到全局属性
+ app.config.globalProperties.$loading = {
+ show: (text) => vnode.component?.exposed?.show(text),
+ hide: () => vnode.component?.exposed?.hide()
+ }
+ }
+}