Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
school-paper-admin-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
school-paper
school-paper-admin-front
Commits
ae1b32f4
Commit
ae1b32f4
authored
Jul 31, 2023
by
H.wb.wang.peixun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审阅批卷页面对接
parent
e03b4576
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
172 additions
and
55 deletions
+172
-55
src/api/school-paper/testPaper.js
+4
-3
src/api/school-paper/testPaperRecord.js
+20
-5
src/components/FileUpload/index.vue
+15
-19
src/components/ImageUpload/index.vue
+12
-28
src/views/school-paper/testPaper/index.vue
+0
-0
src/views/school-paper/testPaperRecord/components/treeselect.vue
+121
-0
src/views/school-paper/testPaperRecord/index.vue
+0
-0
No files found.
src/api/school-paper/testPaper.js
View file @
ae1b32f4
...
...
@@ -10,10 +10,11 @@ export function listTestPaper(query) {
}
// 查询试卷详细
export
function
getTestPaper
(
id
)
{
export
function
getTestPaper
(
query
)
{
return
request
({
url
:
'/school-paper/testPaper/'
+
id
,
method
:
'get'
url
:
'/school-paper/questionBankTestPaper/list'
,
method
:
'get'
,
params
:
query
})
}
// 新增试卷
...
...
src/api/school-paper/testPaperRecord.js
View file @
ae1b32f4
...
...
@@ -17,10 +17,11 @@ export function listgetClassList(query) {
})
}
// 查询答题记录详细
export
function
getTestPaperRecord
(
id
)
{
export
function
getTestPaperRecord
(
query
)
{
return
request
({
url
:
'/school-paper/testPaperRecord/'
+
id
,
method
:
'get'
url
:
'/school-paper/testPaperRecordDetail/getStudentAnswerRecordList'
,
method
:
'get'
,
params
:
query
})
}
...
...
@@ -36,12 +37,26 @@ export function addTestPaperRecord(data) {
// 修改答题记录
export
function
updateTestPaperRecord
(
data
)
{
return
request
({
url
:
'/school-paper/testPaperRecord'
,
url
:
'/school-paper/testPaperRecord
Detail
'
,
method
:
'put'
,
data
:
data
})
}
// 批卷完成
// export function completeReadOver(query) {
// return request({
// url: '',
// method: 'get',
// data: query
// })
// }
export
function
completeReadOver
(
query
)
{
return
request
({
url
:
'/school-paper/testPaperRecord/completeReadOver'
,
method
:
'get'
,
params
:
query
})
}
// 删除答题记录
export
function
delTestPaperRecord
(
id
)
{
return
request
({
...
...
src/components/FileUpload/index.vue
View file @
ae1b32f4
<
template
>
<div
class=
"upload-file"
>
<el-upload
multiple
:action=
"uploadFileUrl"
:before-upload=
"handleBeforeUpload"
:file-list=
"fileList"
:limit=
"limit"
:on-error=
"handleUploadError"
:on-exceed=
"handleExceed"
:on-success=
"handleUploadSuccess"
:show-file-list=
"false"
:headers=
"headers"
class=
"upload-file-uploader"
ref=
"fileUpload"
>
<el-upload
multiple
:action=
"uploadFileUrl"
:before-upload=
"handleBeforeUpload"
:file-list=
"fileList"
:limit=
"limit"
:on-error=
"handleUploadError"
:on-exceed=
"handleExceed"
:on-success=
"handleUploadSuccess"
:show-file-list=
"false"
:headers=
"headers"
:disabled=
"disabled"
class=
"upload-file-uploader"
ref=
"fileUpload"
>
<!-- 上传按钮 -->
<el-button
size=
"mini"
type=
"primary"
>
选取文件
</el-button>
<!-- 上传提示 -->
...
...
@@ -31,7 +20,7 @@
<el-link
:href=
"`${file.url}`"
:underline=
"false"
target=
"_blank"
>
<span
class=
"el-icon-document"
>
{{ getFileName(file.name) }}
</span>
</el-link>
<div
class=
"ele-upload-list__item-content-action"
>
<div
class=
"ele-upload-list__item-content-action"
v-if=
"!disabled"
>
<el-link
:underline=
"false"
@
click=
"handleDelete(index)"
type=
"danger"
>
删除
</el-link>
</div>
</li>
...
...
@@ -67,6 +56,10 @@ export default {
isShowTip
:
{
type
:
Boolean
,
default
:
true
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
...
...
@@ -100,11 +93,11 @@ export default {
}
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
(
item
=>
{
item
=
{
url
:
item
.
url
,
name
:
item
.
name
};
item
=
{
url
:
item
.
url
,
name
:
item
.
name
};
// item.uid = item.uid || new Date().getTime() + temp++;
return
item
;
});
console
.
log
(
this
.
fileList
,
'fileList---------'
)
console
.
log
(
this
.
fileList
,
'fileList---------'
)
}
else
{
this
.
fileList
=
[];
return
[];
...
...
@@ -157,7 +150,7 @@ export default {
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
this
.
uploadList
.
push
({
name
:
res
.
data
.
originalFilename
,
url
:
res
.
data
.
url
});
this
.
uploadList
.
push
({
name
:
res
.
data
.
originalFilename
,
url
:
res
.
data
.
url
});
this
.
uploadedSuccessfully
();
}
else
{
this
.
number
--
;
...
...
@@ -186,7 +179,7 @@ export default {
},
// 获取文件名称
getFileName
(
name
)
{
console
.
log
(
name
,
'==========='
)
console
.
log
(
name
,
'==========='
)
// 如果是url那么取最后的名字 如果不是直接返回
if
(
name
.
lastIndexOf
(
"/"
)
>
-
1
)
{
return
name
.
slice
(
name
.
lastIndexOf
(
"/"
)
+
1
);
...
...
@@ -211,18 +204,21 @@ export default {
.upload-file-uploader
{
margin-bottom
:
5px
;
}
.upload-file-list
.el-upload-list__item
{
border
:
1px
solid
#e4e7ed
;
line-height
:
2
;
margin-bottom
:
10px
;
position
:
relative
;
}
.upload-file-list
.ele-upload-list__item-content
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
color
:
inherit
;
}
.ele-upload-list__item-content-action
.el-link
{
margin-right
:
10px
;
}
...
...
src/components/ImageUpload/index.vue
View file @
ae1b32f4
<
template
>
<div
class=
"component-upload-image"
>
<el-upload
multiple
:action=
"uploadImgUrl"
list-type=
"picture-card"
:on-success=
"handleUploadSuccess"
:before-upload=
"handleBeforeUpload"
:limit=
"limit"
:on-error=
"handleUploadError"
:on-exceed=
"handleExceed"
ref=
"imageUpload"
:on-remove=
"handleDelete"
:show-file-list=
"true"
:headers=
"headers"
:file-list=
"fileList"
:on-preview=
"handlePictureCardPreview"
:class=
"
{ hide: this.fileList.length >= this.limit }"
>
<el-upload
multiple
:action=
"uploadImgUrl"
list-type=
"picture-card"
:on-success=
"handleUploadSuccess"
:before-upload=
"handleBeforeUpload"
:limit=
"limit"
:on-error=
"handleUploadError"
:on-exceed=
"handleExceed"
ref=
"imageUpload"
:on-remove=
"handleDelete"
:show-file-list=
"true"
:headers=
"headers"
:file-list=
"fileList"
:disabled=
"disabled"
:on-preview=
"handlePictureCardPreview"
:class=
"
{ hide: this.fileList.length >= this.limit }">
<i
class=
"el-icon-plus"
></i>
</el-upload>
...
...
@@ -32,16 +19,8 @@
的文件
</div>
<el-dialog
:visible
.
sync=
"dialogVisible"
title=
"预览"
width=
"800"
append-to-body
>
<img
:src=
"dialogImageUrl"
style=
"display: block; max-width: 100%; margin: 0 auto"
/>
<el-dialog
:visible
.
sync=
"dialogVisible"
title=
"预览"
width=
"800"
append-to-body
>
<img
:src=
"dialogImageUrl"
style=
"display: block; max-width: 100%; margin: 0 auto"
/>
</el-dialog>
</div>
</template>
...
...
@@ -73,6 +52,10 @@ export default {
type
:
Boolean
,
default
:
true
,
},
disabled
:
{
type
:
Boolean
,
default
:
false
,
}
},
data
()
{
return
{
...
...
@@ -206,7 +189,7 @@ export default {
},
// 删除图片
handleDelete
(
file
)
{
console
.
log
(
file
,
'文件'
)
console
.
log
(
file
,
'文件'
)
const
findex
=
this
.
fileList
.
map
((
f
)
=>
f
.
url
).
indexOf
(
file
.
url
);
if
(
findex
>
-
1
)
{
this
.
fileList
.
splice
(
findex
,
1
);
...
...
@@ -266,6 +249,7 @@ export default {
::v-deep
.hide
.el-upload--picture-card
{
display
:
none
;
}
//
去掉动画效果
::v-deep
.el-list-enter-active
,
::v-deep
.el-list-leave-active
{
...
...
src/views/school-paper/testPaper/index.vue
View file @
ae1b32f4
This diff is collapsed.
Click to expand it.
src/views/school-paper/testPaperRecord/components/treeselect.vue
0 → 100644
View file @
ae1b32f4
<
template
>
<!--
<div
class=
"main"
>
<div
class=
"tree"
>
-->
<Treeselect
v-model=
"value"
:options=
"options"
:placeholder=
"'请选择人员'"
:multiple=
"multiple"
@
input=
"treeSelectInput"
@
select=
"treeSelectChange"
@
deselect=
"treeSelectDeselect"
@
search-change=
"treeSelectSearch"
@
open=
"treeSelectOpen"
@
close=
"treeSelectClose"
/>
<!--
</div>
</div>
-->
</
template
>
<
script
>
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
resetUserPwd
,
changeUserStatus
,
deptTreeSelect
}
from
"@/api/system/user"
;
// import treeData from './data/tree'
export
default
{
data
()
{
return
{
value
:
null
,
options
:
[]
}
},
props
:{
multiple
:{
type
:
false
}
},
components
:
{
Treeselect
},
mounted
(){
// 延迟模拟请求数据
setTimeout
(()
=>
{
// this.options = treeData
// this.value = [ "1682295245318119426", "1682295184152584194"] // 测试回显操作
},
300
)
this
.
getDeptTree
()
},
methods
:{
/** 查询部门下拉树结构 */
getDeptTree
()
{
deptTreeSelect
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
});
},
// 选中触发(第一次回显的时候会触发,清除值的时候会触发, value值为undefined) input事件用于v-model双向绑定组件更新父组件值
treeSelectInput
(
value
,
instanceId
)
{
console
.
log
(
value
,
'input事件'
)
console
.
log
(
this
.
value
,
'this.value -- input'
)
// 这个不需要 延迟
},
// 选中触发(清除值的时候不会触发)
treeSelectChange
(
raw
,
instanceId
)
{
console
.
log
(
raw
,
'当前的对象'
)
let
self
=
this
setTimeout
(()
=>
{
// 如果用到this.value 需要setTimeout延迟一下拿到最新的值
console
.
log
(
this
.
value
,
'this.value -- select'
)
if
(
!
this
.
multiple
)
{
if
(
raw
.
children
==
undefined
)
{
}
else
{
if
(
self
.
value
==
raw
.
id
)
{
self
.
value
=
null
}
}
}
})
},
// 移除选项时触发 当设置multiple为true时生效 raw为当前移除的对象
treeSelectDeselect
(
raw
,
instanceId
)
{
console
.
log
(
raw
,
'deselect-->>'
)
},
// 搜索
treeSelectSearch
(
searchQuery
,
instanceId
)
{
console
.
log
(
searchQuery
,
'当前搜索的值'
)
},
// 展开触发
treeSelectOpen
(
instanceId
)
{
console
.
log
(
'展开了'
)
},
// 关闭触发
treeSelectClose
(
value
,
instanceId
)
{
console
.
log
(
value
,
'当前的value值'
)
},
// 字段默认 id label 用于规范化数据源
tenantIdnormalizer
(
node
,
instanceId
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
delete
node
.
children
}
return
{
id
:
node
.
id
,
label
:
node
.
title
,
children
:
node
.
children
}
}
}
}
</
script
>
<
style
scoped
>
.main
{
width
:
100%
;
height
:
100%
;
padding
:
60px
0
0
200px
;
}
.main
.tree
{
width
:
240px
;
height
:
40px
;
}
::v-deep
.vue-treeselect__label
{
color
:
#606266
;
}
</
style
>
\ No newline at end of file
src/views/school-paper/testPaperRecord/index.vue
View file @
ae1b32f4
This diff is collapsed.
Click to expand it.
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