Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
d47fd741
Commit
d47fd741
authored
Jun 06, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复导入 成员 bug
parent
93b8a7c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
12 deletions
+34
-12
InviteMember.vue
src/views/components/Team/InviteMember.vue
+34
-12
No files found.
src/views/components/Team/InviteMember.vue
View file @
d47fd741
...
...
@@ -57,12 +57,15 @@
<div
class=
"col text-dark"
style=
"font-size: 16px"
>
上传文件
</div>
</div>
<div
class=
"q-mt-lg"
>
<el-upload
class=
"
full-height full-width
text-primary"
drag
accept=
".xls,.xlsx"
<el-upload
class=
" text-primary"
drag
accept=
".xls,.xlsx"
:action=
"getUploadActionUrl()"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:file-list=
"fileList"
:limit=
"1"
ref=
"upload"
:on-exceed=
"handleExceed"
>
<
template
#
trigger
>
<IconUpload
size=
"54"
class=
""
></IconUpload>
<div
class=
"el-upload__text"
>
<div
style=
"font-size: 16px;"
class=
"q-my-lg"
>
成员名单仅支持 .xls .xlsx
</div>
...
...
@@ -70,11 +73,14 @@
<el-button
class=
"ppt-button"
type=
"primary"
size=
"target"
>
导入成员名单
</el-button>
</div>
</div>
<
template
#
tip
></
template
>
</
template
>
<
template
#
tip
>
<div></div>
</
template
>
</el-upload>
</div>
<
template
v-if=
"dialogVisible"
>
<div
class=
"
q-mt-lg
text-primary"
style=
"font-weight: bold;"
>
提示
</div>
<div
class=
"text-primary"
style=
"font-weight: bold;"
>
提示
</div>
<div
class=
"q-mt-xs row flex-between items-center"
style=
"position: relative;"
>
<div>
<el-alert
show-icon
title=
"人员总数"
type=
"info"
:closable=
"false"
>
...
...
@@ -162,7 +168,7 @@ import { ElMessage } from "element-plus"
import
{
storeToRefs
}
from
"pinia"
import
{
ref
,
unref
}
from
"vue"
import
{
domainManager
}
from
'@/utils/domainManager'
import
{
ElAlert
,
UploadUser
File
}
from
'element-plus'
;
import
type
{
ElAlert
,
UploadUserFile
,
UploadInstance
,
UploadProps
,
UploadRaw
File
}
from
'element-plus'
;
const
props
=
defineProps
({
showType
:
{
...
...
@@ -195,6 +201,14 @@ const closeUploadRes = () => {
const
closed
=
()
=>
{
emit
(
'close'
)
}
const
upload
=
ref
<
UploadInstance
>
()
const
handleExceed
:
UploadProps
[
'onExceed'
]
=
(
files
)
=>
{
upload
.
value
!
.
clearFiles
()
const
file
=
files
[
0
]
as
UploadRawFile
upload
.
value
!
.
handleStart
(
file
)
upload
.
value
.
submit
()
}
const
goDownload
=
(
type
:
any
)
=>
{
if
(
type
==
1
)
window
.
location
.
href
=
UploadResults
.
value
.
DownloadUrl
...
...
@@ -209,22 +223,23 @@ const getUploadActionUrl=()=>{
}
const
handleAvatarSuccess
=
(
res
:
any
)
=>
{
console
.
log
(
"handleAvatarSuccess_res"
,
res
);
if
(
res
.
data
){
UploadResults
.
value
=
res
.
data
if
(
res
.
data
.
successNum
>
0
)
emit
(
'imported'
)
if
(
res
.
data
.
failUrl
)
UploadResults
.
value
.
DownloadUrl
=
domainManager
().
DownloadUrl
.
replace
(
"common"
,
"file"
)
+
`
${
res
.
data
.
failUrl
}
`
}
console
.
log
(
"handleAvatarSuccess_res"
,
res
);
}
const
beforeAvatarUpload
=
async
(
res
:
any
)
=>
{
console
.
log
(
"beforeAvatarUpload_res"
,
res
);
const
beforeAvatarUpload
=
(
res
:
any
)
=>
{
closeUploadRes
()
fileList
.
value
.
push
({
name
:
res
.
name
,
url
:
''
})
dialogVisible
.
value
=
true
console
.
log
(
"beforeAvatarUpload_res"
,
res
);
// fileList.value.unshift({
// name: res.name+new Date().getTime(),
// url: ''
// })
}
const
copyInviteUrlHandler
=
async
(
e
:
MouseEvent
)
=>
{
...
...
@@ -255,6 +270,13 @@ const setIsAdminHandler = (isa: number) => {
</
script
>
<
style
scoped
>
.InviteMember
::v-deep
(
.el-upload-dragger
)
{
padding
:
15px
0
;
}
.InviteMember
::v-deep
(
.el-upload-list
)
{
height
:
20px
;
overflow
:
hidden
;
}
.InviteMember
.content-item
{
display
:
flex
;
flex-direction
:
row
;
...
...
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