Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1146ee0d
authored
May 13, 2026
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(shortLightAlloction): 优化上传文件逻辑,处理无匹配员工时的反馈与状态更新
1 parent
59d340f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
src/views/serviceCentre/shortCourse/components/shortLightAlloction.vue
src/views/serviceCentre/shortCourse/components/shortLightAlloction.vue
View file @
1146ee0
...
@@ -428,13 +428,22 @@ export default {
...
@@ -428,13 +428,22 @@ export default {
cancelFun
:
this
.
whitelistFiles
[
index
].
cancelAxios
,
cancelFun
:
this
.
whitelistFiles
[
index
].
cancelAxios
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
$set
(
this
.
whitelistFiles
[
index
],
"uploadProgress"
,
100
);
// 接口 data 内员工列表(axios 拦截器已解包为 data 对象)
// 接口 data 内员工列表(axios 拦截器已解包为 data 对象)
const
raw
=
res
&&
typeof
res
===
"object"
?
res
:
{};
const
raw
=
res
&&
typeof
res
===
"object"
?
res
:
{};
const
list
=
Array
.
isArray
(
raw
.
staffList
)
const
list
=
Array
.
isArray
(
raw
.
staffList
)
?
raw
.
staffList
?
raw
.
staffList
:
(
Array
.
isArray
(
raw
.
data
?.
staffList
)
?
raw
.
data
.
staffList
:
[]);
:
(
Array
.
isArray
(
raw
.
data
?.
staffList
)
?
raw
.
data
.
staffList
:
[]);
// 优先判断:无匹配员工时不落库、不覆盖原有名单与文件地址,仅清空本次上传控件
if
(
!
list
.
length
)
{
this
.
whitelistFiles
=
[];
this
.
uploadFileList
=
[];
this
.
$refs
.
whitelistUpload
&&
this
.
$refs
.
whitelistUpload
.
clearFiles
();
this
.
$message
.
warning
(
"文件无匹配数据请重新上传"
);
return
;
}
this
.
$set
(
this
.
whitelistFiles
[
index
],
"uploadProgress"
,
100
);
this
.
phoneWhitelistStaffList
=
list
;
this
.
phoneWhitelistStaffList
=
list
;
// 尝试从返回值中取可预览的 url(不同后端可能字段不同)
// 尝试从返回值中取可预览的 url(不同后端可能字段不同)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment