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
a31a3320
Commit
a31a3320
authored
May 15, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jkasd
parent
3e200d52
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
246 additions
and
105 deletions
+246
-105
index.jsx
src/components/ProductCard/index.jsx
+9
-9
sxcard.jsx
src/components/ProductCard/sxcard.jsx
+141
-84
index.jsx
src/components/TreeRender/index.jsx
+7
-2
sxtree.jsx
src/components/TreeRender/sxtree.jsx
+8
-2
index.jsx
src/pages/bustrain/index.jsx
+78
-4
index.jsx
src/pages/dobustrain/index.jsx
+3
-3
index.jsx
src/pages/mybustrain/index.jsx
+0
-1
No files found.
src/components/ProductCard/index.jsx
View file @
a31a3320
...
...
@@ -85,7 +85,7 @@ export default function ShopProductCard({
<
Box
className=
"masker"
></
Box
>
{
type
==
1
&&
(
<
Box
className=
"edit"
>
<
Tooltip
title=
"编辑"
>
<
Tooltip
placement=
"bottom-start"
title=
"编辑"
>
<
IconButton
onClick=
{
()
=>
{
edit
(
product
);
...
...
@@ -97,7 +97,7 @@ export default function ShopProductCard({
</
IconButton
>
</
Tooltip
>
<
Tooltip
title=
{
confirm
?
"确认删除"
:
"删除"
}
>
<
Tooltip
placement=
"bottom-start"
title=
{
confirm
?
"确认删除"
:
"删除"
}
>
{
confirm
?
(
<
IconButton
disabled=
{
confirm
===
"1"
}
...
...
@@ -150,7 +150,7 @@ export default function ShopProductCard({
<
div
></
div
>
{
type
!==
3
&&
(
<
Tooltip
title=
{
shut
?
"确认关闭"
:
"关闭"
}
>
<
Tooltip
placement=
"bottom-start"
title=
{
shut
?
"确认关闭"
:
"关闭"
}
>
{
shut
?
(
<
IconButton
disabled=
{
shut
===
"1"
}
...
...
@@ -200,14 +200,14 @@ export default function ShopProductCard({
overflow=
{
"hidden"
}
alignItems=
{
"center"
}
>
<
Tooltip
title=
{
courseName
}
>
<
Tooltip
placement=
"bottom-start"
title=
{
courseName
}
>
<
Typography
variant=
"subtitle2"
noWrap
>
{
courseName
}
</
Typography
>
</
Tooltip
>
<
Box
width=
{
60
}
textAlign=
{
"right"
}
flexShrink=
{
0
}
>
<
Tooltip
title=
{
createTime
}
>
<
Tooltip
placement=
"bottom-start"
title=
{
createTime
}
>
<
Typography
component=
"span"
variant=
"body2"
...
...
@@ -229,7 +229,7 @@ export default function ShopProductCard({
{
type
==
3
?
(
<
div
></
div
>
)
:
(
<
Tooltip
title=
{
type
==
1
?
"发布"
:
type
==
2
?
"取消发布"
:
""
}
>
<
Tooltip
placement=
"bottom-start"
title=
{
type
==
1
?
"发布"
:
type
==
2
?
"取消发布"
:
""
}
>
<
IconButton
onClick=
{
()
=>
{
publish
(
product
);
...
...
@@ -250,7 +250,7 @@ export default function ShopProductCard({
</
Tooltip
>
)
}
{
type
===
1
?
(
<
Tooltip
title=
"授权"
>
<
Tooltip
placement=
"bottom-start"
title=
"授权"
>
<
IconButton
onClick=
{
()
=>
{
authorized
(
product
);
...
...
@@ -269,7 +269,7 @@ export default function ShopProductCard({
<
Stack
direction=
{
"row"
}
spacing=
{
1
}
>
{
type
===
1
&&
(
<
Tooltip
title=
"备课"
>
<
Tooltip
placement=
"bottom-start"
title=
"备课"
>
<
IconButton
onClick=
{
()
=>
{
history
.
push
(
"/work/dolessons/"
+
product
.
id
);
...
...
@@ -283,7 +283,7 @@ export default function ShopProductCard({
</
Tooltip
>
)
}
<
Tooltip
title=
"复制创建"
>
<
Tooltip
placement=
"bottom-start"
title=
"复制创建"
>
<
IconButton
onClick=
{
()
=>
{
copy
(
product
);
...
...
src/components/ProductCard/sxcard.jsx
View file @
a31a3320
This diff is collapsed.
Click to expand it.
src/components/TreeRender/index.jsx
View file @
a31a3320
...
...
@@ -64,10 +64,9 @@ function TreeRender({
});
const
[
expandall
,
setexpandall
]
=
useState
(
false
);
const
[
expandedKeys
,
onExpand
]
=
useState
();
const
{
data
,
refresh
}
=
useRequest
(()
=>
{
const
{
data
,
refresh
,
loading
}
=
useRequest
(()
=>
{
return
doFetch
({
url
,
params
:
params
??
{}
});
});
console
.
log
(
data
);
const
[
autoExpandParent
,
setAutoExpandParent
]
=
useState
(
true
);
const
allkeys
=
useMemo
(()
=>
{
...
...
@@ -367,6 +366,9 @@ function TreeRender({
open
:
false
,
}));
}
}
okButtonProps=
{
{
loading
,
}
}
onOk=
{
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
drawer
?.
item
)
{
...
...
@@ -419,6 +421,9 @@ function TreeRender({
visible
:
false
,
}));
}
}
okButtonProps=
{
{
loading
,
}
}
onOk=
{
()
=>
{
if
(
modal
.
okText
==
"修改"
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
src/components/TreeRender/sxtree.jsx
View file @
a31a3320
...
...
@@ -63,10 +63,9 @@ function TreeRender({
});
const
[
expandall
,
setexpandall
]
=
useState
(
false
);
const
[
expandedKeys
,
onExpand
]
=
useState
();
const
{
data
,
refresh
}
=
useRequest
(()
=>
{
const
{
data
,
refresh
,
loading
}
=
useRequest
(()
=>
{
return
doFetch
({
url
,
params
:
params
??
{}
});
});
console
.
log
(
data
);
const
[
autoExpandParent
,
setAutoExpandParent
]
=
useState
(
true
);
const
allkeys
=
useMemo
(()
=>
{
...
...
@@ -341,6 +340,7 @@ function TreeRender({
>
<
AddIcon
style=
{
{
fontSize
:
20
,
color
:
colors
.
blue
[
600
]
}
}
></
AddIcon
>
</
IconButton
>
<
Modal
{
...
drawer
}
closable=
{
false
}
...
...
@@ -354,6 +354,9 @@ function TreeRender({
open
:
false
,
}));
}
}
okButtonProps=
{
{
loading
,
}
}
onOk=
{
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
drawer
?.
item
)
{
...
...
@@ -406,6 +409,9 @@ function TreeRender({
visible
:
false
,
}));
}
}
okButtonProps=
{
{
loading
,
}
}
onOk=
{
()
=>
{
if
(
modal
.
okText
==
"修改"
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
src/pages/bustrain/index.jsx
View file @
a31a3320
...
...
@@ -15,7 +15,6 @@ import { Empty, Input, message } from "antd";
import
{
useMemo
,
useState
}
from
"react"
;
import
"./index.less"
;
function
Lessons
()
{
const
[
dialogprops
,
setdialogprops
]
=
useState
({
open
:
false
,
...
...
@@ -46,7 +45,6 @@ function Lessons() {
const
datalist
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/busTrain/list"
,
params
});
return
res
?.
data
?.
dataList
;
},
...
...
@@ -57,7 +55,6 @@ function Lessons() {
);
const
edit
=
(
row
)
=>
{
setdialogprops
({
open
:
true
,
defaultFormValue
:
{
...
row
},
...
...
@@ -82,6 +79,23 @@ function Lessons() {
});
};
const
tauthorized
=
(
row
)
=>
{
doFetch
({
url
:
"/busTrainTeacher/queryRelationTeacher"
,
params
:
{
trainId
:
row
?.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
===
"0000"
)
{
setdialogprops
({
open
:
true
,
maxWidth
:
"xl"
,
defaultFormValue
:
{
...
row
},
teacherIdList
:
res
?.
data
?.
dataList
,
title
:
"协作教师"
,
});
}
});
};
const
remove
=
(
row
)
=>
{
runAsync
({
url
:
"/busTrain/delete"
,
...
...
@@ -93,7 +107,7 @@ function Lessons() {
const
type
=
row
?.
type
===
1
?
2
:
row
?.
type
===
2
?
1
:
null
;
const
extra
=
params
??
{
type
};
runAsync
({
url
:
"/busTrain/
pubOrNotPub
"
,
url
:
"/busTrain/
updateType
"
,
params
:
{
id
:
row
.
id
,
...
extra
},
});
};
...
...
@@ -188,6 +202,65 @@ function Lessons() {
});
}
}
></
InitForm
>
)
:
dialogprops
?.
title
===
"协作教师"
?
(
<
InitForm
defaultFormValue=
{
{
teacherIdList
:
dialogprops
?.
teacherIdList
,
}
}
fields=
{
[
{
rowKey
:
"id"
,
rowName
:
"id"
,
valueType
:
"FormSelectList"
,
dataIndex
:
"teacherIdList"
,
colProps
:
{
span
:
24
,
},
columns
:
[
{
title
:
"账号"
,
key
:
"userAccount"
,
dataIndex
:
"userAccount"
,
editable
:
false
,
},
{
title
:
"教师姓名"
,
key
:
"name"
,
dataIndex
:
"name"
,
editable
:
false
,
},
{
title
:
"学校名称"
,
key
:
"schoolId"
,
dataIndex
:
"schoolName"
,
valueType
:
"select"
,
search
:
false
,
editable
:
false
,
},
{
title
:
"院系名称"
,
key
:
"departmentName"
,
dataIndex
:
"departmentName"
,
editable
:
false
,
},
],
path
:
"/user/getAllTeacherByCurrentTeacherSchool"
,
params
:
{
type
:
""
,
},
},
]
}
onFinish=
{
(
val
)
=>
{
const
teacherIdList
=
val
?.
teacherIdList
?.
map
((
it
)
=>
it
?.
id
);
runAsync
({
url
:
"/busTrainTeacher/relationTrainTeacher"
,
params
:
{
teacherIdList
,
trainId
:
dialogprops
?.
defaultFormValue
?.
id
,
},
});
}
}
/>
)
:
(
<
InitForm
defaultFormValue=
{
{
...
...
@@ -420,6 +493,7 @@ function Lessons() {
remove=
{
remove
}
publish=
{
publish
}
authorized=
{
authorized
}
tauthorized=
{
tauthorized
}
/>
</
Grid
>
))
...
...
src/pages/dobustrain/index.jsx
View file @
a31a3320
...
...
@@ -117,7 +117,7 @@ function Dolessons() {
cancelText
:
"取消"
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
"/
course
Question/delete"
,
url
:
"/
busTrain
Question/delete"
,
params
:
{
id
:
row
?.
id
},
});
},
...
...
@@ -328,7 +328,7 @@ function Dolessons() {
],
},
]
}
path=
"/
course
Question/page"
path=
"/
busTrain
Question/page"
extraparams=
{
{
trainId
:
params
?.
id
,
}
}
...
...
@@ -502,7 +502,7 @@ function Dolessons() {
break
;
}
runAsync
({
url
:
"/
course
Question/saveOrUpdate"
,
url
:
"/
busTrain
Question/saveOrUpdate"
,
params
:
postdata
,
});
}
}
...
...
src/pages/mybustrain/index.jsx
View file @
a31a3320
...
...
@@ -299,7 +299,6 @@ function Lessons() {
}
else
{
news
=
[...
news
,
val
];
}
console
.
log
(
news
);
return
{
...
s
,
typeList
:
news
,
...
...
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