Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
cms-admin
Commits
342c8b96
提交
342c8b96
authored
5月 17, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
内容管理列表增加类型选择
上级
f6529389
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
37 行增加
和
1 行删除
+37
-1
index.vue
src/pages/content-manage/ads/index.vue
+8
-0
index.vue
src/pages/content-manage/article/index.vue
+8
-0
index.vue
src/pages/content-manage/image-text/index.vue
+8
-0
app.js
src/store/modules/app.js
+13
-1
没有找到文件。
src/pages/content-manage/ads/index.vue
浏览文件 @
342c8b96
...
@@ -117,9 +117,14 @@ export default {
...
@@ -117,9 +117,14 @@ export default {
hasDelete
()
{
hasDelete
()
{
return
this
.
permissions
.
includes
(
'content-function-advert-delete'
)
return
this
.
permissions
.
includes
(
'content-function-advert-delete'
)
},
},
// 项目列表
projectList
()
{
projectList
()
{
return
this
.
$store
.
state
.
user
.
projects
return
this
.
$store
.
state
.
user
.
projects
},
},
// 类型列表
typeList
()
{
return
this
.
$store
.
state
.
app
.
typeList
},
drawTitle
()
{
drawTitle
()
{
if
(
this
.
drawFormOptions
.
type
===
'create'
)
return
'新建广告'
if
(
this
.
drawFormOptions
.
type
===
'create'
)
return
'新建广告'
else
if
(
this
.
drawFormOptions
.
type
===
'edit'
)
return
'编辑广告'
else
if
(
this
.
drawFormOptions
.
type
===
'edit'
)
return
'编辑广告'
...
@@ -299,6 +304,9 @@ export default {
...
@@ -299,6 +304,9 @@ export default {
}
}
})
})
}
}
},
beforeMount
()
{
this
.
$store
.
dispatch
(
'app/getTypeList'
,
2
)
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/content-manage/article/index.vue
浏览文件 @
342c8b96
...
@@ -110,9 +110,14 @@ export default {
...
@@ -110,9 +110,14 @@ export default {
hasDelete
()
{
hasDelete
()
{
return
this
.
permissions
.
includes
(
'content-function-acticle-delete'
)
return
this
.
permissions
.
includes
(
'content-function-acticle-delete'
)
},
},
// 项目列表
projectList
()
{
projectList
()
{
return
this
.
$store
.
state
.
user
.
projects
return
this
.
$store
.
state
.
user
.
projects
},
},
// 类型列表
typeList
()
{
return
this
.
$store
.
state
.
app
.
typeList
},
drawTitle
()
{
drawTitle
()
{
if
(
this
.
drawFormOptions
.
type
===
'create'
)
return
'新建文章'
if
(
this
.
drawFormOptions
.
type
===
'create'
)
return
'新建文章'
else
if
(
this
.
drawFormOptions
.
type
===
'edit'
)
return
'编辑文章'
else
if
(
this
.
drawFormOptions
.
type
===
'edit'
)
return
'编辑文章'
...
@@ -293,6 +298,9 @@ export default {
...
@@ -293,6 +298,9 @@ export default {
}
}
})
})
}
}
},
beforeMount
()
{
this
.
$store
.
dispatch
(
'app/getTypeList'
,
1
)
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/content-manage/image-text/index.vue
浏览文件 @
342c8b96
...
@@ -97,9 +97,14 @@ export default {
...
@@ -97,9 +97,14 @@ export default {
hasDelete
()
{
hasDelete
()
{
return
this
.
permissions
.
includes
(
'content-function-imgtext-delete'
)
return
this
.
permissions
.
includes
(
'content-function-imgtext-delete'
)
},
},
// 项目列表
projectList
()
{
projectList
()
{
return
this
.
$store
.
state
.
user
.
projects
return
this
.
$store
.
state
.
user
.
projects
},
},
// 类型列表
typeList
()
{
return
this
.
$store
.
state
.
app
.
typeList
},
drawTitle
()
{
drawTitle
()
{
const
type
=
this
.
drawFormOptions
.
type
const
type
=
this
.
drawFormOptions
.
type
if
(
type
===
'create'
)
return
'新建图文'
if
(
type
===
'create'
)
return
'新建图文'
...
@@ -258,6 +263,9 @@ export default {
...
@@ -258,6 +263,9 @@ export default {
}
}
})
})
}
}
},
beforeMount
()
{
this
.
$store
.
dispatch
(
'app/getTypeList'
,
3
)
}
}
}
}
</
script
>
</
script
>
...
...
src/store/modules/app.js
浏览文件 @
342c8b96
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
import
{
getProjectContentTypeList
}
from
'@/api/contentManage'
const
state
=
{
const
state
=
{
sidebar
:
{
sidebar
:
{
opened
:
Cookies
.
get
(
'sidebarStatus'
)
?
!!+
Cookies
.
get
(
'sidebarStatus'
)
:
true
,
opened
:
Cookies
.
get
(
'sidebarStatus'
)
?
!!+
Cookies
.
get
(
'sidebarStatus'
)
:
true
,
withoutAnimation
:
false
withoutAnimation
:
false
}
},
typeList
:
[]
}
}
const
mutations
=
{
const
mutations
=
{
...
@@ -16,12 +18,22 @@ const mutations = {
...
@@ -16,12 +18,22 @@ const mutations = {
}
else
{
}
else
{
Cookies
.
set
(
'sidebarStatus'
,
0
)
Cookies
.
set
(
'sidebarStatus'
,
0
)
}
}
},
SET_TYPELIST
:
(
state
,
list
)
=>
{
console
.
log
(
list
)
state
.
typeList
=
list
}
}
}
}
const
actions
=
{
const
actions
=
{
toggleSideBar
({
commit
})
{
toggleSideBar
({
commit
})
{
commit
(
'TOGGLE_SIDEBAR'
)
commit
(
'TOGGLE_SIDEBAR'
)
},
getTypeList
({
commit
},
type
,
id
)
{
getProjectContentTypeList
(
type
,
id
).
then
(
res
=>
{
const
data
=
res
.
data
commit
(
'SET_TYPELIST'
,
data
)
})
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论