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
513dcad6
Commit
513dcad6
authored
Dec 19, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
6c794ea1
Pipeline
#6558
passed with stages
in 11 minutes and 17 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
49 deletions
+167
-49
env.ts
config/env.ts
+1
-1
proxy.ts
config/proxy.ts
+1
-1
index.jsx
src/pages/checkhomework/index.jsx
+53
-15
index.jsx
src/pages/myrecord/index.jsx
+56
-16
index.jsx
src/pages/rebustrain/index.jsx
+56
-16
No files found.
config/env.ts
View file @
513dcad6
export
default
{
dev
:
{
REACT_APP_URL
:
"/vstp"
,
// http://tasks-dev.nangaoyun.com
REACT_APP_URL
:
"
http://jmcl.nangaoyun.com
/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"
,
...
...
config/proxy.ts
View file @
513dcad6
...
...
@@ -22,7 +22,7 @@
export
default
{
dev
:
{
"/vstp/"
:
{
target
:
"http://
192.168.40.146:8044
"
,
target
:
"http://
jmcl.nangaoyun.com/vstp/
"
,
changeOrigin
:
true
,
// pathRewrite: { "^/vstp": "" },
},
...
...
src/pages/checkhomework/index.jsx
View file @
513dcad6
...
...
@@ -11,7 +11,9 @@ import { useRequest } from "ahooks";
import
{
Divider
,
Drawer
,
message
,
Table
,
Tabs
,
Tag
,
Tooltip
}
from
"antd"
;
import
{
useMemo
,
useRef
,
useState
}
from
"react"
;
import
"./index.less"
;
function
removeFirstAndLastChar
(
str
)
{
return
str
.
substring
(
1
,
str
.
length
-
1
);
}
function
Checkhomework
()
{
const
actionRef
=
useRef
(),
formRef
=
useRef
(),
...
...
@@ -524,26 +526,23 @@ function Checkhomework() {
rowKey={"id"}
dataSource={
dialogprops?.tabdata?.PeculiarityInfosDict
? Object.values(
dialogprops?.tabdata?.PeculiarityInfosDict
)?.map((it, i) =>
it?.[0]
? {
...it?.[0]
,
id: i + 1,
}
: {}
)
? Object.values(
dialogprops?.tabdata?.PeculiarityInfosDict)
?.map((it, i) => {
return it?.map((item, index) => {
return {
...item,
id: i + "," + index
,
};
});
})
?.flat(
)
: []
}
expandable={{
expandedRowRender: ({ ElementInfoList }) => {
expandedRowRender: ({ ElementInfoList
, PointList
}) => {
return (
<div style={{ display: "flex", gap: 6 }}>
{ElementInfoList?.map((it) => {
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
return (
<div
style={{
...
...
@@ -587,6 +586,45 @@ function Checkhomework() {
</div>
);
})}
<div
style={{
padding: 12,
backgroundColor: "#f0f0f0",
display: "inline-block",
borderRadius: 4,
marginBottom: 6,
}}
>
<span style={{ paddingRight: 12 }}>点集合</span>
{PointList?.map((its) => (
<Tooltip
key={its?.id}
title={
<div
dangerouslySetInnerHTML={{
__html: removeFirstAndLastChar(
JSON.stringify(its.Position)
).replace(/,/g, "<br/>"),
}}
></div>
}
>
<Tag
onClick={() => {
setDrawer((s) => ({
...s,
position: its.Position,
open: true,
}));
}}
style={{ cursor: "pointer" }}
>
{its.Name}
</Tag>
</Tooltip>
))}
</div>
</div>
);
},
...
...
src/pages/myrecord/index.jsx
View file @
513dcad6
...
...
@@ -14,7 +14,9 @@ import { useMemo, useRef, useState } from "react";
import
"./index.less"
;
dayjs
.
extend
(
duration
);
function
removeFirstAndLastChar
(
str
)
{
return
str
.
substring
(
1
,
str
.
length
-
1
);
}
function
Record
()
{
const
actionRef
=
useRef
();
const
[
dialogprops
,
setdialogprops
]
=
useState
({
...
...
@@ -309,26 +311,23 @@ function Record() {
rowKey=
{
"id"
}
dataSource=
{
dialogprops
?.
tabdata
?.
PeculiarityInfosDict
?
Object
.
values
(
dialogprops
?.
tabdata
?.
PeculiarityInfosDict
)?.
map
((
it
,
i
)
=>
it
?.[
0
]
?
{
...
it
?.[
0
]
,
id
:
i
+
1
,
}
:
{}
)
?
Object
.
values
(
dialogprops
?.
tabdata
?.
PeculiarityInfosDict
)
?.
map
((
it
,
i
)
=>
{
return
it
?.
map
((
item
,
index
)
=>
{
return
{
...
item
,
id
:
i
+
","
+
index
,
};
});
})
?.
flat
(
)
:
[]
}
expandable=
{
{
expandedRowRender
:
({
ElementInfoList
})
=>
{
expandedRowRender
:
({
ElementInfoList
,
PointList
})
=>
{
return
(
<
div
style=
{
{
display
:
"flex"
,
gap
:
6
}
}
>
{
ElementInfoList
?.
map
((
it
)
=>
{
function
removeFirstAndLastChar
(
str
)
{
return
str
.
substring
(
1
,
str
.
length
-
1
);
}
return
(
<
div
style=
{
{
...
...
@@ -339,7 +338,9 @@ function Record() {
marginBottom
:
6
,
}
}
>
<
span
style=
{
{
paddingRight
:
12
}
}
>
{
it
?.
Name
}
</
span
>
<
span
style=
{
{
paddingRight
:
12
}
}
>
{
it
?.
Name
}
</
span
>
{
it
?.
PointList
?.
map
((
its
)
=>
(
<
Tooltip
key=
{
its
?.
id
}
...
...
@@ -370,6 +371,45 @@ function Record() {
</
div
>
);
})
}
<
div
style=
{
{
padding
:
12
,
backgroundColor
:
"#f0f0f0"
,
display
:
"inline-block"
,
borderRadius
:
4
,
marginBottom
:
6
,
}
}
>
<
span
style=
{
{
paddingRight
:
12
}
}
>
点集合
</
span
>
{
PointList
?.
map
((
its
)
=>
(
<
Tooltip
key=
{
its
?.
id
}
title=
{
<
div
dangerouslySetInnerHTML=
{
{
__html
:
removeFirstAndLastChar
(
JSON
.
stringify
(
its
.
Position
)
).
replace
(
/,/g
,
"<br/>"
),
}
}
></
div
>
}
>
<
Tag
onClick=
{
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
position
:
its
.
Position
,
open
:
true
,
}));
}
}
style=
{
{
cursor
:
"pointer"
}
}
>
{
its
.
Name
}
</
Tag
>
</
Tooltip
>
))
}
</
div
>
</
div
>
);
},
...
...
src/pages/rebustrain/index.jsx
View file @
513dcad6
import
AutoTable
from
"@/components/AutoTable"
;
import
DraggableDialog
from
"@/components/DraggableDialog"
;
import
InitForm
from
"@/components/InitForm"
;
import
PointViewer
from
"@/components/PointViewer"
;
import
PremButton
from
"@/components/PremButton"
;
import
SplitDesc
from
"@/components/SplitDesc"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
...
...
@@ -8,12 +9,15 @@ import { ProDescriptions } from "@ant-design/pro-components";
import
{
Box
,
Container
,
Stack
,
Typography
}
from
"@mui/material"
;
import
{
useParams
}
from
"@umijs/max"
;
import
{
useAsyncEffect
,
useRequest
}
from
"ahooks"
;
import
{
Divider
,
message
,
Segmented
,
Table
,
Tabs
,
Drawer
}
from
"antd"
;
import
{
Divider
,
Drawer
,
message
,
Segmented
,
Table
,
Tabs
}
from
"antd"
;
import
{
useEffect
,
useMemo
,
useRef
,
useState
}
from
"react"
;
import
PointViewer
from
"@/components/PointViewer"
;
import
{
history
}
from
"umi"
;
import
"./index.less"
;
function
removeFirstAndLastChar
(
str
)
{
return
str
.
substring
(
1
,
str
.
length
-
1
);
}
function
Dolessons
()
{
const
params
=
useParams
();
const
formRefc
=
useRef
();
...
...
@@ -473,26 +477,23 @@ function Dolessons() {
rowKey={"id"}
dataSource={
dialogprops?.tabdata?.PeculiarityInfosDict
? Object.values(
dialogprops?.tabdata?.PeculiarityInfosDict
)?.map((it, i) =>
it?.[0]
? {
...it?.[0]
,
id: i + 1,
}
: {}
)
? Object.values(
dialogprops?.tabdata?.PeculiarityInfosDict)
?.map((it, i) => {
return it?.map((item, index) => {
return {
...item,
id: i + "," + index
,
};
});
})
?.flat(
)
: []
}
expandable={{
expandedRowRender: ({ ElementInfoList }) => {
expandedRowRender: ({ ElementInfoList
, PointList
}) => {
return (
<div style={{ display: "flex", gap: 6 }}>
{ElementInfoList?.map((it) => {
function removeFirstAndLastChar(str) {
return str.substring(1, str.length - 1);
}
return (
<div
style={{
...
...
@@ -536,6 +537,45 @@ function Dolessons() {
</div>
);
})}
<div
style={{
padding: 12,
backgroundColor: "#f0f0f0",
display: "inline-block",
borderRadius: 4,
marginBottom: 6,
}}
>
<span style={{ paddingRight: 12 }}>点集合</span>
{PointList?.map((its) => (
<Tooltip
key={its?.id}
title={
<div
dangerouslySetInnerHTML={{
__html: removeFirstAndLastChar(
JSON.stringify(its.Position)
).replace(/,/g, "<br/>"),
}}
></div>
}
>
<Tag
onClick={() => {
setDrawer((s) => ({
...s,
position: its.Position,
open: true,
}));
}}
style={{ cursor: "pointer" }}
>
{its.Name}
</Tag>
</Tooltip>
))}
</div>
</div>
);
},
...
...
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