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
b567a849
Commit
b567a849
authored
1 year ago
by
wuhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sader
parent
9fac0152
master
No related merge requests found
Pipeline
#6250
passed with stages
in 3 minutes and 38 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
202 additions
and
96 deletions
+202
-96
model.glb
public/model.glb
+0
-0
index.jsx
src/components/PointViewer/index.jsx
+35
-0
index.less
src/components/PointViewer/index.less
+34
-0
index.jsx
src/pages/checkhomework/index.jsx
+133
-96
No files found.
public/model.glb
0 → 100644
View file @
b567a849
File added
This diff is collapsed.
Click to expand it.
src/components/PointViewer/index.jsx
0 → 100644
View file @
b567a849
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-03 11:31:00
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-24 14:27:24
* @FilePath: /editor-plus/src/pages/components/GlftBlock/index.jsx
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
import
{
Gltf
,
OrbitControls
}
from
"@react-three/drei"
;
import
{
Canvas
}
from
"@react-three/fiber"
;
import
"./index.less"
;
function
PointViewer
({
url
})
{
return
(
<
div
className=
"bar-block-component"
>
<
Canvas
style=
{
{
height
:
"600px"
,
width
:
"100%"
}
}
id=
{
"sada"
}
>
<
color
attach=
"background"
args=
{
[
"#333"
]
}
/>
<
ambientLight
intensity=
{
1
}
/>
<
OrbitControls
></
OrbitControls
>
<
pointLight
position=
{
[
10
,
10
,
10
]
}
intensity=
{
1
}
/>
<
Gltf
src=
{
"./model.glb"
}
receiveShadow
castShadow
position=
{
[
0
,
0
,
0
]
}
/>
</
Canvas
>
</
div
>
);
}
export
default
PointViewer
;
This diff is collapsed.
Click to expand it.
src/components/PointViewer/index.less
0 → 100644
View file @
b567a849
.foo-block-element {
border-radius: 5px;
color: #fff;
background-color: #08a9fe;
box-shadow: 0 5px 20px rgba(8,169,254,.1);
}
.bar-block-component {
position: relative;
background-color: #f0f0f0;
box-shadow: 0 5px 20px rgba(192,57,43,.1);
}
.bar-block-component, .foo-block-element {
margin: 10px;
border-radius: 5px;
color: #fff;
}
.bar-block-component .button-remove {
position: absolute;
top: 50%;
right: 0px;
width: 30px;
height: 30px;
padding: 0;
background-color: transparent;
border: none;
transform: translateY(-50%);
color: red;
font-size: 20px;
line-height: 30px;
text-align: center;
}
.bf-content{
height: 80vh !important;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/checkhomework/index.jsx
View file @
b567a849
import
AutoTable
from
"@/components/AutoTable"
;
import
AutoTable
from
"@/components/AutoTable"
;
import
DraggableDialog
from
"@/components/DraggableDialog"
;
import
DraggableDialog
from
"@/components/DraggableDialog"
;
import
InitForm
from
"@/components/InitForm"
;
import
InitForm
from
"@/components/InitForm"
;
import
PointViewer
from
"@/components/PointViewer"
;
import
PremButton
from
"@/components/PremButton"
;
import
PremButton
from
"@/components/PremButton"
;
import
SplitDesc
from
"@/components/SplitDesc"
;
import
SplitDesc
from
"@/components/SplitDesc"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
ProDescriptions
}
from
"@ant-design/pro-components"
;
import
{
ProDescriptions
}
from
"@ant-design/pro-components"
;
import
{
Box
,
Container
,
Stack
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Container
,
Stack
,
Typography
}
from
"@mui/material"
;
import
{
useRequest
}
from
"ahooks"
;
import
{
useRequest
}
from
"ahooks"
;
import
{
Divider
,
message
,
Table
,
Tabs
,
Tag
,
Tooltip
}
from
"antd"
;
import
{
Divider
,
Drawer
,
message
,
Table
,
Tabs
,
Tag
,
Tooltip
}
from
"antd"
;
import
{
useMemo
,
useRef
,
useState
}
from
"react"
;
import
{
useMemo
,
useRef
,
useState
}
from
"react"
;
import
"./index.less"
;
import
"./index.less"
;
...
@@ -330,6 +331,16 @@ function Checkhomework() {
...
@@ -330,6 +331,16 @@ function Checkhomework() {
];
];
}, [totaldata]);
}, [totaldata]);
const [drawer, setDrawer] = useState({
open: false,
onClose: () => {
setDrawer((s) => ({
...s,
open: false,
}));
},
});
return (
return (
<Container maxWidth={false}>
<Container maxWidth={false}>
<DraggableDialog
<DraggableDialog
...
@@ -340,7 +351,7 @@ function Checkhomework() {
...
@@ -340,7 +351,7 @@ function Checkhomework() {
loading={loading}
loading={loading}
formRef={formRefc}
formRef={formRefc}
dialogprops={dialogprops}
dialogprops={dialogprops}
maxWidth={dialogprops?.maxWidth ?? "
sm
"}
maxWidth={dialogprops?.maxWidth ?? "
md
"}
formdom={
formdom={
dialogprops?.title === "批阅" && (
dialogprops?.title === "批阅" && (
<InitForm
<InitForm
...
@@ -413,7 +424,11 @@ function Checkhomework() {
...
@@ -413,7 +424,11 @@ function Checkhomework() {
dataSource={dialogprops?.defaultFormValue}
dataSource={dialogprops?.defaultFormValue}
></ProDescriptions>
></ProDescriptions>
<span style={{ fontSize: 14 }}>实验素养</span>
<Divider></Divider>
<b style={{ fontSize: 14, paddingBottom: 10, display: "block" }}>
实验素养
</b>
<Table
<Table
size="small"
size="small"
pagination={{
pagination={{
...
@@ -449,103 +464,125 @@ function Checkhomework() {
...
@@ -449,103 +464,125 @@ function Checkhomework() {
}
}
></Table>
></Table>
<span style={{ fontSize: 14 }}>实验报告</span>
<Divider></Divider>
<Table
size="small"
<div style={{ position: "relative" }}>
pagination={{
<Drawer {...drawer} getContainer={false} title={false} closable={false}>
pageSize: 6,
<PointViewer></PointViewer>
}}
</Drawer>
columns={[
<b style={{ fontSize: 14, paddingBottom: 10, display: "block" }}>
{
实验报告
title: "名称",
</b>
dataIndex: "Name",
<Table
key: "Name",
size="small"
},
pagination={{
{
pageSize: 6,
title: "测量值",
}}
dataIndex: "actualValue",
columns={[
key: "actualValue",
{
render: (text, row) => {
title: "名称",
return row?.actualValue?.toFixed(4) ?? "";
dataIndex: "Name",
key: "Name",
},
},
},
{
{
title: "测量值",
title: "名义值
",
dataIndex: "actualValue
",
dataIndex: "normal
",
key: "actualValue
",
key: "normal",
render: (text, row) => {
render: (text, row) => {
return row?.actualValue?.toFixed(4) ?? "";
return row?.normal?.toFixed(4) ?? "";
},
},
},
},
{
{
title: "名义值",
title: "上公差",
dataIndex: "normal",
dataIndex: "Upper",
key: "normal",
key: "Upper",
render: (text, row) => {
},
return row?.normal?.toFixed(4) ?? "";
{
},
title: "下公差",
},
dataIndex: "Down",
{
key: "Down",
title: "上公差",
},
dataIndex: "Upper",
]}
key: "Upper",
rowKey={"id"}
},
dataSource={
{
dialogprops?.tabdata?.PeculiarityInfosDict
title: "下公差",
? Object.values(
dataIndex: "Down",
dialogprops?.tabdata?.PeculiarityInfosDict
key: "Down",
)?.map((it, i) =>
},
it?.[0]
]}
? {
rowKey={"id"}
...it?.[0],
dataSource={
id: i + 1,
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,
expandable={{
backgroundColor: "#f0f0f0",
expandedRowRender: ({ ElementInfoList }) => {
display: "inline-block",
return (
borderRadius: 4,
<div style={{ display: "flex", gap: 6 }}>
marginBottom: 6,
{ElementInfoList?.map((it) => {
}}
function removeFirstAndLastChar(str) {
>
return str.substring(1, str.length - 1);
<span style={{ paddingRight: 12 }}>
}
{it?.Name}
return (
</span>
<div
{it?.PointList?.map((its) => (
style={{
<Tooltip
padding: 12,
key={its?.id}
backgroundColor: "#f0f0f0",
title={
display: "inline-block",
<div
borderRadius: 4,
dangerouslySetInnerHTML={{
marginBottom: 6,
__html: removeFirstAndLastChar(
}}
JSON.stringify(its.Position)
>
).replace(/,/g, "<br/>"),
<span style={{ paddingRight: 12 }}>{it?.Name}</span>
}}
{it?.PointList?.map((its) => (
></div>
<Tooltip
}
key={its?.id}
>
title={
<Tag
<div
onClick={() => {
dangerouslySetInnerHTML={{
setDrawer((s) => ({
__html: removeFirstAndLastChar(
...s,
JSON.stringify(its.Position)
position: its.Position,
).replace(/,/g, "<br/>"),
open: true,
}));
}}
}}
></div>
style={{ cursor: "pointer" }}
}
>
>
{its.Name}
<Tag>{its.Name}</Tag>
</Tag>
</Tooltip>
</Tooltip>
))}
))}
</div>
</div>
);
);
})}
})}
</div>
</div>
);
);
},
},
}}
}}
></Table>
></Table>
</div>
</>
</>
) : dialogprops?.title === "详情" ? (
) : dialogprops?.title === "详情" ? (
<Stack
<Stack
...
...
This diff is collapsed.
Click to expand it.
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