| | |
| | | meta: { |
| | | title: "新增角色", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/system/role/add"), |
| | | }, |
| | |
| | | meta: { |
| | | title: "检验方法确认单", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/confirmation-sheet/components/add.vue"), |
| | | }, |
| | |
| | | meta: { |
| | | title: "添加实验方案", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/schemeManagement/addPlan.vue"), |
| | | }, { |
| | |
| | | { |
| | | path: "pilotAndProduction", |
| | | meta: { |
| | | title: "中试、生产验证试验检验分析报告", |
| | | title: "实验、中试、生产验证试验检验分析报告", |
| | | keepAlive: true, |
| | | privilege:'chemistQa_pilotAndProduction' |
| | | }, |
| | |
| | | { |
| | | path: "addPilot", |
| | | meta: { |
| | | title: "新增中试、生产验证试验检验分析报告", |
| | | title: "新增实验、中试、生产验证试验检验分析报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | |
| | | // 化验师 工艺工程师 审批人 |
| | | path: "assayTaskList", |
| | | meta: { |
| | | title: "课题评定列表", |
| | | title: "化验师QA专题报告评定列表", |
| | | privilege:'deliveryAssessment_assayTaskList' |
| | | }, |
| | | // component: () => import("../views/deliveryAssessment/taskList"), |
| | | component: () => import("../views/deliveryAssessment/assayTaskList"), |
| | | }, |
| | | |
| | | { |
| | | // 工艺工程师 |
| | | path: "testerWorkerEvaluate", |
| | |
| | | meta: { |
| | | title: "新增实验员工作评定", |
| | | hide: true, |
| | | // keepAlive: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/deliveryAssessment/testerWorkerEvaluate/add"), |
| | | }, |
| | |
| | | next() |
| | | }); |
| | | |
| | | export default router; |
| | | export default router; |
| | |
| | | <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', |
| | |
| | | }, |
| | | 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(); |
| | |
| | | :file-list="photoList" |
| | | :auto-upload="true" |
| | | list-type="picture-card" |
| | | multiple |
| | | accept="image/*" |
| | | :http-request="handlePhotoUpload" |
| | | :on-remove="handlePhotoRemove" |
| | | > |
| | |
| | | action="#" |
| | | :file-list="spectrumList" |
| | | :auto-upload="true" |
| | | multiple |
| | | :http-request="handleSpectrumUpload" |
| | | :on-remove="handleSpectrumRemove" |
| | | > |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | import { mapState } from "vuex"; |
| | | |
| | | export default { |
| | | name: "AddProject", |
| | | name: "addSchemeManagement", |
| | | components: { |
| | | SelectMemberSimple, |
| | | experimentalScheduling, |
| | |
| | | return statusMap[status] || "未知"; |
| | | } |
| | | const statusMap = { |
| | | '-2': "warning", |
| | | '': "warning", |
| | | '-1': "info", |
| | | '1': "warning", |
| | | '2': "warning", |
| | |
| | | }, |
| | | 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(); |
| | | }, |
| | |
| | | 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; |
| | |
| | | border: 1px solid #049c9a; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <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> |
| | |
| | | } |
| | | }, |
| | | 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 = { |
| | |
| | | } |
| | | 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 |
| | | } |
| | |
| | | border: 1px solid #049c9a; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | } 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() { |
| | |
| | | font-family: "Source Han Sans CN Bold Bold"; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <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> |
| | |
| | | }; |
| | | }, |
| | | 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 = { |
| | |
| | | }; |
| | | 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; |
| | | } |
| | |
| | | border: 1px solid #049c9a; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |