Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
64e35831
Commit
64e35831
authored
Jan 22, 2024
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推修改钉钉请假记录附件显示
parent
28c4a254
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
attendance-performance-manager-ui/admin/src/components/FileUpload.vue
...erformance-manager-ui/admin/src/components/FileUpload.vue
+18
-2
No files found.
attendance-performance-manager-ui/admin/src/components/FileUpload.vue
View file @
64e35831
...
@@ -44,7 +44,13 @@
...
@@ -44,7 +44,13 @@
class=
"el-upload-list__item ele-upload-list__item-content"
class=
"el-upload-list__item ele-upload-list__item-content"
v-for=
"(file, index) in list"
v-for=
"(file, index) in list"
>
>
<el-link
:href=
"baseUrl + file.url"
:underline=
"false"
target=
"_blank"
>
<el-link
:href=
"
file.url[0].indexOf('https') == -1 ? baseUrl + file.url : file.url
"
:underline=
"false"
target=
"_blank"
>
<span
class=
"el-icon-document"
style=
"font-size: 12px"
>
<span
class=
"el-icon-document"
style=
"font-size: 12px"
>
{{ getFileName(file.name) }}
{{ getFileName(file.name) }}
</span>
</span>
...
@@ -148,12 +154,22 @@ export default {
...
@@ -148,12 +154,22 @@ export default {
console
.
log
(
"
value
"
,
this
.
value
);
console
.
log
(
"
value
"
,
this
.
value
);
// 首先将值转为数组
// 首先将值转为数组
const
list
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[
this
.
value
];
const
list
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[
this
.
value
];
list
&&
list
.
forEach
((
v
)
=>
{
v
.
url
.
indexOf
(
"
https
"
)
>=
0
?
(
v
.
url
=
JSON
.
parse
(
v
.
url
))
:
v
.
url
;
});
console
.
log
(
list
,
'
1233
'
);
// 然后将数组转为对象数组
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
((
item
)
=>
{
this
.
fileList
=
list
.
map
((
item
)
=>
{
item
=
{
name
:
item
.
name
,
url
:
item
.
url
};
item
=
{
name
:
item
.
name
,
url
:
item
.
url
.
indexOf
(
"
[`
\
`
"
)
>=
0
?
JSON
.
parse
(
item
.
url
)
:
item
.
url
,
};
item
.
uid
=
item
.
uid
||
new
Date
().
getTime
()
+
temp
++
;
item
.
uid
=
item
.
uid
||
new
Date
().
getTime
()
+
temp
++
;
return
item
;
return
item
;
});
});
return
this
.
fileList
;
return
this
.
fileList
;
}
else
{
}
else
{
this
.
fileList
=
[];
this
.
fileList
=
[];
...
...
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