Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cert-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
cert-admin
Commits
96fa4350
提交
96fa4350
authored
7月 12, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
db90ccd3
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
51 行增加
和
22 行删除
+51
-22
course.vue
src/pages/project/components/course.vue
+19
-5
info.vue
src/pages/project/components/info.vue
+0
-1
student.vue
src/pages/project/components/student.vue
+17
-5
index.vue
src/pages/project/index.vue
+10
-6
degree.vue
src/pages/student/components/degree.vue
+5
-5
没有找到文件。
src/pages/project/components/course.vue
浏览文件 @
96fa4350
...
...
@@ -26,8 +26,11 @@ export default {
type
:
Boolean
,
default
:
false
},
id
:
{
type
:
String
info
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
...
...
@@ -35,6 +38,9 @@ export default {
multipleSelection
:
[]
}
},
created
()
{
console
.
log
(
this
.
info
)
},
computed
:
{
permissions
()
{
return
this
.
$store
.
state
.
user
.
permissions
||
[]
...
...
@@ -44,11 +50,12 @@ export default {
},
tableOptions
()
{
const
params
=
{
key
:
''
}
if
(
this
.
isEdit
)
params
.
project_id
=
this
.
id
if
(
this
.
isEdit
)
params
.
project_id
=
this
.
i
nfo
.
i
d
return
{
remote
:
{
httpRequest
:
getCourseList
,
params
:
params
params
:
params
,
callback
:
this
.
tableCallback
},
filters
:
[
{
type
:
'input'
,
placeholder
:
'请输入课程ID/课程名称'
,
prop
:
'key'
}
...
...
@@ -64,6 +71,13 @@ export default {
}
},
methods
:
{
tableCallback
(
list
)
{
if
(
!
this
.
isEdit
&&
Array
.
isArray
(
list
)
&&
this
.
info
&&
this
.
info
.
courseIds
.
length
>
0
)
{
// 默认删除已有项
list
=
list
.
filter
(
item
=>
!
this
.
info
.
courseIds
.
includes
(
item
.
id
))
}
return
list
;
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
item
=>
item
.
id
)
},
...
...
@@ -82,7 +96,7 @@ export default {
const
msg
=
this
.
isEdit
?
'删除课程'
:
'添加课程'
const
params
=
{
type
:
this
.
isEdit
?
2
:
1
,
project_id
:
this
.
id
,
project_id
:
this
.
i
nfo
.
i
d
,
courses_id
:
this
.
multipleSelection
.
join
()
}
updateProjectCourseRelation
(
params
).
then
(
res
=>
{
...
...
src/pages/project/components/info.vue
浏览文件 @
96fa4350
...
...
@@ -30,7 +30,6 @@ export default {
}
},
created
()
{
console
.
log
(
this
.
info
)
},
methods
:
{
fetchUpdateProject
(
val
)
{
...
...
src/pages/project/components/student.vue
浏览文件 @
96fa4350
...
...
@@ -27,8 +27,11 @@ export default {
type
:
Boolean
,
default
:
false
},
id
:
{
type
:
String
info
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
...
...
@@ -45,11 +48,12 @@ export default {
},
tableOptions
()
{
const
params
=
{
key
:
''
,
mobile
:
''
,
email
:
''
}
if
(
this
.
isEdit
)
params
.
project_id
=
this
.
id
if
(
this
.
isEdit
)
params
.
project_id
=
this
.
i
nfo
.
i
d
return
{
remote
:
{
httpRequest
:
getStudentList
,
params
:
params
params
:
params
,
callback
:
this
.
tableCallback
},
filters
:
[
{
type
:
'input'
,
placeholder
:
'请输入学员ID/学员名称'
,
prop
:
'key'
},
...
...
@@ -77,6 +81,14 @@ export default {
}
},
methods
:
{
tableCallback
(
list
)
{
console
.
log
(
this
.
info
)
if
(
!
this
.
isEdit
&&
Array
.
isArray
(
list
)
&&
this
.
info
&&
this
.
info
.
studentIds
.
length
>
0
)
{
// 默认删除已有项
list
=
list
.
filter
(
item
=>
!
this
.
info
.
studentIds
.
includes
(
item
.
id
))
}
return
list
;
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
item
=>
item
.
id
)
},
...
...
@@ -93,7 +105,7 @@ export default {
const
msg
=
this
.
isEdit
?
'删除学员'
:
'添加学员'
const
params
=
{
type
:
this
.
isEdit
?
2
:
1
,
project_id
:
this
.
id
,
project_id
:
this
.
i
nfo
.
i
d
,
students_id
:
this
.
multipleSelection
.
join
()
}
updateProjectStudentRelation
(
params
).
then
(
res
=>
{
...
...
src/pages/project/index.vue
浏览文件 @
96fa4350
...
...
@@ -44,10 +44,10 @@
<tab-info
:info=
"details"
@
tableRefetch=
"tableRefetch"
/>
</el-tab-pane>
<el-tab-pane
label=
"关联学员"
name=
"student"
>
<tab-student
:i
d=
"details.id
"
v-model=
"drawerVisible"
@
tableRefetch=
"tableRefetch"
isEdit
/>
<tab-student
:i
nfo=
"details
"
v-model=
"drawerVisible"
@
tableRefetch=
"tableRefetch"
isEdit
/>
</el-tab-pane>
<el-tab-pane
label=
"关联课程"
name=
"course"
>
<tab-course
:i
d=
"details.id
"
v-model=
"drawerVisible"
@
tableRefetch=
"tableRefetch"
isEdit
/>
<tab-course
:i
nfo=
"details
"
v-model=
"drawerVisible"
@
tableRefetch=
"tableRefetch"
isEdit
/>
</el-tab-pane>
</el-tabs>
</el-drawer>
...
...
@@ -59,8 +59,8 @@
size=
"960px"
@
close=
"handleClose"
>
<info-form
v-if=
"createType === 'project'"
v-model=
"createDrawerVisible"
@
formSubmit=
"fetchCreateProject"
/>
<tab-student
v-if=
"createType === 'student'"
v-model=
"createDrawerVisible"
:i
d=
"details.id"
type=
"create"
@
tableRefetch=
"tableRefetch"
/>
<tab-course
v-if=
"createType === 'course'"
v-model=
"createDrawerVisible"
:i
d=
"details.id
"
@
tableRefetch=
"tableRefetch"
/>
<tab-student
v-if=
"createType === 'student'"
v-model=
"createDrawerVisible"
:i
nfo=
"details"
@
tableRefetch=
"tableRefetch"
/>
<tab-course
v-if=
"createType === 'course'"
v-model=
"createDrawerVisible"
:i
nfo=
"details
"
@
tableRefetch=
"tableRefetch"
/>
</el-drawer>
</div>
</template>
...
...
@@ -187,7 +187,9 @@ export default {
english_name
:
val
.
english_name
,
type
:
val
.
type
,
pubdate
:
val
.
pubdate
,
id
:
val
.
id
id
:
val
.
id
,
courseIds
:
val
.
courses
.
map
(
item
=>
item
.
id
),
studentIds
:
val
.
students
}
this
.
details
=
details
},
...
...
@@ -200,7 +202,9 @@ export default {
english_name
:
val
.
english_name
,
type
:
val
.
type
,
pubdate
:
val
.
pubdate
,
id
:
val
.
id
id
:
val
.
id
,
courseIds
:
val
.
courses
.
map
(
item
=>
item
.
id
),
studentIds
:
val
.
students
}
this
.
details
=
details
},
...
...
src/pages/student/components/degree.vue
浏览文件 @
96fa4350
...
...
@@ -18,13 +18,13 @@
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogVisible"
width=
"520px"
append-to-body
@
close=
"handleClose"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
>
<el-form-item
label=
"Major"
prop=
"major"
>
<el-input
v-model=
"form.major"
size=
"small"
placeholder=
"请输入
课程
"
/>
<el-input
v-model=
"form.major"
size=
"small"
placeholder=
"请输入
专业
"
/>
</el-form-item>
<el-form-item
label=
"Degree Level"
prop=
"level"
>
<el-input
v-model=
"form.level"
size=
"small"
placeholder=
"请输入学位"
/>
<el-input
v-model=
"form.level"
size=
"small"
placeholder=
"请输入学位
等级
"
/>
</el-form-item>
<el-form-item
label=
"Degree Type"
prop=
"type"
>
<el-input
v-model=
"form.type"
size=
"small"
placeholder=
"请输入
专业
"
/>
<el-input
v-model=
"form.type"
size=
"small"
placeholder=
"请输入
学位类型
"
/>
</el-form-item>
<el-form-item
label=
"Program"
prop=
"project_id"
>
<el-select
v-model=
"form.project_id"
placeholder=
"请选择项目"
size=
"small"
style=
"width:100%;"
>
...
...
@@ -59,8 +59,8 @@ export default {
form
:
Object
.
assign
({
student_id
:
this
.
id
},
defaultForm
),
rules
:
{
major
:
{
required
:
true
,
message
:
'请输入专业'
,
trigger
:
'blur'
},
level
:
{
required
:
true
,
message
:
'请
学位
'
,
trigger
:
'blur'
},
type
:
{
required
:
true
,
message
:
'请学位类型'
,
trigger
:
'blur'
},
level
:
{
required
:
true
,
message
:
'请
输入学位等级
'
,
trigger
:
'blur'
},
type
:
{
required
:
true
,
message
:
'请
输入
学位类型'
,
trigger
:
'blur'
},
project_id
:
{
required
:
true
,
message
:
'请选择项目'
,
trigger
:
'blur'
}
},
projectOptions
:
[],
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论