Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
24000b84
提交
24000b84
authored
2月 13, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(plan): 计划 excel 的 url 上传
同上
上级
81d8ea72
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
10 行删除
+19
-10
user.js
src/api/system/user.js
+3
-1
index.vue
src/views/promotion/plan/index.vue
+16
-9
没有找到文件。
src/api/system/user.js
浏览文件 @
24000b84
...
@@ -51,6 +51,7 @@ export function updateUser(data) {
...
@@ -51,6 +51,7 @@ export function updateUser(data) {
})
})
}
}
// 删除用户
// 删除用户
export
function
delUser
(
userId
)
{
export
function
delUser
(
userId
)
{
return
request
({
return
request
({
...
@@ -148,4 +149,4 @@ export function deptTreeSelectList() {
...
@@ -148,4 +149,4 @@ export function deptTreeSelectList() {
url
:
'/system/user/deptTree'
,
url
:
'/system/user/deptTree'
,
method
:
'get'
method
:
'get'
})
})
}
}
\ No newline at end of file
src/views/promotion/plan/index.vue
浏览文件 @
24000b84
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
getPlanListAPI
,
uploadFileToOSSAPI
}
from
'@/api'
import
{
getPlanListAPI
,
uploadFileToOSSAPI
,
addPlanAPI
}
from
'@/api'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
store
from
'@/store'
import
store
from
'@/store'
...
@@ -96,8 +96,7 @@ const columns = ref([
...
@@ -96,8 +96,7 @@ const columns = ref([
{
{
label
:
'经销商'
,
label
:
'经销商'
,
prop
:
'dealerName'
,
prop
:
'dealerName'
,
width
:
220
,
width
:
220
fixed
:
true
},
},
{
{
label
:
'系统名称'
,
label
:
'系统名称'
,
...
@@ -150,17 +149,25 @@ const getPlanList = async () => {
...
@@ -150,17 +149,25 @@ const getPlanList = async () => {
}
}
getPlanList
()
getPlanList
()
const
formatter
=
(
row
,
col
,
value
)
=>
{
const
formatter
=
(
row
,
col
,
value
)
=>
{
return
value
if
(
col
.
property
===
'planStatus'
)
{
return
value
==
0
?
'执行中'
:
'取消'
}
else
{
return
value
}
}
}
// 上传计划
// 上传计划
const
uploadFile
=
async
(
file
)
=>
{
const
uploadFile
=
async
(
file
)
=>
{
console
.
log
(
store
.
state
)
console
.
log
(
store
.
state
)
const
excelUrl
=
await
uploadFileToOSSAPI
(
`planExcel/
${
store
.
state
.
value
.
user
.
name
}
/
${
uuidv4
()}
-`
+
file
.
file
.
name
,
file
.
file
)
// 拼接当前月数为文件夹名
// const res = await addPlanAPI({
const
date
=
new
Date
()
// "excelUrl": excelUrl,
const
month
=
date
.
getMonth
()
+
1
// "employeeNo": store.state.value.user.userInfo.userName
const
excelUrl
=
await
uploadFileToOSSAPI
(
`planExcel/
${
date
.
getFullYear
()}
-
${
month
}
/
${
store
.
state
.
value
.
user
.
userInfo
.
userName
}
/
${
uuidv4
()}
.xlsx`
,
file
.
file
)
// })
const
res
=
await
addPlanAPI
({
"excelUrl"
:
excelUrl
,
"employeeNo"
:
store
.
state
.
value
.
user
.
userInfo
.
userName
})
console
.
log
(
res
)
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论