Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
81d8ea72
提交
81d8ea72
authored
2月 13, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(plan): 促销计划弹窗标签准备
同上
上级
c8221a8a
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
47 行增加
和
23 行删除
+47
-23
.env.development
.env.development
+0
-4
.env.production
.env.production
+0
-3
.env.staging
.env.staging
+0
-4
upload.js
src/api/common/upload.js
+1
-4
plan.js
src/api/promotion/plan.js
+11
-0
user.js
src/store/modules/user.js
+3
-1
index.vue
src/views/bi/finance/index.vue
+1
-2
index.vue
src/views/promotion/plan/index.vue
+31
-5
没有找到文件。
.env.development
浏览文件 @
81d8ea72
...
...
@@ -16,7 +16,3 @@ VITE_APP_PUBLIC_PATH = '/'
# 第三方服务回调地址
VITE_APP_REDIRECT_URL = 'http://localhost:8080/'
# 阿里云 OSS 外链前缀访问资源
VITE_APP_OSS_PUBLIC_URL = 'https://link-promotion-dev.oss-cn-shanghai.aliyuncs.com/'
.env.production
浏览文件 @
81d8ea72
...
...
@@ -13,6 +13,3 @@ VITE_APP_PUBLIC_PATH = './'
# 第三方服务回调地址
VITE_APP_REDIRECT_URL = 'http://111.198.15.68:86/link/'
# 阿里云 OSS 外链前缀访问资源
VITE_APP_OSS_PUBLIC_URL = '正式环境 OSS 外链地址'
.env.staging
浏览文件 @
81d8ea72
...
...
@@ -13,6 +13,3 @@ VITE_APP_PUBLIC_PATH = './'
# 第三方服务回调地址
VITE_APP_REDIRECT_URL = 'http://111.198.15.68:85/link/'
\ No newline at end of file
# 阿里云 OSS 外链前缀访问资源
VITE_APP_OSS_PUBLIC_URL = 'https://link-promotion-dev.oss-cn-shanghai.aliyuncs.com/'
\ No newline at end of file
src/api/common/upload.js
浏览文件 @
81d8ea72
import
request
from
'@/utils/request'
import
OSS
from
'ali-oss'
const
ossAuthURL
=
`
${
import
.
meta
.
env
.
VITE_APP_PROMOTION
}
/user/aliyun/sts_token`
// 后台获取阿里云 OSS 权限信息接口
const
ossPublickURL
=
import
.
meta
.
env
.
VITE_APP_OSS_PUBLIC_URL
// OSS 公共域名
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
store
from
'@/store'
// OSS 上传文件
export
const
uploadFileToOSSAPI
=
(
fileName
,
filePath
)
=>
{
...
...
@@ -29,7 +26,7 @@ export const uploadFileToOSSAPI = (fileName, filePath) => {
});
// 发送请求上传文件 (文件名包含路径文件夹名字)
const
res
=
await
client
.
put
(
`planExcel/
${
store
.
state
.
name
}
/
${
uuidv4
()}
-`
+
fileName
,
filePath
)
const
res
=
await
client
.
put
(
fileName
,
filePath
)
resolve
(
res
.
url
)
// 上传成功
})
...
...
src/api/promotion/plan.js
浏览文件 @
81d8ea72
...
...
@@ -17,3 +17,13 @@ export function getPlanListAPI(queryParams) {
}
})
}
// 表格新增计划
export
function
addPlanAPI
(
data
)
{
return
request
({
baseURL
:
VITE_APP_PROMOTION
,
url
:
'/plan/v2/core/self/upload'
,
method
:
'POST'
,
data
})
}
\ No newline at end of file
src/store/modules/user.js
浏览文件 @
81d8ea72
...
...
@@ -12,7 +12,8 @@ export default defineStore(
name
:
''
,
avatar
:
''
,
roles
:
[],
permissions
:
[]
permissions
:
[],
userInfo
:
''
}),
actions
:
{
/**
...
...
@@ -61,6 +62,7 @@ export default defineStore(
this
.
id
=
user
.
userId
this
.
name
=
user
.
nickName
this
.
avatar
=
avatar
this
.
userInfo
=
user
resolve
(
res
)
}).
catch
(
error
=>
{
reject
(
error
)
...
...
src/views/bi/finance/index.vue
浏览文件 @
81d8ea72
...
...
@@ -231,7 +231,7 @@
</template>
<
script
setup
>
import
{
getBrandListAPI
,
getTasteListAPI
,
getSpecListAPI
,
getSeriesListAPI
,
getProductListAPI
,
getFinanceListAPI
,
getFinanceDetailAPI
,
getFinanceSubListAPI
,
downloadFinanceListAPI
}
from
'@/api'
import
{
getBrandListAPI
,
getTasteListAPI
,
getSpecListAPI
,
getSeriesListAPI
,
getProductListAPI
,
getFinanceListAPI
,
getFinanceDetailAPI
,
getFinanceSubListAPI
,
downloadFinanceListAPI
,
addPlanAPI
}
from
'@/api'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
formatNumberWithUnit
,
parseTime
}
from
'@/utils'
...
...
@@ -782,7 +782,6 @@ const detailFormatter = (row, column, value) => {
const
changeShowOver
=
()
=>
{
showOverFlowToolTip
.
value
=
!
showOverFlowToolTip
.
value
}
</
script
>
<
style
scoped
...
...
src/views/promotion/plan/index.vue
浏览文件 @
81d8ea72
...
...
@@ -16,8 +16,7 @@
:shortcuts=
"pickerOptions"
/>
</el-form-item>
<el-form-item
label=
"上传计划"
>
<el-upload
v-model:file-list=
"fileList"
class=
"upload-demo"
<el-upload
class=
"upload-demo"
action=
"#"
accept=
".xls,.xlsx"
:http-request=
"uploadFile"
...
...
@@ -46,6 +45,22 @@
:formatter=
"formatter"
:fixed=
"item.fixed"
/>
</el-table>
<!-- 弹窗确认上传计划 -->
<el-dialog
title=
"上传计划"
v-model=
"dialogVisible"
width=
"80%"
>
<div>
<!-- 计划表格 -->
<el-table
:data=
"planTableList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"name"
label=
"文件名"
width=
"200"
>
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</div>
</template>
...
...
@@ -53,6 +68,8 @@
<
script
setup
>
import
{
getPlanListAPI
,
uploadFileToOSSAPI
}
from
'@/api'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
store
from
'@/store'
const
{
recentPickerOptions
:
pickerOptions
,
last7Date
}
=
useDatePickerOptions
(
0
)
const
queryParams
=
reactive
({
...
...
@@ -137,10 +154,19 @@ const formatter = (row, col, value) => {
}
// 上传计划
const
fileList
=
ref
([])
const
uploadFile
=
(
file
)
=>
{
uploadFileToOSSAPI
(
file
.
file
.
name
,
file
.
file
)
const
uploadFile
=
async
(
file
)
=>
{
console
.
log
(
store
.
state
)
const
excelUrl
=
await
uploadFileToOSSAPI
(
`planExcel/
${
store
.
state
.
value
.
user
.
name
}
/
${
uuidv4
()}
-`
+
file
.
file
.
name
,
file
.
file
)
// const res = await addPlanAPI({
// "excelUrl": excelUrl,
// "employeeNo": store.state.value.user.userInfo.userName
// })
dialogVisible
.
value
=
true
}
// 确认计划
const
planTableList
=
ref
([])
const
dialogVisible
=
ref
(
false
)
</
script
>
<
style
scoped
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论