From cc6eb96956d030702edc2120372a381a4f68b0ae Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期三, 04 三月 2026 16:15:05 +0800
Subject: [PATCH] 修改文档问题3-4
---
laboratory/src/views/deliveryAssessment/chemistEvaluate/index.vue | 68 ++++++++++++----
laboratory/src/router/index.js | 14 ++-
laboratory/src/views/chemistQa/productApproval/index.vue | 6
laboratory/src/views/dataManagement/schemeManagement/list.vue | 9 +-
laboratory/src/views/dataManagement/originalRecordTest/components/addDialog.vue | 5 +
laboratory/src/views/dataManagement/schemeManagement/addPlan.vue | 2
laboratory/src/views/deliveryAssessment/testerWorkerEvaluate/index.vue | 69 ++++++++++++----
laboratory/src/views/deliveryAssessment/clinicalTrial/components/detail.vue | 8 +-
8 files changed, 125 insertions(+), 56 deletions(-)
diff --git a/laboratory/src/router/index.js b/laboratory/src/router/index.js
index ff1065a..8d25982 100644
--- a/laboratory/src/router/index.js
+++ b/laboratory/src/router/index.js
@@ -78,6 +78,7 @@
meta: {
title: "新增角色",
hide: true,
+ keepAlive: true,
},
component: () => import("../views/system/role/add"),
},
@@ -214,6 +215,7 @@
meta: {
title: "检验方法确认单",
hide: true,
+ keepAlive: true,
},
component: () => import("../views/dataManagement/confirmation-sheet/components/add.vue"),
},
@@ -232,6 +234,7 @@
meta: {
title: "添加实验方案",
hide: true,
+ keepAlive: true,
},
component: () => import("../views/dataManagement/schemeManagement/addPlan.vue"),
}, {
@@ -584,7 +587,7 @@
{
path: "pilotAndProduction",
meta: {
- title: "中试、生产验证试验检验分析报告",
+ title: "实验、中试、生产验证试验检验分析报告",
keepAlive: true,
privilege:'chemistQa_pilotAndProduction'
},
@@ -593,7 +596,7 @@
{
path: "addPilot",
meta: {
- title: "新增中试、生产验证试验检验分析报告",
+ title: "新增实验、中试、生产验证试验检验分析报告",
hide: true,
keepAlive: true,
},
@@ -740,13 +743,12 @@
// 化验师 工艺工程师 审批人
path: "assayTaskList",
meta: {
- title: "课题评定列表",
+ title: "化验师QA专题报告评定列表",
privilege:'deliveryAssessment_assayTaskList'
},
// component: () => import("../views/deliveryAssessment/taskList"),
component: () => import("../views/deliveryAssessment/assayTaskList"),
},
-
{
// 工艺工程师
path: "testerWorkerEvaluate",
@@ -763,7 +765,7 @@
meta: {
title: "新增实验员工作评定",
hide: true,
- // keepAlive: true,
+ keepAlive: true,
},
component: () => import("../views/deliveryAssessment/testerWorkerEvaluate/add"),
},
@@ -895,4 +897,4 @@
next()
});
-export default router;
\ No newline at end of file
+export default router;
diff --git a/laboratory/src/views/chemistQa/productApproval/index.vue b/laboratory/src/views/chemistQa/productApproval/index.vue
index edda6e5..435eda1 100644
--- a/laboratory/src/views/chemistQa/productApproval/index.vue
+++ b/laboratory/src/views/chemistQa/productApproval/index.vue
@@ -101,7 +101,7 @@
<script>
import Approval from './components/approval'
import ShowDelConfirm from "@/components/showDelConfirm/index.vue";
-import { getDataList, deleteById } from './service'
+import { getDataList, deleteData } from './service'
export default {
name: 'ProjectList',
@@ -177,8 +177,8 @@
},
handleDelConfirm() {
// 调用删除API
- deleteById({ id: this.rowId }).then(res => {
- if (res.code == 200) {
+ deleteData({ id: this.rowId }).then(res => {
+ if (res) {
this.$message.success('删除成功');
this.showDelConfirm = false;
this.getList();
diff --git a/laboratory/src/views/dataManagement/originalRecordTest/components/addDialog.vue b/laboratory/src/views/dataManagement/originalRecordTest/components/addDialog.vue
index df5f698..5d83641 100644
--- a/laboratory/src/views/dataManagement/originalRecordTest/components/addDialog.vue
+++ b/laboratory/src/views/dataManagement/originalRecordTest/components/addDialog.vue
@@ -57,6 +57,8 @@
:file-list="photoList"
:auto-upload="true"
list-type="picture-card"
+ multiple
+ accept="image/*"
:http-request="handlePhotoUpload"
:on-remove="handlePhotoRemove"
>
@@ -80,6 +82,7 @@
action="#"
:file-list="spectrumList"
:auto-upload="true"
+ multiple
:http-request="handleSpectrumUpload"
:on-remove="handleSpectrumRemove"
>
@@ -551,4 +554,4 @@
}
}
}
-</style>
\ No newline at end of file
+</style>
diff --git a/laboratory/src/views/dataManagement/schemeManagement/addPlan.vue b/laboratory/src/views/dataManagement/schemeManagement/addPlan.vue
index 5bbe230..5474afb 100644
--- a/laboratory/src/views/dataManagement/schemeManagement/addPlan.vue
+++ b/laboratory/src/views/dataManagement/schemeManagement/addPlan.vue
@@ -236,7 +236,7 @@
import { mapState } from "vuex";
export default {
- name: "AddProject",
+ name: "addSchemeManagement",
components: {
SelectMemberSimple,
experimentalScheduling,
diff --git a/laboratory/src/views/dataManagement/schemeManagement/list.vue b/laboratory/src/views/dataManagement/schemeManagement/list.vue
index 303250d..69a1720 100644
--- a/laboratory/src/views/dataManagement/schemeManagement/list.vue
+++ b/laboratory/src/views/dataManagement/schemeManagement/list.vue
@@ -189,7 +189,7 @@
return statusMap[status] || "未知";
}
const statusMap = {
- '-2': "warning",
+ '': "warning",
'-1': "info",
'1': "warning",
'2': "warning",
@@ -237,7 +237,7 @@
},
handleTypeChange(type) {
this.currentType = type;
- this.form.status = type === 'draft' ? (this.roleType == 3 ? '-1' : '-2') : '';
+ this.form.status = type === 'draft' ? (this.userRole == '3' ? '-1' : '-2') : '';
this.form.pageNum = 1;
this.getTableData();
},
@@ -245,8 +245,9 @@
try {
// 当处于草稿箱模式时,强制将状态设置为-1
if (this.currentType === 'draft') {
- this.form.status = this.roleType == 3 ? '-1' : '-2';
+ this.form.status = this.userRole == '3' ? '-1' : '-2';
}
+ console.log('111111111111111111111',this.form,'currentType',this.currentType)
const { data } = await getList(this.form);
this.tableData = data.records || [];
this.total = data.total || 0;
@@ -334,4 +335,4 @@
border: 1px solid #049c9a;
}
}
-</style>
\ No newline at end of file
+</style>
diff --git a/laboratory/src/views/deliveryAssessment/chemistEvaluate/index.vue b/laboratory/src/views/deliveryAssessment/chemistEvaluate/index.vue
index dc5dbd1..1e4e82d 100644
--- a/laboratory/src/views/deliveryAssessment/chemistEvaluate/index.vue
+++ b/laboratory/src/views/deliveryAssessment/chemistEvaluate/index.vue
@@ -43,12 +43,7 @@
<template #default="{ row }">
<div>
{{
- (row.evaluateOne * 1) +
- (row.evaluateTwo * 1) +
- (row.evaluateThree * 1) +
- (row.evaluateFour * 1) +
- (row.evaluateFive * 1) +
- (row.evaluateSix * 1)
+ row.evaluateTotal
}}
</div>
</template>
@@ -93,6 +88,43 @@
}
},
methods: {
+ calcEvaluateTotal(item) {
+ try {
+ if (item && item.resultEvaluateJson) {
+ const parsed = typeof item.resultEvaluateJson === 'string'
+ ? JSON.parse(item.resultEvaluateJson)
+ : item.resultEvaluateJson
+
+ const arr = Array.isArray(parsed)
+ ? parsed
+ : (Array.isArray(parsed?.activeIndex) ? parsed.activeIndex : null)
+
+ if (arr) {
+ const total = arr.reduce((sum, it) => {
+ const val = Number(it?.score)
+ return Number.isFinite(val) ? sum + val : sum
+ }, 0)
+ if (Number.isFinite(total)) return total
+ }
+
+ const direct = Number(parsed?.score)
+ if (Number.isFinite(direct)) return direct
+ }
+ } catch (e) { }
+
+ const fields = [
+ item?.evaluateOne,
+ item?.evaluateTwo,
+ item?.evaluateThree,
+ item?.evaluateFour,
+ item?.evaluateFive,
+ item?.evaluateSix,
+ ]
+ return fields.reduce((sum, v) => {
+ const num = Number(v)
+ return Number.isFinite(num) ? sum + num : sum
+ }, 0)
+ },
async getList() {
this.loading = true
const params = {
@@ -105,17 +137,17 @@
}
try {
const res = await chemistEvaluateList(params)
- this.tableData = (res.data?.records || []).map(item => {
- let score = '';
- try {
- const json = typeof item.resultEvaluateJson === 'string'
- ? JSON.parse(item.resultEvaluateJson)
- : item.resultEvaluateJson;
- score = json?.score || '';
- } catch (e) { }
- return { ...item, score };
- })
- this.total = res.data?.total || 0
+ if (res && res.code === 200) {
+ const records = res.data?.records || []
+ this.tableData = records.map(item => ({
+ ...item,
+ evaluateTotal: this.calcEvaluateTotal(item)
+ }))
+ this.total = res.data?.total || 0
+ } else {
+ this.tableData = []
+ this.total = 0
+ }
} finally {
this.loading = false
}
@@ -294,4 +326,4 @@
border: 1px solid #049c9a;
}
}
-</style>
\ No newline at end of file
+</style>
diff --git a/laboratory/src/views/deliveryAssessment/clinicalTrial/components/detail.vue b/laboratory/src/views/deliveryAssessment/clinicalTrial/components/detail.vue
index 01184af..abe629e 100644
--- a/laboratory/src/views/deliveryAssessment/clinicalTrial/components/detail.vue
+++ b/laboratory/src/views/deliveryAssessment/clinicalTrial/components/detail.vue
@@ -154,12 +154,12 @@
} else if (this.type === "detail" && this.id) {
// 详情,查详情接口
const res = await getDetailById({ id: this.id });
- if (res && res.data) {
+ if (res) {
this.form = {
- ...res.data,
+ ...res,
fullScore: 3,
};
- }
+ }
}
},
handleClose() {
@@ -206,4 +206,4 @@
font-family: "Source Han Sans CN Bold Bold";
}
}
-</style>
\ No newline at end of file
+</style>
diff --git a/laboratory/src/views/deliveryAssessment/testerWorkerEvaluate/index.vue b/laboratory/src/views/deliveryAssessment/testerWorkerEvaluate/index.vue
index c449e9e..1e10b39 100644
--- a/laboratory/src/views/deliveryAssessment/testerWorkerEvaluate/index.vue
+++ b/laboratory/src/views/deliveryAssessment/testerWorkerEvaluate/index.vue
@@ -42,12 +42,7 @@
<template #default="{ row }">
<div>
{{
- (row.evaluateOne * 1) +
- (row.evaluateTwo * 1) +
- (row.evaluateThree * 1) +
- (row.evaluateFour * 1) +
- (row.evaluateFive * 1) +
- (row.evaluateSix * 1)
+ row.evaluateTotal
}}
</div>
</template>
@@ -92,6 +87,43 @@
};
},
methods: {
+ calcEvaluateTotal(item) {
+ try {
+ if (item && item.resultEvaluateJson) {
+ const parsed = typeof item.resultEvaluateJson === 'string'
+ ? JSON.parse(item.resultEvaluateJson)
+ : item.resultEvaluateJson
+
+ const arr = Array.isArray(parsed)
+ ? parsed
+ : (Array.isArray(parsed?.activeIndex) ? parsed.activeIndex : null)
+
+ if (arr) {
+ const total = arr.reduce((sum, it) => {
+ const val = Number(it?.score)
+ return Number.isFinite(val) ? sum + val : sum
+ }, 0)
+ if (Number.isFinite(total)) return total
+ }
+
+ const direct = Number(parsed?.score)
+ if (Number.isFinite(direct)) return direct
+ }
+ } catch (e) { }
+
+ const fields = [
+ item?.evaluateOne,
+ item?.evaluateTwo,
+ item?.evaluateThree,
+ item?.evaluateFour,
+ item?.evaluateFive,
+ item?.evaluateSix,
+ ]
+ return fields.reduce((sum, v) => {
+ const num = Number(v)
+ return Number.isFinite(num) ? sum + num : sum
+ }, 0)
+ },
async getList() {
this.loading = true;
const params = {
@@ -110,18 +142,17 @@
};
try {
const res = await chemistEvaluateList(params);
- this.tableData = (res.data?.records || []).map((item) => {
- let score = "";
- try {
- const json =
- typeof item.resultEvaluateJson === "string"
- ? JSON.parse(item.resultEvaluateJson)
- : item.resultEvaluateJson;
- score = json?.score || "";
- } catch (e) { }
- return { ...item, score };
- });
- this.total = res.data?.total || 0;
+ if (res && res.code === 200) {
+ const records = res.data?.records || [];
+ this.tableData = records.map((item) => ({
+ ...item,
+ evaluateTotal: this.calcEvaluateTotal(item),
+ }));
+ this.total = res.data?.total || 0;
+ } else {
+ this.tableData = [];
+ this.total = 0;
+ }
} finally {
this.loading = false;
}
@@ -302,4 +333,4 @@
border: 1px solid #049c9a;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.7.1