人员管理
This commit is contained in:
@@ -5,7 +5,7 @@ VITE_PORT = 8888
|
|||||||
VITE_OPEN=true
|
VITE_OPEN=true
|
||||||
|
|
||||||
# 本地环境
|
# 本地环境
|
||||||
ENV = 'development'
|
ENV=development
|
||||||
|
|
||||||
# ADMIN 服务地址
|
# ADMIN 服务地址(会被 .env.local 覆盖)
|
||||||
VITE_ADMIN_PROXY_PATH=http://localhost:9999
|
VITE_ADMIN_PROXY_PATH=http://localhost:9999
|
||||||
|
|||||||
319
docs/按钮样式规范.md
319
docs/按钮样式规范.md
@@ -1,191 +1,131 @@
|
|||||||
# 按钮样式设计规范
|
# 按钮样式设计规范
|
||||||
|
|
||||||
本文档定义了项目中按钮组件的样式规范,包括实心按钮和Plain按钮的使用规则,确保整个应用的按钮样式统一、协调、美观。
|
本文档定义了项目中按钮组件的样式规范,确保整个应用的按钮样式统一、协调、美观。
|
||||||
|
|
||||||
## 一、按钮类型分类
|
## 一、尺寸
|
||||||
|
|
||||||
### 1. 实心按钮(Solid)- 用于最重要的操作
|
**所有按钮统一使用默认尺寸**,不需要设置 `size` 属性。
|
||||||
|
|
||||||
**使用场景:**
|
- 高度:32px(Element Plus默认)
|
||||||
- 新增、创建操作
|
- 适用于所有场景:页面操作区域、表格操作列、对话框底部等
|
||||||
- 保存、提交操作
|
|
||||||
- 确认、确定操作
|
|
||||||
- 删除等危险操作(需要突出警示)
|
|
||||||
|
|
||||||
**视觉特点:**
|
|
||||||
- 实心填充,高对比度
|
|
||||||
- 突出显示,吸引用户注意力
|
|
||||||
- 通常位于操作区域的主要位置
|
|
||||||
|
|
||||||
**代码示例:**
|
|
||||||
```vue
|
```vue
|
||||||
<!-- 主要操作:新增 -->
|
<el-button type="primary" icon="FolderAdd">新 增</el-button>
|
||||||
<el-button type="primary" icon="Plus" @click="handleAdd">新 增</el-button>
|
<el-button type="primary" link icon="EditPen">编辑</el-button>
|
||||||
|
|
||||||
<!-- 危险操作:删除 -->
|
|
||||||
<el-button type="danger" icon="Delete" @click="handleDelete">删 除</el-button>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Plain按钮(边框样式)- 用于次要操作
|
## 二、颜色
|
||||||
|
|
||||||
**使用场景:**
|
| 操作类型 | type | plain | 颜色 | 使用场景 |
|
||||||
- 查询、搜索操作
|
|---------|------|-------|------|---------|
|
||||||
- 导出、导入操作
|
| 主要操作 | `primary` | - | 蓝色实心 | 新增、保存、提交 |
|
||||||
- 设置、配置操作
|
| 查询 | `primary` | - | 蓝色实心 | 查询 |
|
||||||
- 辅助功能操作
|
| 重置 | `primary` | ✓ | 蓝色边框 | 重置 |
|
||||||
|
| 导出操作 | `warning` | ✓ | 橙色边框 | 导出、下载 |
|
||||||
|
| 导入操作 | `primary` | ✓ | 蓝色边框 | 导入、上传 |
|
||||||
|
| 设置操作 | `primary` | ✓ | 蓝色边框 | 设置、配置 |
|
||||||
|
| 状态锁定 | - | - | 灰色 | 状态锁定、解锁 |
|
||||||
|
| 危险操作 | `danger` | - | 红色实心 | 删除、清空 |
|
||||||
|
|
||||||
**视觉特点:**
|
## 三、样式
|
||||||
- 边框+透明背景
|
|
||||||
- 不抢夺视觉焦点
|
### 1. 实心按钮(默认)
|
||||||
- 保持页面协调统一
|
- **使用场景**:新增、保存、删除等主要操作
|
||||||
- 适合批量操作按钮
|
- **代码**:`type="primary"` 或 `type="danger"`
|
||||||
|
|
||||||
**代码示例:**
|
|
||||||
```vue
|
```vue
|
||||||
<!-- 查询操作 -->
|
<el-button type="primary" icon="FolderAdd">新 增</el-button>
|
||||||
<el-button type="primary" plain icon="Search" @click="handleSearch">查询</el-button>
|
<el-button type="danger" icon="Delete">删 除</el-button>
|
||||||
|
|
||||||
<!-- 导出操作 -->
|
|
||||||
<el-button type="primary" plain icon="Download" @click="handleExport">导出</el-button>
|
|
||||||
|
|
||||||
<!-- 导入操作 -->
|
|
||||||
<el-button type="primary" plain icon="Upload" @click="handleImport">导入</el-button>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. 默认按钮 - 用于中性操作
|
### 2. Plain按钮(边框样式)
|
||||||
|
- **使用场景**:重置、导出、导入、设置等次要操作
|
||||||
|
- **代码**:`type="primary" plain` 或 `type="warning" plain`
|
||||||
|
|
||||||
**使用场景:**
|
|
||||||
- 设置、配置操作
|
|
||||||
- 状态切换操作
|
|
||||||
- 中性功能操作
|
|
||||||
|
|
||||||
**视觉特点:**
|
|
||||||
- 灰色系,低调不突出
|
|
||||||
- 适合不重要的操作
|
|
||||||
|
|
||||||
**代码示例:**
|
|
||||||
```vue
|
```vue
|
||||||
<!-- 设置操作 -->
|
<el-button type="primary" plain icon="Refresh">重置</el-button>
|
||||||
<el-button icon="Setting" @click="handleSetting">状态锁定</el-button>
|
<el-button type="warning" plain icon="Download">导出</el-button>
|
||||||
|
<el-button type="primary" plain icon="UploadFilled">导入</el-button>
|
||||||
|
<el-button type="primary" plain icon="Setting">设置</el-button>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 二、配色方案
|
### 3. 设置按钮
|
||||||
|
- **使用场景**:设置、配置等操作
|
||||||
|
- **代码**:`type="primary" plain`
|
||||||
|
|
||||||
> **设计原则:** 在保持项目默认样式的基础上,通过颜色区分不同操作类型,提升视觉层次和识别度。
|
```vue
|
||||||
|
<el-button type="primary" plain icon="Setting">设置</el-button>
|
||||||
|
```
|
||||||
|
|
||||||
### 主要操作按钮
|
### 4. 默认按钮(灰色)
|
||||||
- **类型:** `type="primary"` 实心
|
- **使用场景**:状态锁定、解锁等中性操作
|
||||||
- **颜色:** 蓝色实心填充
|
- **代码**:不设置 `type` 属性
|
||||||
- **用途:** 新增、保存、提交等主要操作
|
|
||||||
- **示例:** 新增按钮
|
|
||||||
|
|
||||||
### 查询操作按钮
|
```vue
|
||||||
- **类型:** `type="primary" plain`
|
<el-button icon="Lock">状态锁定</el-button>
|
||||||
- **颜色:** 蓝色边框 + 透明背景
|
```
|
||||||
- **用途:** 查询、搜索、筛选等操作
|
|
||||||
- **示例:** 一体化查询、搜索按钮
|
|
||||||
- **说明:** 与主要操作保持同一色系,体现关联性
|
|
||||||
|
|
||||||
### 导出操作按钮
|
### 5. 表格操作列按钮(link)
|
||||||
- **类型:** `type="warning" plain`
|
- **使用场景**:表格操作列,使用 `link` 属性
|
||||||
- **颜色:** 橙色边框 + 透明背景
|
- **代码**:`link` 属性,配合 `type` 使用
|
||||||
- **用途:** 数据导出、下载等操作
|
- **说明**:表格内的操作按钮统一使用 `link` 样式,节省空间
|
||||||
- **示例:** 导出WORD、自定义导出
|
|
||||||
- **说明:** 橙色表示数据输出,与导入形成对比
|
|
||||||
|
|
||||||
### 导入操作按钮
|
```vue
|
||||||
- **类型:** `type="primary" plain`
|
<el-button type="primary" link icon="EditPen">编辑</el-button>
|
||||||
- **颜色:** 蓝色边框 + 透明背景
|
<el-button type="danger" link icon="Delete">删除</el-button>
|
||||||
- **用途:** 数据导入、上传等操作
|
<el-button type="success" link icon="CircleCheck">通过</el-button>
|
||||||
- **示例:** 导入信息
|
<el-button type="danger" link icon="DocumentDelete">批量删除</el-button>
|
||||||
- **说明:** 保持项目默认样式,与查询操作保持一致
|
```
|
||||||
|
|
||||||
### 设置操作按钮
|
## 四、图标
|
||||||
- **类型:** 默认样式(无type属性)
|
|
||||||
- **颜色:** 灰色系
|
|
||||||
- **用途:** 设置、配置、状态锁定等中性操作
|
|
||||||
- **示例:** 状态锁定按钮
|
|
||||||
|
|
||||||
### 危险操作按钮
|
|
||||||
- **类型:** `type="danger"` 实心 或 `type="danger" plain`
|
|
||||||
- **颜色:** 红色
|
|
||||||
- **用途:** 删除、清空等危险操作
|
|
||||||
- **示例:** 删除按钮
|
|
||||||
|
|
||||||
## 三、按钮图标规范
|
|
||||||
|
|
||||||
所有按钮应配合相应的图标使用,提升用户体验和视觉识别度。
|
所有按钮应配合相应的图标使用,提升用户体验和视觉识别度。
|
||||||
|
|
||||||
### 常用图标映射
|
### 常用图标映射
|
||||||
|
|
||||||
| 操作类型 | 图标名称 | 说明 |
|
| 操作类型 | 图标名称 |
|
||||||
|---------|---------|------|
|
|---------|---------|
|
||||||
| 新增/添加 | `FolderAdd` | 文件夹加号图标(项目默认) |
|
| 查询 | `Search` |
|
||||||
| 查询/搜索 | `Search` | 搜索图标 |
|
| 重置 | `Refresh` |
|
||||||
| 导出/下载 | `Download` | 下载图标 |
|
| 新增/添加 | `FolderAdd` |
|
||||||
| 导入/上传 | `Upload` | 上传图标(项目默认) |
|
| 导出/下载 | `Download` |
|
||||||
| 编辑/修改 | `Edit` | 编辑图标 |
|
| 导入/上传 | `UploadFilled` |
|
||||||
| 删除 | `Delete` | 删除图标 |
|
| 编辑/修改 | `EditPen` |
|
||||||
| 查看/详情 | `View` | 查看图标 |
|
| 删除 | `Delete` |
|
||||||
| 设置/配置 | `Setting` | 设置图标 |
|
| 批量删除 | `DocumentDelete` |
|
||||||
| 锁定/解锁 | `Lock` | 锁定图标 |
|
| 通过 | `CircleCheck` |
|
||||||
| 刷新/重置 | `Refresh` | 刷新图标 |
|
| 驳回 | `CircleClose` |
|
||||||
| 用户相关 | `User` | 用户图标 |
|
| 查看图片 | `Picture` |
|
||||||
|
| 详情/其他 | `Document` |
|
||||||
|
| 设置/配置 | `Setting` |
|
||||||
|
| 锁定/解锁 | `Lock` |
|
||||||
|
| 用户相关 | `User` |
|
||||||
|
|
||||||
### 图标使用示例
|
### 使用示例
|
||||||
|
|
||||||
```vue
|
|
||||||
<el-button type="primary" icon="FolderAdd" @click="handleAdd">新 增</el-button>
|
|
||||||
<el-button type="primary" plain icon="Search" @click="handleSearch">查询</el-button>
|
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
|
||||||
<el-button type="primary" plain icon="Upload" @click="handleImport">导入</el-button>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 四、按钮尺寸规范
|
|
||||||
|
|
||||||
### 默认尺寸(default)
|
|
||||||
- 用于页面主要操作区域的按钮
|
|
||||||
- 高度:32px(Element Plus默认)
|
|
||||||
|
|
||||||
### 小尺寸(small)
|
|
||||||
- 用于表格操作列、对话框底部等空间受限的场景
|
|
||||||
- 高度:24px
|
|
||||||
- 使用 `size="small"` 属性
|
|
||||||
|
|
||||||
```vue
|
|
||||||
<!-- 表格操作列 -->
|
|
||||||
<el-button type="primary" link size="small" @click="handleEdit">编辑</el-button>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 链接按钮(link)
|
|
||||||
- 用于表格操作列,节省空间
|
|
||||||
- 使用 `link` 属性
|
|
||||||
|
|
||||||
```vue
|
|
||||||
<el-button type="primary" link size="small" @click="handleView">查看</el-button>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 五、按钮布局规范
|
|
||||||
|
|
||||||
### 按钮间距
|
|
||||||
- 按钮之间使用 `class="ml10"` 保持10px的左边距
|
|
||||||
- 确保按钮组视觉统一
|
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<el-button type="primary" icon="FolderAdd">新 增</el-button>
|
<el-button type="primary" icon="FolderAdd">新 增</el-button>
|
||||||
<el-button type="primary" plain icon="Search" class="ml10">查询</el-button>
|
<el-button type="primary" icon="Search">查询</el-button>
|
||||||
<el-button type="warning" plain icon="Download" class="ml10">导出</el-button>
|
<el-button type="primary" plain icon="Refresh">重置</el-button>
|
||||||
<el-button type="primary" plain icon="Upload" class="ml10">导入</el-button>
|
<el-button type="warning" plain icon="Download">导出</el-button>
|
||||||
|
<el-button type="primary" plain icon="UploadFilled">导入</el-button>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 按钮分组
|
## 五、间距
|
||||||
- 相关功能的按钮应放在一起
|
|
||||||
- 主要操作按钮放在最前面
|
按钮之间使用 `class="ml10"` 保持10px的左边距,确保按钮组视觉统一。
|
||||||
- 次要操作按钮放在后面
|
|
||||||
|
```vue
|
||||||
|
<el-button type="primary" icon="FolderAdd">新 增</el-button>
|
||||||
|
<el-button type="primary" icon="Search" class="ml10">查询</el-button>
|
||||||
|
<el-button type="primary" plain icon="Refresh" class="ml10">重置</el-button>
|
||||||
|
<el-button type="warning" plain icon="Download" class="ml10">导出</el-button>
|
||||||
|
<el-button type="primary" plain icon="UploadFilled" class="ml10">导入</el-button>
|
||||||
|
```
|
||||||
|
|
||||||
## 六、完整示例
|
## 六、完整示例
|
||||||
|
|
||||||
### 页面操作按钮组示例
|
### 页面操作按钮组
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -198,16 +138,24 @@
|
|||||||
v-if="permissions.add">新 增
|
v-if="permissions.add">新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 查询操作:使用 primary plain 样式 -->
|
<!-- 查询操作 -->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
|
||||||
icon="Search"
|
icon="Search"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
@click="handleSearch">查询
|
@click="handleSearch">查询
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 导出操作:使用 warning plain 样式,橙色边框 -->
|
<!-- 重置操作 -->
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Refresh"
|
||||||
|
class="ml10"
|
||||||
|
@click="resetQuery">重置
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<!-- 导出操作 -->
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
@@ -216,17 +164,19 @@
|
|||||||
@click="handleExport">导出
|
@click="handleExport">导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 导入操作:使用 primary plain 样式,蓝色边框,保持项目默认样式 -->
|
<!-- 导入操作 -->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Upload"
|
icon="UploadFilled"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
@click="handleImport">导入
|
@click="handleImport">导入
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 设置操作:使用默认样式 -->
|
<!-- 设置操作 -->
|
||||||
<el-button
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
icon="Setting"
|
icon="Setting"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
@click="handleSetting">设置
|
@click="handleSetting">设置
|
||||||
@@ -235,7 +185,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 表格操作列示例
|
### 表格操作列
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<el-table-column label="操作" width="200" align="center" fixed="right">
|
<el-table-column label="操作" width="200" align="center" fixed="right">
|
||||||
@@ -243,67 +193,30 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
size="small"
|
icon="EditPen"
|
||||||
@click="handleEdit(scope.row)">编辑
|
@click="handleEdit(scope.row)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
size="small"
|
icon="Delete"
|
||||||
@click="handleDelete(scope.row)">删除
|
@click="handleDelete(scope.row)">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 七、最佳实践
|
## 七、快速参考
|
||||||
|
|
||||||
1. **一致性原则**
|
| 要素 | 规范 |
|
||||||
- 相同功能的按钮在整个应用中应使用相同的样式
|
|------|------|
|
||||||
- 保持图标和颜色的统一性
|
| **尺寸** | 统一使用默认尺寸,不设置 `size` 属性 |
|
||||||
|
| **颜色** | 主要操作用蓝色实心,次要操作用蓝色/橙色边框,危险操作用红色 |
|
||||||
2. **层次分明**
|
| **样式** | 主要操作用实心,次要操作用 `plain`,**表格操作列必须用 `link`** |
|
||||||
- 主要操作使用实心按钮,突出显示
|
| **图标** | 所有按钮必须配合图标,使用 PascalCase 格式 |
|
||||||
- 次要操作使用Plain按钮,保持协调
|
| **间距** | 按钮之间使用 `class="ml10"` 保持10px间距 |
|
||||||
|
|
||||||
3. **语义化**
|
|
||||||
- 按钮的颜色和样式应与其功能语义相匹配
|
|
||||||
- 危险操作使用红色,数据操作使用绿色等
|
|
||||||
|
|
||||||
4. **用户体验**
|
|
||||||
- 重要操作按钮应放在显眼位置
|
|
||||||
- 按钮文字应简洁明了
|
|
||||||
- 配合图标提升识别度
|
|
||||||
|
|
||||||
5. **响应式考虑**
|
|
||||||
- 在移动端或小屏幕设备上,考虑使用更紧凑的布局
|
|
||||||
- 使用 `size="small"` 适应空间限制
|
|
||||||
|
|
||||||
## 八、注意事项
|
|
||||||
|
|
||||||
1. **避免过度使用实心按钮**
|
|
||||||
- 一个页面中实心按钮不应过多,通常1-2个主要操作即可
|
|
||||||
- 过多的实心按钮会分散用户注意力
|
|
||||||
|
|
||||||
2. **Plain按钮的优势**
|
|
||||||
- Plain按钮视觉更柔和,适合批量操作
|
|
||||||
- 不会抢夺主要操作的视觉焦点
|
|
||||||
|
|
||||||
3. **图标选择**
|
|
||||||
- 图标应与操作功能语义匹配
|
|
||||||
- 使用Element Plus内置图标,保持一致性
|
|
||||||
|
|
||||||
4. **权限控制**
|
|
||||||
- 按钮应根据用户权限显示/隐藏
|
|
||||||
- 使用 `v-if` 控制按钮的显示
|
|
||||||
|
|
||||||
## 九、更新记录
|
|
||||||
|
|
||||||
- **2024-XX-XX**: 创建按钮样式规范文档
|
|
||||||
- 规范版本:v1.0
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**维护者:** 前端开发团队
|
**维护者:** 前端开发团队
|
||||||
**最后更新:** 2024年
|
**最后更新:** 2024年
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalpartychange',
|
url: '/professional/professionalpartychange/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalpartychange/${id}`,
|
url: `/professional/professionalpartychange/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalpartychange/${id}`,
|
url: `/professional/professionalpartychange/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalpartychange',
|
url: '/professional/professionalpartychange/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalpoliticsstatus',
|
url: '/professional/professionalpoliticsstatus/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addPoliticssStatus = (obj: any) => {
|
export const addPoliticssStatus = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalpoliticsstatus',
|
url: '/professional/professionalpoliticsstatus/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -59,8 +59,11 @@ export const addPoliticssStatus = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalpoliticsstatus/${id}`,
|
url: `/professional/professionalpoliticsstatus/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalpoliticsstatus/${id}`,
|
url: `/professional/professionalpoliticsstatus/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const dePoObj = (id: string | number) => {
|
export const dePoObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalpoliticsstatus/${id}`,
|
url: `/professional/professionalpoliticsstatus/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -92,8 +101,8 @@ export const dePoObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalpoliticsstatus',
|
url: '/professional/professionalpoliticsstatus/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -35,7 +35,7 @@ export function fetchList(query?: any) {
|
|||||||
*/
|
*/
|
||||||
export function addObj(obj?: any) {
|
export function addObj(obj?: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalqualificationrelation',
|
url: '/professional/professionalqualificationrelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,7 +47,7 @@ export function addObj(obj?: any) {
|
|||||||
*/
|
*/
|
||||||
export function addQuaRelation(obj?: any) {
|
export function addQuaRelation(obj?: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalqualificationrelation',
|
url: '/professional/professionalqualificationrelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -59,8 +59,11 @@ export function addQuaRelation(obj?: any) {
|
|||||||
*/
|
*/
|
||||||
export function getObj(id: string | number) {
|
export function getObj(id: string | number) {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalqualificationrelation/' + id,
|
url: '/professional/professionalqualificationrelation/getById',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,8 +73,11 @@ export function getObj(id: string | number) {
|
|||||||
*/
|
*/
|
||||||
export function delObj(id: string | number) {
|
export function delObj(id: string | number) {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalqualificationrelation/' + id,
|
url: '/professional/professionalqualificationrelation/deleteById',
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,8 +87,11 @@ export function delObj(id: string | number) {
|
|||||||
*/
|
*/
|
||||||
export function delQuaObj(id: string | number) {
|
export function delQuaObj(id: string | number) {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalqualificationrelation/' + id,
|
url: '/professional/professionalqualificationrelation/deleteById',
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,8 +101,8 @@ export function delQuaObj(id: string | number) {
|
|||||||
*/
|
*/
|
||||||
export function putObj(obj?: any) {
|
export function putObj(obj?: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalqualificationrelation',
|
url: '/professional/professionalqualificationrelation/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalsocial',
|
url: '/professional/professionalsocial/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addSocialObj = (obj: any) => {
|
export const addSocialObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalsocial',
|
url: '/professional/professionalsocial/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -59,8 +59,11 @@ export const addSocialObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalsocial/${id}`,
|
url: `/professional/professionalsocial/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalsocial/${id}`,
|
url: `/professional/professionalsocial/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delSocialObj = (id: string | number) => {
|
export const delSocialObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalsocial/${id}`,
|
url: `/professional/professionalsocial/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -92,8 +101,8 @@ export const delSocialObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalsocial',
|
url: '/professional/professionalsocial/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacheracademicrelation',
|
url: '/professional/professionalteacheracademicrelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addAcadeRelation = (obj: any) => {
|
export const addAcadeRelation = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacheracademicrelation',
|
url: '/professional/professionalteacheracademicrelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -59,8 +59,11 @@ export const addAcadeRelation = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacheracademicrelation/${id}`,
|
url: `/professional/professionalteacheracademicrelation/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacheracademicrelation/${id}`,
|
url: `/professional/professionalteacheracademicrelation/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delEduObj = (id: string | number) => {
|
export const delEduObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacheracademicrelation/${id}`,
|
url: `/professional/professionalteacheracademicrelation/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -92,8 +101,8 @@ export const delEduObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacheracademicrelation',
|
url: '/professional/professionalteacheracademicrelation/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteachercertificaterelation',
|
url: '/professional/professionalteachercertificaterelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteachercertificaterelation/${id}`,
|
url: `/professional/professionalteachercertificaterelation/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteachercertificaterelation/${id}`,
|
url: `/professional/professionalteachercertificaterelation/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteachercertificaterelation',
|
url: '/professional/professionalteachercertificaterelation/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacherhonor',
|
url: '/professional/professionalteacherhonor/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacherhonor/${id}`,
|
url: `/professional/professionalteacherhonor/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacherhonor/${id}`,
|
url: `/professional/professionalteacherhonor/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacherhonor',
|
url: '/professional/professionalteacherhonor/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacherstationchange',
|
url: '/professional/professionalteacherstationchange/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacherstationchange/${id}`,
|
url: `/professional/professionalteacherstationchange/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionalteacherstationchange/${id}`,
|
url: `/professional/professionalteacherstationchange/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionalteacherstationchange',
|
url: '/professional/professionalteacherstationchange/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionaltitlerelation',
|
url: '/professional/professionaltitlerelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addTitleRelationObj = (obj: any) => {
|
export const addTitleRelationObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionaltitlerelation',
|
url: '/professional/professionaltitlerelation/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -59,8 +59,11 @@ export const addTitleRelationObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionaltitlerelation/${id}`,
|
url: `/professional/professionaltitlerelation/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionaltitlerelation/${id}`,
|
url: `/professional/professionaltitlerelation/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delTitleObj = (id: string | number) => {
|
export const delTitleObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/professionaltitlerelation/${id}`,
|
url: `/professional/professionaltitlerelation/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -92,8 +101,8 @@ export const delTitleObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/professionaltitlerelation',
|
url: '/professional/professionaltitlerelation/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/teacherbase',
|
url: '/professional/teacherbase/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/teacherbase/${id}`,
|
url: `/professional/teacherbase/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/professional/teacherbase/${id}`,
|
url: `/professional/teacherbase/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/professional/teacherbase',
|
url: '/professional/teacherbase/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -336,3 +342,4 @@ export const search = (data: string | number) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tag
|
<el-tag
|
||||||
|
:effect="currentOption.effect"
|
||||||
v-if="currentOption"
|
v-if="currentOption"
|
||||||
:type="currentOption.type"
|
:type="currentOption.type"
|
||||||
:class="{ 'audit-state-tag': showIcon && currentOption.icon }"
|
:class="{ 'audit-state-tag': showIcon && currentOption.icon }"
|
||||||
@@ -18,6 +19,7 @@ export interface StateOption {
|
|||||||
label: string;
|
label: string;
|
||||||
type: 'success' | 'danger' | 'warning' | 'info' | '';
|
type: 'success' | 'danger' | 'warning' | 'info' | '';
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
effect?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -30,9 +32,9 @@ interface Props {
|
|||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
state: '',
|
state: '',
|
||||||
options: () => [
|
options: () => [
|
||||||
{ value: '1', label: '通过', type: 'success', icon: 'fa-solid fa-circle-check' },
|
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check' , effect:"dark" },
|
||||||
{ value: '-2', label: '驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark' },
|
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect:"dark" },
|
||||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock' }
|
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock' ,effect:"light" }
|
||||||
],
|
],
|
||||||
showIcon: true,
|
showIcon: true,
|
||||||
emptyText: '-'
|
emptyText: '-'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="search-form-container">
|
<div class="search-form-container">
|
||||||
<el-form :model="formModel" ref="formRef" :inline="true" @keyup.enter="handleKeyupEnter" class="search-form-inline">
|
<el-form :model="formModel" ref="formRef" :inline="true" @keyup.enter="handleKeyupEnter">
|
||||||
<!-- 直接展示的表单项 -->
|
<!-- 直接展示的表单项 -->
|
||||||
<slot :visible="true" :expanded="isExpanded"></slot>
|
<slot :visible="true" :expanded="isExpanded"></slot>
|
||||||
|
|
||||||
@@ -154,8 +154,9 @@ defineExpose({
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search-form-container {
|
.search-form-container {
|
||||||
|
// 直接使用全局样式 el-form--inline,只需要覆盖特殊样式
|
||||||
|
|
||||||
:deep(.search-form-inline) {
|
:deep(.el-form--inline) {
|
||||||
.collapse-trigger-item {
|
.collapse-trigger-item {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -165,6 +166,18 @@ defineExpose({
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果需要自定义宽度,可以覆盖全局样式(默认使用全局的 240px)
|
||||||
|
// 如果需要改为 200px,取消下面的注释
|
||||||
|
// .el-form-item {
|
||||||
|
// & > .el-input,
|
||||||
|
// .el-cascader,
|
||||||
|
// .el-select,
|
||||||
|
// .el-date-editor,
|
||||||
|
// .el-autocomplete {
|
||||||
|
// width: 200px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可折叠内容区域 - 使用 contents 让包装器不影响布局
|
// 可折叠内容区域 - 使用 contents 让包装器不影响布局
|
||||||
|
|||||||
@@ -67,15 +67,25 @@
|
|||||||
// https://github.com/element-plus/element-plus/pull/15352
|
// https://github.com/element-plus/element-plus/pull/15352
|
||||||
.el-form--inline {
|
.el-form--inline {
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
|
// 默认宽度 200px(输入框、单选、选择器等)
|
||||||
& > .el-input,
|
& > .el-input,
|
||||||
.el-cascader,
|
.el-cascader,
|
||||||
.el-select,
|
.el-select,
|
||||||
.el-date-editor,
|
|
||||||
.el-autocomplete {
|
.el-autocomplete {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日期选择器:单日期为 200px,双日期(范围选择)为 240px
|
||||||
|
.el-date-editor {
|
||||||
|
width: 200px;
|
||||||
|
|
||||||
|
// 日期范围选择器(双日期)使用 240px
|
||||||
|
&.el-range-editor {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Alert 警告
|
/* Alert 警告
|
||||||
------------------------------- */
|
------------------------------- */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" title="驳回" width="600px" :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="visible" title="驳回" width="600px" :close-on-click-modal="false" destroy-on-close>
|
||||||
<el-form label-width="150px">
|
<el-form label-width="100px">
|
||||||
<el-form-item label="姓名:">
|
<el-form-item label="姓名:">
|
||||||
<el-tag>{{ dataForm.name }}</el-tag>
|
<el-tag>{{ dataForm.name }}</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
:model="search"
|
:model="search"
|
||||||
ref="searchFormRef"
|
ref="searchFormRef"
|
||||||
@keyup-enter="handleFilter(search)"
|
@keyup-enter="handleFilter"
|
||||||
>
|
>
|
||||||
<template #default="{ visible }">
|
<template #default="{ visible }">
|
||||||
<template v-if="visible">
|
<template v-if="visible">
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -23,7 +22,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.realName"
|
v-model="search.realName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入用户名"
|
placeholder="请输入用户名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -33,7 +31,7 @@
|
|||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleFilter(search)" icon="Search">查询</el-button>
|
<el-button type="primary" @click="handleFilter" icon="Search">查询</el-button>
|
||||||
<el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
<el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -50,9 +48,11 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
|
||||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table-column prop="realName" label="用户名" min-width="120" align="center" show-overflow-tooltip />
|
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="oldBranchName" label="原支部名称" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column prop="oldBranchName" label="原支部名称" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
@@ -83,9 +83,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||||
import { fetchList } from '/@/api/professional/professionaluser/professionalpartychange'
|
import { fetchList } from '/@/api/professional/professionaluser/professionalpartychange'
|
||||||
|
|
||||||
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
|
|
||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" title="编辑职业资格" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="dialogVisible" title="编辑职业资格" width="600px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||||
<div v-if="showForm">
|
<div v-if="showForm">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -55,15 +55,17 @@
|
|||||||
<el-form-item label="证书编号" prop="certificateNumber">
|
<el-form-item label="证书编号" prop="certificateNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.certificateNumber"
|
v-model="dataForm.certificateNumber"
|
||||||
placeholder="请输入证书编号"
|
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||||
clearable
|
clearable
|
||||||
|
show-word-limit
|
||||||
|
maxlength="32"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="材料1" prop="materialA">
|
<el-form-item label="材料1" prop="materialA">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
@@ -72,7 +74,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -81,7 +85,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -92,17 +96,14 @@
|
|||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { Session } from '/@/utils/storage'
|
import { Session } from '/@/utils/storage'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||||
import { putObj } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
import { putObj } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||||
|
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||||
// Props
|
import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig'
|
||||||
const props = defineProps<{
|
import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype'
|
||||||
visible?: boolean
|
|
||||||
}>()
|
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:visible', value: boolean): void
|
|
||||||
(e: 'refreshData'): void
|
(e: 'refreshData'): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -113,11 +114,8 @@ const message = useMessage()
|
|||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
|
|
||||||
// 对话框显示状态
|
// 对话框显示状态(内部管理)
|
||||||
const visible = computed({
|
const dialogVisible = ref(false)
|
||||||
get: () => props.visible || false,
|
|
||||||
set: (val) => emit('update:visible', val)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
@@ -144,35 +142,18 @@ const formRules = {
|
|||||||
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
||||||
],
|
],
|
||||||
certificateNumber: [
|
certificateNumber: [
|
||||||
{ required: true, message: '请输入证书编号', trigger: 'blur' }
|
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基础信息
|
// 基础信息
|
||||||
const baseInfoAbout = reactive<{
|
const baseInfoAbout = reactive<{
|
||||||
stationTypeList: any[]
|
|
||||||
atStationList: any[]
|
|
||||||
teacherTypeList: any[]
|
|
||||||
employmentNatureList: any[]
|
|
||||||
stationLevelList: any[]
|
|
||||||
stationDutyLevelList: any[]
|
|
||||||
workTypeList: any[]
|
workTypeList: any[]
|
||||||
proTitleList: any[]
|
|
||||||
majorStationList: any[]
|
|
||||||
qualificationList: any[]
|
qualificationList: any[]
|
||||||
partBranchList: any[]
|
|
||||||
}>({
|
}>({
|
||||||
stationTypeList: [],
|
|
||||||
atStationList: [],
|
|
||||||
teacherTypeList: [],
|
|
||||||
employmentNatureList: [],
|
|
||||||
stationLevelList: [],
|
|
||||||
stationDutyLevelList: [],
|
|
||||||
workTypeList: [],
|
workTypeList: [],
|
||||||
proTitleList: [],
|
qualificationList: []
|
||||||
majorStationList: [],
|
|
||||||
qualificationList: [],
|
|
||||||
partBranchList: []
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 上传相关
|
// 上传相关
|
||||||
@@ -198,25 +179,31 @@ const qualificationList = computed(() => baseInfoAbout.qualificationList as any[
|
|||||||
// 初始化字典数据
|
// 初始化字典数据
|
||||||
const initDicData = async () => {
|
const initDicData = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await getAllInfoAboutList()
|
// 使用专门的 API 获取数据(与 index.vue 保持一致)
|
||||||
const map = response.data.data
|
const [levelRes, workRes] = await Promise.all([
|
||||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
getLevelList(),
|
||||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
getWorkTypeList()
|
||||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
])
|
||||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
|
||||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
// 处理资格等级列表(与 index.vue 保持一致)
|
||||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
if (levelRes && levelRes.data) {
|
||||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
baseInfoAbout.qualificationList = levelRes.data
|
||||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
}
|
||||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
|
||||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
// 处理工种列表(与 index.vue 保持一致)
|
||||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
if (workRes && workRes.data) {
|
||||||
visible.value = true
|
baseInfoAbout.workTypeList = workRes.data
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 获取字典数据失败
|
// 获取字典数据失败
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 证书编号输入处理(只允许英文和数字)
|
||||||
|
const handleCertificateNumberInput = (value: string) => {
|
||||||
|
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
const materiaUploadSuccess = (response: any) => {
|
const materiaUploadSuccess = (response: any) => {
|
||||||
if (response.data && response.data.code === "-1") {
|
if (response.data && response.data.code === "-1") {
|
||||||
@@ -227,7 +214,9 @@ const materiaUploadSuccess = (response: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开对话框
|
// 打开对话框
|
||||||
const openDialog = (row: any) => {
|
const openDialog = async (row?: any) => {
|
||||||
|
if (row && row.id) {
|
||||||
|
// 编辑模式
|
||||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=3`
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=3`
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
Object.assign(dataForm, {
|
Object.assign(dataForm, {
|
||||||
@@ -242,21 +231,84 @@ const openDialog = (row: any) => {
|
|||||||
id: row.id || ''
|
id: row.id || ''
|
||||||
})
|
})
|
||||||
showForm.value = true
|
showForm.value = true
|
||||||
initDicData()
|
await initDicData()
|
||||||
|
dialogVisible.value = true
|
||||||
|
} else {
|
||||||
|
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||||
|
try {
|
||||||
|
const lockResponse = await checkLocked('job')
|
||||||
|
if (lockResponse.data) {
|
||||||
|
// 已锁定
|
||||||
|
message.warning("新增功能已锁定,暂不允许操作")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未锁定,继续获取 teacherNo
|
||||||
|
const response = await getMyTeacherNo()
|
||||||
|
const teacherNo = response.data
|
||||||
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=3`
|
||||||
|
Object.assign(dataForm, {
|
||||||
|
worker: '',
|
||||||
|
qualificationConfigId: '',
|
||||||
|
certificateTime: '',
|
||||||
|
certificateNumber: '',
|
||||||
|
materialA: '',
|
||||||
|
evidenceA: '',
|
||||||
|
state: '',
|
||||||
|
teacherNo: teacherNo,
|
||||||
|
id: ''
|
||||||
|
})
|
||||||
|
fileList.value = []
|
||||||
|
// 先加载字典数据,再显示表单
|
||||||
|
await initDicData()
|
||||||
|
showForm.value = true
|
||||||
|
dialogVisible.value = true
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取教师编号失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const dialogSubmit = async () => {
|
const dialogSubmit = async () => {
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||||
|
if (!dataForm.evidenceA && !dataForm.materialA) {
|
||||||
|
message.warning("请上传证明材料")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
await formRef.value.validate(async (valid: boolean) => {
|
await formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
if (dataForm.id) {
|
||||||
|
// 编辑:使用 putObj 接口(管理员编辑)
|
||||||
dataForm.state = '0'
|
dataForm.state = '0'
|
||||||
await putObj(dataForm)
|
await putObj(dataForm)
|
||||||
message.success("操作成功")
|
message.success("修改成功")
|
||||||
visible.value = false
|
} else {
|
||||||
|
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||||
|
const submitData: any = {
|
||||||
|
type: 3, // 职业资格类型
|
||||||
|
teacherNo: dataForm.teacherNo,
|
||||||
|
worker: dataForm.worker,
|
||||||
|
qualificationConfigId: dataForm.qualificationConfigId,
|
||||||
|
certificateTime: dataForm.certificateTime,
|
||||||
|
certificateNumber: dataForm.certificateNumber,
|
||||||
|
mateA: dataForm.evidenceA || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await updateOtherInfo(submitData)
|
||||||
|
if (res.data == '-1') {
|
||||||
|
message.warning("当前不允许提交")
|
||||||
|
} else {
|
||||||
|
message.success("提交成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
emit('refreshData')
|
emit('refreshData')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error?.msg || '操作失败')
|
message.error(error?.msg || '操作失败')
|
||||||
|
|||||||
@@ -1,28 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-padding">
|
<div class="layout-padding">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<!-- 图表统计 -->
|
|
||||||
<div style="text-align: right; margin-bottom: 20px;">
|
|
||||||
<el-collapse accordion @change="initChartOption">
|
|
||||||
<el-collapse-item title="资格等级统计">
|
|
||||||
<div style="width: 100%">
|
|
||||||
<el-row :gutter="24">
|
|
||||||
<el-col :span="12">
|
|
||||||
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-table :data="chartData" border show-summary style="width: 100%">
|
|
||||||
<el-table-column prop="name" label="等级" width="180" align="center" />
|
|
||||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
|
||||||
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-collapse-item>
|
|
||||||
</el-collapse>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search-form
|
<search-form
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
@@ -36,7 +14,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="search.state"
|
v-model="search.state"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择审核状态"
|
placeholder="请选择审核状态"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -52,7 +29,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -61,7 +37,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.realName"
|
v-model="search.realName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -87,7 +62,8 @@
|
|||||||
v-if="permissions.professional_professionalqualificationrelation_add">新 增
|
v-if="permissions.professional_professionalqualificationrelation_add">新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="warning"
|
||||||
|
plain
|
||||||
icon="Download"
|
icon="Download"
|
||||||
v-if="permissions.professional_teacherbase_export"
|
v-if="permissions.professional_teacherbase_export"
|
||||||
@click="handleDownLoadWord"
|
@click="handleDownLoadWord"
|
||||||
@@ -109,18 +85,15 @@
|
|||||||
|
|
||||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
|
||||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||||
|
</template>
|
||||||
<el-table-column prop="realName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="qualificationConfigId" label="资格等级" min-width="150" align="center" show-overflow-tooltip>
|
<el-table-column prop="qualificationConfigId" label="资格等级" min-width="150" align="center" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -142,40 +115,44 @@
|
|||||||
v-if="scope.row.evidenceA && scope.row.evidenceA !== ''"
|
v-if="scope.row.evidenceA && scope.row.evidenceA !== ''"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
|
icon="Document"
|
||||||
@click="handlePreview(scope.row.srcList)">查看
|
@click="handlePreview(scope.row.srcList)">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Edit"
|
icon="edit-pen"
|
||||||
v-if="permissions.professional_professionalqualificationrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
v-if="permissions.professional_professionalqualificationrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||||
@click="handleEdit(scope.row)">编辑
|
@click="handleEdit(scope.row)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="Check"
|
icon="CircleCheck"
|
||||||
v-if="permissions.professional_professionalqualificationrelation_exam && scope.row.state === '0'"
|
v-if="permissions.professional_professionalqualificationrelation_exam && scope.row.state === '0'"
|
||||||
@click="changeState(scope.row, 1)">通过
|
@click="changeState(scope.row, 1)">通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
icon="Close"
|
icon="CircleClose"
|
||||||
v-if="permissions.professional_professionalqualificationrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
v-if="permissions.professional_professionalqualificationrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||||
@click="changeState(scope.row, -2)">驳回
|
@click="changeState(scope.row, -2)">驳回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Delete"
|
icon="delete"
|
||||||
v-if="permissions.professional_professionalqualificationrelation_del"
|
v-if="permissions.professional_professionalqualificationrelation_del"
|
||||||
|
style="margin-left: 12px"
|
||||||
@click="handleDel(scope.row)">删除
|
@click="handleDel(scope.row)">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -200,7 +177,6 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 子组件 -->
|
<!-- 子组件 -->
|
||||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
|
||||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||||
</div>
|
</div>
|
||||||
@@ -215,28 +191,28 @@ import { BasicTableProps, useTable } from '/@/hooks/table'
|
|||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { useMessageBox } from '/@/hooks/message'
|
import { useMessageBox } from '/@/hooks/message'
|
||||||
import { useDict } from '/@/hooks/dict'
|
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 {
|
import {
|
||||||
fetchList,
|
fetchList,
|
||||||
putObj,
|
putObj,
|
||||||
delObj,
|
delObj,
|
||||||
getChartOption,
|
|
||||||
exportExcel
|
exportExcel
|
||||||
} from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
} from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||||
import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig'
|
import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig'
|
||||||
import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype'
|
import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
import DataForm from './form.vue'
|
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||||
import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.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'))
|
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
|
// 使用 Pinia store
|
||||||
const userInfoStore = useUserInfo()
|
const userInfoStore = useUserInfo()
|
||||||
@@ -261,10 +237,8 @@ const { professional_state: professionalState } = useDict('professional_state')
|
|||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
const multiDialogRef = ref()
|
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref()
|
||||||
const backReasonRef = ref()
|
const backReasonRef = ref()
|
||||||
const chartRef = ref()
|
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
|
|
||||||
// 搜索表单数据
|
// 搜索表单数据
|
||||||
@@ -274,10 +248,6 @@ const search = reactive({
|
|||||||
realName: ''
|
realName: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 图表数据
|
|
||||||
const chartOption = ref<any>({})
|
|
||||||
const chartData = ref<any[]>([])
|
|
||||||
|
|
||||||
// 材料预览
|
// 材料预览
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const imgUrl = ref<Array<{ title: string; url: string }>>([])
|
const imgUrl = ref<Array<{ title: string; url: string }>>([])
|
||||||
@@ -313,33 +283,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
|
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||||
|
|
||||||
// 初始化图表
|
|
||||||
const initChartOption = async () => {
|
|
||||||
try {
|
|
||||||
const response = await getChartOption()
|
|
||||||
chartOption.value = response.data.data.option || {}
|
|
||||||
|
|
||||||
let total = 0
|
|
||||||
if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) {
|
|
||||||
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({
|
|
||||||
name: item.name,
|
|
||||||
value: item.value,
|
|
||||||
rate: `${rate}%`
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
// Failed to load chart data
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 预览材料
|
// 预览材料
|
||||||
const handlePreview = (list: string[]) => {
|
const handlePreview = (list: string[]) => {
|
||||||
imgUrl.value = []
|
imgUrl.value = []
|
||||||
@@ -397,7 +340,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 打开新增窗口
|
// 打开新增窗口
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
multiDialogRef.value?.init(3)
|
dataFormRef.value?.openDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开编辑窗口
|
// 打开编辑窗口
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
<!-- 页面标题 -->
|
||||||
|
<div style="margin-bottom: 20px;">
|
||||||
|
<h2 style="margin: 0; font-size: 20px; font-weight: 600; color: #303133;">资格等级统计</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 图表统计 -->
|
||||||
|
<div style="width: 100%">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-table :data="chartData" border show-summary style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="等级" width="180" align="center" />
|
||||||
|
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||||
|
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
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 { getChartOption } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||||
|
|
||||||
|
// 注册 ECharts 组件
|
||||||
|
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||||
|
|
||||||
|
// 图表引用
|
||||||
|
const chartRef = ref()
|
||||||
|
|
||||||
|
// 图表数据
|
||||||
|
const chartOption = ref<any>({})
|
||||||
|
const chartData = ref<any[]>([])
|
||||||
|
|
||||||
|
// 初始化图表
|
||||||
|
const initChartOption = async () => {
|
||||||
|
try {
|
||||||
|
const response = await getChartOption()
|
||||||
|
chartOption.value = response.data.data.option || {}
|
||||||
|
|
||||||
|
let total = 0
|
||||||
|
if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) {
|
||||||
|
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({
|
||||||
|
name: item.name,
|
||||||
|
value: item.value,
|
||||||
|
rate: `${rate}%`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// Failed to load chart data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载时初始化图表
|
||||||
|
onMounted(() => {
|
||||||
|
initChartOption()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" title="编辑学历学位" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="dialogVisible" title="编辑学历学位" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||||
<div v-if="showForm">
|
<div v-if="showForm">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -88,15 +88,17 @@
|
|||||||
<el-form-item label="证书编码" prop="certificateNumber">
|
<el-form-item label="证书编码" prop="certificateNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.certificateNumber"
|
v-model="dataForm.certificateNumber"
|
||||||
placeholder="请输入证书编码"
|
placeholder="请输入证书编码(仅支持英文和数字)"
|
||||||
clearable
|
clearable
|
||||||
|
show-word-limit
|
||||||
|
maxlength="100"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="学历证书" prop="materialA">
|
<el-form-item label="学历证书" prop="materialA">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
@@ -105,7 +107,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -113,7 +117,6 @@
|
|||||||
<el-form-item label="学位证书" prop="materialB">
|
<el-form-item label="学位证书" prop="materialB">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:file-list="fileListB"
|
:file-list="fileListB"
|
||||||
@@ -122,7 +125,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -131,7 +136,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -142,20 +147,15 @@
|
|||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { Session } from '/@/utils/storage'
|
import { Session } from '/@/utils/storage'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||||
import { putObj } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
import { putObj } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||||
import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig'
|
import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig'
|
||||||
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
||||||
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
|
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
|
||||||
|
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||||
// Props
|
|
||||||
const props = defineProps<{
|
|
||||||
visible?: boolean
|
|
||||||
}>()
|
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:visible', value: boolean): void
|
|
||||||
(e: 'refreshData'): void
|
(e: 'refreshData'): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -166,11 +166,8 @@ const message = useMessage()
|
|||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
|
|
||||||
// 对话框显示状态
|
// 对话框显示状态(内部管理)
|
||||||
const visible = computed({
|
const dialogVisible = ref(false)
|
||||||
get: () => props.visible || false,
|
|
||||||
set: (val) => emit('update:visible', val)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
@@ -205,7 +202,8 @@ const formRules = {
|
|||||||
{ required: true, message: '请输入所学专业', trigger: 'blur' }
|
{ required: true, message: '请输入所学专业', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
certificateNumber: [
|
certificateNumber: [
|
||||||
{ required: true, message: '请输入证书编码', trigger: 'blur' }
|
{ required: true, message: '请输入证书编码', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,32 +212,7 @@ const educationTypeList = ref<any[]>([])
|
|||||||
const qualificationList = ref<any[]>([])
|
const qualificationList = ref<any[]>([])
|
||||||
const degreeList = ref<any[]>([])
|
const degreeList = ref<any[]>([])
|
||||||
|
|
||||||
// 基础信息
|
// 基础信息(简化,只保留需要的)
|
||||||
const baseInfoAbout = reactive<{
|
|
||||||
stationTypeList: any[]
|
|
||||||
atStationList: any[]
|
|
||||||
teacherTypeList: any[]
|
|
||||||
employmentNatureList: any[]
|
|
||||||
stationLevelList: any[]
|
|
||||||
stationDutyLevelList: any[]
|
|
||||||
workTypeList: any[]
|
|
||||||
proTitleList: any[]
|
|
||||||
majorStationList: any[]
|
|
||||||
qualificationList: any[]
|
|
||||||
partBranchList: any[]
|
|
||||||
}>({
|
|
||||||
stationTypeList: [],
|
|
||||||
atStationList: [],
|
|
||||||
teacherTypeList: [],
|
|
||||||
employmentNatureList: [],
|
|
||||||
stationLevelList: [],
|
|
||||||
stationDutyLevelList: [],
|
|
||||||
workTypeList: [],
|
|
||||||
proTitleList: [],
|
|
||||||
majorStationList: [],
|
|
||||||
qualificationList: [],
|
|
||||||
partBranchList: []
|
|
||||||
})
|
|
||||||
|
|
||||||
// 上传相关
|
// 上传相关
|
||||||
const url = ref('')
|
const url = ref('')
|
||||||
@@ -259,26 +232,13 @@ const showForm = ref(false)
|
|||||||
// 初始化字典数据
|
// 初始化字典数据
|
||||||
const initDicData = async () => {
|
const initDicData = async () => {
|
||||||
try {
|
try {
|
||||||
const [response, eduRes, quaRes, degRes] = await Promise.all([
|
// 使用专门的 API 获取数据(与 index.vue 保持一致)
|
||||||
getAllInfoAboutList(),
|
const [eduRes, quaRes, degRes] = await Promise.all([
|
||||||
getAllTypeList(),
|
getAllTypeList(),
|
||||||
getQualificationList(),
|
getQualificationList(),
|
||||||
getDegreeList()
|
getDegreeList()
|
||||||
])
|
])
|
||||||
|
|
||||||
const map = response.data.data
|
|
||||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
|
||||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
|
||||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
|
||||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
|
||||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
|
||||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
|
||||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
|
||||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
|
||||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
|
||||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
|
||||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
|
||||||
|
|
||||||
// 获取教育类型列表
|
// 获取教育类型列表
|
||||||
if (eduRes && eduRes.data) {
|
if (eduRes && eduRes.data) {
|
||||||
educationTypeList.value = Array.isArray(eduRes.data)
|
educationTypeList.value = Array.isArray(eduRes.data)
|
||||||
@@ -299,13 +259,16 @@ const initDicData = async () => {
|
|||||||
? degRes.data
|
? degRes.data
|
||||||
: (degRes.data.records || degRes.data.list || [])
|
: (degRes.data.records || degRes.data.list || [])
|
||||||
}
|
}
|
||||||
|
|
||||||
visible.value = true
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 获取字典数据失败
|
// 获取字典数据失败
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 证书编号输入处理(只允许英文和数字)
|
||||||
|
const handleCertificateNumberInput = (value: string) => {
|
||||||
|
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
// 文件上传成功 - 学历证书
|
// 文件上传成功 - 学历证书
|
||||||
const materiaUploadSuccess = (response: any) => {
|
const materiaUploadSuccess = (response: any) => {
|
||||||
if (response.data && response.data.code === "-1") {
|
if (response.data && response.data.code === "-1") {
|
||||||
@@ -325,7 +288,9 @@ const materiaUploadSuccessB = (response: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开对话框
|
// 打开对话框
|
||||||
const openDialog = (row: any) => {
|
const openDialog = async (row?: any) => {
|
||||||
|
if (row && row.id) {
|
||||||
|
// 编辑模式
|
||||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=1`
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=1`
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
fileListB.value = []
|
fileListB.value = []
|
||||||
@@ -346,21 +311,98 @@ const openDialog = (row: any) => {
|
|||||||
id: row.id || ''
|
id: row.id || ''
|
||||||
})
|
})
|
||||||
showForm.value = true
|
showForm.value = true
|
||||||
initDicData()
|
await initDicData()
|
||||||
|
dialogVisible.value = true
|
||||||
|
} else {
|
||||||
|
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||||
|
try {
|
||||||
|
const lockResponse = await checkLocked('acade')
|
||||||
|
if (lockResponse.data) {
|
||||||
|
// 已锁定
|
||||||
|
message.warning("新增功能已锁定,暂不允许操作")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未锁定,继续获取 teacherNo
|
||||||
|
const response = await getMyTeacherNo()
|
||||||
|
const teacherNo = response.data
|
||||||
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=1`
|
||||||
|
Object.assign(dataForm, {
|
||||||
|
graduateTime: '',
|
||||||
|
type: '',
|
||||||
|
qualificationConfigId: '',
|
||||||
|
degreeConfigId: '',
|
||||||
|
graduateSchool: '',
|
||||||
|
major: '',
|
||||||
|
certificateNumber: '',
|
||||||
|
materialA: '',
|
||||||
|
materialB: '',
|
||||||
|
qualificationImg: '',
|
||||||
|
degreeImg: '',
|
||||||
|
state: '',
|
||||||
|
teacherNo: teacherNo,
|
||||||
|
id: ''
|
||||||
|
})
|
||||||
|
fileList.value = []
|
||||||
|
fileListB.value = []
|
||||||
|
// 先加载字典数据,再显示表单
|
||||||
|
await initDicData()
|
||||||
|
showForm.value = true
|
||||||
|
dialogVisible.value = true
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取教师编号失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const dialogSubmit = async () => {
|
const dialogSubmit = async () => {
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
// 验证证明材料是否上传(与 MultiDialog 保持一致:mateA 或 mateB 至少有一个)
|
||||||
|
if (!dataForm.qualificationImg && !dataForm.degreeImg && !dataForm.materialA && !dataForm.materialB) {
|
||||||
|
message.warning("请上传学历或学位证书")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
await formRef.value.validate(async (valid: boolean) => {
|
await formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
if (dataForm.id) {
|
||||||
|
// 编辑:使用 putObj 接口(管理员编辑)
|
||||||
dataForm.state = '0'
|
dataForm.state = '0'
|
||||||
await putObj(dataForm)
|
await putObj(dataForm)
|
||||||
message.success("操作成功")
|
message.success("修改成功")
|
||||||
visible.value = false
|
} else {
|
||||||
|
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||||
|
// 注意:MultiDialog 中 type 字段在提交时会被设置为 val(1),但表单中也有 type 字段用于教育类型
|
||||||
|
// 这里直接使用 dataForm 的所有字段,后端应该能够处理
|
||||||
|
const submitData: any = {
|
||||||
|
type: 1, // 学历更新类型(固定值,会覆盖表单中的 type)
|
||||||
|
teacherNo: dataForm.teacherNo,
|
||||||
|
graduateTime: dataForm.graduateTime,
|
||||||
|
qualificationConfigId: dataForm.qualificationConfigId,
|
||||||
|
degreeConfigId: dataForm.degreeConfigId,
|
||||||
|
graduateSchool: dataForm.graduateSchool,
|
||||||
|
major: dataForm.major,
|
||||||
|
certificateNumber: dataForm.certificateNumber,
|
||||||
|
mateA: dataForm.qualificationImg || dataForm.materialA, // 学历证书
|
||||||
|
mateB: dataForm.degreeImg || dataForm.materialB // 学位证书
|
||||||
|
}
|
||||||
|
|
||||||
|
// 注意:MultiDialog 中教育类型字段也是 type,但在提交时会被覆盖为 val(1)
|
||||||
|
// 如果后端需要教育类型,可能需要单独传递,这里先不传,保持与 MultiDialog 一致
|
||||||
|
|
||||||
|
const res = await updateOtherInfo(submitData)
|
||||||
|
if (res.data == '-1') {
|
||||||
|
message.warning("当前不允许提交")
|
||||||
|
} else {
|
||||||
|
message.success("提交成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
emit('refreshData')
|
emit('refreshData')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error?.msg || '操作失败')
|
message.error(error?.msg || '操作失败')
|
||||||
|
|||||||
@@ -1,28 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-padding">
|
<div class="layout-padding">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<!-- 图表统计 -->
|
|
||||||
<div style="text-align: right; margin-bottom: 20px;">
|
|
||||||
<el-collapse accordion @change="initChartOption">
|
|
||||||
<el-collapse-item title="学历统计">
|
|
||||||
<div style="width: 100%">
|
|
||||||
<el-row :gutter="24">
|
|
||||||
<el-col :span="12">
|
|
||||||
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-table :data="chartData" border show-summary style="width: 100%">
|
|
||||||
<el-table-column prop="xl" label="学历" width="180" align="center" />
|
|
||||||
<el-table-column prop="total" label="人数" width="180" align="center" />
|
|
||||||
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-collapse-item>
|
|
||||||
</el-collapse>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search-form
|
<search-form
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
@@ -36,7 +14,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="search.state"
|
v-model="search.state"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择审核状态"
|
placeholder="请选择审核状态"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -52,7 +29,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -61,7 +37,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.realName"
|
v-model="search.realName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -87,7 +62,8 @@
|
|||||||
v-if="permissions.professional_professionalteacheracademicrelation_add">新 增
|
v-if="permissions.professional_professionalteacheracademicrelation_add">新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="warning"
|
||||||
|
plain
|
||||||
icon="Download"
|
icon="Download"
|
||||||
v-if="permissions.professional_teacherbase_export"
|
v-if="permissions.professional_teacherbase_export"
|
||||||
@click="handleDownLoadWord"
|
@click="handleDownLoadWord"
|
||||||
@@ -109,18 +85,15 @@
|
|||||||
|
|
||||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
|
||||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||||
|
</template>
|
||||||
<el-table-column prop="realName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="graduateTime" label="毕业时间" width="180" align="center" />
|
<el-table-column prop="graduateTime" label="毕业时间" width="180" align="center" />
|
||||||
|
|
||||||
@@ -144,6 +117,7 @@
|
|||||||
v-if="scope.row.qualificationImg && scope.row.qualificationImg !== ''"
|
v-if="scope.row.qualificationImg && scope.row.qualificationImg !== ''"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
|
icon="Document"
|
||||||
@click="handlePreview(scope.row.qiList, 1)">查看
|
@click="handlePreview(scope.row.qiList, 1)">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
@@ -156,40 +130,44 @@
|
|||||||
v-if="scope.row.degreeImg && scope.row.degreeImg !== ''"
|
v-if="scope.row.degreeImg && scope.row.degreeImg !== ''"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
|
icon="Document"
|
||||||
@click="handlePreview(scope.row.deList, 2)">查看
|
@click="handlePreview(scope.row.deList, 2)">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Edit"
|
icon="edit-pen"
|
||||||
v-if="permissions.professional_professionalteacheracademicrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
v-if="permissions.professional_professionalteacheracademicrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||||
@click="handleEdit(scope.row)">编辑
|
@click="handleEdit(scope.row)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="Check"
|
icon="CircleCheck"
|
||||||
v-if="permissions.professional_professionalteacheracademicrelation_exam && scope.row.state === '0'"
|
v-if="permissions.professional_professionalteacheracademicrelation_exam && scope.row.state === '0'"
|
||||||
@click="changeState(scope.row, 1)">通过
|
@click="changeState(scope.row, 1)">通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
icon="Close"
|
icon="CircleClose"
|
||||||
v-if="permissions.professional_professionalteacheracademicrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
v-if="permissions.professional_professionalteacheracademicrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||||
@click="changeState(scope.row, -2)">驳回
|
@click="changeState(scope.row, -2)">驳回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Delete"
|
icon="delete"
|
||||||
v-if="permissions.professional_professionalteacheracademicrelation_del"
|
v-if="permissions.professional_professionalteacheracademicrelation_del"
|
||||||
|
style="margin-left: 12px"
|
||||||
@click="handleDel(scope.row)">删除
|
@click="handleDel(scope.row)">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -214,7 +192,6 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 子组件 -->
|
<!-- 子组件 -->
|
||||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
|
||||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||||
</div>
|
</div>
|
||||||
@@ -229,28 +206,28 @@ import { BasicTableProps, useTable } from '/@/hooks/table'
|
|||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { useMessageBox } from '/@/hooks/message'
|
import { useMessageBox } from '/@/hooks/message'
|
||||||
import { useDict } from '/@/hooks/dict'
|
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 {
|
import {
|
||||||
fetchList,
|
fetchList,
|
||||||
putObj,
|
putObj,
|
||||||
delObj,
|
delObj,
|
||||||
getChartOption,
|
|
||||||
exportExcel
|
exportExcel
|
||||||
} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||||
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
|
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
|
||||||
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
import DataForm from './form.vue'
|
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||||
import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.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'))
|
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
|
// 使用 Pinia store
|
||||||
const userInfoStore = useUserInfo()
|
const userInfoStore = useUserInfo()
|
||||||
@@ -275,10 +252,8 @@ const { professional_state: professionalState } = useDict('professional_state')
|
|||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
const multiDialogRef = ref()
|
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref()
|
||||||
const backReasonRef = ref()
|
const backReasonRef = ref()
|
||||||
const chartRef = ref()
|
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
|
|
||||||
// 搜索表单数据
|
// 搜索表单数据
|
||||||
@@ -288,10 +263,6 @@ const search = reactive({
|
|||||||
realName: ''
|
realName: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 图表数据
|
|
||||||
const chartOption = ref<any>({})
|
|
||||||
const chartData = ref<any[]>([])
|
|
||||||
|
|
||||||
// 材料预览
|
// 材料预览
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const dialogTitle = ref('')
|
const dialogTitle = ref('')
|
||||||
@@ -334,34 +305,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
|
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
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) => {
|
const handlePreview = (list: string[], type: number) => {
|
||||||
imgUrl.value = []
|
imgUrl.value = []
|
||||||
@@ -425,7 +368,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 打开新增窗口
|
// 打开新增窗口
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
multiDialogRef.value?.init(1)
|
dataFormRef.value?.openDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开编辑窗口
|
// 打开编辑窗口
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
<!-- 页面标题 -->
|
||||||
|
<div style="margin-bottom: 20px;">
|
||||||
|
<h2 style="margin: 0; font-size: 20px; font-weight: 600; color: #303133;">学历统计</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 图表统计 -->
|
||||||
|
<div style="width: 100%">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-table :data="chartData" border show-summary style="width: 100%">
|
||||||
|
<el-table-column prop="xl" label="学历" width="180" align="center" />
|
||||||
|
<el-table-column prop="total" label="人数" width="180" align="center" />
|
||||||
|
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
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 { getChartOption } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||||
|
|
||||||
|
// 注册 ECharts 组件
|
||||||
|
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||||
|
|
||||||
|
// 图表引用
|
||||||
|
const chartRef = ref()
|
||||||
|
|
||||||
|
// 图表数据
|
||||||
|
const chartOption = ref<any>({})
|
||||||
|
const chartData = ref<any[]>([])
|
||||||
|
|
||||||
|
// 初始化图表
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载时初始化图表
|
||||||
|
onMounted(() => {
|
||||||
|
initChartOption()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" title="编辑教师资格证" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="dialogVisible" title="编辑教师资格证" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||||
<div v-if="showForm">
|
<div v-if="showForm">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -38,15 +38,17 @@
|
|||||||
<el-form-item label="证书编号" prop="certificateNumber">
|
<el-form-item label="证书编号" prop="certificateNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.certificateNumber"
|
v-model="dataForm.certificateNumber"
|
||||||
placeholder="请输入证书编号"
|
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||||
clearable
|
clearable
|
||||||
|
show-word-limit
|
||||||
|
maxlength="64"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="材料1" prop="materialA">
|
<el-form-item label="材料1" prop="materialA">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
@@ -55,7 +57,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -63,7 +67,6 @@
|
|||||||
<el-form-item label="材料2" prop="materialB">
|
<el-form-item label="材料2" prop="materialB">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:file-list="fileListB"
|
:file-list="fileListB"
|
||||||
@@ -72,7 +75,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -81,7 +86,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -92,18 +97,13 @@
|
|||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { Session } from '/@/utils/storage'
|
import { Session } from '/@/utils/storage'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||||
import { putObj } from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
import { putObj } from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
||||||
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
||||||
|
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||||
// Props
|
|
||||||
const props = defineProps<{
|
|
||||||
visible?: boolean
|
|
||||||
}>()
|
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:visible', value: boolean): void
|
|
||||||
(e: 'refreshData'): void
|
(e: 'refreshData'): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -114,11 +114,8 @@ const message = useMessage()
|
|||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
|
|
||||||
// 对话框显示状态
|
// 对话框显示状态(内部管理)
|
||||||
const visible = computed({
|
const dialogVisible = ref(false)
|
||||||
get: () => props.visible || false,
|
|
||||||
set: (val) => emit('update:visible', val)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
@@ -143,39 +140,15 @@ const formRules = {
|
|||||||
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
||||||
],
|
],
|
||||||
certificateNumber: [
|
certificateNumber: [
|
||||||
{ required: true, message: '请输入证书编号', trigger: 'blur' }
|
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 教师资格证列表
|
// 教师资格证列表
|
||||||
const teacherCertificateList = ref<any[]>([])
|
const teacherCertificateList = ref<any[]>([])
|
||||||
|
|
||||||
// 基础信息
|
// 基础信息(简化,只保留需要的)
|
||||||
const baseInfoAbout = reactive<{
|
|
||||||
stationTypeList: any[]
|
|
||||||
atStationList: any[]
|
|
||||||
teacherTypeList: any[]
|
|
||||||
employmentNatureList: any[]
|
|
||||||
stationLevelList: any[]
|
|
||||||
stationDutyLevelList: any[]
|
|
||||||
workTypeList: any[]
|
|
||||||
proTitleList: any[]
|
|
||||||
majorStationList: any[]
|
|
||||||
qualificationList: any[]
|
|
||||||
partBranchList: any[]
|
|
||||||
}>({
|
|
||||||
stationTypeList: [],
|
|
||||||
atStationList: [],
|
|
||||||
teacherTypeList: [],
|
|
||||||
employmentNatureList: [],
|
|
||||||
stationLevelList: [],
|
|
||||||
stationDutyLevelList: [],
|
|
||||||
workTypeList: [],
|
|
||||||
proTitleList: [],
|
|
||||||
majorStationList: [],
|
|
||||||
qualificationList: [],
|
|
||||||
partBranchList: []
|
|
||||||
})
|
|
||||||
|
|
||||||
// 上传相关
|
// 上传相关
|
||||||
const url = ref('')
|
const url = ref('')
|
||||||
@@ -195,23 +168,8 @@ const showForm = ref(false)
|
|||||||
// 初始化字典数据
|
// 初始化字典数据
|
||||||
const initDicData = async () => {
|
const initDicData = async () => {
|
||||||
try {
|
try {
|
||||||
const [response, certResponse] = await Promise.all([
|
// 使用专门的 API 获取数据(与 index.vue 保持一致)
|
||||||
getAllInfoAboutList(),
|
const certResponse = await getTeacherCertificateList()
|
||||||
getTeacherCertificateList()
|
|
||||||
])
|
|
||||||
|
|
||||||
const map = response.data.data
|
|
||||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
|
||||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
|
||||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
|
||||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
|
||||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
|
||||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
|
||||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
|
||||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
|
||||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
|
||||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
|
||||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
|
||||||
|
|
||||||
// 获取教师资格证列表
|
// 获取教师资格证列表
|
||||||
if (certResponse && certResponse.data) {
|
if (certResponse && certResponse.data) {
|
||||||
@@ -219,13 +177,16 @@ const initDicData = async () => {
|
|||||||
? certResponse.data
|
? certResponse.data
|
||||||
: (certResponse.data.records || certResponse.data.list || [])
|
: (certResponse.data.records || certResponse.data.list || [])
|
||||||
}
|
}
|
||||||
|
|
||||||
visible.value = true
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 获取字典数据失败
|
// 获取字典数据失败
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 证书编号输入处理(只允许英文和数字)
|
||||||
|
const handleCertificateNumberInput = (value: string) => {
|
||||||
|
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
// 文件上传成功 - 材料A
|
// 文件上传成功 - 材料A
|
||||||
const materiaUploadSuccess = (response: any) => {
|
const materiaUploadSuccess = (response: any) => {
|
||||||
if (response.data && response.data.code === "-1") {
|
if (response.data && response.data.code === "-1") {
|
||||||
@@ -245,7 +206,9 @@ const materiaUploadSuccessB = (response: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开对话框
|
// 打开对话框
|
||||||
const openDialog = (row: any) => {
|
const openDialog = async (row?: any) => {
|
||||||
|
if (row && row.id) {
|
||||||
|
// 编辑模式
|
||||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=0`
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=0`
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
fileListB.value = []
|
fileListB.value = []
|
||||||
@@ -262,21 +225,85 @@ const openDialog = (row: any) => {
|
|||||||
id: row.id || ''
|
id: row.id || ''
|
||||||
})
|
})
|
||||||
showForm.value = true
|
showForm.value = true
|
||||||
initDicData()
|
await initDicData()
|
||||||
|
dialogVisible.value = true
|
||||||
|
} else {
|
||||||
|
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||||
|
try {
|
||||||
|
const lockResponse = await checkLocked('teacherTitle')
|
||||||
|
if (lockResponse.data) {
|
||||||
|
// 已锁定
|
||||||
|
message.warning("新增功能已锁定,暂不允许操作")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未锁定,继续获取 teacherNo
|
||||||
|
const response = await getMyTeacherNo()
|
||||||
|
const teacherNo = response.data
|
||||||
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=0`
|
||||||
|
Object.assign(dataForm, {
|
||||||
|
certificateConfId: '',
|
||||||
|
certificateTime: '',
|
||||||
|
certificateNumber: '',
|
||||||
|
materialA: '',
|
||||||
|
materialB: '',
|
||||||
|
evidenceA: '',
|
||||||
|
evidenceB: '',
|
||||||
|
state: '',
|
||||||
|
teacherNo: teacherNo,
|
||||||
|
id: ''
|
||||||
|
})
|
||||||
|
fileList.value = []
|
||||||
|
fileListB.value = []
|
||||||
|
// 先加载字典数据,再显示表单
|
||||||
|
await initDicData()
|
||||||
|
showForm.value = true
|
||||||
|
dialogVisible.value = true
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取教师编号失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const dialogSubmit = async () => {
|
const dialogSubmit = async () => {
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||||
|
if (!dataForm.evidenceA && !dataForm.materialA) {
|
||||||
|
message.warning("请上传证明材料")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
await formRef.value.validate(async (valid: boolean) => {
|
await formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
if (dataForm.id) {
|
||||||
|
// 编辑:使用 putObj 接口(管理员编辑)
|
||||||
dataForm.state = '0'
|
dataForm.state = '0'
|
||||||
await putObj(dataForm)
|
await putObj(dataForm)
|
||||||
message.success("操作成功")
|
message.success("修改成功")
|
||||||
visible.value = false
|
} else {
|
||||||
|
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||||
|
// 注意:MultiDialog 的 type=0 表单只有 certificateConfId 和 certificateNumber,没有 certificateTime
|
||||||
|
const submitData: any = {
|
||||||
|
type: 0, // 教师资格证类型
|
||||||
|
teacherNo: dataForm.teacherNo,
|
||||||
|
certificateConfId: dataForm.certificateConfId,
|
||||||
|
certificateNumber: dataForm.certificateNumber,
|
||||||
|
mateA: dataForm.evidenceA || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await updateOtherInfo(submitData)
|
||||||
|
if (res.data == '-1') {
|
||||||
|
message.warning("当前不允许提交")
|
||||||
|
} else {
|
||||||
|
message.success("提交成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
emit('refreshData')
|
emit('refreshData')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error?.msg || '操作失败')
|
message.error(error?.msg || '操作失败')
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="search.state"
|
v-model="search.state"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择审核状态"
|
placeholder="请选择审核状态"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -30,7 +29,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -39,7 +37,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.realName"
|
v-model="search.realName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -65,7 +62,8 @@
|
|||||||
v-if="permissions.professional_professionalteachercertificaterelation_add">新 增
|
v-if="permissions.professional_professionalteachercertificaterelation_add">新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="warning"
|
||||||
|
plain
|
||||||
icon="Download"
|
icon="Download"
|
||||||
v-if="permissions.professional_teacherbase_export"
|
v-if="permissions.professional_teacherbase_export"
|
||||||
@click="handleDownLoadWord"
|
@click="handleDownLoadWord"
|
||||||
@@ -87,18 +85,15 @@
|
|||||||
|
|
||||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
|
||||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||||
|
</template>
|
||||||
<el-table-column prop="realName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="certificateConfId" label="关联资格证书" min-width="150" align="center" show-overflow-tooltip>
|
<el-table-column prop="certificateConfId" label="关联资格证书" min-width="150" align="center" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -116,40 +111,44 @@
|
|||||||
v-if="scope.row.evidenceA && scope.row.evidenceA !== ''"
|
v-if="scope.row.evidenceA && scope.row.evidenceA !== ''"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
|
icon="Document"
|
||||||
@click="handlePreview(scope.row.srcList)">查看
|
@click="handlePreview(scope.row.srcList)">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Edit"
|
icon="edit-pen"
|
||||||
v-if="permissions.professional_professionalteachercertificaterelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
v-if="permissions.professional_professionalteachercertificaterelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||||
@click="handleEdit(scope.row)">编辑
|
@click="handleEdit(scope.row)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="Check"
|
icon="CircleCheck"
|
||||||
v-if="permissions.professional_professionalteachercertificaterelation_exam && scope.row.state === '0'"
|
v-if="permissions.professional_professionalteachercertificaterelation_exam && scope.row.state === '0'"
|
||||||
@click="changeState(scope.row, 1)">通过
|
@click="changeState(scope.row, 1)">通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
icon="Close"
|
icon="CircleClose"
|
||||||
v-if="permissions.professional_professionalteachercertificaterelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
v-if="permissions.professional_professionalteachercertificaterelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||||
@click="changeState(scope.row, -2)">驳回
|
@click="changeState(scope.row, -2)">驳回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Delete"
|
icon="delete"
|
||||||
v-if="permissions.professional_professionalteachercertificaterelation_del"
|
v-if="permissions.professional_professionalteachercertificaterelation_del"
|
||||||
|
style="margin-left: 12px"
|
||||||
@click="handleDel(scope.row)">删除
|
@click="handleDel(scope.row)">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -174,7 +173,6 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 子组件 -->
|
<!-- 子组件 -->
|
||||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
|
||||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||||
</div>
|
</div>
|
||||||
@@ -197,11 +195,20 @@ import {
|
|||||||
exportExcel
|
exportExcel
|
||||||
} from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
} from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
||||||
import { defineAsyncComponent } from 'vue'
|
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 DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||||
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.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
|
// 使用 Pinia store
|
||||||
const userInfoStore = useUserInfo()
|
const userInfoStore = useUserInfo()
|
||||||
const { userInfos } = storeToRefs(userInfoStore)
|
const { userInfos } = storeToRefs(userInfoStore)
|
||||||
@@ -225,7 +232,6 @@ const { professional_state: professionalState } = useDict('professional_state')
|
|||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
const multiDialogRef = ref()
|
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref()
|
||||||
const backReasonRef = ref()
|
const backReasonRef = ref()
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
@@ -327,7 +333,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 打开新增窗口
|
// 打开新增窗口
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
multiDialogRef.value?.init(0)
|
dataFormRef.value?.openDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开编辑窗口
|
// 打开编辑窗口
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" :title="title" width="80%" append-to-body :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="dialogVisible" :title="title" width="80%" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -33,7 +33,6 @@
|
|||||||
<el-form-item label="证明材料" prop="materialA">
|
<el-form-item label="证明材料" prop="materialA">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:on-success="materiaUploadSuccess"
|
:on-success="materiaUploadSuccess"
|
||||||
@@ -42,7 +41,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -52,7 +53,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="visible = false">关 闭</el-button>
|
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||||
<el-button @click="dialogSubmit" type="primary" :loading="submitLoading">保 存</el-button>
|
<el-button @click="dialogSubmit" type="primary" :loading="submitLoading">保 存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -63,17 +64,12 @@
|
|||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { Session } from '/@/utils/storage'
|
import { Session } from '/@/utils/storage'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||||
import { putObj } from '/@/api/professional/professionaluser/professionalteacherhonor'
|
import { putObj } from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||||
|
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||||
// Props
|
|
||||||
const props = defineProps<{
|
|
||||||
visible?: boolean
|
|
||||||
}>()
|
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:visible', value: boolean): void
|
|
||||||
(e: 'refreshData'): void
|
(e: 'refreshData'): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -84,11 +80,8 @@ const message = useMessage()
|
|||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
|
|
||||||
// 对话框显示状态
|
// 对话框显示状态(内部管理)
|
||||||
const visible = computed({
|
const dialogVisible = ref(false)
|
||||||
get: () => props.visible || false,
|
|
||||||
set: (val) => emit('update:visible', val)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
@@ -116,32 +109,7 @@ const dataRules = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基础信息
|
// 基础信息(简化,只保留需要的)
|
||||||
const baseInfoAbout = reactive<{
|
|
||||||
stationTypeList: any[]
|
|
||||||
atStationList: any[]
|
|
||||||
teacherTypeList: any[]
|
|
||||||
employmentNatureList: any[]
|
|
||||||
stationLevelList: any[]
|
|
||||||
stationDutyLevelList: any[]
|
|
||||||
workTypeList: any[]
|
|
||||||
proTitleList: any[]
|
|
||||||
majorStationList: any[]
|
|
||||||
qualificationList: any[]
|
|
||||||
partBranchList: any[]
|
|
||||||
}>({
|
|
||||||
stationTypeList: [],
|
|
||||||
atStationList: [],
|
|
||||||
teacherTypeList: [],
|
|
||||||
employmentNatureList: [],
|
|
||||||
stationLevelList: [],
|
|
||||||
stationDutyLevelList: [],
|
|
||||||
workTypeList: [],
|
|
||||||
proTitleList: [],
|
|
||||||
majorStationList: [],
|
|
||||||
qualificationList: [],
|
|
||||||
partBranchList: []
|
|
||||||
})
|
|
||||||
|
|
||||||
// 上传相关
|
// 上传相关
|
||||||
const url = ref('')
|
const url = ref('')
|
||||||
@@ -160,26 +128,9 @@ const showForm = ref(false)
|
|||||||
// 标题
|
// 标题
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
|
|
||||||
// 初始化字典数据
|
// 初始化字典数据(简化,不需要加载字典数据)
|
||||||
const initDicData = async () => {
|
const initDicData = async () => {
|
||||||
try {
|
// 综合表彰不需要额外的字典数据
|
||||||
const response = await getAllInfoAboutList()
|
|
||||||
const map = response.data.data
|
|
||||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
|
||||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
|
||||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
|
||||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
|
||||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
|
||||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
|
||||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
|
||||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
|
||||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
|
||||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
|
||||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
|
||||||
visible.value = true
|
|
||||||
} catch (error) {
|
|
||||||
// 获取字典数据失败
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
@@ -192,7 +143,9 @@ const materiaUploadSuccess = (response: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开对话框
|
// 打开对话框
|
||||||
const openDialog = (row: any) => {
|
const openDialog = async (row?: any) => {
|
||||||
|
if (row && row.id) {
|
||||||
|
// 编辑模式
|
||||||
title.value = row.teacherName || ''
|
title.value = row.teacherName || ''
|
||||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=4`
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=4`
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
@@ -208,21 +161,84 @@ const openDialog = (row: any) => {
|
|||||||
id: row.id || ''
|
id: row.id || ''
|
||||||
})
|
})
|
||||||
showForm.value = true
|
showForm.value = true
|
||||||
initDicData()
|
await initDicData()
|
||||||
|
dialogVisible.value = true
|
||||||
|
} else {
|
||||||
|
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||||
|
try {
|
||||||
|
const lockResponse = await checkLocked('remix')
|
||||||
|
if (lockResponse.data) {
|
||||||
|
// 已锁定
|
||||||
|
message.warning("新增功能已锁定,暂不允许操作")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未锁定,继续获取 teacherNo
|
||||||
|
const response = await getMyTeacherNo()
|
||||||
|
const teacherNo = response.data
|
||||||
|
title.value = '新增综合表彰'
|
||||||
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=4`
|
||||||
|
Object.assign(dataForm, {
|
||||||
|
honor: '',
|
||||||
|
honorCompany: '',
|
||||||
|
year: null,
|
||||||
|
materialA: '',
|
||||||
|
attachment: '',
|
||||||
|
state: '',
|
||||||
|
teacherNo: teacherNo,
|
||||||
|
teacherName: '',
|
||||||
|
id: ''
|
||||||
|
})
|
||||||
|
fileList.value = []
|
||||||
|
// 先加载字典数据,再显示表单
|
||||||
|
await initDicData()
|
||||||
|
showForm.value = true
|
||||||
|
dialogVisible.value = true
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取教师编号失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const dialogSubmit = async () => {
|
const dialogSubmit = async () => {
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||||
|
if (!dataForm.attachment && !dataForm.materialA) {
|
||||||
|
message.warning("请上传证明材料")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
await formRef.value.validate(async (valid: boolean) => {
|
await formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
if (dataForm.id) {
|
||||||
|
// 编辑:使用 putObj 接口(管理员编辑)
|
||||||
dataForm.state = '0'
|
dataForm.state = '0'
|
||||||
await putObj(dataForm)
|
await putObj(dataForm)
|
||||||
message.success("操作成功")
|
message.success("修改成功")
|
||||||
visible.value = false
|
} else {
|
||||||
|
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||||
|
const submitData: any = {
|
||||||
|
type: 4, // 综合表彰类型
|
||||||
|
teacherNo: dataForm.teacherNo,
|
||||||
|
honor: dataForm.honor,
|
||||||
|
honorCompany: dataForm.honorCompany,
|
||||||
|
year: dataForm.year,
|
||||||
|
mateA: dataForm.attachment || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await updateOtherInfo(submitData)
|
||||||
|
if (res.data == '-1') {
|
||||||
|
message.warning("当前不允许提交")
|
||||||
|
} else {
|
||||||
|
message.success("提交成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
emit('refreshData')
|
emit('refreshData')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error?.msg || '操作失败')
|
message.error(error?.msg || '操作失败')
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="search.state"
|
v-model="search.state"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择审核状态"
|
placeholder="请选择审核状态"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -30,7 +29,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -39,7 +37,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherName"
|
v-model="search.teacherName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -65,10 +62,11 @@
|
|||||||
v-if="permissions.professional_professionalteacherhonor_add">新 增
|
v-if="permissions.professional_professionalteacherhonor_add">新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="warning"
|
||||||
|
plain
|
||||||
icon="Download"
|
icon="Download"
|
||||||
@click="handleDownLoadWord"
|
@click="handleDownLoadWord"
|
||||||
:loading="exportLoading">导出
|
:loading="exportLoading">导出信息
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -86,18 +84,15 @@
|
|||||||
|
|
||||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
|
||||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
<TeacherNameNo :name="scope.row.teacherName" :no="scope.row.teacherNo" />
|
||||||
|
</template>
|
||||||
<el-table-column prop="teacherName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="honor" label="荣誉" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column prop="honor" label="荣誉" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
@@ -111,40 +106,44 @@
|
|||||||
v-if="scope.row.attachment && scope.row.attachment !== ''"
|
v-if="scope.row.attachment && scope.row.attachment !== ''"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
|
icon="Document"
|
||||||
@click="showEdvince(scope.row)">查看
|
@click="showEdvince(scope.row)">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Edit"
|
icon="edit-pen"
|
||||||
v-if="permissions.professional_professionalteacherhonor_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
v-if="permissions.professional_professionalteacherhonor_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||||
@click="handleEdit(scope.row)">编辑
|
@click="handleEdit(scope.row)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="Check"
|
icon="CircleCheck"
|
||||||
v-if="permissions.professional_professionalteacherhonor_exam && scope.row.state === '0'"
|
v-if="permissions.professional_professionalteacherhonor_exam && scope.row.state === '0'"
|
||||||
@click="changeState(scope.row, 1)">通过
|
@click="changeState(scope.row, 1)">通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
icon="Close"
|
icon="CircleClose"
|
||||||
v-if="permissions.professional_professionalteacherhonor_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
v-if="permissions.professional_professionalteacherhonor_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||||
@click="changeState(scope.row, -2)">驳回
|
@click="changeState(scope.row, -2)">驳回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="Delete"
|
icon="delete"
|
||||||
v-if="permissions.professional_professionalteacherhonor_del"
|
v-if="permissions.professional_professionalteacherhonor_del"
|
||||||
|
style="margin-left: 12px"
|
||||||
@click="handleDel(scope.row)">删除
|
@click="handleDel(scope.row)">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -159,10 +158,9 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 子组件 -->
|
<!-- 子组件 -->
|
||||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
|
||||||
<ShowHonorEdvince ref="showHonorEdvinceRef" />
|
<ShowHonorEdvince ref="showHonorEdvinceRef" />
|
||||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||||
<DataForm ref="dataFormRef" />
|
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -181,10 +179,11 @@ import {
|
|||||||
delObj
|
delObj
|
||||||
} from '/@/api/professional/professionaluser/professionalteacherhonor'
|
} from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
import ShowHonorEdvince from './showHonorEdvince.vue'
|
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||||
import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.vue'
|
const ShowHonorEdvince = defineAsyncComponent(() => import('./showHonorEdvince.vue'))
|
||||||
import DataForm from './form.vue'
|
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||||
|
const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||||
|
|
||||||
// 使用 Pinia store
|
// 使用 Pinia store
|
||||||
const userInfoStore = useUserInfo()
|
const userInfoStore = useUserInfo()
|
||||||
@@ -206,10 +205,17 @@ const messageBox = useMessageBox()
|
|||||||
// 字典数据
|
// 字典数据
|
||||||
const { professional_state: professionalState } = useDict('professional_state')
|
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 tableRef = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
const multiDialogRef = ref()
|
|
||||||
const showHonorEdvinceRef = ref()
|
const showHonorEdvinceRef = ref()
|
||||||
const backReasonRef = ref()
|
const backReasonRef = ref()
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref()
|
||||||
@@ -288,7 +294,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 打开新增窗口
|
// 打开新增窗口
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
multiDialogRef.value?.init(4)
|
dataFormRef.value?.openDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开编辑窗口
|
// 打开编辑窗口
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
:model="search"
|
:model="search"
|
||||||
ref="searchFormRef"
|
ref="searchFormRef"
|
||||||
@keyup-enter="handleFilter(search)"
|
@keyup-enter="handleFilter"
|
||||||
>
|
>
|
||||||
<template #default="{ visible }">
|
<template #default="{ visible }">
|
||||||
<template v-if="visible">
|
<template v-if="visible">
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -23,7 +22,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherName"
|
v-model="search.teacherName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -33,7 +31,7 @@
|
|||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleFilter(search)" icon="Search">查询</el-button>
|
<el-button type="primary" @click="handleFilter" icon="Search">查询</el-button>
|
||||||
<el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
<el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -50,15 +48,17 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
|
||||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table-column prop="teacherName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
<TeacherNameNo :name="scope.row.teacherName" :no="scope.row.teacherNo" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="oldDeptName" label="原部门名称" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column prop="oldDeptName" label="原部门名称" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column prop="newDeptName" label="现部门名称" min-width="150" align="center" show-overflow-tooltip />
|
<el-table-column prop="newDeptName" label="现部门名称" min-width="150" align="center" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column prop="changeDate" label="调令日期" width="120" align="center" />
|
<el-table-column prop="changeDate" label="调令日期" min-width="120" align="center" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -84,9 +84,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||||
import { fetchList } from '/@/api/professional/professionaluser/professionalteacherstationchange'
|
import { fetchList } from '/@/api/professional/professionaluser/professionalteacherstationchange'
|
||||||
|
|
||||||
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
|
|
||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" title="编辑职称" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="dialogVisible" title="编辑职称" width="600px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||||
<div v-if="showForm">
|
<div v-if="showForm">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -66,15 +66,17 @@
|
|||||||
<el-form-item label="证书编号" prop="certificateNumber">
|
<el-form-item label="证书编号" prop="certificateNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.certificateNumber"
|
v-model="dataForm.certificateNumber"
|
||||||
placeholder="请输入证书编号"
|
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||||
clearable
|
clearable
|
||||||
|
show-word-limit
|
||||||
|
maxlength="32"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证明材料" prop="materialA">
|
<el-form-item label="证明材料" prop="materialA">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="url"
|
:action="url"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
@@ -83,7 +85,9 @@
|
|||||||
>
|
>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -92,7 +96,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -103,17 +107,14 @@
|
|||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { Session } from '/@/utils/storage'
|
import { Session } from '/@/utils/storage'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
||||||
|
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
||||||
import { putObj } from '/@/api/professional/professionaluser/professionaltitlerelation'
|
import { putObj } from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||||
|
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||||
// Props
|
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||||
const props = defineProps<{
|
|
||||||
visible?: boolean
|
|
||||||
}>()
|
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:visible', value: boolean): void
|
|
||||||
(e: 'refreshData'): void
|
(e: 'refreshData'): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
@@ -124,11 +125,8 @@ const message = useMessage()
|
|||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
|
|
||||||
// 对话框显示状态
|
// 对话框显示状态(内部管理)
|
||||||
const visible = computed({
|
const dialogVisible = ref(false)
|
||||||
get: () => props.visible || false,
|
|
||||||
set: (val) => emit('update:visible', val)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
@@ -156,35 +154,18 @@ const formRules = {
|
|||||||
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
||||||
],
|
],
|
||||||
certificateNumber: [
|
certificateNumber: [
|
||||||
{ required: true, message: '请输入证书编号', trigger: 'blur' }
|
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基础信息
|
// 基础信息
|
||||||
const baseInfoAbout = reactive<{
|
const baseInfoAbout = reactive<{
|
||||||
stationTypeList: any[]
|
|
||||||
atStationList: any[]
|
|
||||||
teacherTypeList: any[]
|
|
||||||
employmentNatureList: any[]
|
|
||||||
stationLevelList: any[]
|
|
||||||
stationDutyLevelList: any[]
|
|
||||||
workTypeList: any[]
|
|
||||||
proTitleList: any[]
|
proTitleList: any[]
|
||||||
majorStationList: any[]
|
majorStationList: any[]
|
||||||
qualificationList: any[]
|
|
||||||
partBranchList: any[]
|
|
||||||
}>({
|
}>({
|
||||||
stationTypeList: [],
|
|
||||||
atStationList: [],
|
|
||||||
teacherTypeList: [],
|
|
||||||
employmentNatureList: [],
|
|
||||||
stationLevelList: [],
|
|
||||||
stationDutyLevelList: [],
|
|
||||||
workTypeList: [],
|
|
||||||
proTitleList: [],
|
proTitleList: [],
|
||||||
majorStationList: [],
|
majorStationList: []
|
||||||
qualificationList: [],
|
|
||||||
partBranchList: []
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 上传相关
|
// 上传相关
|
||||||
@@ -210,23 +191,28 @@ const majorStationList = computed(() => baseInfoAbout.majorStationList as any[])
|
|||||||
// 初始化字典数据
|
// 初始化字典数据
|
||||||
const initDicData = async () => {
|
const initDicData = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await getAllInfoAboutList()
|
const [titleResponse, stationResponse] = await Promise.all([
|
||||||
const map = response.data.data
|
getProfessionalTitleList(),
|
||||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
getMajorStationList()
|
||||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
])
|
||||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
|
||||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
// 处理职称列表(与 index.vue 保持一致)
|
||||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
if (titleResponse && titleResponse.data) {
|
||||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
baseInfoAbout.proTitleList = titleResponse.data
|
||||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
|
||||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
|
||||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
|
||||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
|
||||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
|
||||||
visible.value = true
|
|
||||||
} catch (error) {
|
|
||||||
// 获取字典数据失败
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理专业技术职务列表(与 index.vue 保持一致)
|
||||||
|
if (stationResponse && stationResponse.data) {
|
||||||
|
baseInfoAbout.majorStationList = stationResponse.data
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取字典数据失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 证书编号输入处理(只允许英文和数字)
|
||||||
|
const handleCertificateNumberInput = (value: string) => {
|
||||||
|
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
@@ -235,13 +221,17 @@ const materiaUploadSuccess = (response: any) => {
|
|||||||
message.error("当前不允许上传文件")
|
message.error("当前不允许上传文件")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 统一使用 evidence 字段存储证明材料URL(与后端API一致)
|
||||||
dataForm.evidence = response.data.url
|
dataForm.evidence = response.data.url
|
||||||
|
dataForm.materialA = response.data.url
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开对话框
|
// 打开对话框
|
||||||
const openDialog = (row: any) => {
|
const openDialog = async (row?: any) => {
|
||||||
|
// 新增时 row 可能为 null 或 undefined
|
||||||
|
if (row && row.teacherNo) {
|
||||||
|
// 编辑模式:使用传入的 teacherNo(编辑不需要检查锁定)
|
||||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=2`
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=2`
|
||||||
fileList.value = []
|
|
||||||
Object.assign(dataForm, {
|
Object.assign(dataForm, {
|
||||||
professionalTitleConfigId: row.professionalTitleConfigId || '',
|
professionalTitleConfigId: row.professionalTitleConfigId || '',
|
||||||
majorStation: row.majorStation || '',
|
majorStation: row.majorStation || '',
|
||||||
@@ -254,22 +244,89 @@ const openDialog = (row: any) => {
|
|||||||
teacherNo: row.teacherNo || '',
|
teacherNo: row.teacherNo || '',
|
||||||
id: row.id || ''
|
id: row.id || ''
|
||||||
})
|
})
|
||||||
|
fileList.value = []
|
||||||
|
// 先加载字典数据,再显示表单
|
||||||
|
await initDicData()
|
||||||
showForm.value = true
|
showForm.value = true
|
||||||
initDicData()
|
dialogVisible.value = true
|
||||||
|
} else {
|
||||||
|
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||||
|
try {
|
||||||
|
const lockResponse = await checkLocked('title')
|
||||||
|
if (lockResponse.data) {
|
||||||
|
// 已锁定
|
||||||
|
message.warning("新增功能已锁定,暂不允许操作")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未锁定,继续获取 teacherNo
|
||||||
|
const response = await getMyTeacherNo()
|
||||||
|
const teacherNo = response.data
|
||||||
|
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=2`
|
||||||
|
Object.assign(dataForm, {
|
||||||
|
professionalTitleConfigId: '',
|
||||||
|
majorStation: '',
|
||||||
|
certificateTime: '',
|
||||||
|
inOfficeDate: '',
|
||||||
|
certificateNumber: '',
|
||||||
|
materialA: '',
|
||||||
|
evidence: '',
|
||||||
|
state: '',
|
||||||
|
teacherNo: teacherNo,
|
||||||
|
id: ''
|
||||||
|
})
|
||||||
|
fileList.value = []
|
||||||
|
// 先加载字典数据,再显示表单
|
||||||
|
await initDicData()
|
||||||
|
showForm.value = true
|
||||||
|
dialogVisible.value = true
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取教师编号失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const dialogSubmit = async () => {
|
const dialogSubmit = async () => {
|
||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||||
|
if (!dataForm.evidence && !dataForm.materialA) {
|
||||||
|
message.warning("请上传证明材料")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
await formRef.value.validate(async (valid: boolean) => {
|
await formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
if (dataForm.id) {
|
||||||
|
// 编辑:使用 putObj 接口(管理员编辑)
|
||||||
dataForm.state = '0'
|
dataForm.state = '0'
|
||||||
await putObj(dataForm)
|
await putObj(dataForm)
|
||||||
message.success("操作成功")
|
message.success("修改成功")
|
||||||
visible.value = false
|
} else {
|
||||||
|
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||||
|
const submitData: any = {
|
||||||
|
type: 2, // 职称类型
|
||||||
|
teacherNo: dataForm.teacherNo,
|
||||||
|
professionalTitleConfigId: dataForm.professionalTitleConfigId,
|
||||||
|
majorStation: dataForm.majorStation,
|
||||||
|
certificateTime: dataForm.certificateTime,
|
||||||
|
inOfficeDate: dataForm.inOfficeDate,
|
||||||
|
certificateNumber: dataForm.certificateNumber,
|
||||||
|
mateA: dataForm.evidence || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await updateOtherInfo(submitData)
|
||||||
|
if (res.data == '-1') {
|
||||||
|
message.warning("当前不允许提交")
|
||||||
|
} else {
|
||||||
|
message.success("提交成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
emit('refreshData')
|
emit('refreshData')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error?.msg || '操作失败')
|
message.error(error?.msg || '操作失败')
|
||||||
|
|||||||
@@ -1,41 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-padding">
|
<div class="layout-padding">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<!-- 图表统计 -->
|
|
||||||
<div style="text-align: right; margin-bottom: 20px;">
|
|
||||||
<el-collapse accordion @change="initChartOption">
|
|
||||||
<el-collapse-item title="职称统计">
|
|
||||||
<div style="width: 100%">
|
|
||||||
<el-row :gutter="24">
|
|
||||||
<el-col :span="12">
|
|
||||||
<v-chart ref="titleChartRef" style="width: 100%; height: 400px;" :option="titleChartOption" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-table :data="titleChartTableData" border show-summary style="width: 100%">
|
|
||||||
<el-table-column prop="name" label="职称" width="180" align="center" />
|
|
||||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
|
||||||
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row :gutter="24" style="margin-top: 20px;">
|
|
||||||
<el-col :span="12">
|
|
||||||
<v-chart ref="techChartRef" style="width: 100%; height: 400px;" :option="techChartOption" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-table :data="techChartTableData" border show-summary style="width: 100%">
|
|
||||||
<el-table-column prop="name" label="技术职务" width="180" align="center" />
|
|
||||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
|
||||||
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-collapse-item>
|
|
||||||
</el-collapse>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search-form
|
<search-form
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
@@ -49,7 +14,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="search.state"
|
v-model="search.state"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择审核状态"
|
placeholder="请选择审核状态"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -65,7 +29,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.teacherNo"
|
v-model="search.teacherNo"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入工号"
|
placeholder="请输入工号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -74,7 +37,6 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="search.realName"
|
v-model="search.realName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -84,7 +46,6 @@
|
|||||||
v-model="search.professionalTitleConfigId"
|
v-model="search.professionalTitleConfigId"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择职称"
|
placeholder="请选择职称"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -101,7 +62,6 @@
|
|||||||
v-model="search.majorStation"
|
v-model="search.majorStation"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请选择专业技术职务"
|
placeholder="请选择专业技术职务"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -134,7 +94,9 @@
|
|||||||
v-if="permissions.professional_professionaltitlerelation_add">新 增
|
v-if="permissions.professional_professionaltitlerelation_add">新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
class="ml10"
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
icon="Download"
|
icon="Download"
|
||||||
v-if="permissions.professional_teacherbase_export"
|
v-if="permissions.professional_teacherbase_export"
|
||||||
@click="handleDownLoadWord"
|
@click="handleDownLoadWord"
|
||||||
@@ -188,7 +150,7 @@
|
|||||||
v-if="scope.row.evidence && scope.row.evidence !== ''"
|
v-if="scope.row.evidence && scope.row.evidence !== ''"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="View"
|
icon="Document"
|
||||||
@click="handlePreview(scope.row.srcList)">查看
|
@click="handlePreview(scope.row.srcList)">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
@@ -209,14 +171,14 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="check"
|
icon="CircleCheck"
|
||||||
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.state === '0'"
|
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.state === '0'"
|
||||||
@click="changeState(scope.row, 1)">通过
|
@click="changeState(scope.row, 1)">通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
icon="close"
|
icon="CircleClose"
|
||||||
v-if="permissions.professional_professionaltitlerelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
v-if="permissions.professional_professionaltitlerelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||||
@click="changeState(scope.row, -2)">驳回
|
@click="changeState(scope.row, -2)">驳回
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -265,21 +227,17 @@ import { BasicTableProps, useTable } from '/@/hooks/table'
|
|||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
import { useMessageBox } from '/@/hooks/message'
|
import { useMessageBox } from '/@/hooks/message'
|
||||||
import { useDict } from '/@/hooks/dict'
|
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 {
|
import {
|
||||||
fetchList,
|
fetchList,
|
||||||
putObj,
|
putObj,
|
||||||
delObj,
|
delObj,
|
||||||
getChartOption,
|
|
||||||
exportRelation
|
exportRelation
|
||||||
} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||||
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
||||||
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
// 子组件
|
||||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
||||||
@@ -287,9 +245,6 @@ const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
|||||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||||
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue'))
|
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue'))
|
||||||
|
|
||||||
// 注册 ECharts 组件
|
|
||||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
|
||||||
|
|
||||||
// 使用 Pinia store
|
// 使用 Pinia store
|
||||||
const userInfoStore = useUserInfo()
|
const userInfoStore = useUserInfo()
|
||||||
const { userInfos } = storeToRefs(userInfoStore)
|
const { userInfos } = storeToRefs(userInfoStore)
|
||||||
@@ -316,8 +271,6 @@ const searchFormRef = ref()
|
|||||||
const multiDialogRef = ref()
|
const multiDialogRef = ref()
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref()
|
||||||
const backReasonRef = ref()
|
const backReasonRef = ref()
|
||||||
const titleChartRef = ref()
|
|
||||||
const techChartRef = ref()
|
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
|
|
||||||
// 搜索表单数据
|
// 搜索表单数据
|
||||||
@@ -329,12 +282,6 @@ const search = reactive({
|
|||||||
majorStation: ''
|
majorStation: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 图表数据
|
|
||||||
const titleChartOption = ref<any>({})
|
|
||||||
const titleChartTableData = ref<any[]>([])
|
|
||||||
const techChartOption = ref<any>({})
|
|
||||||
const techChartTableData = ref<any[]>([])
|
|
||||||
|
|
||||||
// 材料预览
|
// 材料预览
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const imgUrl = ref<Array<{ title: string; url: string }>>([])
|
const imgUrl = ref<Array<{ title: string; url: string }>>([])
|
||||||
@@ -371,54 +318,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
|
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||||
|
|
||||||
// 初始化图表
|
|
||||||
const initChartOption = async () => {
|
|
||||||
try {
|
|
||||||
const response = await getChartOption()
|
|
||||||
const data = response.data.data || {}
|
|
||||||
|
|
||||||
// 职称图表
|
|
||||||
titleChartOption.value = data.titleOption || {}
|
|
||||||
let titleTotal = 0
|
|
||||||
if (titleChartOption.value.series && titleChartOption.value.series[0] && titleChartOption.value.series[0].data) {
|
|
||||||
titleChartOption.value.series[0].data.forEach((item: any) => {
|
|
||||||
titleTotal += item.value || 0
|
|
||||||
})
|
|
||||||
|
|
||||||
titleChartTableData.value = []
|
|
||||||
titleChartOption.value.series[0].data.forEach((item: any) => {
|
|
||||||
const rate = titleTotal > 0 ? Number((item.value / titleTotal * 100).toFixed(1)) : 0
|
|
||||||
titleChartTableData.value.push({
|
|
||||||
name: item.name,
|
|
||||||
value: item.value,
|
|
||||||
rate: `${rate}%`
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 技术职务图表
|
|
||||||
techChartOption.value = data.techOption || {}
|
|
||||||
let techTotal = 0
|
|
||||||
if (techChartOption.value.series && techChartOption.value.series[0] && techChartOption.value.series[0].data) {
|
|
||||||
techChartOption.value.series[0].data.forEach((item: any) => {
|
|
||||||
techTotal += item.value || 0
|
|
||||||
})
|
|
||||||
|
|
||||||
techChartTableData.value = []
|
|
||||||
techChartOption.value.series[0].data.forEach((item: any) => {
|
|
||||||
const rate = techTotal > 0 ? Number((item.value / techTotal * 100).toFixed(1)) : 0
|
|
||||||
techChartTableData.value.push({
|
|
||||||
name: item.name,
|
|
||||||
value: item.value,
|
|
||||||
rate: `${rate}%`
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
// Failed to load chart data
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 预览材料
|
// 预览材料
|
||||||
const handlePreview = (list: string[]) => {
|
const handlePreview = (list: string[]) => {
|
||||||
imgUrl.value = []
|
imgUrl.value = []
|
||||||
@@ -477,7 +376,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 打开新增窗口
|
// 打开新增窗口
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
multiDialogRef.value?.init(2)
|
dataFormRef.value?.openDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开编辑窗口
|
// 打开编辑窗口
|
||||||
|
|||||||
119
src/views/professional/professionaltitlerelation/statistics.vue
Normal file
119
src/views/professional/professionaltitlerelation/statistics.vue
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
<!-- 页面标题 -->
|
||||||
|
<div style="margin-bottom: 20px;">
|
||||||
|
<h2 style="margin: 0; font-size: 20px; font-weight: 600; color: #303133;">职称统计</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 图表统计 -->
|
||||||
|
<div style="width: 100%">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<v-chart ref="titleChartRef" style="width: 100%; height: 400px;" :option="titleChartOption" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-table :data="titleChartTableData" border show-summary style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="职称" width="180" align="center" />
|
||||||
|
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||||
|
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="24" style="margin-top: 20px;">
|
||||||
|
<el-col :span="12">
|
||||||
|
<v-chart ref="techChartRef" style="width: 100%; height: 400px;" :option="techChartOption" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-table :data="techChartTableData" border show-summary style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="技术职务" width="180" align="center" />
|
||||||
|
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||||
|
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
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 { getChartOption } from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||||
|
|
||||||
|
// 注册 ECharts 组件
|
||||||
|
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||||
|
|
||||||
|
// 图表引用
|
||||||
|
const titleChartRef = ref()
|
||||||
|
const techChartRef = ref()
|
||||||
|
|
||||||
|
// 图表数据
|
||||||
|
const titleChartOption = ref<any>({})
|
||||||
|
const titleChartTableData = ref<any[]>([])
|
||||||
|
const techChartOption = ref<any>({})
|
||||||
|
const techChartTableData = ref<any[]>([])
|
||||||
|
|
||||||
|
// 初始化图表
|
||||||
|
const initChartOption = async () => {
|
||||||
|
try {
|
||||||
|
const response = await getChartOption()
|
||||||
|
const data = response.data.data || {}
|
||||||
|
|
||||||
|
// 职称图表
|
||||||
|
titleChartOption.value = data.titleOption || {}
|
||||||
|
let titleTotal = 0
|
||||||
|
if (titleChartOption.value.series && titleChartOption.value.series[0] && titleChartOption.value.series[0].data) {
|
||||||
|
titleChartOption.value.series[0].data.forEach((item: any) => {
|
||||||
|
titleTotal += item.value || 0
|
||||||
|
})
|
||||||
|
|
||||||
|
titleChartTableData.value = []
|
||||||
|
titleChartOption.value.series[0].data.forEach((item: any) => {
|
||||||
|
const rate = titleTotal > 0 ? Number((item.value / titleTotal * 100).toFixed(1)) : 0
|
||||||
|
titleChartTableData.value.push({
|
||||||
|
name: item.name,
|
||||||
|
value: item.value,
|
||||||
|
rate: `${rate}%`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 技术职务图表
|
||||||
|
techChartOption.value = data.techOption || {}
|
||||||
|
let techTotal = 0
|
||||||
|
if (techChartOption.value.series && techChartOption.value.series[0] && techChartOption.value.series[0].data) {
|
||||||
|
techChartOption.value.series[0].data.forEach((item: any) => {
|
||||||
|
techTotal += item.value || 0
|
||||||
|
})
|
||||||
|
|
||||||
|
techChartTableData.value = []
|
||||||
|
techChartOption.value.series[0].data.forEach((item: any) => {
|
||||||
|
const rate = techTotal > 0 ? Number((item.value / techTotal * 100).toFixed(1)) : 0
|
||||||
|
techChartTableData.value.push({
|
||||||
|
name: item.name,
|
||||||
|
value: item.value,
|
||||||
|
rate: `${rate}%`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// Failed to load chart data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载时初始化图表
|
||||||
|
onMounted(() => {
|
||||||
|
initChartOption()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Upload"
|
icon="UploadFilled"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
v-if="permissions.professional_teacherinfo_import"
|
v-if="permissions.professional_teacherinfo_import"
|
||||||
@click="handleImportDialog"
|
@click="handleImportDialog"
|
||||||
@@ -1027,8 +1027,8 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
type="date"
|
type="date"
|
||||||
v-model="form.professionalStationRelation.stationDate"
|
v-model="form.professionalStationRelation.stationDate"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
format="yyyy-MM-dd"
|
format="YYYY-MM-DD"
|
||||||
placeholder="请选择时间"
|
placeholder="请选择时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
@@ -1071,8 +1071,8 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
type="date"
|
type="date"
|
||||||
v-model="form.professionalStationRelation.workDate"
|
v-model="form.professionalStationRelation.workDate"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
format="yyyy-MM-dd"
|
format="YYYY-MM-DD"
|
||||||
placeholder="请选择时间"
|
placeholder="请选择时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
@@ -1084,8 +1084,8 @@
|
|||||||
type="date"
|
type="date"
|
||||||
readonly
|
readonly
|
||||||
v-model="form.professionalStationRelation.retireDate"
|
v-model="form.professionalStationRelation.retireDate"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
format="yyyy-MM-dd"
|
format="YYYY-MM-DD"
|
||||||
placeholder="自动计算"
|
placeholder="自动计算"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
@@ -1108,8 +1108,8 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
type="date"
|
type="date"
|
||||||
v-model="form.professionalStationRelation.dutyDate"
|
v-model="form.professionalStationRelation.dutyDate"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
format="yyyy-MM-dd"
|
format="YYYY-MM-DD"
|
||||||
placeholder="请选择时间"
|
placeholder="请选择时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
@@ -1122,8 +1122,8 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
type="date"
|
type="date"
|
||||||
v-model="form.professionalStationRelation.entrySchoolDate"
|
v-model="form.professionalStationRelation.entrySchoolDate"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
format="yyyy-MM-dd"
|
format="YYYY-MM-DD"
|
||||||
placeholder="请选择时间"
|
placeholder="请选择时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
@@ -1134,8 +1134,8 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
type="date"
|
type="date"
|
||||||
v-model="form.professionalStationRelation.entryDutyDate"
|
v-model="form.professionalStationRelation.entryDutyDate"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
format="yyyy-MM-dd"
|
format="YYYY-MM-DD"
|
||||||
placeholder="请选择时间"
|
placeholder="请选择时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
@@ -1419,11 +1419,11 @@
|
|||||||
exportNoImgUser,
|
exportNoImgUser,
|
||||||
updateInout,
|
updateInout,
|
||||||
exportTeacherInfo as exportTeacherInfoApi
|
exportTeacherInfo as exportTeacherInfoApi
|
||||||
} from '/@/api/professional/teacherbase'
|
} from '/@/api/professional/professionaluser/teacherbase'
|
||||||
import {getNationalList} from '/@/api/basic/basicnation'
|
import {getNationalList} from '/@/api/basic/basicnation'
|
||||||
import {addPoliticssStatus, dePoObj} from '/@/api/professional/professionalpoliticsstatus'
|
import {addPoliticssStatus, dePoObj} from '/@/api/professional/professionaluser/professionalpoliticsstatus'
|
||||||
import {addAcadeRelation, delEduObj} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
import {addAcadeRelation, delEduObj} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||||
import {addSocialObj, delSocialObj as delSocialObjApi} from '/@/api/professional/professionalsocial'
|
import {addSocialObj, delSocialObj as delSocialObjApi} from '/@/api/professional/professionaluser/professionalsocial'
|
||||||
import {addTitleRelationObj, delTitleObj as delTitleObjApi} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
import {addTitleRelationObj, delTitleObj as delTitleObjApi} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||||
import {addQuaRelation, delQuaObj as delQuaObjApi} from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
import {addQuaRelation, delQuaObj as delQuaObjApi} from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||||
import {getDicts} from '/@/api/admin/dict'
|
import {getDicts} from '/@/api/admin/dict'
|
||||||
@@ -1437,7 +1437,7 @@
|
|||||||
getDeptListByParent
|
getDeptListByParent
|
||||||
} from '/@/api/basic/basicdept'
|
} from '/@/api/basic/basicdept'
|
||||||
import {getAllList, updateStatus} from '/@/api/professional/professionalstatuslock'
|
import {getAllList, updateStatus} from '/@/api/professional/professionalstatuslock'
|
||||||
import {resetPassWord} from "/@/api/professional/teacherbase"
|
import {resetPassWord} from "/@/api/professional/professionaluser/teacherbase"
|
||||||
// 组件配置已不再需要(已从 avue-crud 迁移到 el-table)
|
// 组件配置已不再需要(已从 avue-crud 迁移到 el-table)
|
||||||
import global from '/@/components/tools/commondict.vue'
|
import global from '/@/components/tools/commondict.vue'
|
||||||
import authImg from "/@/components/tools/auth-img.vue";
|
import authImg from "/@/components/tools/auth-img.vue";
|
||||||
|
|||||||
@@ -15,21 +15,28 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证书编号" prop="certificateNumber">
|
<el-form-item label="证书编号" prop="certificateNumber">
|
||||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编号" />
|
<el-input
|
||||||
|
v-model="waitShenheForm.form.certificateNumber"
|
||||||
|
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证明材料">
|
<el-form-item label="证明材料">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="materialUrlFrom.url"
|
:action="materialUrlFrom.url"
|
||||||
:file-list="materialUrlFrom.fileListA"
|
:file-list="materialUrlFrom.fileListA"
|
||||||
:on-success="materiaUploadSuccessA"
|
:on-success="materiaUploadSuccessA"
|
||||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -93,36 +100,48 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证书编码" prop="certificateNumber">
|
<el-form-item label="证书编码" prop="certificateNumber">
|
||||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编码" />
|
<el-input
|
||||||
|
v-model="waitShenheForm.form.certificateNumber"
|
||||||
|
placeholder="请输入证书编码(仅支持英文和数字)"
|
||||||
|
show-word-limit
|
||||||
|
maxlength="100"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="学历证书">
|
<el-form-item label="学历证书">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="materialUrlFrom.url"
|
:action="materialUrlFrom.url"
|
||||||
:file-list="materialUrlFrom.fileListA"
|
:file-list="materialUrlFrom.fileListA"
|
||||||
:on-success="materiaUploadSuccessA"
|
:on-success="materiaUploadSuccessA"
|
||||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="学位证书">
|
<el-form-item label="学位证书">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="materialUrlFrom.url"
|
:action="materialUrlFrom.url"
|
||||||
:on-success="materiaUploadSuccessB"
|
:on-success="materiaUploadSuccessB"
|
||||||
:file-list="materialUrlFrom.fileListB"
|
:file-list="materialUrlFrom.fileListB"
|
||||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -178,21 +197,28 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证书编号" prop="certificateNumber">
|
<el-form-item label="证书编号" prop="certificateNumber">
|
||||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编号" />
|
<el-input
|
||||||
|
v-model="waitShenheForm.form.certificateNumber"
|
||||||
|
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证明材料">
|
<el-form-item label="证明材料">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="materialUrlFrom.url"
|
:action="materialUrlFrom.url"
|
||||||
:file-list="materialUrlFrom.fileListA"
|
:file-list="materialUrlFrom.fileListA"
|
||||||
:on-success="materiaUploadSuccessA"
|
:on-success="materiaUploadSuccessA"
|
||||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -237,21 +263,30 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="证书编号" prop="certificateNumber">
|
<el-form-item label="证书编号" prop="certificateNumber">
|
||||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编号" />
|
<el-input
|
||||||
|
v-model="waitShenheForm.form.certificateNumber"
|
||||||
|
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||||
|
show-word-limit
|
||||||
|
maxlength="32"
|
||||||
|
@input="handleCertificateNumberInput"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="材料1">
|
<el-form-item label="材料1">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="materialUrlFrom.url"
|
:action="materialUrlFrom.url"
|
||||||
:file-list="materialUrlFrom.fileListA"
|
:file-list="materialUrlFrom.fileListA"
|
||||||
:on-success="materiaUploadSuccessA"
|
:on-success="materiaUploadSuccessA"
|
||||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -284,15 +319,18 @@
|
|||||||
<el-form-item label="证明材料">
|
<el-form-item label="证明材料">
|
||||||
<el-upload
|
<el-upload
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="width:3.5cm;height:5.3cm;"
|
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:action="materialUrlFrom.url"
|
:action="materialUrlFrom.url"
|
||||||
:on-success="materiaUploadSuccessA"
|
:on-success="materiaUploadSuccessA"
|
||||||
:file-list="materialUrlFrom.fileListA"
|
:file-list="materialUrlFrom.fileListA"
|
||||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div style="margin-top: 8px;">
|
||||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -428,7 +466,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||||
import { updateOtherInfo, getMyTeacherNo, getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
import { updateOtherInfo, getMyTeacherNo, getAllInfoAboutList } from '/@/api/professional/professionaluser/teacherbase'
|
||||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||||
import { getDeptListByLevelTwo, getDeptListByParent as getDeptListByParentApi } from '/@/api/basic/basicdept'
|
import { getDeptListByLevelTwo, getDeptListByParent as getDeptListByParentApi } from '/@/api/basic/basicdept'
|
||||||
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
||||||
@@ -456,7 +494,10 @@
|
|||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
const teacherCertificateRules = {
|
const teacherCertificateRules = {
|
||||||
certificateConfId: [{ required: true, message: '请选择类型', trigger: 'change' }],
|
certificateConfId: [{ required: true, message: '请选择类型', trigger: 'change' }],
|
||||||
certificateNumber: [{ required: true, message: '请输入证书编号', trigger: 'blur' }]
|
certificateNumber: [
|
||||||
|
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const educationRules = {
|
const educationRules = {
|
||||||
@@ -464,21 +505,30 @@
|
|||||||
type: [{ required: true, message: '请选择教育类型', trigger: 'change' }],
|
type: [{ required: true, message: '请选择教育类型', trigger: 'change' }],
|
||||||
graduateSchool: [{ required: true, message: '请输入毕业学校', trigger: 'blur' }],
|
graduateSchool: [{ required: true, message: '请输入毕业学校', trigger: 'blur' }],
|
||||||
major: [{ required: true, message: '请输入所学专业', trigger: 'blur' }],
|
major: [{ required: true, message: '请输入所学专业', trigger: 'blur' }],
|
||||||
certificateNumber: [{ required: true, message: '请输入证书编码', trigger: 'blur' }]
|
certificateNumber: [
|
||||||
|
{ required: true, message: '请输入证书编码', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const proRules = {
|
const proRules = {
|
||||||
professionalTitleConfigId: [{ required: true, message: '请选择职称等级', trigger: 'change' }],
|
professionalTitleConfigId: [{ required: true, message: '请选择职称等级', trigger: 'change' }],
|
||||||
majorStation: [{ required: true, message: '请选择专业技术职务', trigger: 'change' }],
|
majorStation: [{ required: true, message: '请选择专业技术职务', trigger: 'change' }],
|
||||||
certificateTime: [{ required: true, message: '请选择取证时间', trigger: 'change' }],
|
certificateTime: [{ required: true, message: '请选择取证时间', trigger: 'change' }],
|
||||||
certificateNumber: [{ required: true, message: '请输入证书编号', trigger: 'blur' }]
|
certificateNumber: [
|
||||||
|
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const workRules = {
|
const workRules = {
|
||||||
worker: [{ required: true, message: '请选择职业工种', trigger: 'change' }],
|
worker: [{ required: true, message: '请选择职业工种', trigger: 'change' }],
|
||||||
qualificationConfigId: [{ required: true, message: '请选择等级', trigger: 'change' }],
|
qualificationConfigId: [{ required: true, message: '请选择等级', trigger: 'change' }],
|
||||||
certificateTime: [{ required: true, message: '请选择取证时间', trigger: 'change' }],
|
certificateTime: [{ required: true, message: '请选择取证时间', trigger: 'change' }],
|
||||||
certificateNumber: [{ required: true, message: '请输入证书编号', trigger: 'blur' }]
|
certificateNumber: [
|
||||||
|
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||||
|
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const honorRules = {
|
const honorRules = {
|
||||||
@@ -598,21 +648,25 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 方法定义
|
// 方法定义
|
||||||
const initDicData = () => {
|
const initDicData = async () => {
|
||||||
getAllInfoAboutList().then((response: any) => {
|
try {
|
||||||
const map = response.data.data
|
const response = await getAllInfoAboutList()
|
||||||
baseInfoAbout.stationTypeList = map['stationTypeList']
|
const map = response.data
|
||||||
baseInfoAbout.atStationList = map['atStationList']
|
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||||
baseInfoAbout.teacherTypeList = map['teacherTypeList']
|
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||||
baseInfoAbout.employmentNatureList = map['employmentNatureList']
|
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||||
baseInfoAbout.stationLevelList = map['stationLevelList']
|
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList']
|
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||||
baseInfoAbout.workTypeList = map['workTypeList']
|
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||||
baseInfoAbout.proTitleList = map['proTitleList']
|
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||||
baseInfoAbout.majorStationList = map['majorStationList']
|
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||||
baseInfoAbout.qualificationList = map['qualificationList']
|
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||||
baseInfoAbout.partBranchList = map['partBranchList']
|
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||||
})
|
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||||
|
} catch (error) {
|
||||||
|
// 获取基础信息失败
|
||||||
|
}
|
||||||
|
|
||||||
// 加载字典数据
|
// 加载字典数据
|
||||||
loadCertificateTypeList()
|
loadCertificateTypeList()
|
||||||
loadEducationTypeList()
|
loadEducationTypeList()
|
||||||
@@ -620,17 +674,18 @@
|
|||||||
loadDegreeList()
|
loadDegreeList()
|
||||||
}
|
}
|
||||||
|
|
||||||
const init = (val: number) => {
|
const init = async (val: number) => {
|
||||||
initDicData()
|
await initDicData()
|
||||||
if (val == 5 || val == 6) {
|
if (val === 5 || val === 6) {
|
||||||
teacherNo.value = props.nowRow.teacherNo
|
teacherNo.value = props.nowRow.teacherNo
|
||||||
handleWaitExam(val)
|
handleWaitExam(val)
|
||||||
} else {
|
} else {
|
||||||
for (let i in waitShenheForm.form) {
|
// 重置表单数据
|
||||||
if (i !== 'newDeptCodeList' && i !== 'deptCodeList') {
|
Object.keys(waitShenheForm.form).forEach(key => {
|
||||||
(waitShenheForm.form as any)[i] = ''
|
if (key !== 'newDeptCodeList' && key !== 'deptCodeList') {
|
||||||
}
|
(waitShenheForm.form as any)[key] = ''
|
||||||
}
|
}
|
||||||
|
})
|
||||||
waitShenheForm.form.newDeptCodeList = []
|
waitShenheForm.form.newDeptCodeList = []
|
||||||
waitShenheForm.form.deptCodeList = []
|
waitShenheForm.form.deptCodeList = []
|
||||||
materialUrlFrom.fileListA = []
|
materialUrlFrom.fileListA = []
|
||||||
@@ -638,32 +693,33 @@
|
|||||||
materialUrlFrom.fileListC = []
|
materialUrlFrom.fileListC = []
|
||||||
materialUrlFrom.url = '/professional/file/teacherAboutInfoUpload'
|
materialUrlFrom.url = '/professional/file/teacherAboutInfoUpload'
|
||||||
|
|
||||||
let statusCode = ""
|
// 状态码映射
|
||||||
if (val == 0) {
|
const statusCodeMap: Record<number, string> = {
|
||||||
statusCode = "teacherTitle"
|
0: "teacherTitle",
|
||||||
|
1: "acade",
|
||||||
|
2: "title",
|
||||||
|
3: "job",
|
||||||
|
4: "remix"
|
||||||
}
|
}
|
||||||
if (val == 1) {
|
const statusCode = statusCodeMap[val]
|
||||||
statusCode = "acade"
|
|
||||||
}
|
if (statusCode) {
|
||||||
if (val == 2) {
|
try {
|
||||||
statusCode = "title"
|
const lockResponse = await checkLocked(statusCode)
|
||||||
}
|
if (lockResponse.data) {
|
||||||
if (val == 3) {
|
|
||||||
statusCode = "job"
|
|
||||||
}
|
|
||||||
if (val == 4) {
|
|
||||||
statusCode = "remix"
|
|
||||||
}
|
|
||||||
checkLocked(statusCode).then((res: any) => {
|
|
||||||
if (!res.data.data) {
|
|
||||||
getMyTeacherNo().then((res: any) => {
|
|
||||||
teacherNo.value = res.data.data
|
|
||||||
handleWaitExam(val)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
message.warning("新增功能已锁定,暂不允许操作")
|
message.warning("新增功能已锁定,暂不允许操作")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const response = await getMyTeacherNo()
|
||||||
|
teacherNo.value = response.data
|
||||||
|
handleWaitExam(val)
|
||||||
|
} catch (error) {
|
||||||
|
message.error('操作失败')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
handleWaitExam(val)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleWaitExam = (val: number) => {
|
const handleWaitExam = (val: number) => {
|
||||||
@@ -676,127 +732,113 @@
|
|||||||
waitShenheForm.f = false
|
waitShenheForm.f = false
|
||||||
waitShenheForm.g = false
|
waitShenheForm.g = false
|
||||||
|
|
||||||
switch (val) {
|
// 表单类型配置
|
||||||
case 0:
|
const formConfig: Record<number, { title: string; field: 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' }> = {
|
||||||
waitShenheForm.title = "教师资格证"
|
0: { title: "教师资格证", field: 'a' },
|
||||||
waitShenheForm.a = true
|
1: { title: "学历更新", field: 'b' },
|
||||||
break
|
2: { title: "职称更新", field: 'c' },
|
||||||
case 1:
|
3: { title: "职业更新", field: 'd' },
|
||||||
waitShenheForm.title = "学历更新"
|
4: { title: "综合表彰", field: 'e' },
|
||||||
waitShenheForm.b = true
|
5: { title: "人员调动", field: 'f' },
|
||||||
break
|
6: { title: "党员调动", field: 'g' }
|
||||||
case 2:
|
}
|
||||||
waitShenheForm.title = "职称更新"
|
|
||||||
waitShenheForm.c = true
|
const config = formConfig[val]
|
||||||
break
|
if (config) {
|
||||||
case 3:
|
waitShenheForm.title = config.title
|
||||||
waitShenheForm.title = "职业更新"
|
;(waitShenheForm as any)[config.field] = true
|
||||||
waitShenheForm.d = true
|
|
||||||
break
|
// 特殊处理
|
||||||
case 4:
|
if (val === 4) {
|
||||||
waitShenheForm.title = "综合表彰"
|
// 综合表彰:重置相关字段
|
||||||
materialUrlFrom.fileListA = []
|
materialUrlFrom.fileListA = []
|
||||||
waitShenheForm.form.honor = ''
|
waitShenheForm.form.honor = ''
|
||||||
waitShenheForm.form.honorCompany = ''
|
waitShenheForm.form.honorCompany = ''
|
||||||
waitShenheForm.form.year = ''
|
waitShenheForm.form.year = ''
|
||||||
waitShenheForm.form.attachment = ''
|
waitShenheForm.form.attachment = ''
|
||||||
waitShenheForm.e = true
|
} else if (val === 5) {
|
||||||
break
|
// 人员调动:加载部门数据
|
||||||
case 5:
|
|
||||||
waitShenheForm.title = "人员调动"
|
|
||||||
waitShenheForm.f = true
|
|
||||||
waitShenheForm.form = { ...props.nowRow }
|
waitShenheForm.form = { ...props.nowRow }
|
||||||
waitShenheForm.form.newDeptCodeList = []
|
waitShenheForm.form.newDeptCodeList = []
|
||||||
waitShenheForm.form.deptCodeList = []
|
waitShenheForm.form.deptCodeList = []
|
||||||
newSecDeptCode.value = ''
|
newSecDeptCode.value = ''
|
||||||
newSecChildDeptCode.value = ''
|
newSecChildDeptCode.value = ''
|
||||||
getDeptListByLevelTwo().then((res: any) => {
|
getDeptListByLevelTwo().then((res: any) => {
|
||||||
secDeptList.value = res.data.data
|
secDeptList.value = res.data
|
||||||
educationDialogFromVisible.value = true
|
educationDialogFromVisible.value = true
|
||||||
|
}).catch(() => {
|
||||||
|
message.error('获取部门列表失败')
|
||||||
})
|
})
|
||||||
break
|
} else if (val === 6) {
|
||||||
case 6:
|
// 党员调动:设置原支部
|
||||||
waitShenheForm.title = "党员调动"
|
|
||||||
waitShenheForm.form = { ...props.nowRow }
|
waitShenheForm.form = { ...props.nowRow }
|
||||||
waitShenheForm.form.oldBranchName = waitShenheForm.form.oldBranchId
|
waitShenheForm.form.oldBranchName = waitShenheForm.form.oldBranchId
|
||||||
waitShenheForm.g = true
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
materialUrlFrom.url = materialUrlFrom.url + "?teacherNo=" + teacherNo.value + "&type=" + val
|
}
|
||||||
if (val != 5) {
|
materialUrlFrom.url = `${materialUrlFrom.url}?teacherNo=${teacherNo.value}&type=${val}`
|
||||||
|
if (val !== 5) {
|
||||||
educationDialogFromVisible.value = true
|
educationDialogFromVisible.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const materiaUploadSuccessA = (response: any, file: any, fileList: any) => {
|
// 证书编号输入处理(只允许英文和数字)
|
||||||
if (response.data.code == "-1") {
|
const handleCertificateNumberInput = (value: string) => {
|
||||||
|
waitShenheForm.form.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 文件上传成功处理
|
||||||
|
const materiaUploadSuccessA = (response: any) => {
|
||||||
|
if (response.data?.code === "-1") {
|
||||||
message.error("当前不允许上传文件")
|
message.error("当前不允许上传文件")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
waitShenheForm.form.mateA = response.data.url
|
waitShenheForm.form.mateA = response.data.url
|
||||||
}
|
}
|
||||||
|
|
||||||
const materiaUploadSuccessB = (response: any, file: any, fileList: any) => {
|
const materiaUploadSuccessB = (response: any) => {
|
||||||
if (response.data.code == "-1") {
|
if (response.data?.code === "-1") {
|
||||||
message.error("当前不允许上传文件")
|
message.error("当前不允许上传文件")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
waitShenheForm.form.mateB = response.data.url
|
waitShenheForm.form.mateB = response.data.url
|
||||||
}
|
}
|
||||||
|
|
||||||
const materiaUploadSuccessC = (response: any, file: any, fileList: any) => {
|
|
||||||
if (response.data.code == "-1") {
|
|
||||||
message.error("当前不允许上传文件")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
waitShenheForm.form.mateC = response.data.url
|
|
||||||
}
|
|
||||||
const dialogSubmit = async (val: number) => {
|
const dialogSubmit = async (val: number) => {
|
||||||
waitShenheForm.form.type = val
|
waitShenheForm.form.type = val
|
||||||
waitShenheForm.form.teacherNo = teacherNo.value
|
waitShenheForm.form.teacherNo = teacherNo.value
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证配置
|
||||||
let formRef: any = null
|
const formRefMap: Record<number, any> = {
|
||||||
|
0: teacherCertificateFormRef.value,
|
||||||
|
1: educationFormRef.value,
|
||||||
|
2: proFormRef.value,
|
||||||
|
3: workFormRef.value,
|
||||||
|
4: honorFormRef.value,
|
||||||
|
5: stationChangeFormRef.value,
|
||||||
|
6: partChangeFormRef.value
|
||||||
|
}
|
||||||
|
|
||||||
if (val == 0) {
|
const formRef = formRefMap[val]
|
||||||
formRef = teacherCertificateFormRef.value
|
|
||||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
// 材料验证
|
||||||
|
if (val === 0 || val === 2 || val === 3 || val === 4) {
|
||||||
|
// 需要上传材料A的表单
|
||||||
|
if (!waitShenheForm.form.mateA) {
|
||||||
message.info("请上传资料")
|
message.info("请上传资料")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if (val == 1) {
|
} else if (val === 1) {
|
||||||
formRef = educationFormRef.value
|
// 学历:需要上传材料A或材料B
|
||||||
if ((undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") && (undefined == waitShenheForm.form.mateB || waitShenheForm.form.mateB == "")) {
|
if (!waitShenheForm.form.mateA && !waitShenheForm.form.mateB) {
|
||||||
message.info("请上传学历或学位证书")
|
message.info("请上传学历或学位证书")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if (val == 2) {
|
} else if (val === 5) {
|
||||||
formRef = proFormRef.value
|
// 人员调动:需要选择部门
|
||||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
|
||||||
message.info("请上传证明材料")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else if (val == 3) {
|
|
||||||
formRef = workFormRef.value
|
|
||||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
|
||||||
message.info("请上传资料")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else if (val == 4) {
|
|
||||||
formRef = honorFormRef.value
|
|
||||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
|
||||||
message.info("请上传证明材料")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else if (val == 5) {
|
|
||||||
formRef = stationChangeFormRef.value
|
|
||||||
if (!newSecDeptCode.value) {
|
if (!newSecDeptCode.value) {
|
||||||
message.info("请选择要调入的部门")
|
message.info("请选择要调入的部门")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
waitShenheForm.form.newDeptCode = newSecDeptCode.value
|
waitShenheForm.form.newDeptCode = newSecDeptCode.value
|
||||||
waitShenheForm.form.newSecDeptCode = newSecChildDeptCode.value ? newSecChildDeptCode.value : newSecDeptCode.value
|
waitShenheForm.form.newSecDeptCode = newSecChildDeptCode.value || newSecDeptCode.value
|
||||||
} else if (val == 6) {
|
|
||||||
formRef = partChangeFormRef.value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 验证表单
|
// 验证表单
|
||||||
@@ -811,8 +853,8 @@
|
|||||||
try {
|
try {
|
||||||
await messageBox.confirm('确认提交?')
|
await messageBox.confirm('确认提交?')
|
||||||
const res = await updateOtherInfo(waitShenheForm.form)
|
const res = await updateOtherInfo(waitShenheForm.form)
|
||||||
if (res.data.data == '-1') {
|
if (res.data === '-1') {
|
||||||
message.success("当前不允许提交")
|
message.warning("当前不允许提交")
|
||||||
} else {
|
} else {
|
||||||
message.success("提交成功")
|
message.success("提交成功")
|
||||||
}
|
}
|
||||||
@@ -823,12 +865,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDeptListByParent = () => {
|
const getDeptListByParent = async () => {
|
||||||
newSecChildDeptCode.value = ''
|
newSecChildDeptCode.value = ''
|
||||||
newSecChildDeptCodeList.value = []
|
newSecChildDeptCodeList.value = []
|
||||||
getDeptListByParentApi(newSecDeptCode.value).then((res: any) => {
|
try {
|
||||||
newSecChildDeptCodeList.value = res.data.data
|
const res = await getDeptListByParentApi(newSecDeptCode.value)
|
||||||
})
|
newSecChildDeptCodeList.value = res.data
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取部门列表失败')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 暴露方法
|
// 暴露方法
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
|||||||
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
},
|
},
|
||||||
|
'/professional/file': {
|
||||||
|
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
|
||||||
|
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
||||||
|
},
|
||||||
'^/ws/info/.*': {
|
'^/ws/info/.*': {
|
||||||
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
|
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
|
||||||
ws: true, // 是否启用 WebSocket
|
ws: true, // 是否启用 WebSocket
|
||||||
|
|||||||
Reference in New Issue
Block a user