Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs_vsofpm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
cs_vsofpm
Commits
9fac0152
Commit
9fac0152
authored
Dec 07, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
0d880026
Pipeline
#6239
passed with stages
in 5 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
152 additions
and
4 deletions
+152
-4
env.ts
config/env.ts
+1
-1
index.jsx
src/pages/checkhomework/index.jsx
+151
-3
No files found.
config/env.ts
View file @
9fac0152
...
...
@@ -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"
,
...
...
src/pages/checkhomework/index.jsx
View file @
9fac0152
...
...
@@ -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
,
Tab
s
}
from
"antd"
;
import
{
Divider
,
message
,
Tab
le
,
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment