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
e383d507
Commit
e383d507
authored
Feb 21, 2023
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改】查看和提交作业(用户端)
parent
adef92ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
33 deletions
+42
-33
src/views/index/camp/homework/refer.vue
src/views/index/camp/homework/refer.vue
+42
-33
No files found.
src/views/index/camp/homework/refer.vue
View file @
e383d507
...
@@ -315,6 +315,7 @@
...
@@ -315,6 +315,7 @@
teacher_commment
:
""
,
//老师评语
teacher_commment
:
""
,
//老师评语
tea_scoreFileList
:
[],
//老师评语的附件
tea_scoreFileList
:
[],
//老师评语的附件
srcList
:
[],
//在线预览图片-放大
srcList
:
[],
//在线预览图片-放大
fileList
:
[],
//传给后端的url
};
};
},
},
created
()
{
created
()
{
...
@@ -432,8 +433,14 @@
...
@@ -432,8 +433,14 @@
type
:
item
.
type
,
type
:
item
.
type
,
};
};
});
});
//
this
.
fileList
=
gotfileList
.
map
((
item
)
=>
{
return
{
url_open
:
item
.
url_open
,
};
});
console
.
log
(
this
.
stu_fileList
);
console
.
log
(
this
.
stu_fileList
);
console
.
log
(
this
.
fileList
);
}
}
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
else
if
(
student_status
==
2
)
{
}
else
if
(
student_status
==
2
)
{
...
@@ -468,33 +475,7 @@
...
@@ -468,33 +475,7 @@
}
}
});
});
},
},
// 未完成
notReadHandle
()
{
this
.
formData
.
teacher_id
=
this
.
work_nums
;
// if (!this.formData.stu_enclosure_url) {
// delete this.formData.stu_enclosure_url;
// } else {
this
.
formData
.
stu_enclosure_url
=
this
.
stu_enclosure_url
+
'
,
'
+
this
.
stu_fileListoss
;
// console.log(this.formData.stu_enclosure_url , "this.formData.stu_enclosure_url ");
// }
// if (!this.formData.stu_answer) {
// delete this.formData.stu_answer;
// }
// console.log(this.stu_fileList, "this.stu_fileList");
// return
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
;
...
@@ -585,13 +566,16 @@
...
@@ -585,13 +566,16 @@
savefile
:
res
.
data
.
config
.
savefile
,
savefile
:
res
.
data
.
config
.
savefile
,
name
:
res
.
data
.
config
.
savefile
.
split
(
"
/work/
"
)[
1
],
name
:
res
.
data
.
config
.
savefile
.
split
(
"
/work/
"
)[
1
],
};
};
this
.
stu_fileList
.
push
(
obj
);
console
.
log
(
this
.
stu_fileList
,
"
this.stu_fileList
"
);
console
.
log
(
this
.
stu_fileList
,
"
this.stu_fileList
"
);
this
.
stu_fileList
.
push
(
obj
);
this
.
fileList
.
push
(
obj
);
console
.
log
(
this
.
fileList
,
'
this.fileList
'
)
this
.
stu_fileListoss
=
this
.
stu_fileList
this
.
stu_fileListoss
=
this
.
stu_fileList
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
return
item
.
url_open
;
return
item
.
url_open
;
})
})
.
join
(
"
,
"
);
.
join
(
"
,
"
);
console
.
log
(
this
.
stu_fileListoss
,
"
stu_fileListoss
"
);
console
.
log
(
this
.
stu_fileListoss
,
"
stu_fileListoss
"
);
// this.formData.stu_enclosure_url = this.stu_fileListoss;
// this.formData.stu_enclosure_url = this.stu_fileListoss;
let
code
=
this
.
$store
.
state
.
indexIdentity
;
let
code
=
this
.
$store
.
state
.
indexIdentity
;
...
@@ -650,16 +634,14 @@
...
@@ -650,16 +634,14 @@
return
this
.
$message
.
error
(
res
.
data
.
message
);
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
console
.
log
(
this
.
stu_fileList
);
console
.
log
(
this
.
stu_fileList
);
console
.
log
(
this
.
fileList
);
// console.log(this.stu_fileListoss);
// console.log(this.stu_fileListoss);
this
.
stu_fileList
.
forEach
((
item
,
idx
)
=>
{
this
.
stu_fileList
.
forEach
((
item
,
idx
)
=>
{
// console.log(idx, "idx");
// console.log(idx, "idx");
console
.
log
(
111111
);
console
.
log
(
item
.
url
);
console
.
log
(
file
.
url
);
// return
console
.
log
(
item
.
url
==
file
.
url
);
console
.
log
(
item
.
url
==
file
.
url
);
if
(
item
.
url
==
file
.
url
)
{
if
(
item
.
url
==
file
.
url
)
{
this
.
stu_fileList
.
splice
(
idx
,
1
);
this
.
stu_fileList
.
splice
(
idx
,
1
);
this
.
fileList
.
splice
(
idx
,
1
);
let
code
=
this
.
$store
.
state
.
indexIdentity
;
let
code
=
this
.
$store
.
state
.
indexIdentity
;
this
.
stu_fileListoss
=
this
.
stu_fileList
this
.
stu_fileListoss
=
this
.
stu_fileList
.
map
(
function
(
item
,
index
)
{
.
map
(
function
(
item
,
index
)
{
...
@@ -726,6 +708,33 @@
...
@@ -726,6 +708,33 @@
.
catch
((
_
)
=>
{
.
catch
((
_
)
=>
{
});
});
},
},
// 未完成
notReadHandle
()
{
this
.
formData
.
teacher_id
=
this
.
work_nums
;
// console.log(this.fileList)
this
.
formData
.
stu_enclosure_url
=
this
.
fileList
.
map
((
item
)
=>
{
return
item
.
url_open
;
})
.
join
(
"
,
"
);
console
.
log
(
this
.
formData
.
stu_enclosure_url
)
subStudentWork
(
this
.
formData
)
.
then
((
response
)
=>
{
// console.log(response);
//作业无修改
if
(
response
.
data
.
code
==
4000343
)
{
this
.
cancelBtn
()
return
this
.
$message
.
error
(
response
.
data
.
message
);
}
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
);
});
},
// 提交按钮
// 提交按钮
confirm
()
{
confirm
()
{
if
(
this
.
stu_fileList
.
length
==
0
)
{
if
(
this
.
stu_fileList
.
length
==
0
)
{
...
...
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