Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
60f5a879
提交
60f5a879
authored
2月 12, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(promotion/plan): 促销计划表格数据展示完毕
同上
上级
5f282ab9
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
144 行增加
和
4 行删除
+144
-4
index.js
src/api/index.js
+1
-0
plan.js
src/api/promotion/plan.js
+20
-0
request.js
src/utils/request.js
+7
-2
index.vue
src/views/promotion/plan/index.vue
+116
-1
index.vue
src/views/promotion/task/index.vue
+0
-1
没有找到文件。
src/api/index.js
浏览文件 @
60f5a879
...
@@ -13,6 +13,7 @@ export * from './monitor/job'
...
@@ -13,6 +13,7 @@ export * from './monitor/job'
export
*
from
'./monitor/jobLog'
export
*
from
'./monitor/jobLog'
export
*
from
'./monitor/online'
export
*
from
'./monitor/online'
export
*
from
'./monitor/server'
export
*
from
'./monitor/server'
export
*
from
'./promotion/plan'
export
*
from
'./promotion/task'
export
*
from
'./promotion/task'
export
*
from
'./system/dict/data'
export
*
from
'./system/dict/data'
export
*
from
'./system/dict/type'
export
*
from
'./system/dict/type'
...
...
src/api/promotion/plan.js
0 → 100644
浏览文件 @
60f5a879
import
request
from
'@/utils/request'
const
VITE_APP_PROMOTION
=
import
.
meta
.
env
.
VITE_APP_PROMOTION
// 获取计划列表
export
function
getPlanListAPI
(
queryParams
)
{
return
request
({
baseURL
:
VITE_APP_PROMOTION
,
url
:
'/plan/v2/query/page'
,
method
:
'POST'
,
data
:
{
"pageNum"
:
queryParams
.
pageNum
,
"pageSize"
:
queryParams
.
pageSize
,
"queryParams"
:
{
"activityStartDate"
:
queryParams
.
activityDate
[
0
],
"activityEndDate"
:
queryParams
.
activityDate
[
1
]
}
}
})
}
\ No newline at end of file
src/utils/request.js
浏览文件 @
60f5a879
...
@@ -12,7 +12,7 @@ let downloadLoadingInstance;
...
@@ -12,7 +12,7 @@ let downloadLoadingInstance;
// 是否显示重新登录
// 是否显示重新登录
export
let
isRelogin
=
{
show
:
false
};
export
let
isRelogin
=
{
show
:
false
};
//
其他
系统后台 baseURL
//
促销
系统后台 baseURL
export
const
promotionBaseURL
=
import
.
meta
.
env
.
VITE_APP_PROMOTION_BASE_API
export
const
promotionBaseURL
=
import
.
meta
.
env
.
VITE_APP_PROMOTION_BASE_API
axios
.
defaults
.
headers
[
'Content-Type'
]
=
'application/json;charset=utf-8'
axios
.
defaults
.
headers
[
'Content-Type'
]
=
'application/json;charset=utf-8'
...
@@ -31,7 +31,12 @@ service.interceptors.request.use(config => {
...
@@ -31,7 +31,12 @@ service.interceptors.request.use(config => {
// 是否需要防止数据重复提交
// 是否需要防止数据重复提交
const
isRepeatSubmit
=
(
config
.
headers
||
{}).
repeatSubmit
===
false
const
isRepeatSubmit
=
(
config
.
headers
||
{}).
repeatSubmit
===
false
if
(
getToken
()
&&
!
isToken
)
{
if
(
getToken
()
&&
!
isToken
)
{
config
.
headers
[
'Authorization'
]
=
'Bearer '
+
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
if
(
config
.
url
.
indexOf
(
promotionBaseURL
))
{
// 促销后台不能带 Bearer 前缀
config
.
headers
[
'Authorization'
]
=
getToken
()
}
else
{
config
.
headers
[
'Authorization'
]
=
'Bearer '
+
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
}
}
}
// get请求映射params参数
// get请求映射params参数
if
(
config
.
method
===
'get'
&&
config
.
params
)
{
if
(
config
.
method
===
'get'
&&
config
.
params
)
{
...
...
src/views/promotion/plan/index.vue
浏览文件 @
60f5a879
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
class=
"container"
>
<div
class=
"container"
>
促销计划
<!-- 查询表单 -->
<el-form
:model=
"queryParams"
inline
label-width=
"68px"
>
<el-form-item
label=
"选择日期"
prop=
"date"
>
<el-date-picker
v-model=
"queryParams.activityDate"
type=
"daterange"
:clearable=
"false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:shortcuts=
"pickerOptions"
/>
</el-form-item>
</el-form>
<!-- 表格列表 -->
<!-- 数据表格 -->
<el-table
:data=
"tableList"
:cell-style=
"
{ 'word-wrap': 'break-word', 'white-space': 'normal' }"
border
style="width: 100%"
show-overflow-tooltip>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
v-for=
"item in columns"
:key=
"item.label"
:prop=
"item.prop"
:label=
"item.label"
:width=
"item.width"
:formatter=
"formatter"
:fixed=
"item.fixed"
/>
</el-table>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
getPlanListAPI
}
from
'@/api'
import
{
useDatePickerOptions
}
from
'@/hooks'
const
{
recentPickerOptions
:
pickerOptions
,
last7Date
}
=
useDatePickerOptions
(
0
)
const
queryParams
=
reactive
({
pageNum
:
1
,
pageSize
:
10
,
activityDate
:
last7Date
})
// 任务列表
const
tableList
=
ref
([])
const
columns
=
ref
([
{
label
:
'活动 ID'
,
prop
:
'id'
,
width
:
90
,
fixed
:
true
},
{
label
:
'负责人'
,
prop
:
'employeeName'
,
width
:
90
,
fixed
:
true
},
{
label
:
'经销商'
,
prop
:
'dealerName'
,
width
:
220
,
fixed
:
true
},
{
label
:
'系统名称'
,
prop
:
'lineName'
,
width
:
100
},
{
label
:
'店铺名称'
,
prop
:
'storeName'
,
width
:
200
},
{
label
:
'活动状态'
,
prop
:
'planStatus'
,
width
:
100
},
{
label
:
'活动模式'
,
prop
:
'pattern'
,
width
:
100
},
{
label
:
'省份'
,
prop
:
'province'
,
width
:
100
},
{
label
:
'城市'
,
prop
:
'city'
,
width
:
100
},
{
label
:
'最后修改时间'
,
prop
:
'modifyTime'
,
width
:
250
},
{
label
:
'上传文件名称'
,
prop
:
''
,
width
:
150
},
{
label
:
'操作'
,
prop
:
''
},
])
const
getPlanList
=
async
()
=>
{
const
res
=
await
getPlanListAPI
(
queryParams
)
tableList
.
value
=
res
.
data
.
records
}
getPlanList
()
const
formatter
=
(
row
,
col
,
value
)
=>
{
return
value
}
</
script
>
</
script
>
<
style
scoped
<
style
scoped
...
...
src/views/promotion/task/index.vue
浏览文件 @
60f5a879
...
@@ -113,7 +113,6 @@ import { useDatePickerOptions } from '@/hooks'
...
@@ -113,7 +113,6 @@ import { useDatePickerOptions } from '@/hooks'
import
{
getWarZoneListAPI
,
getChargeListAPI
,
getTaskListAPI
,
getProCityAPI
}
from
'@/api'
import
{
getWarZoneListAPI
,
getChargeListAPI
,
getTaskListAPI
,
getProCityAPI
}
from
'@/api'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
const
{
recentPickerOptions
:
pickerOptions
,
last7Date
}
=
useDatePickerOptions
(
0
)
const
{
recentPickerOptions
:
pickerOptions
,
last7Date
}
=
useDatePickerOptions
(
0
)
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
date
:
last7Date
,
date
:
last7Date
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论