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
b67fabcf
authored
Jul 05, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: mall SeckillActivity
parent
40571302
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
src/views/mall/promotion/seckill/activity/index.vue
+20
-1
src/views/mall/promotion/seckill/activity/seckillActivity.data.ts
+1
-1
No files found.
src/views/mall/promotion/seckill/activity/index.vue
View file @
b67fabcf
...
...
@@ -32,6 +32,14 @@
@
expand-change=
"expandChange"
>
<
template
#
expand
>
展示活动商品和商品相关属性活动配置
</
template
>
<
template
#
spuId=
"{ row }"
>
<el-image
:src=
"row.picUrl"
class=
"w-30px h-30px align-middle mr-5px"
@
click=
"imagePreview(row.picUrl)"
/>
<span
class=
"align-middle"
>
{{
row
.
spuName
}}
</span>
</
template
>
<
template
#
configIds=
"{ row }"
>
<el-tag
v-for=
"(name, index) in convertSeckillConfigNames(row)"
:key=
"index"
class=
"mr-5px"
>
{{
name
}}
...
...
@@ -67,6 +75,7 @@ import { getListAllSimple } from '@/api/mall/promotion/seckill/seckillConfig'
import
*
as
SeckillActivityApi
from
'@/api/mall/promotion/seckill/seckillActivity'
import
SeckillActivityForm
from
'./SeckillActivityForm.vue'
import
{
cloneDeep
}
from
'lodash-es'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
defineOptions
({
name
:
'PromotionSeckillActivity'
})
...
...
@@ -90,7 +99,12 @@ const openForm = (type: string, id?: number) => {
const
handleDelete
=
(
id
:
number
)
=>
{
tableMethods
.
delList
(
id
,
false
)
}
/** 商品图预览 */
const
imagePreview
=
(
imgUrl
:
string
)
=>
{
createImageViewer
({
urlList
:
[
imgUrl
]
})
}
const
configList
=
ref
([])
// 时段配置精简列表
const
convertSeckillConfigNames
=
computed
(
()
=>
(
row
)
=>
...
...
@@ -106,6 +120,11 @@ const expandChange = (row, expandedRows) => {
/** 初始化 **/
onMounted
(
async
()
=>
{
/*
TODO
后面准备封装成一个函数来操作 tableColumns 重新排列:比如说需求是表单上商品选择是在后面的而列表展示的时候需要调到位置。
封装效果支持批量操作,给出 field 和需要插入的位置,例:[{field:'spuId',index: 1}] 效果为把 field 为 spuId 的 column 移动到第一个位置
*/
// 处理一下表格列让商品往前
const
index
=
allSchemas
.
tableColumns
.
findIndex
((
item
)
=>
item
.
field
===
'spuId'
)
const
column
=
cloneDeep
(
allSchemas
.
tableColumns
[
index
])
...
...
src/views/mall/promotion/seckill/activity/seckillActivity.data.ts
View file @
b67fabcf
...
...
@@ -194,7 +194,7 @@ const crudSchemas = reactive<CrudSchema[]>([
}
},
table
:
{
width
:
2
00
width
:
3
00
}
},
{
...
...
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