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
Dec 07, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sader
parent
9fac0152
Pipeline
#6250
passed with stages
in 3 minutes and 38 seconds
Changes
4
Pipelines
1
Show 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
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
;
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
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,7 +464,15 @@ function Checkhomework() {
...
@@ -449,7 +464,15 @@ function Checkhomework() {
}
}
></Table>
></Table>
<span style={{ fontSize: 14 }}>实验报告</span>
<Divider></Divider>
<div style={{ position: "relative" }}>
<Drawer {...drawer} getContainer={false} title={false} closable={false}>
<PointViewer></PointViewer>
</Drawer>
<b style={{ fontSize: 14, paddingBottom: 10, display: "block" }}>
实验报告
</b>
<Table
<Table
size="small"
size="small"
pagination={{
pagination={{
...
@@ -521,7 +544,9 @@ function Checkhomework() {
...
@@ -521,7 +544,9 @@ function Checkhomework() {
marginBottom: 6,
marginBottom: 6,
}}
}}
>
>
<span style={{ paddingRight: 12 }}>{it?.Name}</span>
<span style={{ paddingRight: 12 }}>
{it?.Name}
</span>
{it?.PointList?.map((its) => (
{it?.PointList?.map((its) => (
<Tooltip
<Tooltip
key={its?.id}
key={its?.id}
...
@@ -535,7 +560,18 @@ function Checkhomework() {
...
@@ -535,7 +560,18 @@ function Checkhomework() {
></div>
></div>
}
}
>
>
<Tag>{its.Name}</Tag>
<Tag
onClick={() => {
setDrawer((s) => ({
...s,
position: its.Position,
open: true,
}));
}}
style={{ cursor: "pointer" }}
>
{its.Name}
</Tag>
</Tooltip>
</Tooltip>
))}
))}
</div>
</div>
...
@@ -546,6 +582,7 @@ function Checkhomework() {
...
@@ -546,6 +582,7 @@ function Checkhomework() {
},
},
}}
}}
></Table>
></Table>
</div>
</>
</>
) : dialogprops?.title === "详情" ? (
) : dialogprops?.title === "详情" ? (
<Stack
<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