Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
be8d7a4f
提交
be8d7a4f
authored
4月 26, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 新增实验复制功能
上级
16398b9c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
18 行删除
+19
-18
api.ts
src/modules/admin/lab/experiment/api.ts
+5
-0
FormDialog.vue
src/modules/admin/lab/experiment/components/FormDialog.vue
+1
-1
Index.vue
src/modules/admin/lab/experiment/views/Index.vue
+13
-17
没有找到文件。
src/modules/admin/lab/experiment/api.ts
浏览文件 @
be8d7a4f
...
@@ -171,3 +171,8 @@ export function deleteExam(data: { id: string }) {
...
@@ -171,3 +171,8 @@ export function deleteExam(data: { id: string }) {
export
function
getScoreExamList
(
params
:
{
experiment_id
:
string
})
{
export
function
getScoreExamList
(
params
:
{
experiment_id
:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/backend/experiment-score-rule/exams'
,
{
params
})
return
httpRequest
.
get
(
'/api/resource/v1/backend/experiment-score-rule/exams'
,
{
params
})
}
}
// 复制实验
export
function
copyExperiment
(
data
:
{
experiment_id
:
string
})
{
return
httpRequest
.
post
(
'/api/resource/v1/backend/experiment/copy'
,
data
)
}
src/modules/admin/lab/experiment/components/FormDialog.vue
浏览文件 @
be8d7a4f
...
@@ -124,7 +124,7 @@ function handleUpdate(params: ExperimentCreateItem) {
...
@@ -124,7 +124,7 @@ function handleUpdate(params: ExperimentCreateItem) {
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"实验名称"
prop=
"name"
>
<el-form-item
label=
"实验名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
:disabled=
"isUpdate"
/>
<el-input
v-model=
"form.name"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"实验学时"
prop=
"length"
>
<el-form-item
label=
"实验学时"
prop=
"length"
>
<el-input-number
v-model=
"form.length"
:min=
"1"
:max=
"20"
step-strictly
style=
"width: 100%"
/>
<el-input-number
v-model=
"form.length"
:min=
"1"
:max=
"20"
step-strictly
style=
"width: 100%"
/>
...
...
src/modules/admin/lab/experiment/views/Index.vue
浏览文件 @
be8d7a4f
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
import
type
{
ExperimentItem
}
from
'../types'
import
type
{
ExperimentItem
}
from
'../types'
import
{
CirclePlus
}
from
'@element-plus/icons-vue'
import
{
CirclePlus
}
from
'@element-plus/icons-vue'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getExperimentList
}
from
'../api'
import
{
getExperimentList
,
copyExperiment
}
from
'../api'
import
{
useGetCourseList
}
from
'../composables/useGetCourseList'
import
{
useGetCourseList
}
from
'../composables/useGetCourseList'
import
{
useGetCourseExperimentList
}
from
'../composables/useGetCourseExperimentList'
import
{
useGetCourseExperimentList
}
from
'../composables/useGetCourseExperimentList'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
ElMessage
}
from
'element-plus'
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
GradeRulesDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/GradeRulesDialog.vue'
))
const
GradeRulesDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/GradeRulesDialog.vue'
))
...
@@ -128,15 +129,19 @@ function handleUpdateDML(row: ExperimentItem) {
...
@@ -128,15 +129,19 @@ function handleUpdateDML(row: ExperimentItem) {
rowData
.
value
=
row
rowData
.
value
=
row
dmlDialogVisible
=
true
dmlDialogVisible
=
true
}
}
async
function
handleCopy
(
row
:
ExperimentItem
)
{
await
copyExperiment
({
experiment_id
:
row
.
id
})
ElMessage
.
success
(
'复制成功'
)
appList
?.
refetch
()
}
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard
title=
"实验管理"
>
<AppCard
title=
"实验管理"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-button
type=
"primary"
:icon=
"CirclePlus"
v-permission=
"'v1-backend-experiment-create'"
@
click=
"handleAdd"
<el-button
type=
"primary"
:icon=
"CirclePlus"
v-permission=
"'v1-backend-experiment-create'"
@
click=
"handleAdd"
>
新增实验
</el-button>
>
新增实验
</el-button
>
</
template
>
</
template
>
<
template
#
table-x=
"{ row }: { row: ExperimentItem }"
>
<
template
#
table-x=
"{ row }: { row: ExperimentItem }"
>
...
@@ -159,11 +164,7 @@ function handleUpdateDML(row: ExperimentItem) {
...
@@ -159,11 +164,7 @@ function handleUpdateDML(row: ExperimentItem) {
v-permission=
"'v1-backend-experiment-scorerule-detail'"
v-permission=
"'v1-backend-experiment-scorerule-detail'"
>
编辑成绩规则
</el-button
>
编辑成绩规则
</el-button
><br
/>
><br
/>
<el-button
<el-button
type=
"info"
round
style=
"width: 132px; margin-bottom: 12px"
v-permission=
"'v1-backend-experiment-report-detail'"
>
type=
"info"
round
style=
"width: 132px; margin-bottom: 12px"
v-permission=
"'v1-backend-experiment-report-detail'"
>
<router-link
:to=
"`/admin/lab/experiment/report/$
{row.id}`" target="_blank">编辑报告规则
</router-link>
<router-link
:to=
"`/admin/lab/experiment/report/$
{row.id}`" target="_blank">编辑报告规则
</router-link>
</el-button>
</el-button>
<br
/>
<br
/>
...
@@ -174,19 +175,14 @@ function handleUpdateDML(row: ExperimentItem) {
...
@@ -174,19 +175,14 @@ function handleUpdateDML(row: ExperimentItem) {
<!-- <el-button type="primary" round v-permission="'v1-backend-experiment-view'">
<!-- <el-button type="primary" round v-permission="'v1-backend-experiment-view'">
<router-link :to="`/admin/lab/experiment/${row.id}`" target="_blank">关联班级与分组</router-link>
<router-link :to="`/admin/lab/experiment/${row.id}`" target="_blank">关联班级与分组</router-link>
</el-button> -->
</el-button> -->
<el-button
type=
"primary"
round
@
click=
"handleUpdate(row)"
v-permission=
"'v1-backend-experiment-update'"
<el-button
type=
"primary"
round
@
click=
"handleUpdate(row)"
v-permission=
"'v1-backend-experiment-update'"
>
编辑
</el-button>
>
编辑
</el-button
<el-button
type=
"primary"
round
@
click=
"handleCopy(row)"
style=
"margin-top: 12px"
>
复制
</el-button>
>
</template>
</template>
</AppList>
</AppList>
</AppCard>
</AppCard>
<FormDialog
v-model=
"dialogVisible"
:data=
"rowData"
@
update=
"onUpdateSuccess"
v-if=
"dialogVisible"
></FormDialog>
<FormDialog
v-model=
"dialogVisible"
:data=
"rowData"
@
update=
"onUpdateSuccess"
v-if=
"dialogVisible"
></FormDialog>
<!-- 编辑实验成绩规则 -->
<!-- 编辑实验成绩规则 -->
<GradeRulesDialog
<GradeRulesDialog
v-model=
"gradeRulesDialogVisible"
:data=
"rowData"
@
update=
"onUpdateSuccess"
v-if=
"gradeRulesDialogVisible && rowData"
></GradeRulesDialog>
v-model=
"gradeRulesDialogVisible"
:data=
"rowData"
@
update=
"onUpdateSuccess"
v-if=
"gradeRulesDialogVisible && rowData"
></GradeRulesDialog>
<!-- 配置数字营销实验 -->
<!-- 配置数字营销实验 -->
<DMLFormDialog
v-model=
"dmlDialogVisible"
:data=
"rowData"
v-if=
"dmlDialogVisible && rowData"
></DMLFormDialog>
<DMLFormDialog
v-model=
"dmlDialogVisible"
:data=
"rowData"
v-if=
"dmlDialogVisible && rowData"
></DMLFormDialog>
</template>
</template>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论