Commit 9fac0152 authored by wuhao's avatar wuhao 🎯

asder

parent 0d880026
Pipeline #6239 passed with stages
in 5 minutes and 25 seconds
......@@ -3,7 +3,7 @@
export default {
dev:{
"REACT_APP_URL":"/vstp", // http://tasks-dev.nangaoyun.com
"REACT_APP_URL":"http://192.168.40.228:8044/vstp", // http://tasks-dev.nangaoyun.com
"DEFAULT_HEAD_IMG":"./assets/images/avatars/avatar_21.jpg",
"DEFAULT_404_IMG":"./assets/illustrations/illustration_404.svg",
"DOWNLOAD_URL":"http://192.168.40.2",
......
......@@ -7,7 +7,7 @@ import { doFetch } from "@/utils/doFetch";
import { ProDescriptions } from "@ant-design/pro-components";
import { Box, Container, Stack, Typography } from "@mui/material";
import { useRequest } from "ahooks";
import { Divider, message, Tabs } from "antd";
import { Divider, message, Table, Tabs, Tag, Tooltip } from "antd";
import { useMemo, useRef, useState } from "react";
import "./index.less";
......@@ -51,11 +51,18 @@ function Checkhomework() {
btn={{
size: "small",
variant: "text",
onClick: () => {
onClick: async () => {
let res = await doFetch({
url: "/studentExperiment/queryResult",
params: {
id: row.id,
},
});
setdialogprops({
open: true,
defaultFormValue: { ...row },
title: "批阅",
tabdata: res?.data?.data,
});
},
}}
......@@ -382,12 +389,19 @@ function Checkhomework() {
<Tabs
items={datas?.tabs}
activeKey={dialogprops?.defaultFormValue?.id}
onChange={(key) => {
onChange={async (key) => {
let currow = datas?.tabs?.filter((it) => it?.id == key)[0];
let res = await doFetch({
url: "/studentExperiment/queryResult",
params: {
id: currow.id,
},
});
setdialogprops({
open: true,
defaultFormValue: { ...currow },
title: "批阅",
tabdata: res?.data?.data,
});
}}
></Tabs>
......@@ -398,6 +412,140 @@ function Checkhomework() {
style={{ marginBottom: 12 }}
dataSource={dialogprops?.defaultFormValue}
></ProDescriptions>
<span style={{ fontSize: 14 }}>实验素养</span>
<Table
size="small"
pagination={{
pageSize: 6,
}}
columns={[
{
title: "操作名称",
dataIndex: "config",
key: "config",
render: (text, row) => {
return row?.config?.name;
},
},
{
title: "是否操作",
dataIndex: "isComplete",
key: "isComplete",
width: 200,
render: (text, row) => {
return row?.isComplete ? (
"完成"
) : (
<span style={{ color: "red" }}>未完成</span>
);
},
},
]}
dataSource={
dialogprops?.tabdata?.recordDataDic
? Object.values(dialogprops?.tabdata?.recordDataDic)
: []
}
></Table>
<span style={{ fontSize: 14 }}>实验报告</span>
<Table
size="small"
pagination={{
pageSize: 6,
}}
columns={[
{
title: "名称",
dataIndex: "Name",
key: "Name",
},
{
title: "测量值",
dataIndex: "actualValue",
key: "actualValue",
render: (text, row) => {
return row?.actualValue?.toFixed(4) ?? "";
},
},
{
title: "名义值",
dataIndex: "normal",
key: "normal",
render: (text, row) => {
return row?.normal?.toFixed(4) ?? "";
},
},
{
title: "上公差",
dataIndex: "Upper",
key: "Upper",
},
{
title: "下公差",
dataIndex: "Down",
key: "Down",
},
]}
rowKey={"id"}
dataSource={
dialogprops?.tabdata?.PeculiarityInfosDict
? Object.values(
dialogprops?.tabdata?.PeculiarityInfosDict
)?.map((it, i) =>
it?.[0]
? {
...it?.[0],
id: i + 1,
}
: {}
)
: []
}
expandable={{
expandedRowRender: ({ ElementInfoList }) => {
return (
<div style={{ display: "flex", gap: 6 }}>
{ElementInfoList?.map((it) => {
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
return (
<div
style={{
padding: 12,
backgroundColor: "#f0f0f0",
display: "inline-block",
borderRadius: 4,
marginBottom: 6,
}}
>
<span style={{ paddingRight: 12 }}>{it?.Name}</span>
{it?.PointList?.map((its) => (
<Tooltip
key={its?.id}
title={
<div
dangerouslySetInnerHTML={{
__html: removeFirstAndLastChar(
JSON.stringify(its.Position)
).replace(/,/g, "<br/>"),
}}
></div>
}
>
<Tag>{its.Name}</Tag>
</Tooltip>
))}
</div>
);
})}
</div>
);
},
}}
></Table>
</>
) : dialogprops?.title === "详情" ? (
<Stack
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment