Merge branch 'master' of http://119.91.43.128:3001/sheng/mes-ui-d2
This commit is contained in:
245
docs/质量管理功能测试任务列表.md
Normal file
245
docs/质量管理功能测试任务列表.md
Normal file
@@ -0,0 +1,245 @@
|
||||
# 质量管理功能测试任务列表
|
||||
|
||||
## 检验类别管理 (Inspection Type Management)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/first_inspection/category 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 首巡检项目配置 (First Article Inspection Configuration)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/first_inspection/setting 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 首巡检录入 (First Article Inspection Records)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/first_inspection/input 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 首巡检报表 (First Article Inspection Reports)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/first_inspection/report 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
|
||||
## 检验单管理 (Inspection Orders)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/xqc/inspection_order_manage 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 检验标准 (Inspection Standards)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/xqc/inspection_standard 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 接收质量限 (AQL Standards)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/xqc/aql_config 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 检测方案维护 (Inspection Plans)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/xqc/inspection_plan 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 检验项目 (Inspection Items)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/xqc/inspection_item 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## 抽样方案配置 (Sampling Plans)
|
||||
|
||||
- [ ] 通过菜单或地址 /quality_control/xqc/sampling_plan 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## SPC渲染条件配置 (SPC Configuration)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/management 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 新增一条测试数据,确认必填校验、提交成功提示和列表刷新正常。
|
||||
- [ ] 编辑刚新增的数据,确认回显、保存和刷新后的字段值正确。
|
||||
- [ ] 删除测试数据,确认二次确认弹窗、删除请求和列表刷新正常。
|
||||
|
||||
## XBar-R (XBar-R Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/XBar-R 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## XBar-S (XBar-S Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/XBar-S 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## I-MR (I-MR Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/I-MR 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## Levey-Jennings (Levey-Jennings Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/Levey-Jennings 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## EWMA (EWMA Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/EWMA 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## CUSUM (CUSUM Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/CUSUM 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## MA (Moving Average Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/MA 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## MAMR (Moving Average MR Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/MAMR 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## MAMS (Moving Average S Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/MAMS 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## CPK (Process Capability Index)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/Cpk 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## DPMO (DPMO)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/DPMO 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## PChart (P Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/PChart 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## NPChart (NP Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/NPChart 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## CChart (C Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/CChart 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
## UChart (U Chart)
|
||||
|
||||
- [ ] 通过菜单或地址 /spc/chart/UChart 打开页面,确认页面标题、查询区和列表区域正常显示。
|
||||
- [ ] 输入主要查询条件后点击查询,确认请求参数和列表刷新符合旧系统字段。
|
||||
- [ ] 点击重置,确认查询条件清空并回到第一页。
|
||||
- [ ] 切换分页大小和页码,确认列表数据、总数和加载状态正常。
|
||||
- [ ] 对照旧系统同一查询条件,确认报表/只读列表的关键字段展示一致。
|
||||
- [ ] 查询有样本数据的 SPC 项目,确认折线图区域和明细表同步展示,并且无样本时页面不报错。
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
> 根据 `后台Webman界面截图对照表.md` 生成。状态以当前 V2 项目中已落地的页面目录为准。
|
||||
|
||||
- 总功能数:79
|
||||
- 已迁移:48
|
||||
- 未迁移:31
|
||||
- 已迁移:74
|
||||
- 未迁移:5
|
||||
|
||||
| 状态 | 一级模块 | 二级模块 | 三级模块 | 功能说明 | V2 目标路径 |
|
||||
|:---:|---|---|---|---|---|
|
||||
@@ -53,32 +53,32 @@
|
||||
| ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 托盘登录 (Tray Registration) | 托盘登记 | `src/views/planning-production/production-monitoring/tray-registration/` |
|
||||
| ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 设备监控 (Equipment Monitoring) | 设备监控 | `src/views/planning-production/production-monitoring/equipment-monitoring/` |
|
||||
| ✅ | 计划与生产 (Planning & Production) | 生产监控 (Production Monitoring) | 电池工序管理 (Process Execution) | 工序管理 | `src/views/planning-production/production-monitoring/process-execution/` |
|
||||
| ⬜ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 检验类别管理 (Inspection Type Management) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 首巡检项目配置 (First Article Inspection Configuration) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 首巡检录入 (First Article Inspection Records) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 首巡检报表 (First Article Inspection Reports) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检验单管理 (Inspection Orders) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检验标准 (Inspection Standards) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 接收质量限 (AQL Standards) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检测方案维护 (Inspection Plans) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检验项目 (Inspection Items) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 抽样方案配置 (Sampling Plans) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC统计过程控制 (SPC Control) | SPC渲染条件配置 (SPC Configuration) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | XBar-R (XBar-R Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | XBar-S (XBar-S Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | I-MR (I-MR Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | Levey-Jennings (Levey-Jennings Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | EWMA (EWMA Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | CUSUM (CUSUM Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | MA (Moving Average Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | MAMR (Moving Average MR Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | MAMS (Moving Average S Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | CPK (Process Capability Index) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | DPMO (DPMO) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | PChart (P Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | NPChart (NP Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | CChart (C Chart) | | 待确认 |
|
||||
| ⬜ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | UChart (U Chart) | | 待确认 |
|
||||
| ✅ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 检验类别管理 (Inspection Type Management) | | `src/views/quality-management/process-control/inspection-type-management/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 首巡检项目配置 (First Article Inspection Configuration) | | `src/views/quality-management/process-control/first-article-inspection-configuration/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 首巡检录入 (First Article Inspection Records) | | `src/views/quality-management/process-control/first-article-inspection-records/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 过程控制 (Process Control) | 首巡检报表 (First Article Inspection Reports) | | `src/views/quality-management/process-control/first-article-inspection-reports/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检验单管理 (Inspection Orders) | | `src/views/quality-management/inspection-management/inspection-orders/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检验标准 (Inspection Standards) | | `src/views/quality-management/inspection-management/inspection-standards/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 接收质量限 (AQL Standards) | | `src/views/quality-management/inspection-management/aql-standards/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检测方案维护 (Inspection Plans) | | `src/views/quality-management/inspection-management/inspection-plans/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 检验项目 (Inspection Items) | | `src/views/quality-management/inspection-management/inspection-items/` |
|
||||
| ✅ | 质量管理 (Quality Management) | 检验控制 (Inspection Management) | 抽样方案配置 (Sampling Plans) | | `src/views/quality-management/inspection-management/sampling-plans/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC统计过程控制 (SPC Control) | SPC渲染条件配置 (SPC Configuration) | | `src/views/quality-management/spc-control/spc-configuration/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | XBar-R (XBar-R Chart) | | `src/views/quality-management/spc-variable-charts/xbar-r/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | XBar-S (XBar-S Chart) | | `src/views/quality-management/spc-variable-charts/xbar-s/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | I-MR (I-MR Chart) | | `src/views/quality-management/spc-variable-charts/i-mr/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | Levey-Jennings (Levey-Jennings Chart) | | `src/views/quality-management/spc-variable-charts/levey-jennings/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | EWMA (EWMA Chart) | | `src/views/quality-management/spc-variable-charts/ewma/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | CUSUM (CUSUM Chart) | | `src/views/quality-management/spc-variable-charts/cusum/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | MA (Moving Average Chart) | | `src/views/quality-management/spc-variable-charts/ma/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | MAMR (Moving Average MR Chart) | | `src/views/quality-management/spc-variable-charts/mamr/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | MAMS (Moving Average S Chart) | | `src/views/quality-management/spc-variable-charts/mams/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计量型报表 (SPC Variable Charts) | CPK (Process Capability Index) | | `src/views/quality-management/spc-variable-charts/cpk/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | DPMO (DPMO) | | `src/views/quality-management/spc-attribute-charts/dpmo/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | PChart (P Chart) | | `src/views/quality-management/spc-attribute-charts/pchart/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | NPChart (NP Chart) | | `src/views/quality-management/spc-attribute-charts/npchart/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | CChart (C Chart) | | `src/views/quality-management/spc-attribute-charts/cchart/` |
|
||||
| ✅ | 质量管理 (Quality Management) | SPC计数型报表 (SPC Attribute Charts) | UChart (U Chart) | | `src/views/quality-management/spc-attribute-charts/uchart/` |
|
||||
| ✅ | 数据中台 (Data Platform) | 基础追溯 (Traceability) | 反向追溯 (Backward Traceability) | 反向追溯 | `src/views/data-platform/traceability/backward/` |
|
||||
| ✅ | 数据中台 (Data Platform) | 基础追溯 (Traceability) | 正向追溯 (Forward Traceability) | 正向追溯 | `src/views/data-platform/traceability/forward/` |
|
||||
| ✅ | 数据中台 (Data Platform) | 基础追溯 (Traceability) | 电池曲线 (Battery Curve) | 电池曲线 | `src/views/data-platform/traceability/battery-curve/` |
|
||||
|
||||
39
src/api/quality-management/aql-standards.js
Normal file
39
src/api/quality-management/aql-standards.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/xqc/aql_config/'
|
||||
|
||||
function apiParams (data = {}, method = 'quality_control_xqc_aql_config_list', platform = 'background') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchAqlStandardsList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: apiParams(data, 'quality_control_xqc_aql_config_list', 'background')
|
||||
})
|
||||
}
|
||||
|
||||
export function createAqlStandards (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'create',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'quality_control_xqc_aql_config_create', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function editAqlStandards (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'edit',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'quality_control_xqc_aql_config_edit', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteAqlStandards (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'quality_control_xqc_aql_config_delete', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/first_inspection/first_inspection/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.setting.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchFirstArticleInspectionConfigurationList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'get.setting.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createFirstArticleInspectionConfiguration (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'add',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'add.setting', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function editFirstArticleInspectionConfiguration (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'update',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.setting', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteFirstArticleInspectionConfiguration (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'del.setting.list', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/first_inspection/first_inspection/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.setting.item.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchFirstArticleInspectionRecordsList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'item/list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'get.setting.item.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createFirstArticleInspectionRecords (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'item/add',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'add.setting.item', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function editFirstArticleInspectionRecords (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'item/update',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.setting.item', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteFirstArticleInspectionRecords (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'item/delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'del.setting.item', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/first_inspection/first_inspection/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.setting.item.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchFirstArticleInspectionReportsList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'item/list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'get.setting.item.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/inspection-items.js
Normal file
39
src/api/quality-management/inspection-items.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/xqc/inspection_item/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.quality.inspection_item.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchInspectionItemsList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'get.quality.inspection_item.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createInspectionItems (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'add',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'add.quality.inspection_item.add', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function editInspectionItems (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'set',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.quality.inspection_item.set', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteInspectionItems (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'del',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'del.quality.inspection_item.del', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/inspection-orders.js
Normal file
39
src/api/quality-management/inspection-orders.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/xqc/inspection_order_manage/'
|
||||
|
||||
function apiParams (data = {}, method = 'xqc.inspection_order_manage.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchInspectionOrdersList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.inspection_order_manage.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createInspectionOrders (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'save',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.inspection_order_manage.save', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function editInspectionOrders (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'save',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.inspection_order_manage.save', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteInspectionOrders (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'revoke',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.inspection_order_manage.revoke', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/inspection-plans.js
Normal file
39
src/api/quality-management/inspection-plans.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/xqc/inspection_plan/'
|
||||
|
||||
function apiParams (data = {}, method = 'quality_control_xqc_inspection_plan_list', platform = 'background') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchInspectionPlansList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: apiParams(data, 'quality_control_xqc_inspection_plan_list', 'background')
|
||||
})
|
||||
}
|
||||
|
||||
export function createInspectionPlans (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'create',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'quality_control_xqc_inspection_plan_create', 'background')
|
||||
})
|
||||
}
|
||||
|
||||
export function editInspectionPlans (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'edit',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'quality_control_xqc_inspection_plan_edit', 'background')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteInspectionPlans (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'quality_control_xqc_inspection_plan_delete', 'background')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/inspection-standards.js
Normal file
39
src/api/quality-management/inspection-standards.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/xqc/inspection_standard/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.quality.inspection_standard.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchInspectionStandardsList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'get.quality.inspection_standard.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createInspectionStandards (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'add',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'add.quality.inspection_standard.add', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function editInspectionStandards (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'set',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.quality.inspection_standard.set', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteInspectionStandards (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'del',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'del.quality.inspection_standard.del', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/inspection-type-management.js
Normal file
39
src/api/quality-management/inspection-type-management.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/first_inspection/first_inspection/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.quality.category.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchInspectionTypeManagementList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'category/list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'get.quality.category.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createInspectionTypeManagement (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'category/add',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'add.quality.category', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function editInspectionTypeManagement (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'category/update',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.quality.category', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteInspectionTypeManagement (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'category/delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'del.quality.category', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/sampling-plans.js
Normal file
39
src/api/quality-management/sampling-plans.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'quality_control/xqc/sampling_plan/'
|
||||
|
||||
function apiParams (data = {}, method = 'xqc.sampling_plan_config.list', platform = 'api') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchSamplingPlansList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.sampling_plan_config.list', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function createSamplingPlans (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'save',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.sampling_plan_config.save', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function editSamplingPlans (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'save',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.sampling_plan_config.save', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteSamplingPlans (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'xqc.sampling_plan_config.delete', 'api')
|
||||
})
|
||||
}
|
||||
|
||||
39
src/api/quality-management/spc-configuration.js
Normal file
39
src/api/quality-management/spc-configuration.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'spc/manager/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.spc.create', platform = 'admin') {
|
||||
return { method, platform, ...data }
|
||||
}
|
||||
export function fetchSpcConfigurationList (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: apiParams(data, 'get.spc.create', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function createSpcConfiguration (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'create',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.spc.create', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function editSpcConfiguration (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'edit',
|
||||
method: 'put',
|
||||
data: apiParams(data, 'set.spc.edit', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteSpcConfiguration (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'post',
|
||||
data: apiParams(data, 'set.spc.delete', 'admin')
|
||||
})
|
||||
}
|
||||
|
||||
24
src/api/quality-management/spc-sample-report.js
Normal file
24
src/api/quality-management/spc-sample-report.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'spc/manager/'
|
||||
|
||||
function apiParams (data = {}, method = 'get.spc.all') {
|
||||
return { method, platform: 'admin', ...data }
|
||||
}
|
||||
|
||||
export function getSpcConfigAll (data = {}) {
|
||||
return request({
|
||||
url: BASE + 'all',
|
||||
method: 'get',
|
||||
params: apiParams(data, 'get.spc.all')
|
||||
})
|
||||
}
|
||||
|
||||
export function getNodeSubgroupSamplesData (data = {}) {
|
||||
return request({
|
||||
baseURL: process.env.VUE_APP_HSLSERVER_API,
|
||||
url: '',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
1614
src/locales/en.json
1614
src/locales/en.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,66 @@ export default {
|
||||
name: `${pre}index`,
|
||||
meta: { ...meta, title: '质量管理', root: '/quality_control' },
|
||||
component: _import('system/function/module-index')
|
||||
},
|
||||
{
|
||||
path: 'first_inspection/category',
|
||||
name: `${pre}process-control-inspection-type-management`,
|
||||
meta: { ...meta, cache: true, title: '检验类别管理' },
|
||||
component: _import('quality-management/process-control/inspection-type-management')
|
||||
},
|
||||
{
|
||||
path: 'first_inspection/setting',
|
||||
name: `${pre}process-control-first-article-inspection-configuration`,
|
||||
meta: { ...meta, cache: true, title: '首巡检项目配置' },
|
||||
component: _import('quality-management/process-control/first-article-inspection-configuration')
|
||||
},
|
||||
{
|
||||
path: 'first_inspection/input',
|
||||
name: `${pre}process-control-first-article-inspection-records`,
|
||||
meta: { ...meta, cache: true, title: '首巡检录入' },
|
||||
component: _import('quality-management/process-control/first-article-inspection-records')
|
||||
},
|
||||
{
|
||||
path: 'first_inspection/report',
|
||||
name: `${pre}process-control-first-article-inspection-reports`,
|
||||
meta: { ...meta, cache: true, title: '首巡检报表' },
|
||||
component: _import('quality-management/process-control/first-article-inspection-reports')
|
||||
},
|
||||
{
|
||||
path: 'xqc/inspection_order_manage',
|
||||
name: `${pre}inspection-management-inspection-orders`,
|
||||
meta: { ...meta, cache: true, title: '检验单管理' },
|
||||
component: _import('quality-management/inspection-management/inspection-orders')
|
||||
},
|
||||
{
|
||||
path: 'xqc/inspection_standard',
|
||||
name: `${pre}inspection-management-inspection-standards`,
|
||||
meta: { ...meta, cache: true, title: '检验标准' },
|
||||
component: _import('quality-management/inspection-management/inspection-standards')
|
||||
},
|
||||
{
|
||||
path: 'xqc/aql_config',
|
||||
name: `${pre}inspection-management-aql-standards`,
|
||||
meta: { ...meta, cache: true, title: '接收质量限' },
|
||||
component: _import('quality-management/inspection-management/aql-standards')
|
||||
},
|
||||
{
|
||||
path: 'xqc/inspection_plan',
|
||||
name: `${pre}inspection-management-inspection-plans`,
|
||||
meta: { ...meta, cache: true, title: '检测方案维护' },
|
||||
component: _import('quality-management/inspection-management/inspection-plans')
|
||||
},
|
||||
{
|
||||
path: 'xqc/inspection_item',
|
||||
name: `${pre}inspection-management-inspection-items`,
|
||||
meta: { ...meta, cache: true, title: '检验项目' },
|
||||
component: _import('quality-management/inspection-management/inspection-items')
|
||||
},
|
||||
{
|
||||
path: 'xqc/sampling_plan',
|
||||
name: `${pre}inspection-management-sampling-plans`,
|
||||
meta: { ...meta, cache: true, title: '抽样方案配置' },
|
||||
component: _import('quality-management/inspection-management/sampling-plans')
|
||||
}
|
||||
])('quality_control-')
|
||||
}
|
||||
|
||||
114
src/router/modules/spc-quality-management.js
Normal file
114
src/router/modules/spc-quality-management.js
Normal file
@@ -0,0 +1,114 @@
|
||||
import layoutHeaderAside from '@/layout/header-aside'
|
||||
|
||||
const meta = { auth: true }
|
||||
|
||||
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
|
||||
|
||||
export default {
|
||||
path: '/spc',
|
||||
component: layoutHeaderAside,
|
||||
children: (pre => [
|
||||
{
|
||||
path: 'index',
|
||||
name: `${pre}index`,
|
||||
meta: { ...meta, title: 'SPC统计过程控制', root: '/spc' },
|
||||
component: _import('system/function/module-index')
|
||||
},
|
||||
{
|
||||
path: 'management',
|
||||
name: `${pre}spc-control-spc-configuration`,
|
||||
meta: { ...meta, cache: true, title: 'SPC渲染条件配置' },
|
||||
component: _import('quality-management/spc-control/spc-configuration')
|
||||
},
|
||||
{
|
||||
path: 'chart/XBar-R',
|
||||
name: `${pre}spc-variable-charts-xbar-r`,
|
||||
meta: { ...meta, cache: true, title: 'XBar-R' },
|
||||
component: _import('quality-management/spc-variable-charts/xbar-r')
|
||||
},
|
||||
{
|
||||
path: 'chart/XBar-S',
|
||||
name: `${pre}spc-variable-charts-xbar-s`,
|
||||
meta: { ...meta, cache: true, title: 'XBar-S' },
|
||||
component: _import('quality-management/spc-variable-charts/xbar-s')
|
||||
},
|
||||
{
|
||||
path: 'chart/I-MR',
|
||||
name: `${pre}spc-variable-charts-i-mr`,
|
||||
meta: { ...meta, cache: true, title: 'I-MR' },
|
||||
component: _import('quality-management/spc-variable-charts/i-mr')
|
||||
},
|
||||
{
|
||||
path: 'chart/Levey-Jennings',
|
||||
name: `${pre}spc-variable-charts-levey-jennings`,
|
||||
meta: { ...meta, cache: true, title: 'Levey-Jennings' },
|
||||
component: _import('quality-management/spc-variable-charts/levey-jennings')
|
||||
},
|
||||
{
|
||||
path: 'chart/EWMA',
|
||||
name: `${pre}spc-variable-charts-ewma`,
|
||||
meta: { ...meta, cache: true, title: 'EWMA' },
|
||||
component: _import('quality-management/spc-variable-charts/ewma')
|
||||
},
|
||||
{
|
||||
path: 'chart/CUSUM',
|
||||
name: `${pre}spc-variable-charts-cusum`,
|
||||
meta: { ...meta, cache: true, title: 'CUSUM' },
|
||||
component: _import('quality-management/spc-variable-charts/cusum')
|
||||
},
|
||||
{
|
||||
path: 'chart/MA',
|
||||
name: `${pre}spc-variable-charts-ma`,
|
||||
meta: { ...meta, cache: true, title: 'MA' },
|
||||
component: _import('quality-management/spc-variable-charts/ma')
|
||||
},
|
||||
{
|
||||
path: 'chart/MAMR',
|
||||
name: `${pre}spc-variable-charts-mamr`,
|
||||
meta: { ...meta, cache: true, title: 'MAMR' },
|
||||
component: _import('quality-management/spc-variable-charts/mamr')
|
||||
},
|
||||
{
|
||||
path: 'chart/MAMS',
|
||||
name: `${pre}spc-variable-charts-mams`,
|
||||
meta: { ...meta, cache: true, title: 'MAMS' },
|
||||
component: _import('quality-management/spc-variable-charts/mams')
|
||||
},
|
||||
{
|
||||
path: 'chart/Cpk',
|
||||
name: `${pre}spc-variable-charts-cpk`,
|
||||
meta: { ...meta, cache: true, title: 'CPK' },
|
||||
component: _import('quality-management/spc-variable-charts/cpk')
|
||||
},
|
||||
{
|
||||
path: 'chart/DPMO',
|
||||
name: `${pre}spc-attribute-charts-dpmo`,
|
||||
meta: { ...meta, cache: true, title: 'DPMO' },
|
||||
component: _import('quality-management/spc-attribute-charts/dpmo')
|
||||
},
|
||||
{
|
||||
path: 'chart/PChart',
|
||||
name: `${pre}spc-attribute-charts-pchart`,
|
||||
meta: { ...meta, cache: true, title: 'PChart' },
|
||||
component: _import('quality-management/spc-attribute-charts/pchart')
|
||||
},
|
||||
{
|
||||
path: 'chart/NPChart',
|
||||
name: `${pre}spc-attribute-charts-npchart`,
|
||||
meta: { ...meta, cache: true, title: 'NPChart' },
|
||||
component: _import('quality-management/spc-attribute-charts/npchart')
|
||||
},
|
||||
{
|
||||
path: 'chart/CChart',
|
||||
name: `${pre}spc-attribute-charts-cchart`,
|
||||
meta: { ...meta, cache: true, title: 'CChart' },
|
||||
component: _import('quality-management/spc-attribute-charts/cchart')
|
||||
},
|
||||
{
|
||||
path: 'chart/UChart',
|
||||
name: `${pre}spc-attribute-charts-uchart`,
|
||||
meta: { ...meta, cache: true, title: 'UChart' },
|
||||
component: _import('quality-management/spc-attribute-charts/uchart')
|
||||
}
|
||||
])('spc-')
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import planningProduction from './modules/planning-production'
|
||||
import dataPlatform from './modules/data-platform'
|
||||
import systemAdministration from './modules/system-administration'
|
||||
import equipmentManagement from './modules/equipment-management'
|
||||
import spcQualityManagement from './modules/spc-quality-management'
|
||||
|
||||
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
|
||||
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
|
||||
@@ -59,7 +60,8 @@ const frameIn = [
|
||||
planningProduction,
|
||||
dataPlatform,
|
||||
systemAdministration,
|
||||
equipmentManagement
|
||||
equipmentManagement,
|
||||
spcQualityManagement
|
||||
]
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('code'))">
|
||||
<el-input
|
||||
v-model="search.code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('name'))">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/aql-standards"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchAqlStandardsList,
|
||||
createAqlStandards,
|
||||
editAqlStandards,
|
||||
deleteAqlStandards
|
||||
} from '@/api/quality-management/aql-standards'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-aql-standards',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.aql_standards'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"code":"","name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"code":"","name":"","aql_value":"","sampling_plan_id":"","note":""},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'code',
|
||||
label: this.key('code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'name',
|
||||
label: this.key('name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'aql_value',
|
||||
label: this.key('aql_value'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'sampling_plan_id',
|
||||
label: this.key('sampling_plan_id'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'code', label: this.key('code'), minWidth: 130 },
|
||||
{ prop: 'name', label: this.key('name'), minWidth: 130 },
|
||||
{ prop: 'aql_value', label: this.key('aql_value'), minWidth: 130 },
|
||||
{ prop: 'sampling_plan_name', label: this.key('sampling_plan_name'), minWidth: 170 },
|
||||
{ prop: 'note', label: this.key('remark'), minWidth: 130 },
|
||||
{ prop: 'created_at', label: this.key('created_at'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/xqc/aql_config/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/xqc/aql_config/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/xqc/aql_config/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchAqlStandardsList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"code":"","name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"code":"","name":"","aql_value":"","sampling_plan_id":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"code":"","name":"","aql_value":"","sampling_plan_id":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createAqlStandards(this.formData)
|
||||
} else {
|
||||
await editAqlStandards({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteAqlStandards({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('code'))">
|
||||
<el-input
|
||||
v-model="search.code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('name'))">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/inspection-items"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchInspectionItemsList,
|
||||
createInspectionItems,
|
||||
editInspectionItems,
|
||||
deleteInspectionItems
|
||||
} from '@/api/quality-management/inspection-items'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-inspection-items',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.inspection_items'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"code":"","name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"code":"","name":"","inspection_attribute":"","inspection_unit":"","note":""},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'code',
|
||||
label: this.key('code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'name',
|
||||
label: this.key('name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_attribute',
|
||||
label: this.key('inspection_attribute'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_unit',
|
||||
label: this.key('inspection_unit'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'code', label: this.key('code'), minWidth: 130 },
|
||||
{ prop: 'name', label: this.key('name'), minWidth: 130 },
|
||||
{ prop: 'inspection_attribute', label: this.key('inspection_attribute'), minWidth: 170 },
|
||||
{ prop: 'inspection_unit', label: this.key('inspection_unit'), minWidth: 170 },
|
||||
{ prop: 'note', label: this.key('remark'), minWidth: 130 },
|
||||
{ prop: 'created_at', label: this.key('created_at'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/xqc/inspection_item/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/xqc/inspection_item/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/xqc/inspection_item/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchInspectionItemsList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"code":"","name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"code":"","name":"","inspection_attribute":"","inspection_unit":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"code":"","name":"","inspection_attribute":"","inspection_unit":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createInspectionItems(this.formData)
|
||||
} else {
|
||||
await editInspectionItems({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteInspectionItems({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('inspection_order_no'))">
|
||||
<el-input
|
||||
v-model="search.inspection_order_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('material_code'))">
|
||||
<el-input
|
||||
v-model="search.material_code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/inspection-orders"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchInspectionOrdersList,
|
||||
createInspectionOrders,
|
||||
editInspectionOrders,
|
||||
deleteInspectionOrders
|
||||
} from '@/api/quality-management/inspection-orders'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-inspection-orders',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.inspection_orders'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"inspection_order_no":"","material_code":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"inspection_order_no":"","material_code":"","material_name":"","note":""},
|
||||
rules: {
|
||||
inspection_order_no: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_order_no',
|
||||
label: this.key('inspection_order_no'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'material_code',
|
||||
label: this.key('material_code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'material_name',
|
||||
label: this.key('material_name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'inspection_order_no', label: this.key('inspection_order_no'), minWidth: 170 },
|
||||
{ prop: 'material_code', label: this.key('material_code'), minWidth: 170 },
|
||||
{ prop: 'material_name', label: this.key('material_name'), minWidth: 170 },
|
||||
{ prop: 'inspection_status', label: this.key('inspection_status'), minWidth: 170 },
|
||||
{ prop: 'inspection_result', label: this.key('inspection_result'), minWidth: 170 },
|
||||
{ prop: 'created_at', label: this.key('created_at'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/xqc/inspection_order_manage/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/xqc/inspection_order_manage/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/xqc/inspection_order_manage/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchInspectionOrdersList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"inspection_order_no":"","material_code":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"inspection_order_no":"","material_code":"","material_name":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"inspection_order_no":"","material_code":"","material_name":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createInspectionOrders(this.formData)
|
||||
} else {
|
||||
await editInspectionOrders({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteInspectionOrders({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('material_code'))">
|
||||
<el-input
|
||||
v-model="search.material_code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('material_name'))">
|
||||
<el-input
|
||||
v-model="search.material_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/inspection-plans"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchInspectionPlansList,
|
||||
createInspectionPlans,
|
||||
editInspectionPlans,
|
||||
deleteInspectionPlans
|
||||
} from '@/api/quality-management/inspection-plans'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-inspection-plans',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.inspection_plans'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"material_code":"","material_name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"material_code":"","material_name":"","supplier":"","inspection_category_id":"","note":""},
|
||||
rules: {
|
||||
material_code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
material_name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'material_code',
|
||||
label: this.key('material_code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'material_name',
|
||||
label: this.key('material_name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'supplier',
|
||||
label: this.key('supplier'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_category_id',
|
||||
label: this.key('inspection_category_id'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'material_code', label: this.key('material_code'), minWidth: 170 },
|
||||
{ prop: 'material_name', label: this.key('material_name'), minWidth: 170 },
|
||||
{ prop: 'supplier', label: this.key('supplier'), minWidth: 130 },
|
||||
{ prop: 'inspection_category_name', label: this.key('inspection_category_name'), minWidth: 170 },
|
||||
{ prop: 'note', label: this.key('remark'), minWidth: 130 },
|
||||
{ prop: 'created_at', label: this.key('created_at'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/xqc/inspection_plan/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/xqc/inspection_plan/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/xqc/inspection_plan/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchInspectionPlansList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"material_code":"","material_name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"material_code":"","material_name":"","supplier":"","inspection_category_id":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"material_code":"","material_name":"","supplier":"","inspection_category_id":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createInspectionPlans(this.formData)
|
||||
} else {
|
||||
await editInspectionPlans({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteInspectionPlans({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('code'))">
|
||||
<el-input
|
||||
v-model="search.code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('name'))">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/inspection-standards"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchInspectionStandardsList,
|
||||
createInspectionStandards,
|
||||
editInspectionStandards,
|
||||
deleteInspectionStandards
|
||||
} from '@/api/quality-management/inspection-standards'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-inspection-standards',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.inspection_standards'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"code":"","name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"code":"","name":"","inspection_type":"","standard_value":"","note":""},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'code',
|
||||
label: this.key('code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'name',
|
||||
label: this.key('name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_type',
|
||||
label: this.key('inspection_type'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'standard_value',
|
||||
label: this.key('standard_value'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'code', label: this.key('code'), minWidth: 130 },
|
||||
{ prop: 'name', label: this.key('name'), minWidth: 130 },
|
||||
{ prop: 'inspection_type', label: this.key('inspection_type'), minWidth: 170 },
|
||||
{ prop: 'standard_value', label: this.key('standard_value'), minWidth: 170 },
|
||||
{ prop: 'note', label: this.key('remark'), minWidth: 130 },
|
||||
{ prop: 'created_at', label: this.key('created_at'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/xqc/inspection_standard/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/xqc/inspection_standard/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/xqc/inspection_standard/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchInspectionStandardsList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"code":"","name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"code":"","name":"","inspection_type":"","standard_value":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"code":"","name":"","inspection_type":"","standard_value":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createInspectionStandards(this.formData)
|
||||
} else {
|
||||
await editInspectionStandards({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteInspectionStandards({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('scheme_code'))">
|
||||
<el-input
|
||||
v-model="search.scheme_code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('scheme_name'))">
|
||||
<el-input
|
||||
v-model="search.scheme_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/sampling-plans"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchSamplingPlansList,
|
||||
createSamplingPlans,
|
||||
editSamplingPlans,
|
||||
deleteSamplingPlans
|
||||
} from '@/api/quality-management/sampling-plans'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-sampling-plans',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.sampling_plans'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"scheme_code":"","scheme_name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"scheme_code":"","scheme_name":"","sample_size":"","acceptance_number":"","rejection_number":""},
|
||||
rules: {
|
||||
scheme_code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
scheme_name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'scheme_code',
|
||||
label: this.key('scheme_code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'scheme_name',
|
||||
label: this.key('scheme_name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'sample_size',
|
||||
label: this.key('sample_size'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'acceptance_number',
|
||||
label: this.key('acceptance_number'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'rejection_number',
|
||||
label: this.key('rejection_number'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'scheme_code', label: this.key('scheme_code'), minWidth: 130 },
|
||||
{ prop: 'scheme_name', label: this.key('scheme_name'), minWidth: 130 },
|
||||
{ prop: 'sample_size', label: this.key('sample_size'), minWidth: 130 },
|
||||
{ prop: 'acceptance_number', label: this.key('acceptance_number'), minWidth: 170 },
|
||||
{ prop: 'rejection_number', label: this.key('rejection_number'), minWidth: 170 },
|
||||
{ prop: 'updated_at', label: this.key('updated_at'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/xqc/sampling_plan/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/xqc/sampling_plan/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/xqc/sampling_plan/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchSamplingPlansList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"scheme_code":"","scheme_name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"scheme_code":"","scheme_name":"","sample_size":"","acceptance_number":"","rejection_number":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"scheme_code":"","scheme_name":"","sample_size":"","acceptance_number":"","rejection_number":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createSamplingPlans(this.formData)
|
||||
} else {
|
||||
await editSamplingPlans({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteSamplingPlans({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('code'))">
|
||||
<el-input
|
||||
v-model="search.code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('name'))">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/first-article-inspection-configuration"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchFirstArticleInspectionConfigurationList,
|
||||
createFirstArticleInspectionConfiguration,
|
||||
editFirstArticleInspectionConfiguration,
|
||||
deleteFirstArticleInspectionConfiguration
|
||||
} from '@/api/quality-management/first-article-inspection-configuration'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-first-article-inspection-configuration',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.first_article_inspection_configuration'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"code":"","name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"code":"","name":"","category_id":"","note":""},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'code',
|
||||
label: this.key('code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'name',
|
||||
label: this.key('name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'category_id',
|
||||
label: this.key('category_id'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'code', label: this.key('code'), minWidth: 130 },
|
||||
{ prop: 'name', label: this.key('name'), minWidth: 130 },
|
||||
{ prop: 'category_name', label: this.key('category_name'), minWidth: 170 },
|
||||
{ prop: 'note', label: this.key('remark'), minWidth: 130 },
|
||||
{ prop: 'create_date', label: this.key('create_date'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/first_inspection/setting/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/first_inspection/setting/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/first_inspection/setting/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchFirstArticleInspectionConfigurationList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"code":"","name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"code":"","name":"","category_id":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"code":"","name":"","category_id":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createFirstArticleInspectionConfiguration(this.formData)
|
||||
} else {
|
||||
await editFirstArticleInspectionConfiguration({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteFirstArticleInspectionConfiguration({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('product_no'))">
|
||||
<el-input
|
||||
v-model="search.product_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/first-article-inspection-records"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchFirstArticleInspectionRecordsList,
|
||||
createFirstArticleInspectionRecords,
|
||||
editFirstArticleInspectionRecords,
|
||||
deleteFirstArticleInspectionRecords
|
||||
} from '@/api/quality-management/first-article-inspection-records'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-first-article-inspection-records',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.first_article_inspection_records'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"batch_no":"","product_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"batch_no":"","product_no":"","inspection_item":"","inspection_result":"","note":""},
|
||||
rules: {
|
||||
batch_no: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
product_no: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'batch_no',
|
||||
label: this.key('batch_no'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'product_no',
|
||||
label: this.key('product_no'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_item',
|
||||
label: this.key('inspection_item'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'inspection_result',
|
||||
label: this.key('inspection_result'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'product_no', label: this.key('product_no'), minWidth: 130 },
|
||||
{ prop: 'inspection_item', label: this.key('inspection_item'), minWidth: 170 },
|
||||
{ prop: 'inspection_result', label: this.key('inspection_result'), minWidth: 170 },
|
||||
{ prop: 'inspector', label: this.key('inspector'), minWidth: 130 },
|
||||
{ prop: 'create_date', label: this.key('create_date'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/first_inspection/input/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/first_inspection/input/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/first_inspection/input/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchFirstArticleInspectionRecordsList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"batch_no":"","product_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"batch_no":"","product_no":"","inspection_item":"","inspection_result":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"batch_no":"","product_no":"","inspection_item":"","inspection_result":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createFirstArticleInspectionRecords(this.formData)
|
||||
} else {
|
||||
await editFirstArticleInspectionRecords({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteFirstArticleInspectionRecords({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('product_no'))">
|
||||
<el-input
|
||||
v-model="search.product_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/first-article-inspection-reports"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchFirstArticleInspectionReportsList
|
||||
} from '@/api/quality-management/first-article-inspection-reports'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-first-article-inspection-reports',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.first_article_inspection_reports'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"batch_no":"","product_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'product_no', label: this.key('product_no'), minWidth: 130 },
|
||||
{ prop: 'inspection_item', label: this.key('inspection_item'), minWidth: 170 },
|
||||
{ prop: 'inspection_result', label: this.key('inspection_result'), minWidth: 170 },
|
||||
{ prop: 'inspector', label: this.key('inspector'), minWidth: 130 },
|
||||
{ prop: 'create_date', label: this.key('create_date'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchFirstArticleInspectionReportsList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"batch_no":"","product_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('code'))">
|
||||
<el-input
|
||||
v-model="search.code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('name'))">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/inspection-type-management"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchInspectionTypeManagementList,
|
||||
createInspectionTypeManagement,
|
||||
editInspectionTypeManagement,
|
||||
deleteInspectionTypeManagement
|
||||
} from '@/api/quality-management/inspection-type-management'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-inspection-type-management',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.inspection_type_management'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"code":"","name":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"code":"","name":"","note":""},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'code',
|
||||
label: this.key('code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'name',
|
||||
label: this.key('name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'note',
|
||||
label: this.key('remark'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'code', label: this.key('code'), minWidth: 130 },
|
||||
{ prop: 'name', label: this.key('name'), minWidth: 130 },
|
||||
{ prop: 'note', label: this.key('remark'), minWidth: 130 },
|
||||
{ prop: 'nickname', label: this.key('nickname'), minWidth: 130 },
|
||||
{ prop: 'create_date', label: this.key('create_date'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/quality_control/first_inspection/category/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/quality_control/first_inspection/category/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/quality_control/first_inspection/category/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchInspectionTypeManagementList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"code":"","name":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"code":"","name":"","note":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"code":"","name":"","note":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createInspectionTypeManagement(this.formData)
|
||||
} else {
|
||||
await editInspectionTypeManagement({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteInspectionTypeManagement({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/cchart"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-cchart',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.cchart'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'CChart', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-attribute-charts/dpmo/index.vue
Normal file
199
src/views/quality-management/spc-attribute-charts/dpmo/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/dpmo"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-dpmo',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.dpmo'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'DPMO', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/npchart"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-npchart',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.npchart'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'NPChart', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/pchart"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-pchart',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.pchart'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'PChart', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/uchart"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-uchart',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.uchart'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'UChart', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('name'))">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('node_data_code'))">
|
||||
<el-input
|
||||
v-model="search.node_data_code"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/spc-configuration"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
<page-dialog-form
|
||||
ref="dialogForm"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="520px"
|
||||
:form-cols="formCols"
|
||||
:form-data="formData"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:submitting="submitting"
|
||||
:confirm-text="key('confirm')"
|
||||
:cancel-text="key('cancel')"
|
||||
@submit="onDialogSubmit"
|
||||
@close="onDialogClose"
|
||||
/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import {
|
||||
fetchSpcConfigurationList,
|
||||
createSpcConfiguration,
|
||||
editSpcConfiguration,
|
||||
deleteSpcConfiguration
|
||||
} from '@/api/quality-management/spc-configuration'
|
||||
import PageTable from '@/components/page-table'
|
||||
import PageDialogForm from '@/components/page-dialog-form'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-spc-configuration',
|
||||
components: { PageTable, PageDialogForm },
|
||||
mixins: [i18nMixin('page.quality_management.spc_configuration'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"name":"","node_data_code":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {"name":"","node_data_name":"","node_data_code":"","category":"","working_subclass":""},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
],
|
||||
node_data_name: [
|
||||
{ required: true, message: this.key('required'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'name',
|
||||
label: this.key('name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'node_data_name',
|
||||
label: this.key('node_data_name'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'node_data_code',
|
||||
label: this.key('node_data_code'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'category',
|
||||
label: this.key('category'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
type: 'input',
|
||||
prop: 'working_subclass',
|
||||
label: this.key('working_subclass'),
|
||||
placeholder: this.key('please_enter'),
|
||||
clearable: true,
|
||||
style: { width: '90%' }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'name', label: this.key('name'), minWidth: 130 },
|
||||
{ prop: 'node_data_name', label: this.key('node_data_name'), minWidth: 170 },
|
||||
{ prop: 'node_data_code', label: this.key('node_data_code'), minWidth: 170 },
|
||||
{ prop: 'category', label: this.key('category'), minWidth: 130 },
|
||||
{ prop: 'working_subclass', label: this.key('working_subclass'), minWidth: 170 },
|
||||
{ prop: 'create_time', label: this.key('create_time'), minWidth: 130 },
|
||||
{ prop: '_actions', label: this.key('operation'), width: 160, fixed: 'right' }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [
|
||||
{
|
||||
key: 'add',
|
||||
label: this.key('add'),
|
||||
icon: 'el-icon-plus',
|
||||
type: 'primary',
|
||||
auth: '/spc/management/create',
|
||||
onClick: this.openAdd
|
||||
}
|
||||
],
|
||||
row: [
|
||||
{
|
||||
key: 'edit',
|
||||
label: this.key('edit'),
|
||||
icon: 'el-icon-edit',
|
||||
auth: '/spc/management/edit',
|
||||
onClick: this.openEdit
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: this.key('delete'),
|
||||
icon: 'el-icon-delete',
|
||||
color: 'danger',
|
||||
auth: '/spc/management/delete',
|
||||
onClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await fetchSpcConfigurationList(params)
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"name":"","node_data_code":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
},
|
||||
resetForm () {
|
||||
this.formData = {"name":"","node_data_name":"","node_data_code":"","category":"","working_subclass":""}
|
||||
this.editId = ''
|
||||
},
|
||||
openAdd () {
|
||||
this.handleType = 'create'
|
||||
this.dialogTitle = this.key('add_title')
|
||||
this.resetForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit (row) {
|
||||
this.handleType = 'edit'
|
||||
this.dialogTitle = this.key('edit_title')
|
||||
this.editId = row.id
|
||||
this.formData = { ...{"name":"","node_data_name":"","node_data_code":"","category":"","working_subclass":""}, ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async onDialogSubmit () {
|
||||
this.submitting = true
|
||||
try {
|
||||
if (this.handleType === 'create') {
|
||||
await createSpcConfiguration(this.formData)
|
||||
} else {
|
||||
await editSpcConfiguration({ ...this.formData, id: this.editId })
|
||||
}
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.dialogVisible = false
|
||||
this.fetchData()
|
||||
} finally {
|
||||
this.submitting = false
|
||||
}
|
||||
},
|
||||
onDialogClose () {
|
||||
this.resetForm()
|
||||
},
|
||||
async handleDelete (row) {
|
||||
const cancelled = await this.$confirmAction({
|
||||
message: this.key('confirm_delete'),
|
||||
title: this.key('tip')
|
||||
}, () => deleteSpcConfiguration({ id: [row.id], ids: [row.id], inspection_order_no: row.inspection_order_no }))
|
||||
if (cancelled) return
|
||||
this.$message.success(this.$t(this.key('operation_success')))
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/cpk/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/cpk/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/cpk"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-cpk',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.cpk'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'CPK', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/cusum/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/cusum/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/cusum"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-cusum',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.cusum'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'CUSUM', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/ewma/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/ewma/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/ewma"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-ewma',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.ewma'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'EWMA', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/i-mr/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/i-mr/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/i-mr"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-i-mr',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.i_mr'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'I-MR', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/levey-jennings"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-levey-jennings',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.levey_jennings'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'Levey-Jennings', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/ma/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/ma/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/ma"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-ma',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.ma'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'MA', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/mamr/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/mamr/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/mamr"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-mamr',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.mamr'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'MAMR', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/quality-management/spc-variable-charts/mams/index.vue
Normal file
199
src/views/quality-management/spc-variable-charts/mams/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/mams"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-mams',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.mams'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'MAMS', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/xbar-r"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-xbar-r',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.xbar_r'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'XBar-R', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template #header>
|
||||
<div class="search-bar">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item :label="$t(key('project_name'))">
|
||||
<el-input
|
||||
v-model="search.project_name"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t(key('batch_no'))">
|
||||
<el-input
|
||||
v-model="search.batch_no"
|
||||
:placeholder="$t(key('please_enter'))"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="onSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSearch">
|
||||
{{ $t(key('search')) }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="onReset">
|
||||
{{ $t(key('reset')) }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div ref="chart" class="spc-chart-panel" />
|
||||
|
||||
<page-table
|
||||
ref="pageTable"
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:toolbar-buttons="toolbarButtons"
|
||||
:row-buttons="rowButtons"
|
||||
:pagination="pagination"
|
||||
help-url="/help/quality-management/xbar-s"
|
||||
:help-text="$t(ckey('help'))"
|
||||
auto-height
|
||||
@page-change="onPageChange"
|
||||
@selection-change="onSelect"
|
||||
/>
|
||||
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useTableColumns } from '@/composables/useTableColumns'
|
||||
import { useTableButtons } from '@/composables/useTableButtons'
|
||||
import { i18nMixin } from '@/composables/useI18n'
|
||||
import { confirmMixin } from '@/composables/useConfirmHandle'
|
||||
import { getSpcConfigAll, getNodeSubgroupSamplesData } from '@/api/quality-management/spc-sample-report'
|
||||
import * as echarts from 'echarts'
|
||||
import PageTable from '@/components/page-table'
|
||||
|
||||
function readList (res) {
|
||||
if (Array.isArray(res)) return { list: res, total: res.length }
|
||||
const data = res && res.data ? res.data : res
|
||||
if (Array.isArray(data)) return { list: data, total: data.length }
|
||||
const list = (data && (data.list || data.rows || data.records || data.data)) || []
|
||||
const total = data && (data.total || data.count || list.length)
|
||||
return { list: Array.isArray(list) ? list : [], total: Number(total) || 0 }
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'quality-management-xbar-s',
|
||||
components: { PageTable },
|
||||
mixins: [i18nMixin('page.quality_management.xbar_s'), confirmMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
submitting: false,
|
||||
tableData: [],
|
||||
selectedRows: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
editId: '',
|
||||
handleType: 'create',
|
||||
search: {"project_name":"","batch_no":""},
|
||||
pagination: { current: 1, size: 10, total: 0 },
|
||||
formData: {},
|
||||
rules: {
|
||||
|
||||
},
|
||||
columns: [],
|
||||
toolbarButtons: [],
|
||||
rowButtons: [],
|
||||
formCols: [
|
||||
|
||||
],
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.columns = useTableColumns([
|
||||
{ prop: 'subgroup_id', label: this.key('subgroup_id'), minWidth: 130 },
|
||||
{ prop: 'sampling_time', label: this.key('sampling_time'), minWidth: 170 },
|
||||
{ prop: 'sample_value', label: this.key('sample_value'), minWidth: 130 },
|
||||
{ prop: 'batch_no', label: this.key('batch_no'), minWidth: 130 },
|
||||
{ prop: 'result', label: this.key('result'), minWidth: 130 },
|
||||
{ prop: 'remark', label: this.key('remark'), minWidth: 130 }
|
||||
])
|
||||
const btns = useTableButtons({
|
||||
toolbar: [],
|
||||
row: []
|
||||
}, this.$permission)
|
||||
this.toolbarButtons = btns.toolbarButtons
|
||||
this.rowButtons = btns.rowButtons
|
||||
this.loadSpcConfig()
|
||||
this.fetchData()
|
||||
},
|
||||
mounted () {
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.chart) this.chart.dispose()
|
||||
},
|
||||
methods: {
|
||||
async loadSpcConfig () {
|
||||
try {
|
||||
await getSpcConfigAll({})
|
||||
} catch (error) {
|
||||
// 配置列表失败不阻断报表查询。
|
||||
}
|
||||
},
|
||||
async fetchData () {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
...this.search,
|
||||
page_no: this.pagination.current,
|
||||
page_size: this.pagination.size,
|
||||
page: this.pagination.current,
|
||||
size: this.pagination.size
|
||||
}
|
||||
const res = await getNodeSubgroupSamplesData({ chart_type: 'XBar-S', ...params })
|
||||
const { list, total } = readList(res)
|
||||
this.tableData = list
|
||||
this.pagination.total = total
|
||||
this.renderChart(list)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
renderChart (rows) {
|
||||
if (!this.chart) return
|
||||
const labels = rows.map((row, index) => row.sampling_time || row.create_time || String(index + 1))
|
||||
const values = rows.map(row => Number(row.sample_value || row.value || row.result || 0))
|
||||
this.chart.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
grid: { left: 48, right: 24, top: 32, bottom: 40 },
|
||||
xAxis: { type: 'category', data: labels },
|
||||
yAxis: { type: 'value' },
|
||||
series: [{ type: 'line', smooth: true, data: values }]
|
||||
})
|
||||
},
|
||||
onSearch () {
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onReset () {
|
||||
this.search = {"project_name":"","batch_no":""}
|
||||
this.pagination.current = 1
|
||||
this.fetchData()
|
||||
},
|
||||
onPageChange (page) {
|
||||
this.pagination.current = page.current
|
||||
this.pagination.size = page.size
|
||||
this.fetchData()
|
||||
},
|
||||
onSelect (rows) {
|
||||
this.selectedRows = rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-bar {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.spc-chart-panel {
|
||||
height: 320px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
/deep/ .el-form-item--mini.el-form-item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user