From 24453baf3e08d62523e214c8fe2646e60b34d8ed Mon Sep 17 00:00:00 2001 From: guochunsi <1595020186@qq.com> Date: Sun, 4 Jan 2026 18:23:27 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 10 +- docs/按钮样式规范.md | 323 ++++++--------- .../professionalpartychange.ts | 18 +- .../professionalpoliticsstatus.ts | 27 +- .../professionalqualificationrelation.ts | 27 +- .../professionalsocial.ts | 27 +- .../professionalteacheracademicrelation.ts | 27 +- .../professionalteachercertificaterelation.ts | 18 +- .../professionalteacherhonor.ts | 18 +- .../professionalteacherstationchange.ts | 18 +- .../professionaltitlerelation.ts | 27 +- .../{ => professionaluser}/teacherbase.ts | 19 +- src/components/AuditState/index.vue | 8 +- src/components/SearchForm/index.vue | 19 +- src/theme/element.scss | 14 +- .../common/professional-back-resaon.vue | 2 +- .../professionalpartychange/index.vue | 17 +- .../form.vue | 194 +++++---- .../index.vue | 117 ++---- .../statistics.vue | 82 ++++ .../form.vue | 266 ++++++------ .../index.vue | 125 ++---- .../statistics.vue | 83 ++++ .../form.vue | 201 ++++++---- .../index.vue | 54 +-- .../professionalteacherhonor/form.vue | 180 +++++---- .../professionalteacherhonor/index.vue | 64 +-- .../index.vue | 19 +- .../professionaltitlerelation/form.vue | 203 ++++++---- .../professionaltitlerelation/index.vue | 119 +----- .../professionaltitlerelation/statistics.vue | 119 ++++++ src/views/professional/teacherbase/index.vue | 34 +- .../professional/teacherbase/multiDialog.vue | 379 ++++++++++-------- vite.config.ts | 4 + 34 files changed, 1603 insertions(+), 1259 deletions(-) rename src/api/professional/{ => professionaluser}/professionalpoliticsstatus.ts (78%) rename src/api/professional/{ => professionaluser}/professionalsocial.ts (80%) rename src/api/professional/{ => professionaluser}/teacherbase.ts (96%) create mode 100644 src/views/professional/professionalqualificationrelation/statistics.vue create mode 100644 src/views/professional/professionalteacheracademicrelation/statistics.vue create mode 100644 src/views/professional/professionaltitlerelation/statistics.vue diff --git a/.env.development b/.env.development index ec6071e..731b7cb 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ # port 端口号 -VITE_PORT = 8888 +VITE_PORT=8888 #浏览器自动打开 -VITE_OPEN = true +VITE_OPEN=true # 本地环境 -ENV = 'development' +ENV=development -# ADMIN 服务地址 -VITE_ADMIN_PROXY_PATH = http://localhost:9999 +# ADMIN 服务地址(会被 .env.local 覆盖) +VITE_ADMIN_PROXY_PATH=http://localhost:9999 diff --git a/docs/按钮样式规范.md b/docs/按钮样式规范.md index f822833..73c6207 100644 --- a/docs/按钮样式规范.md +++ b/docs/按钮样式规范.md @@ -1,191 +1,131 @@ # 按钮样式设计规范 -本文档定义了项目中按钮组件的样式规范,包括实心按钮和Plain按钮的使用规则,确保整个应用的按钮样式统一、协调、美观。 +本文档定义了项目中按钮组件的样式规范,确保整个应用的按钮样式统一、协调、美观。 -## 一、按钮类型分类 +## 一、尺寸 -### 1. 实心按钮(Solid)- 用于最重要的操作 +**所有按钮统一使用默认尺寸**,不需要设置 `size` 属性。 -**使用场景:** -- 新增、创建操作 -- 保存、提交操作 -- 确认、确定操作 -- 删除等危险操作(需要突出警示) +- 高度:32px(Element Plus默认) +- 适用于所有场景:页面操作区域、表格操作列、对话框底部等 -**视觉特点:** -- 实心填充,高对比度 -- 突出显示,吸引用户注意力 -- 通常位于操作区域的主要位置 - -**代码示例:** ```vue - -新 增 - - -删 除 +新 增 +编辑 ``` -### 2. Plain按钮(边框样式)- 用于次要操作 +## 二、颜色 -**使用场景:** -- 查询、搜索操作 -- 导出、导入操作 -- 设置、配置操作 -- 辅助功能操作 +| 操作类型 | type | plain | 颜色 | 使用场景 | +|---------|------|-------|------|---------| +| 主要操作 | `primary` | - | 蓝色实心 | 新增、保存、提交 | +| 查询 | `primary` | - | 蓝色实心 | 查询 | +| 重置 | `primary` | ✓ | 蓝色边框 | 重置 | +| 导出操作 | `warning` | ✓ | 橙色边框 | 导出、下载 | +| 导入操作 | `primary` | ✓ | 蓝色边框 | 导入、上传 | +| 设置操作 | `primary` | ✓ | 蓝色边框 | 设置、配置 | +| 状态锁定 | - | - | 灰色 | 状态锁定、解锁 | +| 危险操作 | `danger` | - | 红色实心 | 删除、清空 | -**视觉特点:** -- 边框+透明背景 -- 不抢夺视觉焦点 -- 保持页面协调统一 -- 适合批量操作按钮 +## 三、样式 + +### 1. 实心按钮(默认) +- **使用场景**:新增、保存、删除等主要操作 +- **代码**:`type="primary"` 或 `type="danger"` -**代码示例:** ```vue - -查询 - - -导出 - - -导入 +新 增 +删 除 ``` -### 3. 默认按钮 - 用于中性操作 +### 2. Plain按钮(边框样式) +- **使用场景**:重置、导出、导入、设置等次要操作 +- **代码**:`type="primary" plain` 或 `type="warning" plain` -**使用场景:** -- 设置、配置操作 -- 状态切换操作 -- 中性功能操作 - -**视觉特点:** -- 灰色系,低调不突出 -- 适合不重要的操作 - -**代码示例:** ```vue - -状态锁定 +重置 +导出 +导入 +设置 ``` -## 二、配色方案 +### 3. 设置按钮 +- **使用场景**:设置、配置等操作 +- **代码**:`type="primary" plain` -> **设计原则:** 在保持项目默认样式的基础上,通过颜色区分不同操作类型,提升视觉层次和识别度。 +```vue +设置 +``` -### 主要操作按钮 -- **类型:** `type="primary"` 实心 -- **颜色:** 蓝色实心填充 -- **用途:** 新增、保存、提交等主要操作 -- **示例:** 新增按钮 +### 4. 默认按钮(灰色) +- **使用场景**:状态锁定、解锁等中性操作 +- **代码**:不设置 `type` 属性 -### 查询操作按钮 -- **类型:** `type="primary" plain` -- **颜色:** 蓝色边框 + 透明背景 -- **用途:** 查询、搜索、筛选等操作 -- **示例:** 一体化查询、搜索按钮 -- **说明:** 与主要操作保持同一色系,体现关联性 +```vue +状态锁定 +``` -### 导出操作按钮 -- **类型:** `type="warning" plain` -- **颜色:** 橙色边框 + 透明背景 -- **用途:** 数据导出、下载等操作 -- **示例:** 导出WORD、自定义导出 -- **说明:** 橙色表示数据输出,与导入形成对比 +### 5. 表格操作列按钮(link) +- **使用场景**:表格操作列,使用 `link` 属性 +- **代码**:`link` 属性,配合 `type` 使用 +- **说明**:表格内的操作按钮统一使用 `link` 样式,节省空间 -### 导入操作按钮 -- **类型:** `type="primary" plain` -- **颜色:** 蓝色边框 + 透明背景 -- **用途:** 数据导入、上传等操作 -- **示例:** 导入信息 -- **说明:** 保持项目默认样式,与查询操作保持一致 +```vue +编辑 +删除 +通过 +批量删除 +``` -### 设置操作按钮 -- **类型:** 默认样式(无type属性) -- **颜色:** 灰色系 -- **用途:** 设置、配置、状态锁定等中性操作 -- **示例:** 状态锁定按钮 - -### 危险操作按钮 -- **类型:** `type="danger"` 实心 或 `type="danger" plain` -- **颜色:** 红色 -- **用途:** 删除、清空等危险操作 -- **示例:** 删除按钮 - -## 三、按钮图标规范 +## 四、图标 所有按钮应配合相应的图标使用,提升用户体验和视觉识别度。 ### 常用图标映射 -| 操作类型 | 图标名称 | 说明 | -|---------|---------|------| -| 新增/添加 | `FolderAdd` | 文件夹加号图标(项目默认) | -| 查询/搜索 | `Search` | 搜索图标 | -| 导出/下载 | `Download` | 下载图标 | -| 导入/上传 | `Upload` | 上传图标(项目默认) | -| 编辑/修改 | `Edit` | 编辑图标 | -| 删除 | `Delete` | 删除图标 | -| 查看/详情 | `View` | 查看图标 | -| 设置/配置 | `Setting` | 设置图标 | -| 锁定/解锁 | `Lock` | 锁定图标 | -| 刷新/重置 | `Refresh` | 刷新图标 | -| 用户相关 | `User` | 用户图标 | +| 操作类型 | 图标名称 | +|---------|---------| +| 查询 | `Search` | +| 重置 | `Refresh` | +| 新增/添加 | `FolderAdd` | +| 导出/下载 | `Download` | +| 导入/上传 | `UploadFilled` | +| 编辑/修改 | `EditPen` | +| 删除 | `Delete` | +| 批量删除 | `DocumentDelete` | +| 通过 | `CircleCheck` | +| 驳回 | `CircleClose` | +| 查看图片 | `Picture` | +| 详情/其他 | `Document` | +| 设置/配置 | `Setting` | +| 锁定/解锁 | `Lock` | +| 用户相关 | `User` | -### 图标使用示例 - -```vue -新 增 -查询 -导出 -导入 -``` - -## 四、按钮尺寸规范 - -### 默认尺寸(default) -- 用于页面主要操作区域的按钮 -- 高度:32px(Element Plus默认) - -### 小尺寸(small) -- 用于表格操作列、对话框底部等空间受限的场景 -- 高度:24px -- 使用 `size="small"` 属性 - -```vue - -编辑 -``` - -### 链接按钮(link) -- 用于表格操作列,节省空间 -- 使用 `link` 属性 - -```vue -查看 -``` - -## 五、按钮布局规范 - -### 按钮间距 -- 按钮之间使用 `class="ml10"` 保持10px的左边距 -- 确保按钮组视觉统一 +### 使用示例 ```vue 新 增 -查询 -导出 -导入 +查询 +重置 +导出 +导入 ``` -### 按钮分组 -- 相关功能的按钮应放在一起 -- 主要操作按钮放在最前面 -- 次要操作按钮放在后面 +## 五、间距 + +按钮之间使用 `class="ml10"` 保持10px的左边距,确保按钮组视觉统一。 + +```vue +新 增 +查询 +重置 +导出 +导入 +``` ## 六、完整示例 -### 页面操作按钮组示例 +### 页面操作按钮组 ```vue @@ -193,21 +133,29 @@ 新 增 - + 查询 - + + 重置 + + + 导出 - + 导入 - + 设置 @@ -235,7 +185,7 @@ ``` -### 表格操作列示例 +### 表格操作列 ```vue @@ -243,67 +193,30 @@ 编辑 删除 ``` -## 七、最佳实践 +## 七、快速参考 -1. **一致性原则** - - 相同功能的按钮在整个应用中应使用相同的样式 - - 保持图标和颜色的统一性 - -2. **层次分明** - - 主要操作使用实心按钮,突出显示 - - 次要操作使用Plain按钮,保持协调 - -3. **语义化** - - 按钮的颜色和样式应与其功能语义相匹配 - - 危险操作使用红色,数据操作使用绿色等 - -4. **用户体验** - - 重要操作按钮应放在显眼位置 - - 按钮文字应简洁明了 - - 配合图标提升识别度 - -5. **响应式考虑** - - 在移动端或小屏幕设备上,考虑使用更紧凑的布局 - - 使用 `size="small"` 适应空间限制 - -## 八、注意事项 - -1. **避免过度使用实心按钮** - - 一个页面中实心按钮不应过多,通常1-2个主要操作即可 - - 过多的实心按钮会分散用户注意力 - -2. **Plain按钮的优势** - - Plain按钮视觉更柔和,适合批量操作 - - 不会抢夺主要操作的视觉焦点 - -3. **图标选择** - - 图标应与操作功能语义匹配 - - 使用Element Plus内置图标,保持一致性 - -4. **权限控制** - - 按钮应根据用户权限显示/隐藏 - - 使用 `v-if` 控制按钮的显示 - -## 九、更新记录 - -- **2024-XX-XX**: 创建按钮样式规范文档 -- 规范版本:v1.0 +| 要素 | 规范 | +|------|------| +| **尺寸** | 统一使用默认尺寸,不设置 `size` 属性 | +| **颜色** | 主要操作用蓝色实心,次要操作用蓝色/橙色边框,危险操作用红色 | +| **样式** | 主要操作用实心,次要操作用 `plain`,**表格操作列必须用 `link`** | +| **图标** | 所有按钮必须配合图标,使用 PascalCase 格式 | +| **间距** | 按钮之间使用 `class="ml10"` 保持10px间距 | --- **维护者:** 前端开发团队 **最后更新:** 2024年 - diff --git a/src/api/professional/professionaluser/professionalpartychange.ts b/src/api/professional/professionaluser/professionalpartychange.ts index f5cf8d1..cdf46e3 100644 --- a/src/api/professional/professionaluser/professionalpartychange.ts +++ b/src/api/professional/professionaluser/professionalpartychange.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalpartychange', + url: '/professional/professionalpartychange/add', method: 'post', data: obj, }); @@ -47,8 +47,11 @@ export const addObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalpartychange/${id}`, + url: `/professional/professionalpartychange/getById`, method: 'get', + params: { + id: id + } }); }; @@ -58,8 +61,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalpartychange/${id}`, - method: 'delete', + url: `/professional/professionalpartychange/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -69,8 +75,8 @@ export const delObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalpartychange', - method: 'put', + url: '/professional/professionalpartychange/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionalpoliticsstatus.ts b/src/api/professional/professionaluser/professionalpoliticsstatus.ts similarity index 78% rename from src/api/professional/professionalpoliticsstatus.ts rename to src/api/professional/professionaluser/professionalpoliticsstatus.ts index 7dbef43..810c5eb 100644 --- a/src/api/professional/professionalpoliticsstatus.ts +++ b/src/api/professional/professionaluser/professionalpoliticsstatus.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalpoliticsstatus', + url: '/professional/professionalpoliticsstatus/add', method: 'post', data: obj, }); @@ -47,7 +47,7 @@ export const addObj = (obj: any) => { */ export const addPoliticssStatus = (obj: any) => { return request({ - url: '/professional/professionalpoliticsstatus', + url: '/professional/professionalpoliticsstatus/add', method: 'post', data: obj, }); @@ -59,8 +59,11 @@ export const addPoliticssStatus = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalpoliticsstatus/${id}`, + url: `/professional/professionalpoliticsstatus/getById`, method: 'get', + params: { + id: id + } }); }; @@ -70,8 +73,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalpoliticsstatus/${id}`, - method: 'delete', + url: `/professional/professionalpoliticsstatus/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -81,8 +87,11 @@ export const delObj = (id: string | number) => { */ export const dePoObj = (id: string | number) => { return request({ - url: `/professional/professionalpoliticsstatus/${id}`, - method: 'delete', + url: `/professional/professionalpoliticsstatus/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -92,8 +101,8 @@ export const dePoObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalpoliticsstatus', - method: 'put', + url: '/professional/professionalpoliticsstatus/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionaluser/professionalqualificationrelation.ts b/src/api/professional/professionaluser/professionalqualificationrelation.ts index a0092fe..de35f04 100644 --- a/src/api/professional/professionaluser/professionalqualificationrelation.ts +++ b/src/api/professional/professionaluser/professionalqualificationrelation.ts @@ -35,7 +35,7 @@ export function fetchList(query?: any) { */ export function addObj(obj?: any) { return request({ - url: '/professional/professionalqualificationrelation', + url: '/professional/professionalqualificationrelation/add', method: 'post', data: obj, }); @@ -47,7 +47,7 @@ export function addObj(obj?: any) { */ export function addQuaRelation(obj?: any) { return request({ - url: '/professional/professionalqualificationrelation', + url: '/professional/professionalqualificationrelation/add', method: 'post', data: obj, }); @@ -59,8 +59,11 @@ export function addQuaRelation(obj?: any) { */ export function getObj(id: string | number) { return request({ - url: '/professional/professionalqualificationrelation/' + id, + url: '/professional/professionalqualificationrelation/getById', method: 'get', + params: { + id: id + } }); } @@ -70,8 +73,11 @@ export function getObj(id: string | number) { */ export function delObj(id: string | number) { return request({ - url: '/professional/professionalqualificationrelation/' + id, - method: 'delete', + url: '/professional/professionalqualificationrelation/deleteById', + method: 'post', + data: { + id: id + } }); } @@ -81,8 +87,11 @@ export function delObj(id: string | number) { */ export function delQuaObj(id: string | number) { return request({ - url: '/professional/professionalqualificationrelation/' + id, - method: 'delete', + url: '/professional/professionalqualificationrelation/deleteById', + method: 'post', + data: { + id: id + } }); } @@ -92,8 +101,8 @@ export function delQuaObj(id: string | number) { */ export function putObj(obj?: any) { return request({ - url: '/professional/professionalqualificationrelation', - method: 'put', + url: '/professional/professionalqualificationrelation/edit', + method: 'post', data: obj, }); } diff --git a/src/api/professional/professionalsocial.ts b/src/api/professional/professionaluser/professionalsocial.ts similarity index 80% rename from src/api/professional/professionalsocial.ts rename to src/api/professional/professionaluser/professionalsocial.ts index 08f8324..6723a56 100644 --- a/src/api/professional/professionalsocial.ts +++ b/src/api/professional/professionaluser/professionalsocial.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalsocial', + url: '/professional/professionalsocial/add', method: 'post', data: obj, }); @@ -47,7 +47,7 @@ export const addObj = (obj: any) => { */ export const addSocialObj = (obj: any) => { return request({ - url: '/professional/professionalsocial', + url: '/professional/professionalsocial/add', method: 'post', data: obj, }); @@ -59,8 +59,11 @@ export const addSocialObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalsocial/${id}`, + url: `/professional/professionalsocial/getById`, method: 'get', + params: { + id: id + } }); }; @@ -70,8 +73,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalsocial/${id}`, - method: 'delete', + url: `/professional/professionalsocial/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -81,8 +87,11 @@ export const delObj = (id: string | number) => { */ export const delSocialObj = (id: string | number) => { return request({ - url: `/professional/professionalsocial/${id}`, - method: 'delete', + url: `/professional/professionalsocial/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -92,8 +101,8 @@ export const delSocialObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalsocial', - method: 'put', + url: '/professional/professionalsocial/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionaluser/professionalteacheracademicrelation.ts b/src/api/professional/professionaluser/professionalteacheracademicrelation.ts index e9bd7b6..0a8f755 100644 --- a/src/api/professional/professionaluser/professionalteacheracademicrelation.ts +++ b/src/api/professional/professionaluser/professionalteacheracademicrelation.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalteacheracademicrelation', + url: '/professional/professionalteacheracademicrelation/add', method: 'post', data: obj, }); @@ -47,7 +47,7 @@ export const addObj = (obj: any) => { */ export const addAcadeRelation = (obj: any) => { return request({ - url: '/professional/professionalteacheracademicrelation', + url: '/professional/professionalteacheracademicrelation/add', method: 'post', data: obj, }); @@ -59,8 +59,11 @@ export const addAcadeRelation = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalteacheracademicrelation/${id}`, + url: `/professional/professionalteacheracademicrelation/getById`, method: 'get', + params: { + id: id + } }); }; @@ -70,8 +73,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalteacheracademicrelation/${id}`, - method: 'delete', + url: `/professional/professionalteacheracademicrelation/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -81,8 +87,11 @@ export const delObj = (id: string | number) => { */ export const delEduObj = (id: string | number) => { return request({ - url: `/professional/professionalteacheracademicrelation/${id}`, - method: 'delete', + url: `/professional/professionalteacheracademicrelation/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -92,8 +101,8 @@ export const delEduObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalteacheracademicrelation', - method: 'put', + url: '/professional/professionalteacheracademicrelation/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionaluser/professionalteachercertificaterelation.ts b/src/api/professional/professionaluser/professionalteachercertificaterelation.ts index 5ee330a..111b590 100644 --- a/src/api/professional/professionaluser/professionalteachercertificaterelation.ts +++ b/src/api/professional/professionaluser/professionalteachercertificaterelation.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalteachercertificaterelation', + url: '/professional/professionalteachercertificaterelation/add', method: 'post', data: obj, }); @@ -47,8 +47,11 @@ export const addObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalteachercertificaterelation/${id}`, + url: `/professional/professionalteachercertificaterelation/getById`, method: 'get', + params: { + id: id + } }); }; @@ -58,8 +61,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalteachercertificaterelation/${id}`, - method: 'delete', + url: `/professional/professionalteachercertificaterelation/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -69,8 +75,8 @@ export const delObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalteachercertificaterelation', - method: 'put', + url: '/professional/professionalteachercertificaterelation/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionaluser/professionalteacherhonor.ts b/src/api/professional/professionaluser/professionalteacherhonor.ts index 4ff41a6..a4c7fd9 100644 --- a/src/api/professional/professionaluser/professionalteacherhonor.ts +++ b/src/api/professional/professionaluser/professionalteacherhonor.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalteacherhonor', + url: '/professional/professionalteacherhonor/add', method: 'post', data: obj, }); @@ -47,8 +47,11 @@ export const addObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalteacherhonor/${id}`, + url: `/professional/professionalteacherhonor/getById`, method: 'get', + params: { + id: id + } }); }; @@ -58,8 +61,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalteacherhonor/${id}`, - method: 'delete', + url: `/professional/professionalteacherhonor/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -69,8 +75,8 @@ export const delObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalteacherhonor', - method: 'put', + url: '/professional/professionalteacherhonor/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionaluser/professionalteacherstationchange.ts b/src/api/professional/professionaluser/professionalteacherstationchange.ts index 5ed275f..b83992a 100644 --- a/src/api/professional/professionaluser/professionalteacherstationchange.ts +++ b/src/api/professional/professionaluser/professionalteacherstationchange.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionalteacherstationchange', + url: '/professional/professionalteacherstationchange/add', method: 'post', data: obj, }); @@ -47,8 +47,11 @@ export const addObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionalteacherstationchange/${id}`, + url: `/professional/professionalteacherstationchange/getById`, method: 'get', + params: { + id: id + } }); }; @@ -58,8 +61,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionalteacherstationchange/${id}`, - method: 'delete', + url: `/professional/professionalteacherstationchange/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -69,8 +75,8 @@ export const delObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionalteacherstationchange', - method: 'put', + url: '/professional/professionalteacherstationchange/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/professionaluser/professionaltitlerelation.ts b/src/api/professional/professionaluser/professionaltitlerelation.ts index 253e727..9c415a3 100644 --- a/src/api/professional/professionaluser/professionaltitlerelation.ts +++ b/src/api/professional/professionaluser/professionaltitlerelation.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/professionaltitlerelation', + url: '/professional/professionaltitlerelation/add', method: 'post', data: obj, }); @@ -47,7 +47,7 @@ export const addObj = (obj: any) => { */ export const addTitleRelationObj = (obj: any) => { return request({ - url: '/professional/professionaltitlerelation', + url: '/professional/professionaltitlerelation/add', method: 'post', data: obj, }); @@ -59,8 +59,11 @@ export const addTitleRelationObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/professionaltitlerelation/${id}`, + url: `/professional/professionaltitlerelation/getById`, method: 'get', + params: { + id: id + } }); }; @@ -70,8 +73,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/professionaltitlerelation/${id}`, - method: 'delete', + url: `/professional/professionaltitlerelation/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -81,8 +87,11 @@ export const delObj = (id: string | number) => { */ export const delTitleObj = (id: string | number) => { return request({ - url: `/professional/professionaltitlerelation/${id}`, - method: 'delete', + url: `/professional/professionaltitlerelation/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -92,8 +101,8 @@ export const delTitleObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/professionaltitlerelation', - method: 'put', + url: '/professional/professionaltitlerelation/edit', + method: 'post', data: obj, }); }; diff --git a/src/api/professional/teacherbase.ts b/src/api/professional/professionaluser/teacherbase.ts similarity index 96% rename from src/api/professional/teacherbase.ts rename to src/api/professional/professionaluser/teacherbase.ts index e204df7..b1287bc 100644 --- a/src/api/professional/teacherbase.ts +++ b/src/api/professional/professionaluser/teacherbase.ts @@ -35,7 +35,7 @@ export const fetchList = (query?: any) => { */ export const addObj = (obj: any) => { return request({ - url: '/professional/teacherbase', + url: '/professional/teacherbase/add', method: 'post', data: obj, }); @@ -47,8 +47,11 @@ export const addObj = (obj: any) => { */ export const getObj = (id: string | number) => { return request({ - url: `/professional/teacherbase/${id}`, + url: `/professional/teacherbase/getById`, method: 'get', + params: { + id: id + } }); }; @@ -58,8 +61,11 @@ export const getObj = (id: string | number) => { */ export const delObj = (id: string | number) => { return request({ - url: `/professional/teacherbase/${id}`, - method: 'delete', + url: `/professional/teacherbase/deleteById`, + method: 'post', + data: { + id: id + } }); }; @@ -69,8 +75,8 @@ export const delObj = (id: string | number) => { */ export const putObj = (obj: any) => { return request({ - url: '/professional/teacherbase', - method: 'put', + url: '/professional/teacherbase/edit', + method: 'post', data: obj, }); }; @@ -336,3 +342,4 @@ export const search = (data: string | number) => { }); }; + diff --git a/src/components/AuditState/index.vue b/src/components/AuditState/index.vue index 2f6337f..59c3404 100644 --- a/src/components/AuditState/index.vue +++ b/src/components/AuditState/index.vue @@ -1,5 +1,6 @@ + @@ -156,40 +130,44 @@ v-if="scope.row.degreeImg && scope.row.degreeImg !== ''" type="primary" link + icon="Document" @click="handlePreview(scope.row.deList, 2)">查看 - - + + + @@ -214,7 +192,6 @@ - @@ -229,28 +206,28 @@ import { BasicTableProps, useTable } from '/@/hooks/table' import { useMessage } from '/@/hooks/message' import { useMessageBox } from '/@/hooks/message' import { useDict } from '/@/hooks/dict' -import VChart from 'vue-echarts' -import { use } from 'echarts/core' -import { PieChart } from 'echarts/charts' -import { TooltipComponent, LegendComponent } from 'echarts/components' -import { CanvasRenderer } from 'echarts/renderers' import { fetchList, putObj, delObj, - getChartOption, exportExcel } from '/@/api/professional/professionaluser/professionalteacheracademicrelation' import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig' import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig' import { defineAsyncComponent } from 'vue' -const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue')) -import DataForm from './form.vue' -import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.vue' +const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue')) +const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue')) +const DataForm = defineAsyncComponent(() => import('./form.vue')) +const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue')) const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue')) -// 注册 ECharts 组件 -use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer]) +// 审核状态选项(独立定义,防止其他页面修改时被波及) +import type { StateOption } from '/@/components/AuditState/index.vue' +const auditStateOptions: StateOption[] = [ + { value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' }, + { value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' }, + { value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' } +] // 使用 Pinia store const userInfoStore = useUserInfo() @@ -275,10 +252,8 @@ const { professional_state: professionalState } = useDict('professional_state') // 表格引用 const tableRef = ref() const searchFormRef = ref() -const multiDialogRef = ref() const dataFormRef = ref() const backReasonRef = ref() -const chartRef = ref() const showSearch = ref(true) // 搜索表单数据 @@ -288,10 +263,6 @@ const search = reactive({ realName: '' }) -// 图表数据 -const chartOption = ref({}) -const chartData = ref([]) - // 材料预览 const dialogVisible = ref(false) const dialogTitle = ref('') @@ -334,34 +305,6 @@ const state: BasicTableProps = reactive({ const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state) -// 初始化图表 -const initChartOption = async () => { - try { - const response = await getChartOption() - chartOption.value = response.data.data || {} - - // 处理图表数据(如果有的话) - if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) { - let total = 0 - chartOption.value.series[0].data.forEach((item: any) => { - total += item.value || 0 - }) - - chartData.value = [] - chartOption.value.series[0].data.forEach((item: any) => { - const rate = total > 0 ? Number((item.value / total * 100).toFixed(1)) : 0 - chartData.value.push({ - xl: item.name, - total: item.value, - rate: `${rate}%` - }) - }) - } - } catch (error) { - // Failed to load chart data - } -} - // 预览材料 const handlePreview = (list: string[], type: number) => { imgUrl.value = [] @@ -425,7 +368,7 @@ const resetQuery = () => { // 打开新增窗口 const handleAdd = () => { - multiDialogRef.value?.init(1) + dataFormRef.value?.openDialog() } // 打开编辑窗口 diff --git a/src/views/professional/professionalteacheracademicrelation/statistics.vue b/src/views/professional/professionalteacheracademicrelation/statistics.vue new file mode 100644 index 0000000..bfbd07e --- /dev/null +++ b/src/views/professional/professionalteacheracademicrelation/statistics.vue @@ -0,0 +1,83 @@ + + + + + + diff --git a/src/views/professional/professionalteachercertificaterelation/form.vue b/src/views/professional/professionalteachercertificaterelation/form.vue index b96063b..f15932e 100644 --- a/src/views/professional/professionalteachercertificaterelation/form.vue +++ b/src/views/professional/professionalteachercertificaterelation/form.vue @@ -1,5 +1,5 @@ - - - - - + + + - + + + @@ -174,7 +173,6 @@ - @@ -197,11 +195,20 @@ import { exportExcel } from '/@/api/professional/professionaluser/professionalteachercertificaterelation' import { defineAsyncComponent } from 'vue' -const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue')) +const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue')) +const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue')) const DataForm = defineAsyncComponent(() => import('./form.vue')) const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue')) const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue')) +// 审核状态选项(独立定义,防止其他页面修改时被波及) +import type { StateOption } from '/@/components/AuditState/index.vue' +const auditStateOptions: StateOption[] = [ + { value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' }, + { value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' }, + { value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' } +] + // 使用 Pinia store const userInfoStore = useUserInfo() const { userInfos } = storeToRefs(userInfoStore) @@ -225,7 +232,6 @@ const { professional_state: professionalState } = useDict('professional_state') // 表格引用 const tableRef = ref() const searchFormRef = ref() -const multiDialogRef = ref() const dataFormRef = ref() const backReasonRef = ref() const showSearch = ref(true) @@ -327,7 +333,7 @@ const resetQuery = () => { // 打开新增窗口 const handleAdd = () => { - multiDialogRef.value?.init(0) + dataFormRef.value?.openDialog() } // 打开编辑窗口 diff --git a/src/views/professional/professionalteacherhonor/form.vue b/src/views/professional/professionalteacherhonor/form.vue index c9d53c9..5e0d6d0 100644 --- a/src/views/professional/professionalteacherhonor/form.vue +++ b/src/views/professional/professionalteacherhonor/form.vue @@ -1,5 +1,5 @@ - + + + @@ -159,10 +158,9 @@ /> - - + @@ -181,10 +179,11 @@ import { delObj } from '/@/api/professional/professionaluser/professionalteacherhonor' import { defineAsyncComponent } from 'vue' -const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue')) -import ShowHonorEdvince from './showHonorEdvince.vue' -import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.vue' -import DataForm from './form.vue' +const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue')) +const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue')) +const ShowHonorEdvince = defineAsyncComponent(() => import('./showHonorEdvince.vue')) +const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue')) +const DataForm = defineAsyncComponent(() => import('./form.vue')) // 使用 Pinia store const userInfoStore = useUserInfo() @@ -206,10 +205,17 @@ const messageBox = useMessageBox() // 字典数据 const { professional_state: professionalState } = useDict('professional_state') +// 审核状态选项(独立定义,防止其他页面修改时被波及) +import type { StateOption } from '/@/components/AuditState/index.vue' +const auditStateOptions: StateOption[] = [ + { value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' }, + { value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' }, + { value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' } +] + // 表格引用 const tableRef = ref() const searchFormRef = ref() -const multiDialogRef = ref() const showHonorEdvinceRef = ref() const backReasonRef = ref() const dataFormRef = ref() @@ -288,7 +294,7 @@ const resetQuery = () => { // 打开新增窗口 const handleAdd = () => { - multiDialogRef.value?.init(4) + dataFormRef.value?.openDialog() } // 打开编辑窗口 diff --git a/src/views/professional/professionalteacherstationchange/index.vue b/src/views/professional/professionalteacherstationchange/index.vue index 1b1fab8..9bd5bc3 100755 --- a/src/views/professional/professionalteacherstationchange/index.vue +++ b/src/views/professional/professionalteacherstationchange/index.vue @@ -6,7 +6,7 @@ v-show="showSearch" :model="search" ref="searchFormRef" - @keyup-enter="handleFilter(search)" + @keyup-enter="handleFilter" > - - - @@ -1198,6 +1161,12 @@
+
+
+ + 岗位变更信息 +
+
@@ -1213,6 +1182,12 @@
+
+
+ + 党员调动信息 +
+
@@ -1236,6 +1211,12 @@
+
+
+ + 综合表彰信息 +
+
@@ -1251,6 +1232,12 @@
+
+
+ + 教师论文信息 +
+
@@ -1285,6 +1272,12 @@
+
+
+ + 教材列表信息 +
+
@@ -1312,6 +1305,12 @@
+
+
+ + 课题列表信息 +
+
@@ -1342,6 +1341,7 @@