Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-fdc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
admin-fdc
Commits
62ecdbc8
提交
62ecdbc8
authored
2月 23, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
49106656
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
66 行增加
和
45 行删除
+66
-45
Aside.vue
src/components/layout/Aside.vue
+3
-3
List.vue
src/modules/audit/myAudit/views/List.vue
+1
-1
List.vue
src/modules/school/cert/views/List.vue
+1
-1
StudentList.vue
src/modules/school/class/components/StudentList.vue
+2
-2
TeachList.vue
src/modules/school/class/components/TeachList.vue
+1
-1
List.vue
src/modules/school/class/views/List.vue
+4
-4
Details.vue
src/modules/school/course/views/Details.vue
+1
-1
List.vue
src/modules/school/course/views/List.vue
+1
-1
List.vue
src/modules/school/exam/views/List.vue
+1
-1
ImportStudent.vue
src/modules/school/student/components/ImportStudent.vue
+1
-1
List.vue
src/modules/school/student/views/List.vue
+13
-5
ImportTeacher.vue
src/modules/school/teacher/components/ImportTeacher.vue
+1
-1
List.vue
src/modules/school/teacher/views/List.vue
+13
-5
index.js
src/store/index.js
+4
-5
axios.js
src/utils/axios.js
+1
-1
beforeEnter.js
src/utils/beforeEnter.js
+2
-2
directives.js
src/utils/directives.js
+16
-10
没有找到文件。
src/components/layout/Aside.vue
浏览文件 @
62ecdbc8
...
...
@@ -3,18 +3,18 @@
<nav
class=
"nav"
>
<el-menu
:default-active=
"defaultActive"
:router=
"true"
>
<template
v-for=
"item in menuList"
>
<el-submenu
:index=
"item.path"
:key=
"item.path"
v-if=
"item.children"
v-
has
=
"item.tag"
>
<el-submenu
:index=
"item.path"
:key=
"item.path"
v-if=
"item.children"
v-
permission
=
"item.tag"
>
<template
#
title
><i
:class=
"item.icon"
></i>
{{
item
.
name
}}
</
template
>
<el-menu-item
:index=
"subitem.path"
v-for=
"subitem in item.children"
:key=
"subitem.path"
v-
has
=
"subitem.tag"
v-
permission
=
"subitem.tag"
>
{{ subitem.name }}
</el-menu-item>
</el-submenu>
<el-menu-item
:index=
"item.path"
:key=
"item.path"
v-
has
=
"item.tag"
v-else
>
<el-menu-item
:index=
"item.path"
:key=
"item.path"
v-
permission
=
"item.tag"
v-else
>
<i
:class=
"item.icon"
></i>
{{ item.name }}
</el-menu-item>
</template>
...
...
src/modules/audit/myAudit/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -30,7 +30,7 @@
>
</
template
>
<
template
#
footer
>
<div
v-if=
"tabActive === '0'"
v-
has
=
"'menu_lobby_multi_pass'"
>
<div
v-if=
"tabActive === '0'"
v-
permission
=
"'menu_lobby_multi_pass'"
>
已选中
{{
multipleSelection
.
length
}}
项
<el-button
style=
"margin-left: 15px"
size=
"mini"
:disabled=
"!multipleSelection.length"
@
click=
"fetchMultiPass"
>
一键通过
</el-button
...
...
src/modules/school/cert/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -19,7 +19,7 @@
<
template
v-slot:table-x=
"{ row }"
>
<router-link
:to=
"
{ path: '/school/cert/details', query: { id: row.student_id, name: row.personal_name } }"
v-
has
="'menu_certificate_view'"
v-
permission
="'menu_certificate_view'"
>
<el-button
type=
"primary"
size=
"mini"
plain
>
查看
</el-button>
</router-link>
...
...
src/modules/school/class/components/StudentList.vue
浏览文件 @
62ecdbc8
...
...
@@ -2,7 +2,7 @@
<!-- 学员 -->
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
#
header-aside
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"addStudent"
v-
has
=
"'menu_class_add_student'"
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"addStudent"
v-
permission
=
"'menu_class_add_student'"
>
添加
</el-button
>
<el-button
...
...
@@ -10,7 +10,7 @@
icon=
"el-icon-upload2"
style=
"margin-left: 20px"
@
click=
"importStudent"
v-
has
=
"'menu_class_import_student'"
v-
permission
=
"'menu_class_import_student'"
>
导入
</el-button
>
</
template
>
...
...
src/modules/school/class/components/TeachList.vue
浏览文件 @
62ecdbc8
<
template
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
#
header-aside
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"addTeacher"
v-
has
=
"'menu_class_add_teacher'"
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"addTeacher"
v-
permission
=
"'menu_class_add_teacher'"
>
添加
</el-button
>
</
template
>
...
...
src/modules/school/class/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -2,13 +2,13 @@
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
#
header-aside
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"onCreate"
v-
has
=
"'menu_class_add'"
>
新建
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"onCreate"
v-
permission
=
"'menu_class_add'"
>
新建
</el-button>
</
template
>
<
template
v-slot:table-x=
"{ row }"
>
<router-link
:to=
"
{ path: 'class/view', query: { id: row.id } }" v-
has
="'menu_class_view'">
<router-link
:to=
"
{ path: 'class/view', query: { id: row.id } }" v-
permission
="'menu_class_view'">
<el-button
type=
"primary"
style=
"margin-left: 10px"
size=
"mini"
plain
>
管理
</el-button>
</router-link>
<router-link
:to=
"
{ path: 'class/update', query: { id: row.id } }" v-
has
="'menu_class_update'">
<router-link
:to=
"
{ path: 'class/update', query: { id: row.id } }" v-
permission
="'menu_class_update'">
<el-button
type=
"success"
style=
"margin-left: 10px"
size=
"mini"
plain
>
更新
</el-button>
</router-link>
<el-button
...
...
@@ -17,7 +17,7 @@
size=
"mini"
plain
@
click=
"onRemove(row)"
v-
has
=
"'menu_class_delete'"
v-
permission
=
"'menu_class_delete'"
>
删除
</el-button
>
</
template
>
...
...
src/modules/school/course/views/Details.vue
浏览文件 @
62ecdbc8
...
...
@@ -17,7 +17,7 @@
</
template
>
<div
class=
"item"
v-for=
"(it, idx) in item.children"
:key=
"idx"
>
<
template
v-if=
"it.type === 2"
>
<i
class=
"el-icon-video-play"
@
click=
"fetchVideoUrl(it)"
v-
has
=
"'menu_course_video'"
></i>
<i
class=
"el-icon-video-play"
@
click=
"fetchVideoUrl(it)"
v-
permission
=
"'menu_course_video'"
></i>
</
template
>
<p>
<span
@
click=
"fetchVideoUrl(it)"
>
{{ it.name }}
</span>
...
...
src/modules/school/course/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -14,7 +14,7 @@
</el-popover>
</
template
>
<
template
v-slot:table-x=
"{ row }"
>
<router-link
:to=
"
{ path: '/school/course/details', query: { id: row.id } }" v-
has
="'menu_course_view'">
<router-link
:to=
"
{ path: '/school/course/details', query: { id: row.id } }" v-
permission
="'menu_course_view'">
<el-button
type=
"primary"
size=
"mini"
plain
>
查看
</el-button>
</router-link>
<el-button
@
click=
"handleUpdate(row)"
type=
"success"
size=
"mini"
plain
style=
"margin-left: 10px"
...
...
src/modules/school/exam/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -5,7 +5,7 @@
<
template
v-slot:table-x=
"{ row }"
>
<router-link
:to=
"
{ path: '/school/exam/details', query: { id: row.id, title: row.paper_title } }"
v-
has
="'menu_examination_sheet_list'"
v-
permission
="'menu_examination_sheet_list'"
>
<el-button
type=
"primary"
size=
"mini"
plain
>
查看
</el-button>
</router-link>
...
...
src/modules/school/student/components/ImportStudent.vue
浏览文件 @
62ecdbc8
...
...
@@ -18,7 +18,7 @@
</el-upload>
<div
style=
"margin-bottom: 10px; text-align: center"
>
导入模板下载:
<a
href=
"https://webapp-pub.ezijing.com/
website/prod/fd-admin/%E4%BA%BA
%E5%91%98%E6%A8%A1%E6%9D%BF.xlsx"
href=
"https://webapp-pub.ezijing.com/
x-training-new/%E5%AD%A6
%E5%91%98%E6%A8%A1%E6%9D%BF.xlsx"
download=
"人员模板"
><el-button
type=
"text"
>
person_import.xlsx
</el-button></a
>
...
...
src/modules/school/student/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -3,7 +3,12 @@
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template>
<el-row
style=
"margin-bottom: 20px"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"add"
v-has=
"'menu_school_students_add'"
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"add"
v-permission=
"'menu_school_students_add'"
>
新建
</el-button
>
<el-button
...
...
@@ -12,7 +17,7 @@
style=
"margin-left: 20px"
@
click=
"imports"
size=
"mini"
v-
has
=
"'menu_school_students_import'"
v-
permission
=
"'menu_school_students_import'"
>
导入
</el-button
>
<!--
<el-button
type=
"primary"
icon=
"el-icon-download"
style=
"margin-left: 20px"
@
click=
"downLoad"
size=
"mini"
>
下载
</el-button>
-->
...
...
@@ -22,10 +27,13 @@
<router-link
:to=
"
{ path: 'student/process', query: { id: row.id } }">
<el-button
type=
"warning"
size=
"mini"
plain
>
学习进度
</el-button>
</router-link>
<router-link
:to=
"
{ path: 'student/view', query: { id: row.id } }" v-
has
="'menu_school_students_view'">
<router-link
:to=
"
{ path: 'student/view', query: { id: row.id } }" v-
permission
="'menu_school_students_view'">
<el-button
type=
"primary"
style=
"margin-left: 10px"
size=
"mini"
plain
>
查看
</el-button>
</router-link>
<router-link
:to=
"
{ path: 'student/update', query: { id: row.id } }" v-has="'menu_school_students_update'">
<router-link
:to=
"
{ path: 'student/update', query: { id: row.id } }"
v-permission="'menu_school_students_update'"
>
<el-button
type=
"success"
style=
"margin-left: 10px"
size=
"mini"
plain
>
更新
</el-button>
</router-link>
<el-button
...
...
@@ -34,7 +42,7 @@
style=
"margin-left: 10px"
size=
"mini"
plain
v-
has
=
"'menu_school_student_delete'"
v-
permission
=
"'menu_school_student_delete'"
>
删除
</el-button
>
</
template
>
...
...
src/modules/school/teacher/components/ImportTeacher.vue
浏览文件 @
62ecdbc8
...
...
@@ -18,7 +18,7 @@
</el-upload>
<div
style=
"margin-bottom: 10px; text-align: center"
>
导入模板下载:
<a
href=
"https://webapp-pub.ezijing.com/
website/prod/fd-admin/%E6%95%99%E5%B7%A5
%E6%A8%A1%E6%9D%BF.xlsx"
href=
"https://webapp-pub.ezijing.com/
x-training-new/%E8%80%81%E5%B8%88
%E6%A8%A1%E6%9D%BF.xlsx"
download=
"教工模板"
><el-button
type=
"text"
>
teacher_import.xlsx
</el-button></a
>
...
...
src/modules/school/teacher/views/List.vue
浏览文件 @
62ecdbc8
...
...
@@ -3,7 +3,12 @@
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template>
<el-row
style=
"margin-bottom: 20px"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"add"
size=
"mini"
v-has=
"'menu_school_teacher_add'"
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"add"
size=
"mini"
v-permission=
"'menu_school_teacher_add'"
>
新建
</el-button
>
<el-button
...
...
@@ -12,16 +17,19 @@
style=
"margin-left: 20px"
@
click=
"imports"
size=
"mini"
v-
has
=
"'menu_school_teacher_import'"
v-
permission
=
"'menu_school_teacher_import'"
>
导入
</el-button
>
</el-row>
</
template
>
<
template
v-slot:table-x=
"{ row }"
>
<router-link
:to=
"
{ path: 'teacher/view', query: { id: row.id } }" v-
has
="'menu_school_teacher_view'">
<router-link
:to=
"
{ path: 'teacher/view', query: { id: row.id } }" v-
permission
="'menu_school_teacher_view'">
<el-button
type=
"primary"
size=
"mini"
plain
>
查看
</el-button>
</router-link>
<router-link
:to=
"
{ path: 'teacher/update', query: { id: row.id } }" v-has="'menu_school_teacher_update'">
<router-link
:to=
"
{ path: 'teacher/update', query: { id: row.id } }"
v-permission="'menu_school_teacher_update'"
>
<el-button
type=
"success"
style=
"margin-left: 10px"
size=
"mini"
plain
>
更新
</el-button>
</router-link>
<el-button
...
...
@@ -30,7 +38,7 @@
size=
"mini"
plain
@
click=
"onRemove(row)"
v-
has
=
"'menu_school_teacher_delete'"
v-
permission
=
"'menu_school_teacher_delete'"
>
删除
</el-button
>
</
template
>
...
...
src/store/index.js
浏览文件 @
62ecdbc8
...
...
@@ -38,7 +38,8 @@ const store = new Vuex.Store({
return
response
})
},
async
checkLogin
({
commit
})
{
async
checkLogin
({
commit
,
dispatch
})
{
await
dispatch
(
'getPermissions'
)
const
isLogin
=
await
getUser
()
.
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
...
...
@@ -56,8 +57,8 @@ const store = new Vuex.Store({
return
isLogin
},
// 获取所有权限列表
getPermissions
({
commit
})
{
getPermissions
().
then
(
res
=>
{
async
getPermissions
({
commit
})
{
await
getPermissions
().
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
items
)
{
commit
(
'setPermissions'
,
res
.
data
.
items
)
}
...
...
@@ -84,7 +85,5 @@ const store = new Vuex.Store({
})
// 设置项目配置
store
.
dispatch
(
'setAppConfig'
)
// 获取权限
store
.
dispatch
(
'getPermissions'
)
export
default
store
src/utils/axios.js
浏览文件 @
62ecdbc8
...
...
@@ -68,7 +68,7 @@ httpRequest.interceptors.response.use(
if
(
error
.
response
)
{
const
{
status
,
message
}
=
error
.
response
.
data
if
(
status
===
401
||
status
===
402
)
{
router
.
push
(
'/401'
)
router
.
replace
(
'/401'
)
}
// 未登录
if
(
status
===
403
)
{
...
...
src/utils/beforeEnter.js
浏览文件 @
62ecdbc8
...
...
@@ -27,8 +27,8 @@ export default async function (to, from, next) {
}
const
isLogin
=
store
.
state
.
user
.
id
||
(
await
store
.
dispatch
(
'checkLogin'
))
if
(
!
isLogin
)
{
//
window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}`
//
return
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
return
}
next
()
...
...
src/utils/directives.js
浏览文件 @
62ecdbc8
import
store
from
'@/store'
function
checkPermission
(
el
,
binding
)
{
const
{
value
}
=
binding
if
(
!
value
)
return
const
permissions
=
store
.
state
.
permissions
||
[]
let
hasPermission
=
false
if
(
Array
.
isArray
(
value
))
{
hasPermission
=
permissions
.
some
(
item
=>
value
.
includes
(
item
.
tag
))
}
else
{
hasPermission
=
!!
permissions
.
find
(
item
=>
item
.
tag
===
value
)
}
if
(
!
hasPermission
)
{
el
.
parentNode
&&
el
.
parentNode
.
removeChild
(
el
)
}
}
// 判断是否有权限
export
default
Vue
=>
{
Vue
.
directive
(
'has'
,
{
inserted
:
function
(
el
,
binding
)
{
if
(
!
binding
.
value
)
return
const
permissions
=
store
.
state
.
permissions
||
[]
const
hasPermission
=
!!
permissions
.
find
(
item
=>
item
.
tag
===
binding
.
value
)
if
(
!
hasPermission
)
{
el
.
parentNode
&&
el
.
parentNode
.
removeChild
(
el
)
}
}
})
Vue
.
directive
(
'permission'
,
{
inserted
:
checkPermission
,
update
:
checkPermission
})
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论