From 8c711e066b57b1c49124251a26c9980f5b1bfae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 27 Oct 2025 11:13:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(pwlProject):=20=E6=9B=B4=E6=96=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=A1=A8=E6=A0=BC=E5=B1=95=E7=A4=BA-=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E9=A1=B9=E7=9B=AE=E7=BB=9F=E8=AE=A1=E5=92=8C?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=20-=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BA=86=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E5=B1=95=E7=A4=BA=E7=BB=93=E6=9E=84=E5=92=8C=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=98=BE=E7=A4=BA-=20=E8=B0=83=E6=95=B4=E4=BA=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=BC=B9=E7=AA=97=E7=9A=84=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E4=BB=A5=E9=80=82=E5=BA=94=E6=9B=B4=E5=A4=9A=E5=86=85=E5=AE=B9?= =?UTF-8?q?=20-=20=E6=B7=BB=E5=8A=A0=E4=BA=86highlight.js=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E4=BB=A5=E6=94=AF=E6=8C=81=E4=BB=A3=E7=A0=81=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=20-=20=E6=9B=B4=E6=96=B0=E4=BA=86=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=88=97=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E5=B5=8C=E5=A5=97=E8=A1=A8=E5=A4=B4=E5=92=8C=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=88=97-=20=E6=94=B9=E8=BF=9B=E4=BA=86=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E3=80=81=E5=BA=95=E7=A8=BF=E3=80=81=E7=AD=BE=E5=AD=97=E7=AD=89?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E5=B1=95=E7=A4=BA=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=20-=E4=BC=98=E5=8C=96=E4=BA=86=E7=8A=B6=E6=80=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=92=8C=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA-=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=87=E9=A2=98=E5=92=8C=E8=BF=94=E5=9B=9E=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20-=20=E6=9B=B4=E6=96=B0=E4=BA=86API=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0type=E5=92=8CitemYear=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 3 + src/api/pwl/pwlProject/index.ts | 25 + src/api/pwl/pwlProject/model/index.ts | 2 + .../pwlProject/components/pwlProjectEdit.vue | 880 +++++++++-------- .../pwl/pwlProject/components/search.vue | 239 ++++- src/views/pwl/pwlProject/index.vue | 892 +++++++++--------- .../components/chatMessageEdit.vue | 407 ++++---- 8 files changed, 1381 insertions(+), 1068 deletions(-) diff --git a/package.json b/package.json index 6f04eed..2d0547f 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "eslint-define-config": "^1.7.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.4.0", + "highlight.js": "^11.11.1", "less": "^4.1.3", "postcss": "^8.4.39", "prettier": "^2.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fcf1008..a7c01d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -186,6 +186,9 @@ importers: eslint-plugin-vue: specifier: ^9.4.0 version: 9.33.0(eslint@8.57.1) + highlight.js: + specifier: ^11.11.1 + version: 11.11.1 less: specifier: ^4.1.3 version: 4.4.2 diff --git a/src/api/pwl/pwlProject/index.ts b/src/api/pwl/pwlProject/index.ts index 9e32a32..0d1a607 100644 --- a/src/api/pwl/pwlProject/index.ts +++ b/src/api/pwl/pwlProject/index.ts @@ -104,3 +104,28 @@ export async function getPwlProject(id: number) { } return Promise.reject(new Error(res.data.message)); } + +export async function pwlProjectCount() { + const res = await request.get('/pwl/pwl-project/'); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + + +/** + * 文章批量导入 + */ +export async function importPwlProject(file: File) { + const formData = new FormData(); + formData.append('file', file); + const res = await request.post>( + MODULES_API_URL + '/pwl/pwl-project/import', + formData + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/pwl/pwlProject/model/index.ts b/src/api/pwl/pwlProject/model/index.ts index 44ebbeb..fb8b9af 100644 --- a/src/api/pwl/pwlProject/model/index.ts +++ b/src/api/pwl/pwlProject/model/index.ts @@ -105,5 +105,7 @@ export interface PwlProject { */ export interface PwlProjectParam extends PageParam { id?: number; + type?: string; + itemYear?: string; keywords?: string; } diff --git a/src/views/pwl/pwlProject/components/pwlProjectEdit.vue b/src/views/pwl/pwlProject/components/pwlProjectEdit.vue index 8cacd9a..02bd654 100644 --- a/src/views/pwl/pwlProject/components/pwlProjectEdit.vue +++ b/src/views/pwl/pwlProject/components/pwlProjectEdit.vue @@ -1,11 +1,11 @@ diff --git a/src/views/pwl/pwlProject/components/search.vue b/src/views/pwl/pwlProject/components/search.vue index 82fea9d..a309315 100644 --- a/src/views/pwl/pwlProject/components/search.vue +++ b/src/views/pwl/pwlProject/components/search.vue @@ -3,40 +3,229 @@ 添加 + + + 批量删除 + + + + + 重置 + 导出xls + 导入xls + + + diff --git a/src/views/pwl/pwlProject/index.vue b/src/views/pwl/pwlProject/index.vue index ebe372e..cb612ab 100644 --- a/src/views/pwl/pwlProject/index.vue +++ b/src/views/pwl/pwlProject/index.vue @@ -1,479 +1,457 @@