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
5462af3d
Commit
5462af3d
authored
Dec 23, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
363e5e93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
49 deletions
+25
-49
src/views/index/camp/Homework.vue
src/views/index/camp/Homework.vue
+1
-0
src/views/index/camp/homework/refer.vue
src/views/index/camp/homework/refer.vue
+24
-49
No files found.
src/views/index/camp/Homework.vue
View file @
5462af3d
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
:order_nums=
"order_num"
:order_nums=
"order_num"
:student_status=
"student_status"
:student_status=
"student_status"
@
closeDialog=
"closeDialog"
@
closeDialog=
"closeDialog"
></refer>
></refer>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/index/camp/homework/refer.vue
View file @
5462af3d
...
@@ -252,7 +252,6 @@ export default {
...
@@ -252,7 +252,6 @@ export default {
{
required
:
true
,
validator
:
validateNum
,
trigger
:
"
blur
"
},
{
required
:
true
,
validator
:
validateNum
,
trigger
:
"
blur
"
},
],
],
},
},
titleName
:
""
,
titleName
:
""
,
isUploading
:
false
,
// 图片上传蒙层
isUploading
:
false
,
// 图片上传蒙层
work_context
:
""
,
//简介
work_context
:
""
,
//简介
...
@@ -260,16 +259,13 @@ export default {
...
@@ -260,16 +259,13 @@ export default {
loading
:
false
,
loading
:
false
,
dialogVisible
:
this
.
dialogVisibleFu
,
dialogVisible
:
this
.
dialogVisibleFu
,
dialogVisibleimage
:
false
,
dialogVisibleimage
:
false
,
// stuWork: {}, // 学生-作业
formData
:
{
formData
:
{
teacher_id
:
""
,
teacher_id
:
""
,
stu_answer
:
""
,
stu_answer
:
""
,
stu_enclosure_url
:
""
,
stu_enclosure_url
:
""
,
},
// 老师-评阅结果
},
// 老师-评阅结果
// upLoading: false, // 老师-上传loading
disabled
:
false
,
//限制输入框
disabled
:
false
,
//限制输入框
stu_fileListoss
:
[]
,
// 学生-上传相关附件(展示-存在缓存)
stu_fileListoss
:
""
,
// 学生-上传相关附件(展示-存在缓存)
teaFileList
:
[],
// 老师-布置作业附件
teaFileList
:
[],
// 老师-布置作业附件
fileList
:
[],
//学生上传的作业文件
fileList
:
[],
//学生上传的作业文件
stu_fileList
:
[],
//学生上传的文件(传给接口的格式)
stu_fileList
:
[],
//学生上传的文件(传给接口的格式)
...
@@ -279,6 +275,7 @@ export default {
...
@@ -279,6 +275,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
console
.
log
(
this
.
formData
.
stu_enclosure_url
);
let
code
=
this
.
$store
.
state
.
indexIdentity
;
let
code
=
this
.
$store
.
state
.
indexIdentity
;
let
stu_fileListoss
=
window
.
localStorage
.
getItem
(
let
stu_fileListoss
=
window
.
localStorage
.
getItem
(
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
...
@@ -294,6 +291,7 @@ export default {
...
@@ -294,6 +291,7 @@ export default {
// console.log(this.student_status);
// console.log(this.student_status);
this
.
getTeachList
();
this
.
getTeachList
();
if
(
this
.
student_status
==
0
)
{
if
(
this
.
student_status
==
0
)
{
this
.
formData
=
{};
}
else
if
(
this
.
student_status
==
1
)
{
}
else
if
(
this
.
student_status
==
1
)
{
this
.
getStudentWork
(
this
.
student_status
);
this
.
getStudentWork
(
this
.
student_status
);
}
else
if
(
this
.
student_status
==
2
)
{
}
else
if
(
this
.
student_status
==
2
)
{
...
@@ -370,10 +368,11 @@ export default {
...
@@ -370,10 +368,11 @@ export default {
return
this
.
$message
.
error
(
res
.
data
.
message
);
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
$message
.
success
(
res
.
data
.
message
);
// console.log(res.data.stu_answer);
if
(
student_status
==
1
)
{
if
(
student_status
==
1
)
{
// 学生已提交
// 学生已提交
this
.
formData
.
stu_answer
=
res
.
data
.
data
.
stu_answer
;
this
.
formData
.
stu_answer
=
res
.
data
.
data
.
stu_answer
;
console
.
log
(
res
.
data
.
data
.
stu_answer
);
let
gotfileList
=
res
.
data
.
data
.
stu_enclosure_url_arr
;
let
gotfileList
=
res
.
data
.
data
.
stu_enclosure_url_arr
;
if
(
gotfileList
)
{
if
(
gotfileList
)
{
this
.
stu_fileList
=
gotfileList
.
map
((
item
)
=>
{
this
.
stu_fileList
=
gotfileList
.
map
((
item
)
=>
{
...
@@ -416,14 +415,14 @@ export default {
...
@@ -416,14 +415,14 @@ export default {
// 未完成
// 未完成
notReadHandle
()
{
notReadHandle
()
{
this
.
formData
.
teacher_id
=
this
.
work_nums
;
this
.
formData
.
teacher_id
=
this
.
work_nums
;
if
(
!
this
.
formData
.
stu_enclosure_url
)
{
//
if (!this.formData.stu_enclosure_url) {
delete
this
.
formData
.
stu_enclosure_url
;
//
delete this.formData.stu_enclosure_url;
}
else
{
//
} else {
this
.
formData
.
stu_enclosure_url
=
this
.
stu_fileListoss
;
this
.
formData
.
stu_enclosure_url
=
this
.
stu_fileListoss
;
}
//
}
if
(
!
this
.
formData
.
stu_answer
)
{
//
if (!this.formData.stu_answer) {
delete
this
.
formData
.
stu_answer
;
//
delete this.formData.stu_answer;
}
//
}
console
.
log
(
this
.
stu_fileList
,
"
this.stu_fileList
"
);
console
.
log
(
this
.
stu_fileList
,
"
this.stu_fileList
"
);
// return
// return
subStudentWork
(
this
.
formData
)
subStudentWork
(
this
.
formData
)
...
@@ -439,38 +438,19 @@ export default {
...
@@ -439,38 +438,19 @@ export default {
console
.
log
(
error
);
console
.
log
(
error
);
});
});
},
},
// 待评阅
yiReadHandle
()
{
let
code
=
this
.
$store
.
state
.
indexIdentity
;
this
.
formData
.
teacher_id
=
this
.
work_nums
;
this
.
formData
.
stu_enclosure_url
=
window
.
localStorage
.
getItem
(
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
);
subStudentWork
(
this
.
formData
)
.
then
((
response
)
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
response
.
data
.
message
);
}
this
.
$message
.
success
(
response
.
data
.
message
);
this
.
cancelBtnTrue
();
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
},
// 成功确认取消,关闭弹框,修改父组件的值
// 成功确认取消,关闭弹框,修改父组件的值
cancelBtnTrue
()
{
cancelBtnTrue
()
{
let
code
=
this
.
$store
.
state
.
indexIdentity
;
let
code
=
this
.
$store
.
state
.
indexIdentity
;
window
.
localStorage
.
removeItem
(
window
.
localStorage
.
removeItem
(
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
);
);
this
.
stu_fileList
=
[];
this
.
stu_fileList
=
[];
this
.
stu_fileListoss
=
[];
this
.
fileList
=
[];
this
.
stu_fileListoss
=
""
;
this
.
teaFileList
=
[];
this
.
teaFileList
=
[];
this
.
formData
.
stu_answer
=
""
;
//
this.formData.stu_answer = "";
this
.
$refs
[
"
formRef_stu
"
].
resetFields
();
//
this.$refs["formRef_stu"].resetFields();
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
this
.
$emit
(
"
closeDialog
"
,
this
.
dialogVisible
,
true
);
this
.
$emit
(
"
closeDialog
"
,
this
.
dialogVisible
,
true
);
},
},
...
@@ -480,11 +460,11 @@ export default {
...
@@ -480,11 +460,11 @@ export default {
window
.
localStorage
.
removeItem
(
window
.
localStorage
.
removeItem
(
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
"
student_file_
"
+
window
.
localStorage
.
getItem
(
"
phone
"
+
code
)
+
code
);
);
this
.
stu_fileList
=
[];
this
.
stu_fileList
=
[];
this
.
stu_fileListoss
=
[];
this
.
fileList
=
[];
this
.
stu_fileListoss
=
""
;
this
.
teaFileList
=
[];
this
.
teaFileList
=
[];
this
.
formData
.
stu_answer
=
""
;
//
this.formData.stu_answer = "";
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
this
.
$emit
(
"
closeDialog
"
,
this
.
dialogVisible
,
false
);
this
.
$emit
(
"
closeDialog
"
,
this
.
dialogVisible
,
false
);
},
},
...
@@ -642,14 +622,9 @@ export default {
...
@@ -642,14 +622,9 @@ export default {
this
.
$refs
[
"
formRef_stu
"
].
validate
((
valid
)
=>
{
this
.
$refs
[
"
formRef_stu
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
return
;
if
(
!
valid
)
return
;
console
.
log
(
valid
,
"
valid
"
);
console
.
log
(
valid
,
"
valid
"
);
if
(
this
.
student_status
==
0
)
{
// 未完成
// 未完成
this
.
notReadHandle
();
this
.
notReadHandle
();
}
else
if
(
this
.
student_status
==
1
)
{
// console.log(11111);
// 已完成
this
.
yiReadHandle
();
}
});
});
},
},
},
},
...
...
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