diff --git a/src/pages/Index/History.vue b/src/pages/Index/History.vue
index 544f5e7..5eb83e1 100644
--- a/src/pages/Index/History.vue
+++ b/src/pages/Index/History.vue
@@ -64,20 +64,8 @@
- subResult1:
- {{ rowData && jsonResult(rowData.subProjResult1) }}
-
-
-
- subResult2:
- {{ rowData && jsonResult(rowData.subProjResult2) }}
-
-
-
-
- subResult3:
- {{ rowData && jsonResult(rowData.subProjResult3) }}
-
+ Result:
+ {{ rowData && JSON.stringify(rowData.results) }}
@@ -151,7 +139,6 @@ import { ElMessage } from 'element-plus'
import WarnSvg from '@/assets/Index/History/warn.svg'
import PrintSvg from '@/assets/Index/History/print.svg'
import ErrorSvg from '@/assets/Warn.svg'
-import Mock from'mockjs';
// 添加表格引用
const historyTableRef = ref()
@@ -241,6 +228,7 @@ const formatDate = (date: string | number | Date) => {
return dayjs(date).format('YYYY-MM-DD')
}
const jsonResult = (result: any) => {
+ if (!result) return
if (result.errorInfo != "") {
return result.errorInfo
} else {
@@ -464,41 +452,10 @@ const handleExport = () => {
warnMessage.value = '导出成功'
showWarn.value = true
}
-const mockData = Mock.mock({
- 'list|50': [
- {
- id: '@increment',
- creatDate: '@date("YYYY-MM-DD")',
- projName: '@ctitle(5, 10)',
- subProjResult1: {
- result1: '@ctitle(3, 5)',
- result2: '@ctitle(3, 5)',
- result3: '@ctitle(3, 5)',
- errorInfo: ''
- },
- subProjResult2: {
- result1: '@ctitle(3, 5)',
- result2: '@ctitle(3, 5)',
- result3: '@ctitle(3, 5)',
- errorInfo: ''
- },
- subProjResult3: {
- result1: '@ctitle(3, 5)',
- result2: '@ctitle(3, 5)',
- result3: '@ctitle(3, 5)',
- errorInfo: ''
- },
- sampleBloodType: '@pick(["A", "B", "AB", "O"])',
- lotId: '@increment'
- }
- ]
-});
+
onMounted(() => {
getTableData()
- tableData.value = mockData.list;
- total.value = mockData.list.length;
- totalPage.value = Math.ceil(mockData.list.length / pageSize.value);
-});
+})