Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
4b374cd5
提交
4b374cd5
authored
6月 15, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab-pro.ezijing.com/ezijing-web/center-resource
上级
5d08f579
7034ef31
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
173 行增加
和
50 行删除
+173
-50
menus.ts
src/assets/menus.ts
+19
-1
AppList.vue
src/components/base/AppList.vue
+9
-1
Aside.vue
src/components/layout/Aside.vue
+3
-3
Header.vue
src/components/layout/Header.vue
+1
-1
AddDialog.vue
src/modules/admin/category/components/AddDialog.vue
+3
-2
List.vue
src/modules/admin/category/views/List.vue
+25
-8
Add.vue
src/modules/admin/teacher/views/Add.vue
+16
-8
Detail.vue
src/modules/admin/teacher/views/Detail.vue
+25
-6
List.vue
src/modules/admin/teacher/views/List.vue
+24
-9
List.vue
src/modules/resource/video/views/List.vue
+1
-1
List.vue
src/modules/system/cover/views/List.vue
+12
-3
List.vue
src/modules/system/dictionary/views/List.vue
+17
-4
rowList.vue
src/modules/system/dictionary/views/rowList.vue
+17
-3
types.ts
src/types.ts
+1
-0
没有找到文件。
src/assets/menus.ts
浏览文件 @
4b374cd5
...
...
@@ -2,21 +2,30 @@ import type { IMenuItem } from '@/types'
import
{
VideoCamera
,
Suitcase
,
Collection
,
Files
,
Monitor
,
Edit
,
User
,
Filter
,
Coordinate
,
Notebook
,
Picture
}
from
'@element-plus/icons-vue'
export
const
menus
:
IMenuItem
[]
=
[
{
tag
:
'v1-resource'
,
name
:
'资源管理'
,
path
:
'/resource'
,
children
:
[
{
tag
:
'v1-resource-video-list'
,
icon
:
VideoCamera
,
name
:
'视频'
,
path
:
'/resource/video'
},
{
icon
:
Suitcase
,
name
:
'课件'
,
path
:
'/resource/courseware'
},
{
tag
:
'v1-resource-courseware-list'
,
icon
:
Suitcase
,
name
:
'课件'
,
path
:
'/resource/courseware'
},
{
tag
:
'v1-resource-lesson-plan-list'
,
icon
:
Collection
,
name
:
'教案'
,
path
:
'/resource/lessonplan'
},
{
tag
:
'v1-resource-other-information-list'
,
icon
:
Files
,
name
:
'其他资料'
,
path
:
'/resource/other'
...
...
@@ -32,15 +41,18 @@ export const menus: IMenuItem[] = [
]
},
{
tag
:
'v1-course'
,
name
:
'课程管理'
,
path
:
'/course'
,
children
:
[
{
tag
:
'v1-course-list'
,
icon
:
Monitor
,
name
:
'我的课程'
,
path
:
'/course/my'
},
{
tag
:
'v1-course-create'
,
icon
:
Edit
,
name
:
'新建课程'
,
path
:
'/course/create'
...
...
@@ -48,15 +60,18 @@ export const menus: IMenuItem[] = [
]
},
{
tag
:
'v1-backend'
,
name
:
'后台管理'
,
path
:
'/admin'
,
children
:
[
{
tag
:
'v1-backend-lecturer-list'
,
icon
:
User
,
name
:
'讲师管理'
,
path
:
'/admin/teacher'
},
{
tag
:
'v1-backend-category-list'
,
icon
:
Filter
,
name
:
'类别管理'
,
path
:
'/admin/category'
...
...
@@ -69,15 +84,18 @@ export const menus: IMenuItem[] = [
]
},
{
tag
:
'v1-backend'
,
name
:
'系统管理'
,
path
:
'/system'
,
children
:
[
{
tag
:
'v1-backend-data-dictionary-list'
,
icon
:
Notebook
,
name
:
'数据字典'
,
path
:
'/system/dictionary'
},
{
tag
:
'v1-backend-cover-list'
,
icon
:
Picture
,
name
:
'封面管理'
,
path
:
'/system/cover'
...
...
src/components/base/AppList.vue
浏览文件 @
4b374cd5
...
...
@@ -173,7 +173,14 @@ defineExpose({ refetch, tableRef })
<!-- 主体 -->
<div
class=
"table-list-bd"
>
<slot
name=
"body"
v-bind=
"{ data: dataList }"
>
<el-table
:data=
"dataList"
v-loading=
"loading"
v-bind=
"$attrs"
style=
"height: 100%"
ref=
"tableRef"
>
<el-table
:data=
"dataList"
v-loading=
"loading"
v-bind=
"$attrs"
style=
"height: 100%"
ref=
"tableRef"
:header-cell-style=
"{ background: '#EFEFEF' }"
>
<el-table-column
v-bind=
"item"
v-for=
"item in columns"
:key=
"item.prop"
>
<
template
#
default=
"scope"
v-if=
"item.slots || item.computed"
>
<slot
:name=
"item.slots"
v-bind=
"scope"
v-if=
"item.slots"
></slot>
...
...
@@ -213,6 +220,7 @@ defineExpose({ refetch, tableRef })
// flex-direction: column;
// box-sizing: border-box;
// }
.table-list-hd
{
display
:
flex
;
margin-bottom
:
10px
;
...
...
src/components/layout/Aside.vue
浏览文件 @
4b374cd5
...
...
@@ -34,15 +34,15 @@ const defaultActive = computed(() => {
<nav
class=
"nav"
>
<el-menu
:default-active=
"defaultActive"
:router=
"true"
class=
"app-menu"
>
<template
v-for=
"item in menuList"
:key=
"item.path"
>
<el-sub-menu
:index=
"item.path"
v-if=
"item.children"
>
<el-sub-menu
:index=
"item.path"
v-
permission=
"item.tag"
v-
if=
"item.children"
>
<template
#
title
>
<el-icon><component
:is=
"item.icon"
></component></el-icon>
{{
item
.
name
}}
</
template
>
<el-menu-item
:index=
"subitem.path"
v-for=
"subitem in item.children"
:key=
"subitem.path"
>
<el-menu-item
:index=
"subitem.path"
v-for=
"subitem in item.children"
:key=
"subitem.path"
v-permission=
"subitem.tag"
>
{{ subitem.name }}
</el-menu-item>
</el-sub-menu>
<el-menu-item
:index=
"item.path"
v-else
>
<el-menu-item
:index=
"item.path"
v-
permission=
"item.tag"
v-
else
>
<el-icon><component
:is=
"item.icon"
></component></el-icon>
{{ item.name }}
</el-menu-item>
</template>
...
...
src/components/layout/Header.vue
浏览文件 @
4b374cd5
...
...
@@ -35,7 +35,7 @@ function genNavClassName(data: IMenuItem) {
<h1
class=
"app-name"
>
统一资源管理平台
</h1>
</div>
<div
class=
"app-header-nav"
>
<div
class=
"app-header-nav-item"
v-for=
"(item, index) in menus"
:key=
"index"
:class=
"genNavClassName(item)"
>
<div
class=
"app-header-nav-item"
v-for=
"(item, index) in menus"
:key=
"index"
:class=
"genNavClassName(item)"
v-permission=
"item.tag"
>
<router-link
:to=
"item.path"
>
{{
item
.
name
}}
</router-link>
</div>
</div>
...
...
src/modules/admin/category/components/AddDialog.vue
浏览文件 @
4b374cd5
...
...
@@ -78,8 +78,9 @@ const handleCancel = () => {
}
// 确认提交表单
const
handleConfirm
=
()
=>
{
console
.
log
(
props
.
isEdit
,
'00000'
)
if
(
props
.
isEdit
)
{
const
params
=
Object
.
assign
({
id
:
props
.
editData
.
id
d
},
categoryForm
)
const
params
=
Object
.
assign
({
id
:
props
.
editData
.
id
},
categoryForm
)
updateCategory
(
params
).
then
(()
=>
{
ElMessage
.
success
(
'更新类别成功'
)
emit
(
'update:dialogVisible'
,
false
)
...
...
@@ -96,7 +97,7 @@ const handleConfirm = () => {
}
onMounted
(()
=>
{
console
.
log
(
props
.
prevCategoryName
,
'props.prevCategoryName
'
)
console
.
log
(
props
.
editData
.
id
,
'0000
'
)
categoryForm
.
depth
=
parseInt
(
props
.
editData
?.
depth
)
+
1
||
0
categoryForm
.
parent_id
=
props
.
editData
?.
id
categoryName
.
value
=
props
.
prevCategoryName
...
...
src/modules/admin/category/views/List.vue
浏览文件 @
4b374cd5
<
script
setup
lang=
"ts"
>
import
Sortable
from
'sortablejs'
import
type
{
MoveEvent
,
SortableEvent
}
from
'sortablejs'
import
AddDialog
from
'../components/AddDialog.vue'
import
{
getCategoryList
,
delCategory
,
moveCategory
}
from
'../api'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
checkPermission
}
from
'@/utils/permission'
import
AddDialog
from
'../components/AddDialog.vue'
import
AppList
from
'@/components/base/AppList.vue'
const
appList
=
$ref
<
null
|
InstanceType
<
typeof
AppList
>>
(
null
)
const
prevCategoryName
=
ref
(
''
)
...
...
@@ -179,7 +179,6 @@ const rebuildData = (value: any, arr: any) => {
}
let
newArr
:
any
=
[]
arr
.
forEach
((
element
:
any
)
=>
{
console
.
log
(
element
,
'element'
)
// indexOf用来判读当前节点name字段是否包含所搜索的字符串value
// 返回值:包含则返回索引值,反之返回-1
if
(
element
.
category_name
.
indexOf
(
value
)
>
-
1
)
{
...
...
@@ -207,7 +206,7 @@ const rebuildData = (value: any, arr: any) => {
}
onMounted
(()
=>
{
useSortable
()
checkPermission
(
'v1-backend-category-drag'
)
&&
useSortable
()
})
</
script
>
<
template
>
...
...
@@ -222,11 +221,29 @@ onMounted(() => {
border
stripe
>
<el-button
type=
"primary"
@
click=
"handleAddCategory"
style=
"margin-bottom: 20px"
>
新增类别
</el-button>
<el-button
type=
"primary"
@
click=
"handleAddCategory"
style=
"margin-bottom: 20px"
v-permission=
"'v1-backend-category-create'"
>
新增类别
</el-button
>
<template
#
table-operate=
"
{ row }">
<el-link
type=
"primary"
style=
"margin-right: 5px"
@
click=
"handleEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
style=
"margin-right: 5px"
@
click=
"handleAddRow(row)"
>
新增
</el-link>
<el-link
type=
"primary"
@
click=
"handleDelete(row)"
>
删除
</el-link>
<el-link
type=
"primary"
style=
"margin-right: 5px"
@
click=
"handleEdit(row)"
v-permission=
"'v1-backend-category-update'"
>
编辑
</el-link
>
<el-link
type=
"primary"
style=
"margin-right: 5px"
@
click=
"handleAddRow(row)"
v-permission=
"'v1-backend-category-create'"
>
新增
</el-link
>
<el-link
type=
"primary"
@
click=
"handleDelete(row)"
v-permission=
"'v1-backend-category-delete'"
>
删除
</el-link>
</
template
>
</AppList>
</AppCard>
...
...
src/modules/admin/teacher/views/Add.vue
浏览文件 @
4b374cd5
...
...
@@ -42,6 +42,14 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if
(
!
formEl
)
return
await
formEl
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
ruleForm
.
education
!==
''
)
{
ruleForm
.
education
=
store
.
getMapValuesByKey
(
'teacher_level'
)
.
filter
(
item
=>
item
.
value
===
ruleForm
.
education
)[
0
].
label
}
// if (ruleForm.avatar === '') {
// ruleForm.avatar = 'https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png'
// }
const
params
=
Object
.
assign
({},
ruleForm
)
createTeacher
(
params
).
then
(()
=>
{
ElMessage
.
success
(
'创建讲师成功'
)
...
...
@@ -56,28 +64,28 @@ const submitForm = async (formEl: FormInstance | undefined) => {
<AppCard
title=
"添加讲师"
>
<el-form
ref=
"ruleFormRef"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"120px"
class=
"demo-ruleForm"
>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-form-item
label=
"讲师姓名:"
prop=
"name"
>
<el-input
v-model=
"ruleForm.name"
style=
"width:
25
0px"
placeholder=
"请输入讲师姓名"
/>
<el-input
v-model=
"ruleForm.name"
style=
"width:
30
0px"
placeholder=
"请输入讲师姓名"
/>
</el-form-item>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-form-item
label=
"讲师职位:"
prop=
"title"
>
<el-input
v-model=
"ruleForm.title"
style=
"width:
25
0px"
placeholder=
"请输入讲师职位"
/>
<el-input
v-model=
"ruleForm.title"
style=
"width:
30
0px"
placeholder=
"请输入讲师职位"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-form-item
label=
"讲师学历:"
prop=
"education"
>
<el-select
v-model=
"ruleForm.education"
clearable
style=
"width:
25
0px"
placeholder=
"请选择讲师学历"
>
<el-select
v-model=
"ruleForm.education"
clearable
style=
"width:
30
0px"
placeholder=
"请选择讲师学历"
>
<el-option
v-for=
"(item, index) in levelList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-form-item
label=
"讲师任职机构:"
prop=
"office"
>
<el-input
v-model=
"ruleForm.office"
style=
"width:
25
0px"
placeholder=
"请输入讲师任职机构"
/>
<el-input
v-model=
"ruleForm.office"
style=
"width:
30
0px"
placeholder=
"请输入讲师任职机构"
/>
</el-form-item>
</el-col>
</el-row>
...
...
src/modules/admin/teacher/views/Detail.vue
浏览文件 @
4b374cd5
...
...
@@ -4,9 +4,14 @@ import { ElMessage } from 'element-plus'
import
type
{
FormRules
,
FormInstance
}
from
'element-plus'
import
VEditor
from
'@/components/tinymce/Index.vue'
import
AppUpload
from
'@/components/base/AppUpload.vue'
import
{
useMapStore
}
from
'@/stores/map'
const
store
=
useMapStore
()
const
router
=
useRouter
()
const
route
=
useRoute
()
const
appList
=
ref
()
const
levelList
=
store
.
getMapValuesByKey
(
'teacher_level'
)
const
imgDefault
=
$ref
(
'https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png'
)
const
id
=
route
.
query
.
id
as
string
const
title
=
route
.
query
.
title
as
string
...
...
@@ -50,20 +55,26 @@ const handleDelete = (row: any) => {
}
const
getTeacherInfo
=
()
=>
{
getTeacherDetail
({
id
:
id
}).
then
(
res
=>
{
console
.
log
(
res
.
data
)
Object
.
keys
(
ruleForm
).
forEach
(
key
=>
{
ruleForm
[
key
]
=
res
.
data
[
key
]
})
if
(
ruleForm
.
avatar
===
''
)
{
ruleForm
.
avatar
=
imgDefault
}
})
}
// 更新讲师
const
handleUpdate
=
async
(
formEl
:
FormInstance
|
undefined
)
=>
{
console
.
log
(
'0000'
)
if
(
!
formEl
)
return
await
formEl
.
validate
(
valid
=>
{
if
(
valid
)
{
const
params
=
Object
.
assign
({},
ruleForm
)
params
.
education
=
store
.
getMapValuesByKey
(
'teacher_level'
)
.
filter
(
item
=>
item
.
label
===
ruleForm
.
education
)[
0
].
label
updateTeacher
(
params
).
then
(()
=>
{
ElMessage
.
success
(
'
创建
讲师成功'
)
ElMessage
.
success
(
'
更新
讲师成功'
)
router
.
push
(
'/admin/teacher'
)
})
}
...
...
@@ -82,8 +93,7 @@ onMounted(() => {
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"讲师图片:"
prop=
"avatar"
>
<img
v-if=
"isEdit === '1' && ruleForm.avatar !== ''"
:src=
"ruleForm.avatar"
class=
"avatar_box1"
/>
<div
class=
"avatar_box"
v-else-if=
"isEdit === '1' && ruleForm.avatar === ''"
>
暂无讲师图片
</div>
<el-image
v-if=
"isEdit === '1'"
:src=
"ruleForm.avatar || imgDefault"
class=
"avatar_box1"
fit=
"contain"
/>
<AppUpload
v-model=
"ruleForm.avatar"
v-else
/>
</el-form-item>
</el-col>
...
...
@@ -95,7 +105,15 @@ onMounted(() => {
<el-input
v-model=
"ruleForm.title"
:disabled=
"isEdit === '1'"
/>
</el-form-item>
<el-form-item
label=
"讲师学历:"
prop=
"education"
>
<el-input
v-model=
"ruleForm.education"
:disabled=
"isEdit === '1'"
/>
<el-select
v-model=
"ruleForm.education"
clearable
style=
"width: 250px"
placeholder=
"请选择讲师学历"
:disabled=
"isEdit === '1'"
>
<el-option
v-for=
"(item, index) in levelList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"讲师任职机构:"
prop=
"office"
>
<el-input
v-model=
"ruleForm.office"
:disabled=
"isEdit === '1'"
/>
...
...
@@ -143,6 +161,7 @@ onMounted(() => {
border
:
1px
dashed
#ccc
;
}
.avatar_box1
{
width
:
150px
;
max-width
:
150px
;
height
:
200px
;
}
</
style
>
src/modules/admin/teacher/views/List.vue
浏览文件 @
4b374cd5
...
...
@@ -20,7 +20,8 @@ const listOptions = $computed(() => {
prop
:
'education'
,
label
:
'讲师学历:'
,
placeholder
:
'请选择讲师学历'
,
options
:
store
.
getMapValuesByKey
(
'teacher_level'
)
options
:
store
.
getMapValuesByKey
(
'teacher_level'
),
valueKey
:
'label'
}
],
columns
:
[
...
...
@@ -29,7 +30,11 @@ const listOptions = $computed(() => {
{
label
:
'讲师姓名'
,
prop
:
'name'
,
align
:
'center'
},
{
label
:
'讲师任职机构'
,
prop
:
'office'
,
align
:
'center'
},
{
label
:
'讲师职位'
,
prop
:
'title'
,
align
:
'center'
},
{
label
:
'讲师学历'
,
prop
:
'education'
,
align
:
'center'
},
{
label
:
'讲师学历'
,
prop
:
'education'
,
align
:
'center'
},
{
label
:
'创建时间'
,
prop
:
'created_time'
,
align
:
'center'
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
]
...
...
@@ -67,30 +72,40 @@ const handleDetail = (row: any) => {
}
})
}
const
imgDefault
=
ref
(
'https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png'
)
</
script
>
<
template
>
<AppCard
title=
"讲师管理"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
border
stripe
>
<router-link
to=
"/admin/teacher/add"
>
<el-button
type=
"primary"
round
style=
"margin-bottom: 20px"
>
添加讲师
</el-button>
<el-button
type=
"primary"
round
style=
"margin-bottom: 20px"
v-permission=
"'v1-backend-lecturer-create'"
>
添加讲师
</el-button
>
</router-link>
<template
#
header-aside
>
</
template
>
<
template
#
table-img=
"{ row }"
>
<el-image
:src=
"row.avatar"
:src=
"row.avatar
|| imgDefault
"
alt=
""
style=
"width: 50px; height: 50px"
:preview-src-list=
"[row.avatar]"
:preview-src-list=
"[row.avatar]
|| [imgDefault]
"
:initial-index=
"4"
fit=
"contain"
:preview-teleported=
"true"
/></
template
>
/>
</
template
>
<
template
#
table-operate=
"{ row }"
>
<el-space>
<el-link
type=
"primary"
plain
@
click=
"handleDetail(row)"
>
查看
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleUpdate(row)"
>
更新
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
>
删除
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleDetail(row)"
v-permission=
"'v1-backend-lecturer-view'"
>
查看
</el-link
>
<el-link
type=
"primary"
plain
@
click=
"handleUpdate(row)"
v-permission=
"'v1-backend-lecturer-update'"
>
更新
</el-link
>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
v-permission=
"'v1-backend-lecturer-delete'"
>
删除
</el-link
>
</el-space>
</
template
>
</AppList>
...
...
src/modules/resource/video/views/List.vue
浏览文件 @
4b374cd5
...
...
@@ -79,7 +79,7 @@ const listOptions = $computed(() => {
<el-icon
class=
"video-head-icon"
@
click=
"isCard = !isCard"
><Expand
/></el-icon>
</div>
<div
class=
"video-tool-btn"
>
<router-link
to=
"/resource/video/update"
>
<router-link
to=
"/resource/video/update"
v-permission=
"'v1-resource-video-create'"
>
<el-button
type=
"primary"
round
>
新建视频资源
</el-button>
</router-link>
</div>
...
...
src/modules/system/cover/views/List.vue
浏览文件 @
4b374cd5
...
...
@@ -75,7 +75,14 @@ const handleEdit = (row: any) => {
<AppCard
title=
"封面管理"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
border
stripe
>
<template
#
header-aside
>
</
template
>
<el-button
type=
"primary"
round
@
click=
"handleAdd"
style=
"margin-bottom: 20px"
>
新增封面
</el-button>
<el-button
type=
"primary"
round
@
click=
"handleAdd"
style=
"margin-bottom: 20px"
v-permission=
"'v1-backend-cover-create'"
>
新增封面
</el-button
>
<
template
#
table-cover=
"{ row }"
>
<el-image
...
...
@@ -89,8 +96,10 @@ const handleEdit = (row: any) => {
</
template
>
<
template
#
table-operate=
"{ row }"
>
<el-space>
<el-link
type=
"primary"
plain
@
click=
"handleEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
>
删除
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleEdit(row)"
v-permission=
"'v1-backend-cover-update'"
>
编辑
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
v-permission=
"'v1-backend-cover-delete'"
>
删除
</el-link
>
</el-space>
</
template
>
<
template
v-if=
"isShowDialog === true"
>
...
...
src/modules/system/dictionary/views/List.vue
浏览文件 @
4b374cd5
...
...
@@ -100,7 +100,13 @@ const handleUpdate = () => {
<AppCard
title=
"数据字典"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
border
stripe
>
<el-row>
<el-button
type=
"primary"
@
click=
"handleAdd"
style=
"margin-bottom: 20px"
v-permission=
"'test1'"
>
新增字典
</el-button>
<el-button
type=
"primary"
@
click=
"handleAdd"
style=
"margin-bottom: 20px"
v-permission=
"'v1-backend-data-dictionary-create'"
>
新增字典
</el-button
>
</el-row>
<template
v-slot:created_time_start=
"
{ params }">
<el-date-picker
v-model=
"params.created_time_start"
type=
"date"
placeholder=
"开始时间"
>
</el-date-picker>
...
...
@@ -111,9 +117,16 @@ const handleUpdate = () => {
</
template
>
<
template
#
table-operate=
"{ row }"
>
<el-space>
<el-link
type=
"primary"
plain
@
click=
"handleEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleList(row)"
>
列表
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
>
删除
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleEdit(row)"
v-permission=
"'v1-backend-data-dictionary-update'"
>
编辑
</el-link
>
<el-link
type=
"primary"
plain
@
click=
"handleList(row)"
v-permission=
"'v1-backend-data-dictionary-value-list'"
>
列表
</el-link
>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
v-permission=
"'v1-backend-data-dictionary-delete'"
>
删除
</el-link
>
</el-space>
</
template
>
<
template
v-if=
"isShowDialog === true"
>
...
...
src/modules/system/dictionary/views/rowList.vue
浏览文件 @
4b374cd5
...
...
@@ -63,12 +63,26 @@ const handleUpdate = () => {
<AppCard
title=
"字典列表"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<el-row>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"primary"
@
click=
"handleAdd"
v-permission=
"'v1-backend-data-dictionary-value-create'"
>
新增
</el-button
>
</el-row>
<template
#
table-operate=
"
{ row }">
<el-space>
<el-link
type=
"primary"
plain
@
click=
"handleEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
>
删除
</el-link>
<el-link
type=
"primary"
plain
@
click=
"handleEdit(row)"
v-permission=
"'v1-backend-data-dictionary-value-update'"
>
编辑
</el-link
>
<el-link
type=
"primary"
plain
@
click=
"handleDelete(row)"
v-permission=
"'v1-backend-data-dictionary-value-delete'"
>
删除
</el-link
>
</el-space>
</
template
>
</AppList>
...
...
src/types.ts
浏览文件 @
4b374cd5
import
type
{
Component
}
from
'vue'
export
interface
IMenuItem
{
tag
?:
string
name
:
string
path
:
string
icon
?:
Component
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论