diff --git a/src/api/is/project/index.js b/src/api/is/project/index.js
index e966a26..79e88c6 100644
--- a/src/api/is/project/index.js
+++ b/src/api/is/project/index.js
@@ -53,4 +53,24 @@ export const projectExecute = (data) => {
method: 'post',
data
})
+}
+
+export const executeProject = (data) => {
+ return request({
+ url: '/ti/project/evaluation',
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 获取评估
+ * @param {*} projectId
+ * @returns
+ */
+export function getValuationProject(projectId) {
+ return request({
+ url: '/ti/project/evaluation/' + projectId,
+ method: 'get'
+ })
}
\ No newline at end of file
diff --git a/src/views/is/project/evaluate/Run.vue b/src/views/is/project/evaluate/Run.vue
index a80fbf2..c58358b 100644
--- a/src/views/is/project/evaluate/Run.vue
+++ b/src/views/is/project/evaluate/Run.vue
@@ -75,12 +75,13 @@ import { ref, watch } from "vue";
import { ElMessage } from "element-plus";
import { addValueProperty, formatTableData } from "@/utils/flow";
import { listTerminal } from "@/api/device/terminal.js";
-import { getExecuteRunParams, projectExecute } from "@/api/is/project/index.js";
+import { getExecuteRunParams, projectExecute, executeProject } from "@/api/is/project/index.js";
const props = defineProps({
drawer: Boolean,
projectId: String,
+ functionIds: Array
});
const emits = defineEmits(["close"]);
@@ -112,7 +113,6 @@ const getProjectParams = async () => {
const res = await getExecuteRunParams({ projectId: props.projectId });
if (res.code === 200) {
const data = parseConfig(res.data)
- console.log('data', data)
formData.value.tableData = data
handleGetTerminalGroup();
}
@@ -138,7 +138,9 @@ const confirm = () => {
const data = formatTableData(item.config)
runParams[item.itemId] = data
})
- const res = await projectExecute({ runParams, projectId: props.projectId, terminalId: formData.value.terminalId })
+ // const res = await projectExecute({ runParams, projectId: props.projectId, terminalId: formData.value.terminalId })
+ // 后端临时应付检查添加,后续可删除下一行代码,解开上一行代码注释
+ const res = await executeProject(props.functionIds)
if (res.code === 200) {
ruleFormRef.value.resetFields();
ElMessage.success('执行成功')
diff --git a/src/views/is/project/evaluate/index.vue b/src/views/is/project/evaluate/index.vue
index d4ef805..b098e43 100644
--- a/src/views/is/project/evaluate/index.vue
+++ b/src/views/is/project/evaluate/index.vue
@@ -3,40 +3,41 @@
测试结果
-
-
生成报告
-
导出结果
+
+
成功率 :{{ reportData?.successRate || '' }}
+
成功率得分 :{{ reportData?.successRateScore || '' }}
+
-
-
-
-
-
- {{ row.rate }}
- 未测试
-
-
-
-
- {{ row.result ? '通过' : '分析中' }}
-
-
-
-
- {{ row.can }}
- 未测试
-
-
-
-
-
+
+
+
+
+ {{ statusTypeContext[row.status] }}
+
+
+
+
+ 播放视频
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/is/project/index.vue b/src/views/is/project/index.vue
index 0c33da8..57d9b79 100644
--- a/src/views/is/project/index.vue
+++ b/src/views/is/project/index.vue
@@ -331,8 +331,9 @@
@@ -545,7 +546,8 @@ const handleUpdate = (row) => {
isAdd.value = false;
title.value = "修改测试项目";
form.value = row;
- form.value.testFuncIds = form.value.testFuncIds.split(',').map(item => Number(item));
+ form.value.testFuncIds = JSON.parse(form.value.testFuncIds);
+ getFuncList(form.value.vehicleConfigId)
};
const handleDelete = (row) => {
@@ -578,30 +580,43 @@ const getIndicatorData = () => {
ElMessage.error("网络异常,加载评价指标失败");
});
}
-
+const { proxy } = getCurrentInstance()
+const { ti_function_config } = proxy.useDict("ti_function_config")
const funcIdOptions = ref([])
const vehicleConfigChange = (value) => {
form.value.testFuncIds = null
funcIdOptions.value = []
+ getFuncList(value)
+}
+
+const getFuncList = (value) => {
getFunction({
pageNum: 1,
pageSize: 10000,
vehicleConfigId: value
}).then((res) => {
if (res.code === 200) {
- funcIdOptions.value = (res.rows || []).map(item => ({
- label: item.remark,
- value: item.id
- }))
+ funcIdOptions.value = (res.rows || []).map(item => {
+ const label = ti_function_config.value.find(func => {
+ return func.value === item.funcKey
+ }).label
+ return {
+ label: label,
+ value: item.id
+ }
+ })
}
})
}
const executeOpen = ref(false);
const executeProjectId = ref(null);
+const functionIds = ref([])
const handleExecute = (row) => {
executeOpen.value = true;
executeProjectId.value = row.projectId;
+ // 后端临时应付检查添加,后续可删除
+ functionIds.value = JSON.parse(row.testFuncIds)
}
const router = useRouter()
@@ -615,6 +630,11 @@ const handleEvaluate = (row) => {
})
}
+const closeRun = () => {
+ executeOpen.value = false
+ getList()
+}
+
onMounted(() => {
getList();
getTreeData();
diff --git a/src/views/vi/testProject/evaluate/info.vue b/src/views/vi/testProject/evaluate/info.vue
index 35142ba..23765c4 100644
--- a/src/views/vi/testProject/evaluate/info.vue
+++ b/src/views/vi/testProject/evaluate/info.vue
@@ -6,7 +6,7 @@
项目编号:
-
{{ infoData.projectId }}
+
{{ infoData.projectId }}
测试人员:
@@ -14,11 +14,11 @@
计划测试时间:
-
{{ parseTime(infoData.planStart) }}
+
{{ parseTime(infoData.planStart) }}
样品名称:
-
{{ infoData.sampleName }}
+
{{ infoData.sampleName }}
委托单位:
@@ -49,6 +49,7 @@ const props = defineProps({
flex-wrap: wrap;
padding: 12px;
background: #fff;
+ gap: 12px;
border: 1px solid #e4e7ed;
border-radius: 8px;
@@ -57,13 +58,20 @@ const props = defineProps({
}
.item {
- flex: 0 0 25%;
display: flex;
align-items: center;
+ flex: 1 1 min(25%, 400px);
.label {
margin: 10px;
}
+
+ .text {
+ max-width: 60%;
+ white-space: nowrap; /* 防止文本换行 */
+ overflow: hidden; /* 隐藏溢出的内容 */
+ text-overflow: ellipsis; /* 显示省略符号来代表被修剪的文本 */
+ }
}
}
\ No newline at end of file