Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
66ec6108
authored
Oct 16, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:文章管理
parent
7b9ea62e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
37 deletions
+19
-37
src/views/mall/promotion/article/ArticleForm.vue
+7
-5
src/views/mall/promotion/article/index.vue
+12
-32
No files found.
src/views/mall/promotion/article/ArticleForm.vue
View file @
66ec6108
...
@@ -9,6 +9,11 @@
...
@@ -9,6 +9,11 @@
>
>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"文章标题"
prop=
"title"
>
<el-input
v-model=
"formData.title"
placeholder=
"请输入文章标题"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"文章分类"
prop=
"categoryId"
>
<el-form-item
label=
"文章分类"
prop=
"categoryId"
>
<el-select
v-model=
"formData.categoryId"
placeholder=
"请选择"
>
<el-select
v-model=
"formData.categoryId"
placeholder=
"请选择"
>
<el-option
<el-option
...
@@ -21,11 +26,6 @@
...
@@ -21,11 +26,6 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"文章标题"
prop=
"title"
>
<el-input
v-model=
"formData.title"
placeholder=
"请输入文章标题"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"文章作者"
prop=
"author"
>
<el-form-item
label=
"文章作者"
prop=
"author"
>
<el-input
v-model=
"formData.author"
placeholder=
"请输入文章作者"
/>
<el-input
v-model=
"formData.author"
placeholder=
"请输入文章作者"
/>
</el-form-item>
</el-form-item>
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
<UploadImg
v-model=
"formData.picUrl"
height=
"80px"
/>
<UploadImg
v-model=
"formData.picUrl"
height=
"80px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<!-- TODO @puhui999:浏览次数,不能修改 -->
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"浏览次数"
prop=
"browseCount"
>
<el-form-item
label=
"浏览次数"
prop=
"browseCount"
>
<el-input-number
<el-input-number
...
@@ -68,6 +69,7 @@
...
@@ -68,6 +69,7 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<!-- TODO @puhui999:可以使用 SpuTableSelect -->
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品关联"
prop=
"spuId"
>
<el-form-item
label=
"商品关联"
prop=
"spuId"
>
<el-select
v-model=
"formData.spuId"
placeholder=
"请选择"
>
<el-select
v-model=
"formData.spuId"
placeholder=
"请选择"
>
...
...
src/views/mall/promotion/article/index.vue
View file @
66ec6108
...
@@ -78,51 +78,31 @@
...
@@ -78,51 +78,31 @@
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
<el-table-column
align=
"center"
label=
"文章分类"
prop=
"categoryId"
>
<el-table-column
align=
"center"
label=
"编号"
prop=
"id"
min-width=
"60"
/>
<template
#
default=
"scope"
>
<el-table-column
align=
"center"
label=
"封面"
prop=
"picUrl"
min-width=
"80"
>
{{
categoryList
.
find
((
item
)
=>
item
.
id
===
scope
.
row
.
categoryId
)?.
name
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"关联商品"
prop=
"spuId"
width=
"300"
>
<
template
#
default=
"scope"
>
<el-image
:preview-src-list=
"[spuList.find((item) => item.id === scope.row.spuId)?.picUrl]"
:src=
"spuList.find((item) => item.id === scope.row.spuId)?.picUrl"
class=
"mr-[10px] h-40px w-40px v-middle"
preview-teleported
/>
{{
spuList
.
find
((
item
)
=>
item
.
id
===
scope
.
row
.
spuId
)?.
name
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"文章标题"
prop=
"title"
/>
<el-table-column
align=
"center"
label=
"文章作者"
prop=
"author"
/>
<el-table-column
align=
"center"
label=
"文章封面"
prop=
"picUrl"
>
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
<el-image
:src=
"row.picUrl"
class=
"h-30px w-30px"
@
click=
"imagePreview(row.picUrl)"
/>
<el-image
:src=
"row.picUrl"
class=
"h-30px w-30px"
@
click=
"imagePreview(row.picUrl)"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"文章简介"
prop=
"introduction"
/>
<el-table-column
align=
"center"
label=
"标题"
prop=
"title"
min-width=
"180"
/>
<el-table-column
align=
"center"
label=
"浏览次数"
prop=
"browseCount"
/>
<el-table-column
align=
"center"
label=
"分类"
prop=
"categoryId"
min-width=
"180"
>
<el-table-column
align=
"center"
label=
"排序"
prop=
"sort"
/>
<el-table-column
align=
"center"
label=
"状态"
prop=
"status"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMON_STATUS"
:value=
"scope.row.status"
/>
{{
categoryList
.
find
((
item
)
=>
item
.
id
===
scope
.
row
.
categoryId
)?.
name
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"热门"
prop=
"recommendHot"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.recommendHot"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"轮播图"
prop=
"recommendBanner"
>
<el-table-column
align=
"center"
label=
"浏览量"
prop=
"browseCount"
min-width=
"180"
/>
<el-table-column
align=
"center"
label=
"作者"
prop=
"author"
min-width=
"180"
/>
<el-table-column
align=
"center"
label=
"文章简介"
prop=
"introduction"
min-width=
"250"
/>
<el-table-column
align=
"center"
label=
"排序"
prop=
"sort"
min-width=
"60"
/>
<el-table-column
align=
"center"
label=
"状态"
prop=
"status"
min-width=
"60"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.
INFRA_BOOLEAN_STRING"
:value=
"scope.row.recommendBanner
"
/>
<dict-tag
:type=
"DICT_TYPE.
COMMON_STATUS"
:value=
"scope.row.status
"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
label=
"
创建
时间"
label=
"
发布
时间"
prop=
"createTime"
prop=
"createTime"
width=
"180px"
width=
"180px"
/>
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment