Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
80663ddc
提交
80663ddc
authored
11月 27, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 实验关联班级增加按名称搜索
上级
5cd99fb3
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
7 行删除
+10
-7
SelectClassDialog.vue
...les/admin/lab/experiment/components/SelectClassDialog.vue
+10
-7
没有找到文件。
src/modules/admin/lab/experiment/components/SelectClassDialog.vue
浏览文件 @
80663ddc
...
@@ -12,9 +12,10 @@ const detail = $ref(inject('detail') as ExperimentItem)
...
@@ -12,9 +12,10 @@ const detail = $ref(inject('detail') as ExperimentItem)
// 列表配置
// 列表配置
const
listOptions
=
{
const
listOptions
=
{
filters
:
[{
type
:
'input'
,
label
:
'班级名称'
,
prop
:
'name'
}],
remote
:
{
remote
:
{
httpRequest
:
getExperimentClassList
,
httpRequest
:
getExperimentClassList
,
params
:
{
experiment_id
:
detail
?.
id
}
params
:
{
experiment_id
:
detail
?.
id
}
,
},
},
columns
:
[
columns
:
[
{
type
:
'selection'
},
{
type
:
'selection'
},
...
@@ -23,8 +24,8 @@ const listOptions = {
...
@@ -23,8 +24,8 @@ const listOptions = {
{
label
:
'班级名称'
,
prop
:
'name'
},
{
label
:
'班级名称'
,
prop
:
'name'
},
{
label
:
'所属部门/学校'
,
prop
:
'organ_id_name'
},
{
label
:
'所属部门/学校'
,
prop
:
'organ_id_name'
},
{
label
:
'人数'
,
prop
:
'student_nums'
},
{
label
:
'人数'
,
prop
:
'student_nums'
},
{
label
:
'专业'
,
prop
:
'specialty_id_name'
}
{
label
:
'专业'
,
prop
:
'specialty_id_name'
}
,
]
]
,
}
}
let
multipleSelection
=
$ref
<
ClassItem
[]
>
([])
let
multipleSelection
=
$ref
<
ClassItem
[]
>
([])
...
@@ -33,7 +34,7 @@ function handleSelectionChange(selection: ClassItem[]) {
...
@@ -33,7 +34,7 @@ function handleSelectionChange(selection: ClassItem[]) {
}
}
function
handleSubmit
()
{
function
handleSubmit
()
{
const
classes_id
=
multipleSelection
.
map
(
item
=>
item
.
id
).
join
(
','
)
const
classes_id
=
multipleSelection
.
map
(
(
item
)
=>
item
.
id
).
join
(
','
)
experimentAddClass
({
experiment_id
:
detail
.
id
,
classes_id
,
type
:
'add'
}).
then
(()
=>
{
experimentAddClass
({
experiment_id
:
detail
.
id
,
classes_id
,
type
:
'add'
}).
then
(()
=>
{
ElMessage
({
message
:
'关联成功'
,
type
:
'success'
})
ElMessage
({
message
:
'关联成功'
,
type
:
'success'
})
emit
(
'update'
)
emit
(
'update'
)
...
@@ -42,11 +43,13 @@ function handleSubmit() {
...
@@ -42,11 +43,13 @@ function handleSubmit() {
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<el-dialog
title=
"关联班级"
@
update:modelValue=
"
value
=> $emit('update:modelValue', value)"
>
<el-dialog
title=
"关联班级"
@
update:modelValue=
"
(value)
=> $emit('update:modelValue', value)"
>
<p>
所属机构/学校:
{{
detail
.
organ_id_name
}}
</p>
<p
style=
"text-align: right"
>
所属机构/学校:
{{
detail
.
organ_id_name
}}
</p>
<AppList
v-bind=
"listOptions"
@
selection-change=
"handleSelectionChange"
></AppList>
<AppList
v-bind=
"listOptions"
@
selection-change=
"handleSelectionChange"
></AppList>
<el-row
justify=
"center"
>
<el-row
justify=
"center"
>
<el-button
type=
"primary"
round
:disabled=
"!multipleSelection.length"
@
click=
"handleSubmit"
>
关联选择班级
</el-button>
<el-button
type=
"primary"
round
:disabled=
"!multipleSelection.length"
@
click=
"handleSubmit"
>
关联选择班级
</el-button
>
<el-button
round
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
取消
</el-button>
<el-button
round
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
取消
</el-button>
</el-row>
</el-row>
</el-dialog>
</el-dialog>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论