Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
0a73f7c4
提交
0a73f7c4
authored
8月 23, 2023
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
724de096
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
109 行增加
和
7 行删除
+109
-7
GradeRulesDialog.vue
...ules/admin/lab/experiment/components/GradeRulesDialog.vue
+2
-1
GroupQuestion.vue
...min/lab/experiment/components/Questions/GroupQuestion.vue
+1
-1
JourneyQuestion.vue
...n/lab/experiment/components/Questions/JourneyQuestion.vue
+92
-0
PreviewDialog.vue
...min/lab/experiment/components/Questions/PreviewDialog.vue
+5
-1
QuestionsOrder.vue
...in/lab/experiment/components/Questions/QuestionsOrder.vue
+2
-1
Questions.vue
src/modules/admin/lab/experiment/views/Questions.vue
+7
-3
没有找到文件。
src/modules/admin/lab/experiment/components/GradeRulesDialog.vue
浏览文件 @
0a73f7c4
...
@@ -203,8 +203,9 @@ const handleEdit = function (type: number) {
...
@@ -203,8 +203,9 @@ const handleEdit = function (type: number) {
<el-table-column
align=
"right"
>
<el-table-column
align=
"right"
>
<
template
#
default=
"{ $index, row }"
>
<
template
#
default=
"{ $index, row }"
>
<div
class=
"btn-box"
>
<div
class=
"btn-box"
>
<!-- || row.type === 8 -->
<el-button
<el-button
:disabled=
"row.type === 1
|| row.type === 8
"
:disabled=
"row.type === 1"
style=
"padding: 0"
style=
"padding: 0"
text
text
type=
"primary"
type=
"primary"
...
...
src/modules/admin/lab/experiment/components/Questions/GroupQuestion.vue
浏览文件 @
0a73f7c4
...
@@ -30,7 +30,7 @@ onMounted(() => {
...
@@ -30,7 +30,7 @@ onMounted(() => {
/></el-icon>
/></el-icon>
<div
class=
"head-box"
>
<div
class=
"head-box"
>
<el-tabs
v-model=
"item.type"
type=
"card"
class=
"demo-tabs"
>
<el-tabs
v-model=
"item.type"
type=
"card"
class=
"demo-tabs"
>
<el-tab-pane
label=
"静
待
群组"
:name=
"301"
></el-tab-pane>
<el-tab-pane
label=
"静
态
群组"
:name=
"301"
></el-tab-pane>
<el-tab-pane
label=
"动态群组"
:name=
"302"
></el-tab-pane>
<el-tab-pane
label=
"动态群组"
:name=
"302"
></el-tab-pane>
</el-tabs>
</el-tabs>
<el-form-item
label=
"本题分值"
class=
"head-r"
>
<el-form-item
label=
"本题分值"
class=
"head-r"
>
...
...
src/modules/admin/lab/experiment/components/Questions/JourneyQuestion.vue
0 → 100644
浏览文件 @
0a73f7c4
<
script
setup
lang=
"ts"
>
import
type
{
FormInstance
}
from
'element-plus'
import
{
Document
,
CircleCheck
,
CircleClose
,
CircleCloseFilled
}
from
'@element-plus/icons-vue'
import
type
{
UploadFile
}
from
'element-plus'
const
route
=
useRoute
()
const
modelValue
:
any
=
defineModel
()
const
ruleFormRef
=
ref
<
FormInstance
>
()
// 移除上传文件
const
handleRemove
=
(
file
:
UploadFile
)
=>
{
if
(
file
)
{
modelValue
.
value
.
forEach
((
item
:
any
)
=>
{
const
index
=
item
.
files
.
findIndex
((
cItem
:
{
url
:
string
})
=>
cItem
.
url
===
file
.
url
)
item
.
files
.
splice
(
index
,
1
)
})
}
}
const
removeQuestion
=
(
index
:
number
)
=>
{
modelValue
.
value
.
splice
(
index
,
1
)
}
onMounted
(()
=>
{
const
dom
:
any
=
document
.
querySelectorAll
(
'.app-main'
)[
0
]
dom
.
style
.
overflow
=
'visible'
})
</
script
>
<
template
>
<el-card
:id=
"`site-card$
{index}`" class="box-card" v-for="(item, index) in modelValue" :key="item">
<el-icon
@
click=
"removeQuestion(index)"
v-if=
"modelValue.length > 1"
class=
"close"
size=
"28"
color=
"#c01c40"
><CircleCloseFilled
/></el-icon>
<div
class=
"head-box"
>
<el-form-item
label=
"本题分值"
class=
"head-r"
>
<el-input-number
v-model=
"item.score"
:min=
"1"
:max=
"100"
controls-position=
"right"
/>
</el-form-item>
</div>
<el-form
ref=
"ruleFormRef"
label-width=
"120px"
class=
"demo-ruleForm"
status-icon
>
<el-form-item
label=
"题目标题"
:required=
"true"
>
<el-input
v-model=
"item.title"
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item
label=
"题干内容"
>
<el-input
v-model=
"item.content"
:rows=
"5"
type=
"textarea"
placeholder=
"请输入"
/>
</el-form-item>
</el-form>
</el-card>
</
template
>
<
style
lang=
"scss"
scoped
>
.close
{
position
:
absolute
;
top
:
-10px
;
right
:
-10px
;
cursor
:
pointer
;
}
.box-card
{
padding-top
:
20px
;
position
:
relative
;
margin-bottom
:
30px
;
overflow
:
visible
;
}
.head-box
{
display
:
flex
;
margin-bottom
:
30px
;
.head-r
{
margin-left
:
auto
;
}
}
.upload-box
{
display
:
flex
;
.upload-loading
{
width
:
300px
;
display
:
flex
;
align-items
:
center
;
&
:hover
{
.succ-icon2
{
display
:
block
;
}
.succ-icon1
{
display
:
none
;
}
}
.succ-icon2
{
display
:
none
;
cursor
:
pointer
;
}
}
}
</
style
>
src/modules/admin/lab/experiment/components/Questions/PreviewDialog.vue
浏览文件 @
0a73f7c4
...
@@ -14,6 +14,8 @@ const getCurrentQuestions = function () {
...
@@ -14,6 +14,8 @@ const getCurrentQuestions = function () {
list
=
res
.
data
.
items
list
=
res
.
data
.
items
})
})
}
}
const
selectAnswer
=
[
'302'
,
'202'
]
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -30,7 +32,9 @@ const getCurrentQuestions = function () {
...
@@ -30,7 +32,9 @@ const getCurrentQuestions = function () {
<el-form-item
label=
"本题分值"
style=
"margin: 0"
>
{{
item
.
score
}}
</el-form-item>
<el-form-item
label=
"本题分值"
style=
"margin: 0"
>
{{
item
.
score
}}
</el-form-item>
</div>
</div>
</
template
>
</
template
>
<div
class=
"text item"
>
正确答案:{{ item.answer || '上传成功' }}
</div>
<div
class=
"text item"
>
正确答案:{{ ['302', '202'].includes(item.type) ? item.answer_info?.name : item?.answer || '上传成功' }}
</div>
</el-card>
</el-card>
</el-dialog>
</el-dialog>
</template>
</template>
...
...
src/modules/admin/lab/experiment/components/Questions/QuestionsOrder.vue
浏览文件 @
0a73f7c4
...
@@ -40,7 +40,8 @@ const typeName = computed(() => {
...
@@ -40,7 +40,8 @@ const typeName = computed(() => {
'10'
:
'用户/事件数据'
,
'10'
:
'用户/事件数据'
,
'6'
:
'标签管理'
,
'6'
:
'标签管理'
,
'7'
:
'群组管理'
,
'7'
:
'群组管理'
,
'9'
:
'营销资料管理'
'9'
:
'营销资料管理'
,
'8'
:
'用户旅程'
}
}
return
name
[(
route
.
query
?.
type
as
string
)
||
'10'
]
return
name
[(
route
.
query
?.
type
as
string
)
||
'10'
]
})
})
...
...
src/modules/admin/lab/experiment/views/Questions.vue
浏览文件 @
0a73f7c4
...
@@ -8,12 +8,13 @@ const UserQuestion = defineAsyncComponent(() => import('../components/Questions/
...
@@ -8,12 +8,13 @@ const UserQuestion = defineAsyncComponent(() => import('../components/Questions/
const
TagQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/TagQuestion.vue'
))
const
TagQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/TagQuestion.vue'
))
const
GroupQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/GroupQuestion.vue'
))
const
GroupQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/GroupQuestion.vue'
))
const
MaterialQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/MaterialQuestion.vue'
))
const
MaterialQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/MaterialQuestion.vue'
))
const
JourneyQuestion
=
defineAsyncComponent
(()
=>
import
(
'../components/Questions/JourneyQuestion.vue'
))
const
route
:
any
=
useRoute
()
const
route
:
any
=
useRoute
()
const
router
=
useRouter
()
const
router
=
useRouter
()
const
getQuestionTypeInitValue
=
function
()
{
const
getQuestionTypeInitValue
=
function
()
{
const
type
:
any
=
{
10
:
101
,
6
:
201
,
7
:
301
,
9
:
401
}
const
type
:
any
=
{
10
:
101
,
6
:
201
,
7
:
301
,
9
:
401
,
8
:
501
}
return
type
[
parseInt
(
route
.
query
?.
type
||
'10'
)]
return
type
[
parseInt
(
route
.
query
?.
type
||
'10'
)]
}
}
...
@@ -44,7 +45,8 @@ const addQuestion = () => {
...
@@ -44,7 +45,8 @@ const addQuestion = () => {
const
previewDialogVisible
=
$ref
(
false
)
const
previewDialogVisible
=
$ref
(
false
)
const
handleSubmit
=
function
()
{
const
handleSubmit
=
function
()
{
const
type
:
any
=
{
10
:
'1'
,
6
:
'2'
,
7
:
'3'
,
9
:
'4'
}
const
type
:
any
=
{
10
:
'1'
,
6
:
'2'
,
7
:
'3'
,
9
:
'4'
,
8
:
'5'
}
console
.
log
(
data
,
'data'
)
const
params
=
{
const
params
=
{
experiment_id
:
route
.
query
.
id
,
experiment_id
:
route
.
query
.
id
,
module
:
type
[
route
.
query
.
type
],
module
:
type
[
route
.
query
.
type
],
...
@@ -77,7 +79,8 @@ const getCurrentQuestions = function () {
...
@@ -77,7 +79,8 @@ const getCurrentQuestions = function () {
10
:
[
101
,
102
],
10
:
[
101
,
102
],
6
:
[
201
,
202
],
6
:
[
201
,
202
],
7
:
[
301
,
302
],
7
:
[
301
,
302
],
9
:
[
401
,
402
,
403
,
404
,
405
,
406
,
407
,
408
]
9
:
[
401
,
402
,
403
,
404
,
405
,
406
,
407
,
408
],
8
:
[
501
]
}
}
getQuestions
({
experiment_id
:
route
.
query
.
id
,
types
:
typesJson
[
route
.
query
.
type
]
}).
then
(
res
=>
{
getQuestions
({
experiment_id
:
route
.
query
.
id
,
types
:
typesJson
[
route
.
query
.
type
]
}).
then
(
res
=>
{
if
(
res
.
data
?.
items
)
{
if
(
res
.
data
?.
items
)
{
...
@@ -114,6 +117,7 @@ const getCurrentQuestions = function () {
...
@@ -114,6 +117,7 @@ const getCurrentQuestions = function () {
<TagQuestion
v-model=
"data"
v-if=
"route.query.type === '6'"
></TagQuestion>
<TagQuestion
v-model=
"data"
v-if=
"route.query.type === '6'"
></TagQuestion>
<GroupQuestion
v-model=
"data"
v-if=
"route.query.type === '7'"
></GroupQuestion>
<GroupQuestion
v-model=
"data"
v-if=
"route.query.type === '7'"
></GroupQuestion>
<MaterialQuestion
v-model=
"data"
v-if=
"route.query.type === '9'"
></MaterialQuestion>
<MaterialQuestion
v-model=
"data"
v-if=
"route.query.type === '9'"
></MaterialQuestion>
<JourneyQuestion
v-model=
"data"
v-if=
"route.query.type === '8'"
></JourneyQuestion>
<div
class=
"btn-box"
>
<div
class=
"btn-box"
>
<div
class=
"btn-l"
>
<div
class=
"btn-l"
>
<el-button
type=
"primary"
@
click=
"addQuestion"
>
添加试题
</el-button>
<el-button
type=
"primary"
@
click=
"addQuestion"
>
添加试题
</el-button>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论