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
3ba939c2
Commit
3ba939c2
authored
May 08, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asdar
parent
edd6acbb
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
446 additions
and
88 deletions
+446
-88
routes.ts
config/routes.ts
+5
-0
index.jsx
src/components/ProductCard/index.jsx
+15
-4
index.css
src/components/TreeRender/index.css
+0
-0
index.jsx
src/components/TreeRender/index.jsx
+69
-78
index.less
src/components/TreeRender/index.less
+17
-0
config.jsx
src/layouts/dashboard/nav/config.jsx
+1
-1
index.jsx
src/pages/bustrain/index.jsx
+303
-0
index.less
src/pages/bustrain/index.less
+8
-0
index.jsx
src/pages/dolessons/index.jsx
+2
-2
index.less
src/pages/dolessons/index.less
+4
-0
index.jsx
src/pages/lessons/index.jsx
+22
-3
No files found.
config/routes.ts
View file @
3ba939c2
...
...
@@ -59,6 +59,11 @@ export default [
path
:
"/work/usercenter"
,
component
:
"./usercenter"
,
},
{
name
:
"实训管理"
,
path
:
"/work/bustrain"
,
component
:
"./bustrain"
,
},
{
name
:
"组织管理"
,
path
:
"/work/organization"
,
...
...
src/components/ProductCard/index.jsx
View file @
3ba939c2
...
...
@@ -39,7 +39,14 @@ ShopProductCard.propTypes = {
product
:
PropTypes
.
object
,
};
export
default
function
ShopProductCard
({
product
,
remove
,
edit
,
publish
,
authorized
})
{
export
default
function
ShopProductCard
({
product
,
remove
,
edit
,
copy
,
publish
,
authorized
,
})
{
const
{
courseName
,
picUrl
,
createTime
,
statusName
,
type
}
=
product
;
const
[
confirm
,
setconfirm
]
=
useState
(
false
);
const
[
shut
,
setshut
]
=
useState
(
false
);
...
...
@@ -145,8 +152,8 @@ export default function ShopProductCard({ product, remove, edit, publish,authori
<
Tooltip
title=
"授权"
>
<
IconButton
onClick=
{
()
=>
{
authorized
(
product
)
}
}
authorized
(
product
)
;
}
}
>
<
IconFont
type=
"icon-shouquanguanli"
...
...
@@ -177,7 +184,11 @@ export default function ShopProductCard({ product, remove, edit, publish,authori
)
}
<
Tooltip
title=
"复制创建"
>
<
IconButton
>
<
IconButton
onClick=
{
()
=>
{
copy
(
product
);
}
}
>
<
IconFont
type=
"icon-fuzhi"
style=
{
{
fontSize
:
20
,
color
:
"#ffffff"
}
}
...
...
src/components/TreeRender/index.css
deleted
100644 → 0
View file @
edd6acbb
src/components/TreeRender/index.jsx
View file @
3ba939c2
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
ArrowDownOutlined
,
ArrowRightOutlined
,
FormOutlined
,
MinusSquareOutlined
,
PlusSquareOutlined
,
}
from
"@ant-design/icons"
;
import
EditIcon
from
"@mui/icons-material/Edit"
;
import
{
ArrowDownOutlined
,
ArrowRightOutlined
}
from
"@ant-design/icons"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
BorderColorIcon
from
"@mui/icons-material/BorderColor"
;
import
HorizontalRuleIcon
from
"@mui/icons-material/HorizontalRule"
;
import
{
Box
,
colors
,
IconButton
,
Typography
}
from
"@mui/material"
;
import
{
useRequest
}
from
"ahooks"
;
import
{
Divider
,
Input
,
message
,
Modal
,
Popconfirm
,
Tooltip
,
Tree
,
}
from
"antd"
;
import
{
createContext
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
Input
,
message
,
Modal
,
Popconfirm
,
Tooltip
,
Tree
}
from
"antd"
;
import
{
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
"./index.less"
;
const
ReachableContext
=
createContext
(
null
);
let
{
Search
}
=
Input
,
{
TreeNode
}
=
Tree
;
{
/* <TreeRender
url="/ngic-workmanship/pmMaterieType/queryTreeList"
deleteurl="/ngic-workmanship/pmMaterieType/deleteById"
saveurl="/ngic-workmanship/pmMaterieType/save"
onselected={(vals) => {
setmaterieTypeId(vals[0] ?? "");
}}
/> */
}
let
{
Search
}
=
Input
;
const
getParentKey
=
(
key
,
tree
)
=>
{
let
parentKey
;
for
(
let
i
=
0
;
i
<
tree
.
length
;
i
++
)
{
...
...
@@ -41,16 +40,6 @@ const getParentKey = (key, tree) => {
}
return
parentKey
;
};
{
/* <TreeRender
url="/ngic-workmanship/pmMaterieType/queryTreeList"
deleteurl="/ngic-workmanship/pmMaterieType/deleteById"
saveurl="/ngic-workmanship/pmMaterieType/save"
onselected={(vals) => {
setmaterieTypeId(vals[0] ?? "");
}}
/> */
}
function
TreeRender
({
url
,
...
...
@@ -75,7 +64,7 @@ function TreeRender({
});
const
[
expandall
,
setexpandall
]
=
useState
(
false
);
const
[
expandedKeys
,
onExpand
]
=
useState
();
const
{
data
,
loading
,
refresh
}
=
useRequest
(()
=>
{
const
{
data
,
refresh
}
=
useRequest
(()
=>
{
return
doFetch
({
url
,
params
:
params
??
{}
});
});
console
.
log
(
data
);
...
...
@@ -89,7 +78,7 @@ function TreeRender({
el
.
children
&&
el
.
children
.
length
>
0
?
fn
(
el
.
children
)
:
""
;
// 子级递归
});
};
fn
(
data
?.
data
?.
data
??
[]);
fn
(
data
?.
data
?.
data
List
??
[]);
return
res
.
filter
((
it
)
=>
it
.
children
).
map
((
it
)
=>
it
.
key
);
},
[
data
]);
const
alldata
=
useMemo
(()
=>
{
...
...
@@ -100,11 +89,11 @@ function TreeRender({
el
.
children
&&
el
.
children
.
length
>
0
?
fn
(
el
.
children
)
:
""
;
// 子级递归
});
};
fn
(
data
?.
data
?.
data
??
[]);
fn
(
data
?.
data
?.
data
List
??
[]);
return
res
;
},
[
data
]);
const
treeData
=
useMemo
(()
=>
{
let
res
=
data
?.
data
?.
data
??
[];
let
res
=
data
?.
data
?.
data
List
??
[];
return
[
...
res
,
// {
...
...
@@ -148,7 +137,7 @@ function TreeRender({
<
Tooltip
title=
{
item
.
title
}
placement=
"topRight"
>
<
span
style=
{
{
display
:
"
inline-
block"
,
display
:
"block"
,
maxWidth
:
maxWidth
??
88
,
overflow
:
"hidden"
,
textOverflow
:
"ellipsis"
,
...
...
@@ -165,7 +154,7 @@ function TreeRender({
<
Tooltip
title=
{
item
.
title
}
placement=
"topRight"
>
<
span
style=
{
{
display
:
"
inline-
block"
,
display
:
"block"
,
maxWidth
:
maxWidth
??
100
,
overflow
:
"hidden"
,
textOverflow
:
"ellipsis"
,
...
...
@@ -183,12 +172,13 @@ function TreeRender({
className=
"tree-item"
style=
{
{
display
:
"flex"
,
alignItems
:
"
start
"
,
alignItems
:
"
center
"
,
justifyContent
:
"space-between"
,
padding
:
"4px 6px"
,
}
}
>
<
span
style=
{
{
marginRight
:
6
}
}
>
{
title
}
</
span
>
<
div
className=
"
tool-item"
>
<
div
className=
"
center"
style=
{
{
gap
:
8
}
}
>
{
item
.
key
&&
item
.
key
!=
"00000000"
&&
(
<
Tooltip
title=
"编辑"
...
...
@@ -208,48 +198,47 @@ function TreeRender({
}
}
}
>
<
FormOutlined
style=
{
{
color
:
"#1890ff"
}
}
/>
<
div
className=
"bgs"
>
<
BorderColorIcon
style=
{
{
color
:
"#1890ff"
,
fontSize
:
14
}
}
/>
</
div
>
</
Tooltip
>
)
}
{
item
.
key
&&
item
.
key
!=
"00000000"
&&
item
.
children
&&
(
<
Divider
type=
"vertical"
style=
{
{
margin
:
"0 6px"
}
}
></
Divider
>
)
}
{
item
.
key
&&
item
.
key
!=
"00000000"
&&
item
.
children
&&
(
<
Tooltip
title=
"新增"
>
<
PlusSquareOutlined
disabled=
{
false
}
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
setsavetitle
(
null
);
if
(
true
)
{
setModal
({
visible
:
true
,
closable
:
true
,
title
:
"新增子结构"
,
okText
:
"新增"
,
cancelText
:
"取消"
,
placeholder
:
item
.
title
,
key
:
item
.
key
,
});
}
}
}
style=
{
{
color
:
`${true ? "green" : ""}`
,
}
}
/>
<
div
className=
"bgs"
>
<
AddIcon
disabled=
{
false
}
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
setsavetitle
(
null
);
if
(
true
)
{
setModal
({
visible
:
true
,
closable
:
true
,
title
:
"新增子结构"
,
okText
:
"新增"
,
cancelText
:
"取消"
,
placeholder
:
item
.
title
,
key
:
item
.
key
,
});
}
}
}
style=
{
{
color
:
`${true ? "green" : ""}`
,
fontSize
:
20
,
}
}
/>
</
div
>
</
Tooltip
>
)
}
{
item
.
key
!=
"0"
&&
(
<
Divider
type=
"vertical"
style=
{
{
margin
:
"0 6px"
}
}
></
Divider
>
)
}
{
item
.
key
!=
"0"
&&
(
<
Popconfirm
placement=
"top"
title=
"是否删除该节点?"
okText=
"删除"
cancelText=
"取消"
onConfirm=
{
(
e
)
=>
{
onConfirm=
{
()
=>
{
console
.
log
(
111
);
doFetch
({
url
:
deleteurl
,
params
:
{
id
:
item
.
key
}
}).
then
(
(
res
)
=>
{
...
...
@@ -262,12 +251,14 @@ function TreeRender({
}
}
>
<
Tooltip
title=
"删除"
>
<
MinusSquareOutlined
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
}
}
style=
{
{
color
:
"red"
}
}
/>
<
div
className=
"bgs"
>
<
HorizontalRuleIcon
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
}
}
style=
{
{
color
:
"red"
,
fontSize
:
16
}
}
/>
</
div
>
</
Tooltip
>
</
Popconfirm
>
)
}
...
...
@@ -329,10 +320,12 @@ function TreeRender({
icon
:
item
.
icon
??
null
,
};
});
useEffect
(()
=>
{
setexpandall
(
true
);
onExpand
(
allkeys
);
},
[
allkeys
]);
function
getAllList
()
{
const
dataLists
=
[];
const
generateLists
=
(
data
)
=>
{
...
...
@@ -363,9 +356,7 @@ function TreeRender({
setDrawer
({
open
:
true
});
}
}
>
<
EditIcon
style=
{
{
fontSize
:
20
,
color
:
colors
.
blue
[
100
]
}
}
></
EditIcon
>
<
AddIcon
style=
{
{
fontSize
:
20
,
color
:
colors
.
blue
[
600
]
}
}
></
AddIcon
>
</
IconButton
>
<
Modal
{
...
drawer
}
...
...
@@ -375,7 +366,7 @@ function TreeRender({
okText=
"新增"
cancelText=
"取消"
onCancel=
{
()
=>
{
setDrawer
((
s
)
=>
({
setDrawer
(()
=>
({
item
:
null
,
open
:
false
,
}));
...
...
src/components/TreeRender/index.less
View file @
3ba939c2
.ant-tree-switcher{
padding-top: 4px;
}
.bgs{
width: 22px;
height: 22px;
background-color: rgba(255,255,255,1);
display: flex;
justify-content: center;
align-items: center;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 0 8px #eee;
>svg{
zoom:0.9
}
}
\ No newline at end of file
src/layouts/dashboard/nav/config.jsx
View file @
3ba939c2
...
...
@@ -16,7 +16,7 @@ const navConfig = [
children
:
[
{
title
:
"实训管理"
,
path
:
"/work/
user
"
,
path
:
"/work/
bustrain
"
,
icon
:
icon
(
"ic-shixun"
),
},
{
...
...
src/pages/bustrain/index.jsx
0 → 100644
View file @
3ba939c2
import
DraggableDialog
from
"@/components/DraggableDialog"
;
import
ImportExcel
from
"@/components/ImportExcel"
;
import
InitForm
from
"@/components/InitForm"
;
import
PremButton
from
"@/components/PremButton"
;
import
ShopProductCard
from
"@/components/ProductCard"
;
import
ShopProductLoadingCard
from
"@/components/ProductCard/loading"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
PRODUCTS
from
"@/_mock/products"
;
import
{
Box
,
Container
,
Grid
,
Stack
,
Typography
}
from
"@mui/material"
;
import
{
useRequest
}
from
"ahooks"
;
import
{
Empty
,
message
}
from
"antd"
;
import
{
useMemo
,
useState
}
from
"react"
;
import
"./index.less"
;
function
Lessons
()
{
const
[
dialogprops
,
setdialogprops
]
=
useState
({
open
:
false
,
});
const
[
params
,
setparams
]
=
useState
({
trainName
:
""
,
status
:
null
,
type
:
null
,
});
const
handleClose
=
()
=>
{
setdialogprops
((
s
)
=>
({
...
s
,
open
:
false
,
}));
};
const
{
runAsync
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
parames
)
=>
{
if
(
res
?.
code
==
"0000"
)
{
handleClose
();
message
.
success
(
"操作成功"
);
datalist
?.
refresh
();
}
},
});
const
datalist
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/busTrain/list"
,
params
});
return
res
?.
data
?.
dataList
;
},
{
debounceWait
:
400
,
}
);
const
edit
=
(
row
)
=>
{
setdialogprops
({
open
:
true
,
defaultFormValue
:
{
...
row
},
title
:
"编辑"
,
});
};
const
copy
=
(
row
)
=>
{
setdialogprops
({
open
:
true
,
defaultFormValue
:
{
...
row
},
title
:
"复制创建"
,
});
};
const
authorized
=
(
row
)
=>
{
doFetch
({
url
:
"/busTrainTeacher/queryRelationTeacher"
,
params
:
{
courseId
:
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"
,
params
:
{
id
:
row
.
id
},
});
};
const
publish
=
(
row
,
params
)
=>
{
const
type
=
row
?.
type
===
1
?
2
:
row
?.
type
===
2
?
1
:
null
;
const
extra
=
params
??
{
type
};
runAsync
({
url
:
"/busTrain/pubOrNotPub"
,
params
:
{
id
:
row
.
id
,
...
extra
},
});
};
const
columns
=
useMemo
(
()
=>
[
{
title
:
"课程"
,
dataIndex
:
"courseId"
,
key
:
"courseId"
,
valueType
:
"select"
,
options
:
{
path
:
"/sysCourse/getLoginTeacherCourseSection"
,
params
:
{},
},
colProps
:
{
span
:
24
,
},
},
{
title
:
"实训名称"
,
dataIndex
:
"trainName"
,
key
:
"trainName"
},
{
title
:
"截止日期"
,
dataIndex
:
"deadline"
,
key
:
"deadline"
,
valueType
:
"date"
,
},
{
title
:
"实训封面"
,
dataIndex
:
"pic"
,
key
:
"pic"
,
valueType
:
"uploadImage"
,
fieldProps
:
{
limit
:
1
,
},
colProps
:
{
span
:
24
,
},
},
],
[]
);
return
(
<
Container
maxWidth=
{
false
}
>
<
DraggableDialog
handleClose=
{
handleClose
}
loading=
{
loading
}
dialogprops=
{
dialogprops
}
maxWidth=
{
dialogprops
?.
maxWidth
??
"xs"
}
>
{
dialogprops
?.
title
===
"编辑"
||
dialogprops
?.
title
===
"新增实训"
||
dialogprops
?.
title
===
"复制创建"
?
(
<
InitForm
fields=
{
columns
}
defaultFormValue=
{
dialogprops
?.
defaultFormValue
}
onFinish=
{
(
val
,
extra
)
=>
{
let
postdata
=
{
...
val
},
url
=
"/busTrain/saveOrUpdate"
;
switch
(
dialogprops
?.
title
)
{
case
"编辑"
:
postdata
=
{
...
val
,
id
:
dialogprops
?.
defaultFormValue
?.
id
,
};
break
;
case
"复制创建"
:
url
=
"/busTrain/copy"
;
postdata
=
{
...
val
,
id
:
dialogprops
?.
defaultFormValue
?.
id
,
};
break
;
default
:
break
;
}
runAsync
({
url
,
params
:
postdata
,
});
}
}
></
InitForm
>
)
:
(
<
InitForm
defaultFormValue=
{
{
teacherIdList
:
dialogprops
?.
teacherIdList
,
}
}
fields=
{
[
{
rowKey
:
"id"
,
rowName
:
"id"
,
valueType
:
"FormSelectList"
,
dataIndex
:
"teacherIdList"
,
colProps
:
{
span
:
24
,
},
columns
:
[
{
title
:
"账号"
,
key
:
"userAccount"
,
dataIndex
:
"userAccount"
,
readonly
:
true
,
},
{
title
:
"教师姓名"
,
key
:
"name"
,
dataIndex
:
"name"
,
readonly
:
true
,
},
{
title
:
"学校名称"
,
key
:
"schoolName"
,
dataIndex
:
"schoolName"
,
readonly
:
true
,
},
{
title
:
"院系名称"
,
key
:
"departmentName"
,
dataIndex
:
"departmentName"
,
readonly
:
true
,
},
],
path
:
"/user/page"
,
params
:
{
type
:
"2"
,
},
},
]
}
onFinish=
{
(
val
)
=>
{
const
teacherIdList
=
val
?.
teacherIdList
?.
map
((
it
)
=>
it
?.
id
);
runAsync
({
url
:
"/busTrainTeacher/relationCourseTeacher"
,
params
:
{
teacherIdList
,
courseId
:
dialogprops
?.
defaultFormValue
?.
id
,
},
});
}
}
/>
)
}
</
DraggableDialog
>
<
Box
display=
{
"flex"
}
justifyContent=
{
"space-between"
}
alignItems=
{
"center"
}
sx=
{
{
mb
:
2.5
}
}
mt=
{
0
}
>
<
Typography
variant=
"h5"
>
实训管理
</
Typography
>
<
Stack
spacing=
{
2
}
direction=
"row"
>
<
ImportExcel
></
ImportExcel
>
<
PremButton
btn=
{
{
variant
:
"contained"
,
onClick
:
(
e
)
=>
{
e
.
stopPropagation
();
setdialogprops
({
open
:
true
,
defaultFormValue
:
{},
title
:
"新增实训"
,
});
},
}
}
>
新增实训
</
PremButton
>
</
Stack
>
</
Box
>
<
Box
mt=
{
2.5
}
>
<
Grid
container
spacing=
{
3
}
>
{
datalist
?.
loading
&&
!
datalist
?.
data
?
(
PRODUCTS
?.
map
((
product
,
i
)
=>
{
return
(
<
Grid
key=
{
product
.
id
}
item
xs=
{
12
}
sm=
{
4
}
md=
{
3
}
lg=
{
2.4
}
>
<
ShopProductLoadingCard
product=
{
product
}
/>
</
Grid
>
);
})
)
:
datalist
?.
data
?.
length
===
0
?
(
<
Grid
xs=
{
12
}
mt=
{
12
}
>
<
Empty
></
Empty
>
</
Grid
>
)
:
(
datalist
?.
data
?.
map
?.((
product
)
=>
(
<
Grid
key=
{
product
.
id
}
item
xs=
{
12
}
sm=
{
4
}
md=
{
3
}
lg=
{
2.4
}
>
<
ShopProductCard
product=
{
product
}
loading=
{
datalist
?.
loading
}
edit=
{
edit
}
copy=
{
copy
}
remove=
{
remove
}
publish=
{
publish
}
authorized=
{
authorized
}
/>
</
Grid
>
))
)
}
</
Grid
>
</
Box
>
</
Container
>
);
}
export
default
Lessons
;
src/pages/bustrain/index.less
0 → 100644
View file @
3ba939c2
.white {
.ant-pro-card {
background-color: #f6f6f6 !important;
}
.ant-table-tbody,td {
background-color: #f9f9f9 !important;
}
}
src/pages/dolessons/index.jsx
View file @
3ba939c2
...
...
@@ -226,7 +226,7 @@ function Dolessons() {
label
:
`课程目录`
,
children
:
(
<
Grid
container
spacing=
{
2
}
>
<
Grid
item
xs=
{
3
}
>
<
Grid
item
width=
{
340
}
>
<
Box
boxShadow=
{
"0 0 18px #f0f0f0"
}
borderRadius=
{
2
}
padding=
{
2
}
>
<
TreeRender
onselected=
{
checkCourse
}
...
...
@@ -242,7 +242,7 @@ function Dolessons() {
/>
</
Box
>
</
Grid
>
<
Grid
item
xs=
{
9
}
>
<
Grid
item
flex=
{
1
}
>
<
Box
boxShadow=
{
"0 0 18px #f0f0f0"
}
borderRadius=
{
2
}
padding=
{
2
}
>
<
InitForm
formRef=
{
formRef
}
...
...
src/pages/dolessons/index.less
View file @
3ba939c2
...
...
@@ -6,3 +6,7 @@
background-color: #f9f9f9 !important;
}
}
.ant-tree{
background-color: transparent !important;
}
\ No newline at end of file
src/pages/lessons/index.jsx
View file @
3ba939c2
...
...
@@ -58,6 +58,14 @@ function Lessons() {
});
};
const
copy
=
(
row
)
=>
{
setdialogprops
({
open
:
true
,
defaultFormValue
:
{
...
row
},
title
:
"复制创建"
,
});
};
const
authorized
=
(
row
)
=>
{
doFetch
({
url
:
"/sysCourseTeacher/queryRelationTeacher"
,
...
...
@@ -125,12 +133,15 @@ function Lessons() {
dialogprops=
{
dialogprops
}
maxWidth=
{
dialogprops
?.
maxWidth
??
"xs"
}
>
{
dialogprops
?.
title
===
"编辑"
||
dialogprops
?.
title
===
"新增课程"
?
(
{
dialogprops
?.
title
===
"编辑"
||
dialogprops
?.
title
===
"新增课程"
||
dialogprops
?.
title
===
"复制创建"
?
(
<
InitForm
fields=
{
columns
}
defaultFormValue=
{
dialogprops
?.
defaultFormValue
}
onFinish=
{
(
val
,
extra
)
=>
{
let
postdata
=
{
...
val
};
let
postdata
=
{
...
val
},
url
=
"/sysCourse/saveOrUpdate"
;
switch
(
dialogprops
?.
title
)
{
case
"编辑"
:
postdata
=
{
...
...
@@ -138,11 +149,18 @@ function Lessons() {
id
:
dialogprops
?.
defaultFormValue
?.
id
,
};
break
;
case
"复制创建"
:
url
=
"/sysCourse/copy"
;
postdata
=
{
...
val
,
id
:
dialogprops
?.
defaultFormValue
?.
id
,
};
break
;
default
:
break
;
}
runAsync
({
url
:
"/sysCourse/saveOrUpdate"
,
url
,
params
:
postdata
,
});
}
}
...
...
@@ -255,6 +273,7 @@ function Lessons() {
product=
{
product
}
loading=
{
datalist
?.
loading
}
edit=
{
edit
}
copy=
{
copy
}
remove=
{
remove
}
publish=
{
publish
}
authorized=
{
authorized
}
...
...
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