Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
0b94d2dd
提交
0b94d2dd
authored
10月 18, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 优化讨论交流
上级
42c1c8f0
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
54 行增加
和
30 行删除
+54
-30
Discuss.vue
src/modules/student/contest/components/Discuss.vue
+1
-1
DiscussCommentPublish.vue
...ules/student/contest/components/DiscussCommentPublish.vue
+13
-11
DiscussItem.vue
src/modules/student/contest/components/DiscussItem.vue
+1
-1
DiscussPublish.vue
src/modules/student/contest/components/DiscussPublish.vue
+12
-2
Discuss.vue
src/modules/student/lab/components/Discuss.vue
+1
-1
DiscussCommentPublish.vue
src/modules/student/lab/components/DiscussCommentPublish.vue
+13
-11
DiscussItem.vue
src/modules/student/lab/components/DiscussItem.vue
+1
-1
DiscussPublish.vue
src/modules/student/lab/components/DiscussPublish.vue
+12
-2
没有找到文件。
src/modules/student/contest/components/Discuss.vue
浏览文件 @
0b94d2dd
...
@@ -63,7 +63,7 @@ useInfiniteScroll(
...
@@ -63,7 +63,7 @@ useInfiniteScroll(
<el-radio
:label=
"4"
>
我的班级
</el-radio>
-->
<el-radio
:label=
"4"
>
我的班级
</el-radio>
-->
</el-radio-group>
</el-radio-group>
<!-- 发表新话题 -->
<!-- 发表新话题 -->
<DiscussPublish
:competition_id=
"competition_id"
@
update=
"fetchInfo(true)"
v-if=
"competition_id"
></DiscussPublish>
<DiscussPublish
:
list=
"list"
:
competition_id=
"competition_id"
@
update=
"fetchInfo(true)"
v-if=
"competition_id"
></DiscussPublish>
<el-empty
description=
"暂无数据"
v-if=
"isEmpty"
/>
<el-empty
description=
"暂无数据"
v-if=
"isEmpty"
/>
<template
v-else
>
<template
v-else
>
<div
class=
"discuss-scroll"
ref=
"scrollRef"
>
<div
class=
"discuss-scroll"
ref=
"scrollRef"
>
...
...
src/modules/student/contest/components/DiscussCommentPublish.vue
浏览文件 @
0b94d2dd
...
@@ -18,6 +18,7 @@ const form = reactive({ content: '' })
...
@@ -18,6 +18,7 @@ const form = reactive({ content: '' })
const
rules
=
ref
<
FormRules
>
({
const
rules
=
ref
<
FormRules
>
({
content
:
[{
required
:
true
,
message
:
'请输入话题评论内容'
,
trigger
:
'blur'
}]
content
:
[{
required
:
true
,
message
:
'请输入话题评论内容'
,
trigger
:
'blur'
}]
})
})
let
publishVisible
=
$ref
(
false
)
// 提交
// 提交
function
handleSubmit
()
{
function
handleSubmit
()
{
...
@@ -30,22 +31,23 @@ function handleAdd() {
...
@@ -30,22 +31,23 @@ function handleAdd() {
ElMessage
({
message
:
'评论成功'
,
type
:
'success'
})
ElMessage
({
message
:
'评论成功'
,
type
:
'success'
})
emit
(
'update'
)
emit
(
'update'
)
formRef
?.
resetFields
()
formRef
?.
resetFields
()
publishVisible
=
false
})
})
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<el-form
<div
style=
"border-top: 1px dashed #e6e6e6; border-bottom: 1px dashed #e6e6e6; padding: 20px 0"
>
ref=
"formRef"
:model=
"form"
:rules=
"rules"
style=
"border-top: 1px dashed #e6e6e6; border-bottom: 1px dashed #e6e6e6; padding: 20px 0"
>
<el-form-item
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"form.content"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
</el-form-item>
<el-row
justify=
"end"
>
<el-row
justify=
"end"
>
<el-button
type=
"primary"
@
click=
"
handleSubmit"
>
评论
</el-button>
<el-button
type=
"primary"
@
click=
"
publishVisible = true"
v-if=
"!publishVisible"
>
我要
评论
</el-button>
</el-row>
</el-row>
</el-form>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
v-if=
"publishVisible"
>
<el-form-item
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"form.content"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
</el-form-item>
<el-row
justify=
"end"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
发表评论
</el-button>
</el-row>
</el-form>
</div>
</
template
>
</
template
>
src/modules/student/contest/components/DiscussItem.vue
浏览文件 @
0b94d2dd
...
@@ -59,6 +59,7 @@ const commentVisible = $ref(false)
...
@@ -59,6 +59,7 @@ const commentVisible = $ref(false)
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.discuss-item
{
.discuss-item
{
margin-top
:
10px
;
margin-top
:
10px
;
padding-right
:
15px
;
border-top
:
1px
solid
#e6e6e6
;
border-top
:
1px
solid
#e6e6e6
;
}
}
.discuss-box
{
.discuss-box
{
...
@@ -117,7 +118,6 @@ const commentVisible = $ref(false)
...
@@ -117,7 +118,6 @@ const commentVisible = $ref(false)
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
margin-top
:
10px
;
margin-top
:
10px
;
padding-right
:
15px
;
.button-comment
{
.button-comment
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/modules/student/contest/components/DiscussPublish.vue
浏览文件 @
0b94d2dd
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
ExperimentDiscussType
}
from
'../types'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
addExperimentDiscuss
}
from
'../api'
import
{
addExperimentDiscuss
}
from
'../api'
interface
Props
{
interface
Props
{
competition_id
:
string
competition_id
:
string
list
:
ExperimentDiscussType
[]
}
}
const
props
=
defineProps
<
Props
>
()
const
props
=
defineProps
<
Props
>
()
...
@@ -32,17 +34,25 @@ function handleAdd() {
...
@@ -32,17 +34,25 @@ function handleAdd() {
formRef
?.
resetFields
()
formRef
?.
resetFields
()
})
})
}
}
let
publishVisible
=
$ref
(
true
)
watchEffect
(()
=>
{
publishVisible
=
!
props
.
list
.
length
})
</
script
>
</
script
>
<
template
>
<
template
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
style=
"padding: 20px 0 10px"
>
<el-row
justify=
"start"
style=
"padding-top: 10px"
>
<el-button
type=
"primary"
@
click=
"publishVisible = true"
v-if=
"!publishVisible"
>
新话题
</el-button>
</el-row>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
style=
"padding: 20px 0 10px"
v-if=
"publishVisible"
>
<el-form-item
prop=
"title"
>
<el-form-item
prop=
"title"
>
<el-input
v-model=
"form.title"
placeholder=
"话题标题"
></el-input>
<el-input
v-model=
"form.title"
placeholder=
"话题标题"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"content"
>
<el-form-item
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"form.content"
placeholder=
"话题描述"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
<el-input
type=
"textarea"
v-model=
"form.content"
placeholder=
"话题描述"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
</el-form-item>
</el-form-item>
<el-row
justify=
"end"
>
<el-row
justify=
"space-between"
>
<el-button
type=
"info"
@
click=
"publishVisible = false"
>
收起
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
发表
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
发表
</el-button>
</el-row>
</el-row>
</el-form>
</el-form>
...
...
src/modules/student/lab/components/Discuss.vue
浏览文件 @
0b94d2dd
...
@@ -63,7 +63,7 @@ useInfiniteScroll(
...
@@ -63,7 +63,7 @@ useInfiniteScroll(
<el-radio
:label=
"4"
>
我的班级
</el-radio>
<el-radio
:label=
"4"
>
我的班级
</el-radio>
</el-radio-group>
</el-radio-group>
<!-- 发表新话题 -->
<!-- 发表新话题 -->
<DiscussPublish
:experiment_id=
"experiment_id"
@
update=
"fetchInfo(true)"
v-if=
"experiment_id"
></DiscussPublish>
<DiscussPublish
:
list=
"list"
:
experiment_id=
"experiment_id"
@
update=
"fetchInfo(true)"
v-if=
"experiment_id"
></DiscussPublish>
<el-empty
description=
"暂无数据"
v-if=
"isEmpty"
/>
<el-empty
description=
"暂无数据"
v-if=
"isEmpty"
/>
<template
v-else
>
<template
v-else
>
<div
class=
"discuss-scroll"
ref=
"scrollRef"
>
<div
class=
"discuss-scroll"
ref=
"scrollRef"
>
...
...
src/modules/student/lab/components/DiscussCommentPublish.vue
浏览文件 @
0b94d2dd
...
@@ -18,6 +18,7 @@ const form = reactive({ content: '' })
...
@@ -18,6 +18,7 @@ const form = reactive({ content: '' })
const
rules
=
ref
<
FormRules
>
({
const
rules
=
ref
<
FormRules
>
({
content
:
[{
required
:
true
,
message
:
'请输入话题评论内容'
,
trigger
:
'blur'
}]
content
:
[{
required
:
true
,
message
:
'请输入话题评论内容'
,
trigger
:
'blur'
}]
})
})
let
publishVisible
=
$ref
(
false
)
// 提交
// 提交
function
handleSubmit
()
{
function
handleSubmit
()
{
...
@@ -30,22 +31,23 @@ function handleAdd() {
...
@@ -30,22 +31,23 @@ function handleAdd() {
ElMessage
({
message
:
'评论成功'
,
type
:
'success'
})
ElMessage
({
message
:
'评论成功'
,
type
:
'success'
})
emit
(
'update'
)
emit
(
'update'
)
formRef
?.
resetFields
()
formRef
?.
resetFields
()
publishVisible
=
false
})
})
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<el-form
<div
style=
"border-top: 1px dashed #e6e6e6; border-bottom: 1px dashed #e6e6e6; padding: 20px 0"
>
ref=
"formRef"
:model=
"form"
:rules=
"rules"
style=
"border-top: 1px dashed #e6e6e6; border-bottom: 1px dashed #e6e6e6; padding: 20px 0"
>
<el-form-item
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"form.content"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
</el-form-item>
<el-row
justify=
"end"
>
<el-row
justify=
"end"
>
<el-button
type=
"primary"
@
click=
"
handleSubmit"
>
发表
评论
</el-button>
<el-button
type=
"primary"
@
click=
"
publishVisible = true"
v-if=
"!publishVisible"
>
我要
评论
</el-button>
</el-row>
</el-row>
</el-form>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
v-if=
"publishVisible"
>
<el-form-item
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"form.content"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
</el-form-item>
<el-row
justify=
"end"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
发表评论
</el-button>
</el-row>
</el-form>
</div>
</
template
>
</
template
>
src/modules/student/lab/components/DiscussItem.vue
浏览文件 @
0b94d2dd
...
@@ -59,6 +59,7 @@ const commentVisible = $ref(false)
...
@@ -59,6 +59,7 @@ const commentVisible = $ref(false)
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.discuss-item
{
.discuss-item
{
margin-top
:
10px
;
margin-top
:
10px
;
padding-right
:
15px
;
border-top
:
1px
solid
#e6e6e6
;
border-top
:
1px
solid
#e6e6e6
;
}
}
.discuss-box
{
.discuss-box
{
...
@@ -117,7 +118,6 @@ const commentVisible = $ref(false)
...
@@ -117,7 +118,6 @@ const commentVisible = $ref(false)
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
margin-top
:
10px
;
margin-top
:
10px
;
padding-right
:
15px
;
.button-comment
{
.button-comment
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/modules/student/lab/components/DiscussPublish.vue
浏览文件 @
0b94d2dd
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
ExperimentDiscussType
}
from
'../types'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
addExperimentDiscuss
}
from
'../api'
import
{
addExperimentDiscuss
}
from
'../api'
interface
Props
{
interface
Props
{
experiment_id
:
string
experiment_id
:
string
list
:
ExperimentDiscussType
[]
}
}
const
props
=
defineProps
<
Props
>
()
const
props
=
defineProps
<
Props
>
()
...
@@ -32,17 +34,25 @@ function handleAdd() {
...
@@ -32,17 +34,25 @@ function handleAdd() {
formRef
?.
resetFields
()
formRef
?.
resetFields
()
})
})
}
}
let
publishVisible
=
$ref
(
true
)
watchEffect
(()
=>
{
publishVisible
=
!
props
.
list
.
length
})
</
script
>
</
script
>
<
template
>
<
template
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
style=
"padding: 20px 0 10px"
>
<el-row
justify=
"start"
style=
"padding-top: 10px"
>
<el-button
type=
"primary"
@
click=
"publishVisible = true"
v-if=
"!publishVisible"
>
新话题
</el-button>
</el-row>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
style=
"padding: 20px 0 10px"
v-if=
"publishVisible"
>
<el-form-item
prop=
"title"
>
<el-form-item
prop=
"title"
>
<el-input
v-model=
"form.title"
placeholder=
"话题标题"
></el-input>
<el-input
v-model=
"form.title"
placeholder=
"话题标题"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"content"
>
<el-form-item
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"form.content"
placeholder=
"话题描述"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
<el-input
type=
"textarea"
v-model=
"form.content"
placeholder=
"话题描述"
:autosize=
"
{ minRows: 4, maxRows: 6 }" />
</el-form-item>
</el-form-item>
<el-row
justify=
"end"
>
<el-row
justify=
"space-between"
>
<el-button
type=
"info"
@
click=
"publishVisible = false"
>
收起
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
发表
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
发表
</el-button>
</el-row>
</el-row>
</el-form>
</el-form>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论