Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-fdc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
admin-fdc
Commits
38502e73
提交
38502e73
authored
5月 09, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 证书管理支持导出
上级
678f4fb6
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
38 行增加
和
46 行删除
+38
-46
api.js
src/modules/school/cert/api.js
+9
-2
List.vue
src/modules/school/cert/views/List.vue
+21
-28
Update.vue
src/modules/school/student/views/Update.vue
+2
-2
Update.vue
src/modules/school/teacher/views/Update.vue
+2
-2
axios.js
src/utils/axios.js
+4
-12
没有找到文件。
src/modules/school/cert/api.js
浏览文件 @
38502e73
import
httpRequest
from
'@/utils/axios'
import
httpRequest
from
'@/utils/axios'
/**
/**
* 获取
课程
列表
* 获取
证书
列表
*/
*/
export
function
getCertList
(
params
)
{
export
function
getCertList
(
params
)
{
return
httpRequest
.
get
(
'/api/zy-admin/school/certificate/list'
,
{
params
})
return
httpRequest
.
get
(
'/api/zy-admin/school/certificate/list'
,
{
params
})
}
}
/**
/**
* 获取
课程列表
* 获取
证书详情
*/
*/
export
function
getCertDetails
(
params
)
{
export
function
getCertDetails
(
params
)
{
return
httpRequest
.
get
(
'/api/zy-admin/school/certificate/view'
,
{
params
})
return
httpRequest
.
get
(
'/api/zy-admin/school/certificate/view'
,
{
params
})
}
}
/**
* 导出证书列表
*/
export
function
exportCertList
(
params
)
{
return
httpRequest
.
get
(
'/api/zy-admin/school/certificate/download'
,
{
params
,
headers
:
{
responseType
:
'blob'
}
})
}
src/modules/school/cert/views/List.vue
浏览文件 @
38502e73
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
<el-button
type=
"primary"
size=
"mini"
plain
>
查看
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
>
查看
</el-button>
</router-link>
</router-link>
</
template
>
</
template
>
<div
class=
"buttons"
>
<a
:href=
"exportUrl"
download
target=
"_blank"
>
<el-button
type=
"primary"
icon=
"el-icon-download"
>
导出
</el-button>
</a>
<span
style=
"font-size: 12px; padding: 0 10px; color: #606266"
>
导出当前搜索结果
</span>
</div>
</app-list>
</app-list>
</app-card>
</app-card>
</template>
</template>
...
@@ -31,22 +37,22 @@
...
@@ -31,22 +37,22 @@
<
script
>
<
script
>
import
AppClassSelect
from
'@/components/base/AppClassSelect.vue'
import
AppClassSelect
from
'@/components/base/AppClassSelect.vue'
import
{
getCertList
}
from
'../api'
import
{
getCertList
}
from
'../api'
import
queryString
from
'query-string'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isShowDialog
:
false
,
listParams
:
{}
info
:
{}
}
}
},
},
components
:
{
components
:
{
AppClassSelect
},
AppClassSelect
},
computed
:
{
computed
:
{
// 列表配置
// 列表配置
tableOptions
()
{
tableOptions
()
{
return
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getCertList
,
httpRequest
:
getCertList
,
beforeRequest
:
this
.
beforeRequest
,
params
:
{
personal_name
:
''
,
class_id
:
''
,
has_certificate
:
''
}
params
:
{
personal_name
:
''
,
class_id
:
''
,
has_certificate
:
''
}
},
},
filters
:
[
filters
:
[
...
@@ -57,6 +63,7 @@ export default {
...
@@ -57,6 +63,7 @@ export default {
columns
:
[
columns
:
[
{
label
:
'姓名'
,
align
:
'center'
,
prop
:
'personal_name'
},
{
label
:
'姓名'
,
align
:
'center'
,
prop
:
'personal_name'
},
{
label
:
'所属班级'
,
align
:
'center'
,
prop
:
'class_name'
},
{
label
:
'所属班级'
,
align
:
'center'
,
prop
:
'class_name'
},
{
label
:
'所属机构'
,
align
:
'center'
,
prop
:
'organization_name'
},
{
{
label
:
'是否取证'
,
label
:
'是否取证'
,
align
:
'center'
,
align
:
'center'
,
...
@@ -68,32 +75,18 @@ export default {
...
@@ -68,32 +75,18 @@ export default {
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'center'
,
width
:
'220'
,
fixed
:
'right'
}
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'center'
,
width
:
'220'
,
fixed
:
'right'
}
]
]
}
}
},
// 导出地址
exportUrl
()
{
const
query
=
queryString
.
stringify
(
this
.
listParams
)
return
import
.
meta
.
env
.
VITE_BASE_URL
+
'/api/zy-admin/school/certificate/download?'
+
query
}
}
},
},
methods
:
{
methods
:
{
handleAdd
()
{
beforeRequest
(
params
)
{
this
.
isShowDialog
=
true
this
.
listParams
=
{
...
params
}
this
.
info
=
null
return
params
},
}
onDetails
(
row
)
{
console
.
log
(
row
)
},
onEdit
(
row
)
{
this
.
isShowDialog
=
true
this
.
info
=
row
},
// 删除课程
onRemove
(
row
)
{
this
.
$confirm
(
'你确定要删除此项吗'
,
'确认提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
// 调用删除接口
this
.
delTeach
(
row
)
})
},
delTeach
(
row
)
{}
}
}
}
}
</
script
>
</
script
>
src/modules/school/student/views/Update.vue
浏览文件 @
38502e73
<
template
>
<
template
>
<
el
-card>
<
app
-card>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<!-- 姓名 -->
<!-- 姓名 -->
<el-form-item
label=
"姓名"
prop=
"personal_name"
>
<el-form-item
label=
"姓名"
prop=
"personal_name"
>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<el-button
type=
"primary"
@
click=
"submit"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
提交
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</
el
-card>
</
app
-card>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/modules/school/teacher/views/Update.vue
浏览文件 @
38502e73
<
template
>
<
template
>
<
el
-card>
<
app
-card>
<el-form
:model=
"form"
label-width=
"120px"
ref=
"form"
:rules=
"rules"
>
<el-form
:model=
"form"
label-width=
"120px"
ref=
"form"
:rules=
"rules"
>
<!-- 姓名 -->
<!-- 姓名 -->
<el-form-item
label=
"姓名"
prop=
"personal_name"
>
<el-form-item
label=
"姓名"
prop=
"personal_name"
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<el-button
type=
"primary"
@
click=
"submit"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
提交
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</
el
-card>
</
app
-card>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/utils/axios.js
浏览文件 @
38502e73
...
@@ -49,20 +49,12 @@ httpRequest.interceptors.request.use(
...
@@ -49,20 +49,12 @@ httpRequest.interceptors.request.use(
httpRequest
.
interceptors
.
response
.
use
(
httpRequest
.
interceptors
.
response
.
use
(
function
(
response
)
{
function
(
response
)
{
const
{
data
}
=
response
const
{
data
}
=
response
// 正常返回
// 请求失败
if
(
data
.
code
===
0
)
{
if
(
data
.
code
===
1
)
{
return
data
}
// 下载excel流
if
(
data
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
)
{
return
data
}
// 获取阿里视频地址
if
(
data
.
video
)
{
return
data
}
Message
({
message
:
data
.
message
||
data
.
msg
,
type
:
'error'
})
Message
({
message
:
data
.
message
||
data
.
msg
,
type
:
'error'
})
return
Promise
.
reject
(
data
)
return
Promise
.
reject
(
data
)
}
return
data
},
},
function
(
error
)
{
function
(
error
)
{
if
(
error
.
response
)
{
if
(
error
.
response
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论