Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
bf5f7eda
提交
bf5f7eda
authored
10月 17, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
我的实验,左侧拖拽
上级
5b50e9d3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
49 行增加
和
4 行删除
+49
-4
DiscussItem.vue
src/modules/student/contest/components/DiscussItem.vue
+1
-0
DiscussItem.vue
src/modules/student/lab/components/DiscussItem.vue
+1
-0
Index.vue
src/modules/student/lab/views/Index.vue
+47
-4
没有找到文件。
src/modules/student/contest/components/DiscussItem.vue
浏览文件 @
bf5f7eda
...
@@ -117,6 +117,7 @@ const commentVisible = $ref(false)
...
@@ -117,6 +117,7 @@ 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/DiscussItem.vue
浏览文件 @
bf5f7eda
...
@@ -117,6 +117,7 @@ const commentVisible = $ref(false)
...
@@ -117,6 +117,7 @@ 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/views/Index.vue
浏览文件 @
bf5f7eda
...
@@ -16,7 +16,7 @@ const ReportDialog = defineAsyncComponent(() => import('../components/ReportDial
...
@@ -16,7 +16,7 @@ const ReportDialog = defineAsyncComponent(() => import('../components/ReportDial
const
route
=
useRoute
()
const
route
=
useRoute
()
// 左侧
// 左侧
cons
t
leftPanelVisible
=
$ref
<
boolean
>
(
true
)
le
t
leftPanelVisible
=
$ref
<
boolean
>
(
true
)
const
form
=
reactive
<
{
course_id
:
string
;
experiment_id
:
string
}
>
({
const
form
=
reactive
<
{
course_id
:
string
;
experiment_id
:
string
}
>
({
course_id
:
(
route
.
query
.
course_id
as
string
)
||
''
,
course_id
:
(
route
.
query
.
course_id
as
string
)
||
''
,
experiment_id
:
(
route
.
query
.
experiment_id
as
string
)
||
''
experiment_id
:
(
route
.
query
.
experiment_id
as
string
)
||
''
...
@@ -115,6 +115,7 @@ function handleCaptureCallback(event: MessageEvent) {
...
@@ -115,6 +115,7 @@ function handleCaptureCallback(event: MessageEvent) {
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
window
.
addEventListener
(
'message'
,
handleCaptureCallback
,
false
)
window
.
addEventListener
(
'message'
,
handleCaptureCallback
,
false
)
dragControllerDiv
()
})
})
onUnmounted
(()
=>
{
onUnmounted
(()
=>
{
window
.
removeEventListener
(
'message'
,
handleCaptureCallback
,
false
)
window
.
removeEventListener
(
'message'
,
handleCaptureCallback
,
false
)
...
@@ -140,11 +141,40 @@ function handleSubmit() {
...
@@ -140,11 +141,40 @@ function handleSubmit() {
}
}
)
)
}
}
// 拖拽改变左侧宽度
// 因为鼠标移动文档和iframe影响不能move
const
dragFlag
=
ref
(
true
)
function
dragControllerDiv
()
{
const
dragDom
=
document
.
getElementById
(
'panel-icon'
)
const
labLeftDom
=
document
.
getElementById
(
'lab-left'
)
if
(
dragDom
&&
labLeftDom
)
{
dragDom
.
onmousedown
=
function
()
{
// 判断不是拖拽是点击的话就折叠
let
clickFlag
=
true
document
.
onmousemove
=
function
(
e
)
{
clickFlag
=
false
dragFlag
.
value
=
false
labLeftDom
.
style
.
width
=
`
${
e
.
x
}
px`
}
document
.
onmouseup
=
function
()
{
document
.
onmousemove
=
null
document
.
onmouseup
=
null
dragFlag
.
value
=
true
if
(
clickFlag
)
{
labLeftDom
.
style
.
width
=
'400px'
leftPanelVisible
=
!
leftPanelVisible
}
}
return
false
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<section
class=
"lab"
>
<section
class=
"lab"
>
<div
class=
"lab-left"
:class=
"
{ 'is-hidden': !leftPanelVisible }">
<div
class=
"lab-left"
:class=
"
{ 'is-hidden': !leftPanelVisible }"
id="lab-left"
>
<div
class=
"lab-left__inner"
>
<div
class=
"lab-left__inner"
>
<el-form
:model=
"form"
label-suffix=
":"
hide-required-asterisk
>
<el-form
:model=
"form"
label-suffix=
":"
hide-required-asterisk
>
<el-form-item
label=
"请选择课程"
>
<el-form-item
label=
"请选择课程"
>
...
@@ -160,6 +190,7 @@ function handleSubmit() {
...
@@ -160,6 +190,7 @@ function handleSubmit() {
</el-form>
</el-form>
<el-tabs
type=
"border-card"
stretch
>
<el-tabs
type=
"border-card"
stretch
>
<el-tab-pane
label=
"实训指导"
lazy
>
<el-tab-pane
label=
"实训指导"
lazy
>
<div
class=
"pop"
v-if=
"!dragFlag"
></div>
<Book
:course_id=
"form.course_id"
:experiment_id=
"form.experiment_id"
></Book>
<Book
:course_id=
"form.course_id"
:experiment_id=
"form.experiment_id"
></Book>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"操作视频"
lazy
>
<el-tab-pane
label=
"操作视频"
lazy
>
...
@@ -173,7 +204,8 @@ function handleSubmit() {
...
@@ -173,7 +204,8 @@ function handleSubmit() {
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
<div
class=
"panel-icon"
@
click=
"leftPanelVisible = !leftPanelVisible"
>
<!-- @click="leftPanelVisible = !leftPanelVisible" -->
<div
class=
"panel-icon"
id=
"panel-icon"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 16 86"
aria-hidden=
"true"
width=
"16"
height=
"86"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 16 86"
aria-hidden=
"true"
width=
"16"
height=
"86"
>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<path
<path
...
@@ -207,6 +239,7 @@ function handleSubmit() {
...
@@ -207,6 +239,7 @@ function handleSubmit() {
</el-row>
</el-row>
</AppCard>
</AppCard>
<div
class=
"lab-box"
>
<div
class=
"lab-box"
>
<div
class=
"pop"
v-if=
"!dragFlag"
></div>
<el-empty
description=
"您已经提交该实验,不能再进行操作,切换其他实验再做操作吧。"
v-if=
"submitted"
/>
<el-empty
description=
"您已经提交该实验,不能再进行操作,切换其他实验再做操作吧。"
v-if=
"submitted"
/>
<iframe
:src=
"LAB_URL"
:key=
"iframeKey"
frameborder=
"0"
class=
"iframe"
ref=
"iframeRef"
v-else
></iframe>
<iframe
:src=
"LAB_URL"
:key=
"iframeKey"
frameborder=
"0"
class=
"iframe"
ref=
"iframeRef"
v-else
></iframe>
</div>
</div>
...
@@ -235,7 +268,7 @@ function handleSubmit() {
...
@@ -235,7 +268,7 @@ function handleSubmit() {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
transition
:
all
0
.1s
;
transition
:
all
0
.1s
;
&
.is-hidden
{
&
.is-hidden
{
width
:
0
;
width
:
0
!
important
;
padding
:
0
;
padding
:
0
;
.panel-icon
{
.panel-icon
{
left
:
-20px
;
left
:
-20px
;
...
@@ -293,6 +326,7 @@ function handleSubmit() {
...
@@ -293,6 +326,7 @@ function handleSubmit() {
height
:
100%
;
height
:
100%
;
}
}
.lab-box
{
.lab-box
{
position
:
relative
;
flex
:
1
;
flex
:
1
;
width
:
100%
;
width
:
100%
;
margin-top
:
20px
;
margin-top
:
20px
;
...
@@ -301,4 +335,13 @@ function handleSubmit() {
...
@@ -301,4 +335,13 @@ function handleSubmit() {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
.pop
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
999999
;
opacity
:
0
;
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论