Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
campSite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨梦雪
campSite
Commits
c0dcd083
Commit
c0dcd083
authored
Feb 23, 2023
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的作业-查看作业
parent
e383d507
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
22 deletions
+37
-22
src/views/index/camp/homework/refer.vue
src/views/index/camp/homework/refer.vue
+37
-22
No files found.
src/views/index/camp/homework/refer.vue
View file @
c0dcd083
...
@@ -100,22 +100,13 @@
...
@@ -100,22 +100,13 @@
>
>
查看作业
查看作业
</div>
</div>
<!--查看作业图片 -->
<el-dialog
title=
"作业"
:visible.sync=
"dialogVisibleImage"
width=
"30%"
:before-close=
"handleImageClose"
append-to-body
>
<el-image
:lazy=
'true'
:src=
"item.url_open"
:preview-src-list=
"srcList"
></el-image>
</el-dialog>
</div>
</div>
</div>
</div>
</div>
</div>
<!--
<div
v-if=
"stu_fileList.length
<
=
0
"
class=
"img_list"
>
-->
<!--
<div
v-if=
"stu_fileList.length
<
=
0
"
class=
"img_list"
>
-->
<!--
<div>
-->
<!--
<div>
-->
...
@@ -240,7 +231,22 @@
...
@@ -240,7 +231,22 @@
</el-form>
</el-form>
</div>
</div>
</el-dialog>
</el-dialog>
<!--查看作业图片 -->
<el-dialog
title=
"作业"
:visible.sync=
"dialogVisibleImage"
width=
"30%"
:before-close=
"handleImageClose"
append-to-body
>
<el-image
:lazy=
'true'
:src=
"srcList_url_open"
:preview-src-list=
"srcList"
></el-image>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -283,6 +289,7 @@
...
@@ -283,6 +289,7 @@
}
}
};
};
return
{
return
{
dialogVisible
:
this
.
dialogVisibleFu
,
dialogVisibleImage
:
false
,
dialogVisibleImage
:
false
,
referRules
:
{
referRules
:
{
stu_answer
:
[
stu_answer
:
[
...
@@ -299,8 +306,6 @@
...
@@ -299,8 +306,6 @@
time_out
:
1
,
time_out
:
1
,
fileImg
:
fileImg
,
fileImg
:
fileImg
,
loading
:
false
,
loading
:
false
,
dialogVisible
:
this
.
dialogVisibleFu
,
dialogVisibleimage
:
false
,
formData
:
{
formData
:
{
teacher_id
:
""
,
teacher_id
:
""
,
stu_answer
:
""
,
stu_answer
:
""
,
...
@@ -314,6 +319,7 @@
...
@@ -314,6 +319,7 @@
score
:
""
,
//老师评分
score
:
""
,
//老师评分
teacher_commment
:
""
,
//老师评语
teacher_commment
:
""
,
//老师评语
tea_scoreFileList
:
[],
//老师评语的附件
tea_scoreFileList
:
[],
//老师评语的附件
srcList_url_open
:
''
,
//打开的图片url_open
srcList
:
[],
//在线预览图片-放大
srcList
:
[],
//在线预览图片-放大
fileList
:
[],
//传给后端的url
fileList
:
[],
//传给后端的url
};
};
...
@@ -674,12 +680,17 @@
...
@@ -674,12 +680,17 @@
// 查看已上传的学生作业
// 查看已上传的学生作业
handleCheck
(
url
)
{
handleCheck
(
url
)
{
console
.
log
(
url
,
"
url
"
);
console
.
log
(
url
,
"
url
"
);
console
.
log
(
this
.
srcList
,
"
fileList
"
);
// console.log(url.match(/\.(jpeg|jpg|gif|png)$/) != null)
// console.log(url.match(/\.(jpeg|jpg|gif|png)$/) != null)
// 是否为图片
// 是否为图片
if
(
url
.
match
(
/
\.(
jpeg|jpg|gif|png
)
$/
)
!=
null
)
{
if
(
url
.
match
(
/
\.(
jpeg|jpg|gif|png
)
$/
)
!=
null
)
{
this
.
dialogVisibleImage
=
true
;
this
.
dialogVisibleImage
=
true
;
// console.log(url.split(" "), '111')
console
.
log
(
url
.
split
(
"
"
),
'
111
'
)
this
.
srcList
=
url
.
split
(
"
"
);
// this.srcList = url.split(" ");
this
.
srcList_url_open
=
url
this
.
srcList
=
this
.
stu_fileList
.
map
((
item
)
=>
{
return
item
.
url_open
})
}
else
{
}
else
{
let
onlineViewType
=
[
let
onlineViewType
=
[
"
doc
"
,
"
doc
"
,
...
@@ -699,7 +710,8 @@
...
@@ -699,7 +710,8 @@
}
}
window
.
open
(
url
,
"
_blank
"
);
window
.
open
(
url
,
"
_blank
"
);
}
}
},
}
,
handleImageClose
(
done
)
{
handleImageClose
(
done
)
{
this
.
$confirm
(
"
确认关闭?
"
)
this
.
$confirm
(
"
确认关闭?
"
)
.
then
((
_
)
=>
{
.
then
((
_
)
=>
{
...
@@ -707,7 +719,8 @@
...
@@ -707,7 +719,8 @@
})
})
.
catch
((
_
)
=>
{
.
catch
((
_
)
=>
{
});
});
},
}
,
// 未完成
// 未完成
notReadHandle
()
{
notReadHandle
()
{
this
.
formData
.
teacher_id
=
this
.
work_nums
;
this
.
formData
.
teacher_id
=
this
.
work_nums
;
...
@@ -734,7 +747,8 @@
...
@@ -734,7 +747,8 @@
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
});
});
},
}
,
// 提交按钮
// 提交按钮
confirm
()
{
confirm
()
{
if
(
this
.
stu_fileList
.
length
==
0
)
{
if
(
this
.
stu_fileList
.
length
==
0
)
{
...
@@ -764,7 +778,8 @@
...
@@ -764,7 +778,8 @@
message
:
"
已取消
"
,
message
:
"
已取消
"
,
});
});
});
});
},
}
,
},
},
watch
:
{
watch
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment