Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
component
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
purplevin
component
Commits
e2adc16f
Commit
e2adc16f
authored
Sep 06, 2022
by
erichsieh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor : 更新xixin
parent
0d913a66
Pipeline
#3656
failed with stages
in 3 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
10 deletions
+17
-10
packages/splitTool/src/components/SplitBookMarkWordForm.vue
packages/splitTool/src/components/SplitBookMarkWordForm.vue
+3
-1
packages/splitTool/src/components/SplitPageBreakWordForm.vue
packages/splitTool/src/components/SplitPageBreakWordForm.vue
+3
-1
packages/splitTool/src/components/SplitRangeWordForm.vue
packages/splitTool/src/components/SplitRangeWordForm.vue
+3
-1
packages/splitTool/src/components/SplitWordForm.vue
packages/splitTool/src/components/SplitWordForm.vue
+3
-1
packages/splitTool/src/mixin/toolMixin.js
packages/splitTool/src/mixin/toolMixin.js
+5
-6
No files found.
packages/splitTool/src/components/SplitBookMarkWordForm.vue
View file @
e2adc16f
...
...
@@ -48,8 +48,10 @@
</
template
>
<
script
>
import
{
splitDocxByBookMark
}
from
'
@api/graphApi
'
import
mixin
from
'
../mixin/toolMixin
'
export
default
{
name
:
'
SplitWordForm
'
,
mixins
:[
mixin
],
props
:{
baseUrl
:{
type
:
String
...
...
@@ -78,7 +80,7 @@ export default {
this
.
fileList
=
[]
this
.
$refs
.
upload
.
clearFiles
()
const
excelFileName
=
response
.
data
this
.
downloadFile
(
excelFileName
)
this
.
downloadFile
(
this
.
baseUrl
,
excelFileName
)
}
else
{
this
.
$refs
.
upload
.
abort
()
this
.
$message
.
error
(
'
下载档案失败!
'
)
...
...
packages/splitTool/src/components/SplitPageBreakWordForm.vue
View file @
e2adc16f
...
...
@@ -48,8 +48,10 @@
</
template
>
<
script
>
import
{
splitDocxByPageBreak
}
from
'
@api/graphApi
'
import
mixin
from
'
../mixin/toolMixin
'
export
default
{
name
:
'
SplitWordForm
'
,
mixins
:[
mixin
],
props
:{
baseUrl
:{
type
:
String
...
...
@@ -78,7 +80,7 @@ export default {
this
.
fileList
=
[]
this
.
$refs
.
upload
.
clearFiles
()
const
excelFileName
=
response
.
data
this
.
downloadFile
(
excelFileName
)
this
.
downloadFile
(
this
.
baseUrl
,
excelFileName
)
}
else
{
this
.
$refs
.
upload
.
abort
()
this
.
$message
.
error
(
'
下载档案失败!
'
)
...
...
packages/splitTool/src/components/SplitRangeWordForm.vue
View file @
e2adc16f
...
...
@@ -54,8 +54,10 @@
</
template
>
<
script
>
import
{
splitDocxByRange
}
from
'
@api/graphApi
'
import
mixin
from
'
../mixin/toolMixin
'
export
default
{
name
:
'
SplitRangeWordForm
'
,
mixins
:[
mixin
],
props
:{
baseUrl
:{
type
:
String
...
...
@@ -90,7 +92,7 @@ export default {
this
.
fileList
=
[]
this
.
$refs
.
upload
.
clearFiles
()
const
excelFileName
=
response
.
data
this
.
downloadFile
(
excelFileName
)
this
.
downloadFile
(
this
.
baseUrl
,
excelFileName
)
}
else
{
this
.
$refs
.
upload
.
abort
()
this
.
$message
.
error
(
'
下载档案失败!
'
)
...
...
packages/splitTool/src/components/SplitWordForm.vue
View file @
e2adc16f
...
...
@@ -48,8 +48,10 @@
</
template
>
<
script
>
import
{
splitDocx
}
from
'
@api/graphApi
'
import
mixin
from
'
../mixin/toolMixin
'
export
default
{
name
:
'
SplitWordForm
'
,
mixins
:[
mixin
],
props
:{
baseUrl
:{
type
:
String
...
...
@@ -78,7 +80,7 @@ export default {
this
.
fileList
=
[]
this
.
$refs
.
upload
.
clearFiles
()
const
excelFileName
=
response
.
data
this
.
downloadFile
(
excelFileName
)
this
.
downloadFile
(
this
.
baseUrl
,
excelFileName
)
}
else
{
this
.
$refs
.
upload
.
abort
()
this
.
$message
.
error
(
'
下载档案失败!
'
)
...
...
packages/splitTool/src/mixin/toolMixin.js
View file @
e2adc16f
import
graphRequest
from
'
@utils/GraphApiService
'
import
Vue
from
'
vue
'
import
{
downloadFile
}
from
'
@api/graphApi
'
Vue
.
mixin
(
{
export
default
{
methods
:
{
async
downloadFile
(
excelFileName
)
{
async
downloadFile
(
BaseUrl
,
excelFileName
)
{
try
{
const
formData
=
new
FormData
()
formData
.
append
(
'
fileName
'
,
excelFileName
)
const
response
=
await
graphRequest
.
post
(
'
Word/DownloadFile
'
,
formData
,
{
responseType
:
'
blob
'
}
)
const
response
=
await
downloadFile
(
BaseUrl
,
formData
)
if
(
response
)
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'
a
'
)
...
...
@@ -26,4 +25,4 @@ Vue.mixin({
}
}
}
}
)
}
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