Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
692d0f6f
提交
692d0f6f
authored
6月 09, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
64c6fa21
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
48 行增加
和
56 行删除
+48
-56
api.ts
src/modules/admin/category/api.ts
+1
-1
List.vue
src/modules/admin/category/views/List.vue
+2
-5
Detail.vue
src/modules/admin/teacher/views/Detail.vue
+12
-2
List.vue
src/modules/admin/teacher/views/List.vue
+3
-1
List.vue
src/modules/resource/video/views/List.vue
+3
-2
List.vue
src/modules/system/cover/views/List.vue
+3
-1
List.vue
src/modules/system/dictionary/views/List.vue
+3
-24
rowList.vue
src/modules/system/dictionary/views/rowList.vue
+21
-20
没有找到文件。
src/modules/admin/category/api.ts
浏览文件 @
692d0f6f
import
httpRequest
from
'@/utils/axios'
import
httpRequest
from
'@/utils/axios'
// 获取分类列表
// 获取分类列表
export
function
getCategoryList
(
params
:
{
type
:
string
;
category_name
?:
string
})
{
export
function
getCategoryList
(
params
:
{
type
:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/backend/category/list'
,
{
params
})
return
httpRequest
.
get
(
'/api/resource/v1/backend/category/list'
,
{
params
})
}
}
// 新建分类
// 新建分类
...
...
src/modules/admin/category/views/List.vue
浏览文件 @
692d0f6f
...
@@ -11,7 +11,6 @@ const dialogVisible = ref(false)
...
@@ -11,7 +11,6 @@ const dialogVisible = ref(false)
let
form
=
reactive
({
let
form
=
reactive
({
category_name
:
''
category_name
:
''
})
})
interface
ICategory
{
interface
ICategory
{
category_name
:
number
category_name
:
number
depth
:
string
depth
:
string
...
@@ -19,7 +18,7 @@ interface ICategory {
...
@@ -19,7 +18,7 @@ interface ICategory {
lft
:
string
lft
:
string
need_pass
:
string
need_pass
:
string
rgt
:
string
rgt
:
string
status
:
string
status
_name
:
string
children
?:
ICategory
[]
children
?:
ICategory
[]
}
}
let
tableData
=
$ref
<
ICategory
[]
>
([])
let
tableData
=
$ref
<
ICategory
[]
>
([])
...
@@ -70,9 +69,7 @@ const handleAddCategory = () => {
...
@@ -70,9 +69,7 @@ const handleAddCategory = () => {
const
getParent
=
(
node
:
string
,
tree
:
any
)
=>
{
const
getParent
=
(
node
:
string
,
tree
:
any
)
=>
{
let
result
:
any
=
[]
let
result
:
any
=
[]
function
find
(
node
:
string
,
tree
:
any
)
{
function
find
(
node
:
string
,
tree
:
any
)
{
console
.
log
(
node
,
tree
[
0
],
'tree'
)
tree
.
children
.
forEach
((
item
:
any
)
=>
{
tree
.
children
.
forEach
((
item
:
any
)
=>
{
// console.log(item, 'item000')
if
(
item
.
id
===
node
)
{
if
(
item
.
id
===
node
)
{
result
.
push
(
tree
)
result
.
push
(
tree
)
}
}
...
@@ -211,7 +208,7 @@ onMounted(() => {
...
@@ -211,7 +208,7 @@ onMounted(() => {
</el-table-column>
</el-table-column>
<el-table-column
prop=
"category_name"
label=
"类别名称"
align=
"center"
class-name=
"handle"
/>
<el-table-column
prop=
"category_name"
label=
"类别名称"
align=
"center"
class-name=
"handle"
/>
<el-table-column
prop=
"depth"
label=
"层级"
align=
"center"
/>
<el-table-column
prop=
"depth"
label=
"层级"
align=
"center"
/>
<el-table-column
prop=
"status"
label=
"状态"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"status
_name
"
label=
"状态"
align=
"center"
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"300px"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"300px"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
type=
"primary"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
...
...
src/modules/admin/teacher/views/Detail.vue
浏览文件 @
692d0f6f
...
@@ -26,7 +26,8 @@ const rules = reactive<FormRules>({
...
@@ -26,7 +26,8 @@ const rules = reactive<FormRules>({
name
:
[{
required
:
true
,
message
:
'请输入讲师姓名'
,
trigger
:
'blur'
}],
name
:
[{
required
:
true
,
message
:
'请输入讲师姓名'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
' 请输入职位'
,
trigger
:
'blur'
}]
title
:
[{
required
:
true
,
message
:
' 请输入职位'
,
trigger
:
'blur'
}]
})
})
const
listOptions
=
{
const
listOptions
=
$computed
(()
=>
{
return
{
remote
:
{
remote
:
{
params
:
{
type
:
''
}
params
:
{
type
:
''
}
},
},
...
@@ -44,6 +45,7 @@ const listOptions = {
...
@@ -44,6 +45,7 @@ const listOptions = {
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
300
,
align
:
'center'
}
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
300
,
align
:
'center'
}
]
]
}
}
})
const
handleDelete
=
(
row
:
any
)
=>
{
const
handleDelete
=
(
row
:
any
)
=>
{
console
.
log
(
'删除'
,
row
)
console
.
log
(
'删除'
,
row
)
...
@@ -82,7 +84,7 @@ onMounted(() => {
...
@@ -82,7 +84,7 @@ onMounted(() => {
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"讲师图片:"
prop=
"avatar"
>
<el-form-item
label=
"讲师图片:"
prop=
"avatar"
>
<div
v-if=
"isEdit === '1'"
>
暂无照片
</div>
<div
v-if=
"isEdit === '1'"
class=
"avatar_box"
>
暂无照片
</div>
<AppUpload
v-model=
"ruleForm.avatar"
v-else
/>
<AppUpload
v-model=
"ruleForm.avatar"
v-else
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -133,4 +135,12 @@ onMounted(() => {
...
@@ -133,4 +135,12 @@ onMounted(() => {
font-size
:
14px
;
font-size
:
14px
;
color
:
#606266
;
color
:
#606266
;
}
}
.avatar_box
{
width
:
150px
;
height
:
200px
;
text-align
:
center
;
line-height
:
200px
;
color
:
#ccc
;
border
:
1px
dashed
#ccc
;
}
</
style
>
</
style
>
src/modules/admin/teacher/views/List.vue
浏览文件 @
692d0f6f
...
@@ -3,7 +3,8 @@ import { ElMessage,ElMessageBox } from 'element-plus'
...
@@ -3,7 +3,8 @@ import { ElMessage,ElMessageBox } from 'element-plus'
import
{
getTeacherList
,
deleteTeacher
}
from
'../api'
import
{
getTeacherList
,
deleteTeacher
}
from
'../api'
const
router
=
useRouter
()
const
router
=
useRouter
()
const
appList
=
ref
()
const
appList
=
ref
()
const
listOptions
=
{
const
listOptions
=
$computed
(()
=>
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getTeacherList
,
httpRequest
:
getTeacherList
,
params
:
{
type
:
''
}
params
:
{
type
:
''
}
...
@@ -25,6 +26,7 @@ const listOptions = {
...
@@ -25,6 +26,7 @@ const listOptions = {
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
]
]
}
}
})
// 删除讲师
// 删除讲师
const
handleDelete
=
(
row
:
any
)
=>
{
const
handleDelete
=
(
row
:
any
)
=>
{
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
...
...
src/modules/resource/video/views/List.vue
浏览文件 @
692d0f6f
...
@@ -4,8 +4,8 @@ import { getVideoList } from '../api'
...
@@ -4,8 +4,8 @@ import { getVideoList } from '../api'
const
appList
=
ref
()
const
appList
=
ref
()
const
isCard
=
ref
(
false
)
const
isCard
=
ref
(
false
)
const
listOptions
=
$computed
(()
=>
{
const
listOptions
=
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getVideoList
,
httpRequest
:
getVideoList
,
params
:
{
type
:
''
},
params
:
{
type
:
''
},
...
@@ -33,6 +33,7 @@ const listOptions = {
...
@@ -33,6 +33,7 @@ const listOptions = {
{
id
:
2
,
title
:
'视频标题'
,
type
:
'视频分类'
}
{
id
:
2
,
title
:
'视频标题'
,
type
:
'视频分类'
}
]
]
}
}
})
</
script
>
</
script
>
<
template
>
<
template
>
...
...
src/modules/system/cover/views/List.vue
浏览文件 @
692d0f6f
...
@@ -7,7 +7,8 @@ const appList = ref()
...
@@ -7,7 +7,8 @@ const appList = ref()
const
isShowDialog
=
ref
(
false
)
const
isShowDialog
=
ref
(
false
)
const
isEdit
=
ref
(
false
)
const
isEdit
=
ref
(
false
)
const
editData
=
ref
({})
const
editData
=
ref
({})
const
listOptions
=
{
const
listOptions
=
$computed
(()
=>
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getCoverList
,
httpRequest
:
getCoverList
,
params
:
{
type
:
''
}
params
:
{
type
:
''
}
...
@@ -26,6 +27,7 @@ const listOptions = {
...
@@ -26,6 +27,7 @@ const listOptions = {
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
]
]
}
}
})
// 删除
// 删除
const
handleDelete
=
(
row
:
any
)
=>
{
const
handleDelete
=
(
row
:
any
)
=>
{
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
...
...
src/modules/system/dictionary/views/List.vue
浏览文件 @
692d0f6f
...
@@ -3,14 +3,13 @@ import { ElMessage, ElMessageBox } from 'element-plus'
...
@@ -3,14 +3,13 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getDictionaryList
,
createDictionary
,
updateDictionary
,
delDictionary
}
from
'../api'
import
{
getDictionaryList
,
createDictionary
,
updateDictionary
,
delDictionary
}
from
'../api'
import
AddDialog
from
'../component/AddDialog.vue'
import
AddDialog
from
'../component/AddDialog.vue'
const
store
=
useMapStore
()
const
statusList
=
store
.
mapList
.
filter
((
item
:
any
)
=>
item
.
key
===
'system_status'
)[
0
].
values
const
router
=
useRouter
()
const
router
=
useRouter
()
const
appList
=
ref
()
const
appList
=
ref
()
const
isShowDialog
=
ref
(
false
)
// 新增字典弹框状态
const
isShowDialog
=
ref
(
false
)
// 新增字典弹框状态
const
isEdit
=
ref
(
false
)
//是否可编辑
const
isEdit
=
ref
(
false
)
//是否可编辑
const
rowInfo
=
ref
({})
const
rowInfo
=
ref
({})
const
store
=
useMapStore
()
// 状态
// 状态
//表单每行数据
//表单每行数据
...
@@ -31,7 +30,7 @@ const listOptions = $computed(() => {
...
@@ -31,7 +30,7 @@ const listOptions = $computed(() => {
type
:
'select'
,
type
:
'select'
,
prop
:
'status'
,
prop
:
'status'
,
label
:
'字典状态:'
,
label
:
'字典状态:'
,
options
:
st
atusList
options
:
st
ore
.
mapList
?.
filter
((
item
:
any
)
=>
item
.
key
===
'system_status'
)[
0
]?.
values
||
[]
},
},
{
{
type
:
'input'
,
type
:
'input'
,
...
@@ -53,20 +52,6 @@ const listOptions = $computed(() => {
...
@@ -53,20 +52,6 @@ const listOptions = $computed(() => {
{
label
:
'备注 '
,
prop
:
'remark'
,
align
:
'center'
},
{
label
:
'备注 '
,
prop
:
'remark'
,
align
:
'center'
},
{
label
:
'创建时间'
,
prop
:
'created_time'
,
align
:
'center'
},
{
label
:
'创建时间'
,
prop
:
'created_time'
,
align
:
'center'
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'center'
,
width
:
300
}
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'center'
,
width
:
300
}
],
data
:
[
{
key
:
1
,
name
:
'用户性别'
,
type
:
'sex'
,
status
:
'0'
,
remark
:
'用户性别列表'
,
created_time
:
'2022-05-30'
,
rowList
:
[
{
key
:
1
,
name
:
'用户性别'
,
type
:
'sex'
,
status
:
'0'
,
remark
:
'用户性别列表'
,
created_time
:
'2022-05-30'
},
{
key
:
2
,
name
:
'用户年龄'
,
type
:
'age'
,
status
:
'1'
,
remark
:
'用户年龄列表'
,
created_time
:
'2022-05-31'
}
]
}
]
]
}
}
})
})
...
@@ -144,13 +129,7 @@ const handleConfirm = (val: any) => {
...
@@ -144,13 +129,7 @@ const handleConfirm = (val: any) => {
</el-space>
</el-space>
</
template
>
</
template
>
<
template
v-if=
"isShowDialog === true"
>
<
template
v-if=
"isShowDialog === true"
>
<AddDialog
<AddDialog
v-model:isShowDialog=
"isShowDialog"
:isEdit=
"isEdit"
:rowInfo=
"rowInfo"
@
confirm=
"handleConfirm"
/>
v-model:isShowDialog=
"isShowDialog"
:isEdit=
"isEdit"
:rowInfo=
"rowInfo"
:statusList=
"statusList"
@
confirm=
"handleConfirm"
/>
</
template
>
</
template
>
</AppList>
</AppList>
</AppCard>
</AppCard>
...
...
src/modules/system/dictionary/views/rowList.vue
浏览文件 @
692d0f6f
...
@@ -10,27 +10,28 @@ const title = ref('')
...
@@ -10,27 +10,28 @@ const title = ref('')
const
type
=
route
.
query
.
type
as
string
const
type
=
route
.
query
.
type
as
string
const
isEdit
=
ref
(
false
)
const
isEdit
=
ref
(
false
)
const
isListAddDialog
=
ref
(
false
)
const
isListAddDialog
=
ref
(
false
)
const
listOptions
=
$computed
(()
=>
{
const
listOptions
=
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getDictionaryItemList
,
httpRequest
:
getDictionaryItemList
,
params
:
{
data_dictionary_id
:
route
.
query
.
id
}
params
:
{
data_dictionary_id
:
route
.
query
.
id
}
},
columns
:
[
{
label
:
'字典编码'
,
prop
:
'data_dictionary_id'
,
align
:
'center'
},
{
label
:
'字典标签'
,
prop
:
'label'
,
align
:
'center'
},
{
label
:
'字典键值'
,
prop
:
'value'
,
align
:
'center'
},
{
label
:
'状态'
,
prop
:
'status_name'
,
align
:
'center'
},
},
{
label
:
'备注 '
,
prop
:
'remark'
,
align
:
'center'
},
{
label
:
'创建时间'
,
prop
:
'created_time'
,
align
:
'center'
},
columns
:
[
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'center'
,
minWidth
:
180
}
{
label
:
'字典编码'
,
prop
:
'data_dictionary_id'
,
align
:
'center'
},
]
{
label
:
'字典标签'
,
prop
:
'label'
,
align
:
'center'
},
}
{
label
:
'字典键值'
,
prop
:
'value'
,
align
:
'center'
},
{
label
:
'状态'
,
prop
:
'status_name'
,
align
:
'center'
},
{
label
:
'备注 '
,
prop
:
'remark'
,
align
:
'center'
},
{
label
:
'创建时间'
,
prop
:
'created_time'
,
align
:
'center'
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'center'
,
minWidth
:
180
}
]
}
})
const
handleAdd
=
()
=>
{
const
handleAdd
=
()
=>
{
isListAddDialog
.
value
=
true
isListAddDialog
.
value
=
true
isEdit
.
value
=
false
isEdit
.
value
=
false
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论