Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cert-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
cert-admin
Commits
51c025f3
提交
51c025f3
authored
7月 14, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
f6f6c2a6
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
27 行增加
和
27 行删除
+27
-27
index.vue
src/pages/course/index.vue
+10
-10
info.vue
src/pages/student/components/info.vue
+1
-0
index.vue
src/pages/student/index.vue
+16
-17
没有找到文件。
src/pages/course/index.vue
浏览文件 @
51c025f3
...
...
@@ -47,11 +47,12 @@
<el-upload
class=
"file-import"
ref=
"upload"
action=
"
/
"
action=
"
#
"
:auto-upload=
"false"
:file-list=
"fileList"
:limit=
"1"
:before-upload=
"beforeUpload"
:http-request=
"fetchFileUpload"
accept=
".xls,.xlsx"
>
<el-button
slot=
"trigger"
size=
"mini"
type=
"primary"
>
选取文件
</el-button>
...
...
@@ -177,28 +178,27 @@ export default {
this
.
$message
.
error
(
'只能上传excel文件'
)
return
false
}
else
{
return
true
}
},
submitUpload
:
_
.
debounce
(
function
()
{
this
.
$refs
.
upload
.
submit
()
},
500
),
fetchFileUpload
(
data
)
{
const
formData
=
new
window
.
FormData
()
formData
.
append
(
'file'
,
file
)
return
new
Promise
((
resolve
,
reject
)
=>
{
formData
.
append
(
'file'
,
data
.
file
)
importCourse
(
formData
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
message
===
'OK'
)
{
this
.
$message
.
success
(
'导入数据成功'
)
resolve
(
true
)
this
.
$refs
.
tabList
.
refetch
()
window
.
setTimeout
(()
=>
{
this
.
dialogVisible
=
false
},
300
)
}
else
{
this
.
$message
.
error
(
res
.
message
||
'导入数据失败,请重选选取文件上传'
)
resolve
(
false
)
}
})
})
}
},
submitUpload
:
_
.
debounce
(
function
()
{
this
.
$refs
.
upload
.
submit
()
},
500
),
handleCommand
(
type
)
{
if
(
type
===
'all'
)
this
.
fetchExportAll
()
},
...
...
src/pages/student/components/info.vue
浏览文件 @
51c025f3
...
...
@@ -233,6 +233,7 @@ export default {
updateStudentInfo
(
this
.
form
.
id
,
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
message
===
'OK'
)
{
this
.
$message
.
success
(
'提交数据成功'
)
this
.
$emit
(
'tableRefetch'
)
}
else
{
this
.
$message
.
error
(
res
.
message
||
'提交数据失败'
)
}
...
...
src/pages/student/index.vue
浏览文件 @
51c025f3
...
...
@@ -47,11 +47,10 @@
:destroy-on-close=
"true"
size=
"1100px"
top=
"15px"
:before-close=
"handleBeforeClose"
@
close=
"handleClose"
>
:before-close=
"handleBeforeClose"
>
<el-tabs
v-model=
"tabsActive"
type=
"card"
>
<el-tab-pane
label=
"基本信息"
name=
"info"
v-if=
"hasViewInfo"
>
<tab-info
:info=
"details"
/>
<tab-info
:info=
"details"
@
tableRefetch=
"tableRefetch"
/>
</el-tab-pane>
<el-tab-pane
label=
"学位信息"
name=
"degree"
v-if=
"hasViewDegree"
>
<tab-degree
:id=
"details.id"
/>
...
...
@@ -76,6 +75,7 @@
:file-list=
"fileList"
:limit=
"1"
:before-upload=
"beforeUpload"
:http-request=
"fetchFileUpload"
accept=
".xls,.xlsx"
>
<el-button
slot=
"trigger"
size=
"mini"
type=
"primary"
>
选取文件
</el-button>
...
...
@@ -221,7 +221,6 @@ export default {
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
item
=>
item
.
id
)
},
handleImport
()
{},
handleRemove
()
{
this
.
$confirm
(
'确定删除选中项?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -238,8 +237,6 @@ export default {
this
.
$message
.
error
(
'您没有权限查看详情'
)
}
},
handleClose
()
{
},
handleDialogClose
()
{
this
.
fileList
=
[]
},
...
...
@@ -249,29 +246,28 @@ export default {
this
.
$message
.
error
(
'只能上传excel文件'
)
return
false
}
else
{
return
true
}
},
submitUpload
:
_
.
debounce
(
function
()
{
this
.
$refs
.
upload
.
submit
()
},
500
),
fetchFileUpload
(
data
)
{
const
formData
=
new
window
.
FormData
()
formData
.
append
(
'type'
,
this
.
importType
)
formData
.
append
(
'file'
,
file
)
return
new
Promise
((
resolve
,
reject
)
=>
{
formData
.
append
(
'file'
,
data
.
file
)
importStudents
(
formData
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
message
===
'OK'
)
{
this
.
$message
.
success
(
'导入数据成功'
)
resolve
(
true
)
this
.
$refs
.
tabList
.
refetch
()
this
.
tableRefetch
()
window
.
setTimeout
(()
=>
{
this
.
dialogVisible
=
false
},
300
)
}
else
{
this
.
$message
.
error
(
res
.
message
||
'导入数据失败,请重选选取文件上传'
)
resolve
(
false
)
}
})
})
}
},
submitUpload
:
_
.
debounce
(
function
()
{
this
.
$refs
.
upload
.
submit
()
},
500
),
handleBeforeClose
(
done
)
{
if
(
this
.
hasSaveCourse
)
{
this
.
$confirm
(
'您已确认保存好修改的数据,并关闭弹框吗?'
,
'提示'
,
{
...
...
@@ -301,11 +297,14 @@ export default {
deleteStudent
(
ids
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
message
===
'OK'
)
{
this
.
$message
.
success
(
'删除学员成功'
)
this
.
$refs
.
tabList
.
r
efetch
()
this
.
tableR
efetch
()
}
else
{
this
.
$message
.
error
(
'删除学员失败'
)
}
})
},
tableRefetch
()
{
this
.
$refs
.
tabList
.
refetch
()
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论