Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
cms-admin
Commits
e954f05a
提交
e954f05a
authored
5月 13, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对接列表接口
上级
01f6ed3e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
63 行增加
和
41 行删除
+63
-41
contentManage.js
src/api/contentManage.js
+20
-0
TableList.vue
src/components/TableList.vue
+15
-12
index.vue
src/pages/content-manage/ads/index.vue
+6
-4
index.vue
src/pages/content-manage/article/index.vue
+6
-4
index.vue
src/pages/content-manage/image-text/index.vue
+6
-4
index.vue
src/pages/settings/staff/index.vue
+10
-10
index.vue
src/pages/settings/type/index.vue
+0
-7
没有找到文件。
src/api/contentManage.js
浏览文件 @
e954f05a
...
...
@@ -5,3 +5,23 @@ import httpRequest from '@/utils/axios'
export
function
getAdList
(
params
)
{
return
httpRequest
.
get
(
'/api/cms/api/v1/advertisements'
,
{
params
})
}
/**
* 获取文章列表
* @param {string} type_id 类型id
* @param {number} id_title id或标题
* @param {string} project_id 项目id
*/
export
function
getArticleList
(
params
)
{
return
httpRequest
.
get
(
'/api/cms/api/v1/articles'
,
{
params
})
}
/**
* 获取图文列表
* @param {string} type_id 类型id
* @param {number} id_title id或标题
* @param {string} project_id 项目id
*/
export
function
getImgTextList
(
params
)
{
return
httpRequest
.
get
(
'/api/cms/api/v1/img-texts'
,
{
params
})
}
src/components/TableList.vue
浏览文件 @
e954f05a
...
...
@@ -35,8 +35,8 @@
<div
class=
"table-list-hd-aside"
><slot
name=
"header-aside"
/></div>
</div>
<slot></slot>
<div
class=
"table-list-bd"
:style=
"{height: bodyHeight}"
>
<el-table
:data=
"dataList"
size=
"mini"
v-loading=
"loading"
v-bind=
"$attrs"
v-on=
"$listeners"
height=
"calc(100% - 40px)
"
>
<div
class=
"table-list-bd"
>
<el-table
:data=
"dataList"
size=
"mini"
v-loading=
"loading"
v-bind=
"$attrs"
v-on=
"$listeners"
style=
"height: 100%
"
>
<
template
v-for=
"item in columns"
>
<el-table-column
v-bind=
"item"
:key=
"item.prop"
>
<template
v-slot:default=
"scope"
v-if=
"item.slots"
>
...
...
@@ -45,13 +45,14 @@
</el-table-column>
</template>
</el-table>
</div>
<div
class=
"table-list-ft"
>
<el-pagination
class=
"table-list-pagination"
layout=
"total, prev, pager, next, sizes, jumper"
:page-sizes=
"[10, 20, 30, 50, 100]"
:page-size=
"page.size"
:total=
"page.total"
:hide-on-single-page=
"false"
@
size-change=
"pageSizeChange"
@
current-change=
"fetchList"
v-if=
"hasPagination"
...
...
@@ -69,8 +70,6 @@ export default {
remote
:
{
type
:
Object
,
default
:
()
=>
({})
},
// 筛选
filters
:
{
type
:
Array
,
default
:
()
=>
[]
},
// 列表是否有多选
tableSelection
:
{
type
:
Boolean
,
default
:
false
},
// 列表项
columns
:
{
type
:
Array
,
default
:
()
=>
[]
},
// 列表数据
...
...
@@ -78,8 +77,7 @@ export default {
// 是否含有翻页
hasPagination
:
{
type
:
Boolean
,
default
:
true
},
// 每页多少条数据
limit
:
{
type
:
Number
,
default
:
20
},
bodyHeight
:
{
type
:
String
,
default
:
'100%'
}
limit
:
{
type
:
Number
,
default
:
20
}
},
data
()
{
return
{
...
...
@@ -133,7 +131,7 @@ export default {
this
.
loading
=
true
httpRequest
(
params
)
.
then
(
res
=>
{
const
{
data
,
total
}
=
res
.
data
const
{
data
=
[],
total
=
0
}
=
res
.
data
||
{}
this
.
page
.
total
=
total
this
.
dataList
=
callback
?
callback
(
data
)
:
data
})
...
...
@@ -175,7 +173,10 @@ export default {
<
style
lang=
"scss"
>
.table-list
{
padding
:
10px
;
height
:calc
(
100
%
-
20px
)
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
;
}
.table-list-hd
{
display
:
flex
;
...
...
@@ -183,9 +184,11 @@ export default {
.table-list-filter
{
flex
:
1
;
}
// .table-list-bd {
// height:calc(100% - 50px)
// }
.table-list-bd
{
flex
:
1
;
}
.table-list-ft
{
}
.table-list-pagination
{
padding
:
10px
0
;
text-align
:
right
;
...
...
src/pages/content-manage/ads/index.vue
浏览文件 @
e954f05a
...
...
@@ -50,6 +50,7 @@
import
TableList
from
'@/components/TableList'
import
DrawerForm
from
'../components/DrawerForm.vue'
import
ReviewForm
from
'../components/ReviewForm.vue'
import
{
getAdList
}
from
'@/api/contentManage'
export
default
{
components
:
{
TableList
,
DrawerForm
,
ReviewForm
},
data
()
{
...
...
@@ -83,23 +84,24 @@ export default {
tableOptions
()
{
return
{
remote
:
{
params
:
{
id
:
''
,
type
:
''
,
project
:
''
},
httpRequest
:
getAdList
,
params
:
{
type_id
:
''
,
id_title
:
''
,
project_id
:
''
},
beforeRequest
:
this
.
beforeRequest
},
filters
:
[
{
type
:
'select'
,
placeholder
:
'项目'
,
prop
:
'project'
,
prop
:
'project
_id
'
,
options
:
this
.
projectList
,
labelKey
:
'project_name'
,
valueKey
:
'project_id'
},
{
type
:
'input'
,
placeholder
:
'ID'
,
prop
:
'id'
},
{
type
:
'input'
,
placeholder
:
'ID'
,
prop
:
'id
_title
'
},
{
type
:
'select'
,
placeholder
:
'类型'
,
prop
:
'type'
,
prop
:
'type
_id
'
,
options
:
this
.
typeList
,
labelKey
:
'name'
,
valueKey
:
'id'
...
...
src/pages/content-manage/article/index.vue
浏览文件 @
e954f05a
...
...
@@ -49,6 +49,7 @@
<
script
>
import
DrawerForm
from
'../components/DrawerForm.vue'
import
TableList
from
'@/components/TableList'
import
{
getArticleList
}
from
'@/api/contentManage'
export
default
{
data
()
{
return
{
...
...
@@ -80,23 +81,24 @@ export default {
tableOptions
()
{
return
{
remote
:
{
params
:
{
id
:
''
,
type
:
''
,
project
:
''
},
httpRequest
:
getArticleList
,
params
:
{
type_id
:
''
,
id_title
:
''
,
project_id
:
''
},
beforeRequest
:
this
.
beforeRequest
},
filters
:
[
{
type
:
'select'
,
placeholder
:
'项目'
,
prop
:
'project'
,
prop
:
'project
_id
'
,
options
:
this
.
projectList
,
labelKey
:
'project_name'
,
valueKey
:
'project_id'
},
{
type
:
'input'
,
placeholder
:
'ID'
,
prop
:
'id'
},
{
type
:
'input'
,
placeholder
:
'ID'
,
prop
:
'id
_title
'
},
{
type
:
'select'
,
placeholder
:
'类型'
,
prop
:
'type'
,
prop
:
'type
_id
'
,
options
:
this
.
typeList
,
labelKey
:
'name'
,
valueKey
:
'id'
...
...
src/pages/content-manage/image-text/index.vue
浏览文件 @
e954f05a
...
...
@@ -49,6 +49,7 @@
<
script
>
import
DrawerForm
from
'../components/DrawerForm.vue'
import
TableList
from
'@/components/TableList'
import
{
getImgTextList
}
from
'@/api/contentManage'
export
default
{
data
()
{
return
{
...
...
@@ -81,23 +82,24 @@ export default {
tableOptions
()
{
return
{
remote
:
{
params
:
{
id
:
''
,
type
:
''
,
project
:
''
},
httpRequest
:
getImgTextList
,
params
:
{
type_id
:
''
,
id_title
:
''
,
project_id
:
''
},
beforeRequest
:
this
.
beforeRequest
},
filters
:
[
{
type
:
'select'
,
placeholder
:
'项目'
,
prop
:
'project'
,
prop
:
'project
_id
'
,
options
:
this
.
projectList
,
labelKey
:
'project_name'
,
valueKey
:
'project_id'
},
{
type
:
'input'
,
placeholder
:
'ID'
,
prop
:
'id'
},
{
type
:
'input'
,
placeholder
:
'ID'
,
prop
:
'id
_title
'
},
{
type
:
'select'
,
placeholder
:
'类型'
,
prop
:
'type'
,
prop
:
'type
_id
'
,
options
:
this
.
typeList
,
labelKey
:
'name'
,
valueKey
:
'id'
...
...
src/pages/settings/staff/index.vue
浏览文件 @
e954f05a
...
...
@@ -86,6 +86,7 @@
</template>
<
script
>
import
TableList
from
'@/components/TableList'
import
{
getStaffList
}
from
'@/api/settings'
import
_
from
'lodash'
const
MOBILE_REG
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
const
EMAIL_REG
=
/^
[
A-Za-z0-9
]
+
([
_.
][
A-Za-z0-9
]
+
)
*@
([
A-Za-z0-9-
]
+
\.)
+
[
A-Za-z
]{2,6}
$/
...
...
@@ -177,13 +178,14 @@ export default {
tableOptions
()
{
return
{
remote
:
{
httpRequest
:
getStaffList
,
params
:
{}
},
filters
:
[
{
type
:
'select'
,
placeholder
:
'项目'
,
prop
:
'project'
,
prop
:
'project
_id
'
,
options
:
this
.
projectList
,
labelKey
:
'project_name'
,
valueKey
:
'project_id'
...
...
@@ -192,25 +194,23 @@ export default {
{
type
:
'select'
,
placeholder
:
'角色'
,
prop
:
'
type
'
,
prop
:
'
role_id
'
,
options
:
this
.
roleList
,
labelKey
:
'name'
,
valueKey
:
'id'
}
],
columns
:
[
{
prop
:
'name'
,
label
:
'姓名'
},
{
prop
:
'
sso_user.real_
name'
,
label
:
'姓名'
},
{
prop
:
'role'
,
label
:
'角色'
},
{
prop
:
'
phon
e'
,
label
:
'手机号'
},
{
prop
:
'email'
,
label
:
'邮箱'
},
{
prop
:
'pro
ejct_name
'
,
label
:
'项目'
},
{
prop
:
'
sso_user.mobil
e'
,
label
:
'手机号'
},
{
prop
:
'
sso_user.
email'
,
label
:
'邮箱'
},
{
prop
:
'pro
ject_ids
'
,
label
:
'项目'
},
{
prop
:
'author'
,
label
:
'创建人'
},
{
prop
:
'create
_time
'
,
label
:
'创建时间'
},
{
prop
:
'create
d_at
'
,
label
:
'创建时间'
},
{
prop
:
'status'
,
label
:
'状态'
,
slots
:
'status'
},
{
prop
:
'x'
,
label
:
'操作'
,
slots
:
'tools'
}
],
data
:
[{
name
:
'a'
,
role
:
'超级管理员'
,
phone
:
'123812312321'
,
email
:
'dsfdsxxx'
}],
bodyHeight
:
'calc(100% - 50px)'
]
}
}
},
...
...
src/pages/settings/type/index.vue
浏览文件 @
e954f05a
...
...
@@ -139,13 +139,7 @@ export default {
return
text
}
},
created
()
{
// this.fetchTypeList()
},
methods
:
{
// handleTabClick() {
// this.fetchTypeList()
// },
handleCreate
()
{
this
.
dialogType
=
'create'
this
.
dialogVisible
=
true
...
...
@@ -181,7 +175,6 @@ export default {
})
},
statusChange
(
val
)
{
// console.log(val)
this
.
fetchUpdateType
({
type_id
:
val
.
id
,
status
:
val
.
status
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论