Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
f08e5544
Commit
f08e5544
authored
Jul 18, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通用设置-多图上传
parent
529bf751
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
general.js
src/api/base_info/general.js
+12
-0
generalSetting.vue
src/views/baseInfo/generalSetting.vue
+36
-1
No files found.
src/api/base_info/general.js
View file @
f08e5544
...
...
@@ -40,3 +40,15 @@ export function delGeneral(id) {
});
}
export
function
uploadFiles
(
params
)
{
return
fetch
({
url
:
'/api/universal/file/app/unauth/uploadFiles'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
data
:
params
});
}
src/views/baseInfo/generalSetting.vue
View file @
f08e5544
...
...
@@ -75,6 +75,20 @@
<el-button
v-else
type=
"primary"
@
click=
"update('dialogFrom')"
>
确 定
</el-button>
</div>
</el-dialog>
<!--多图上传-->
<!--<el-upload-->
<!--:multiple="multiple"-->
<!--action="${pageContext.request.contextPath}/lookup/editEvidence/123"-->
<!--list-type="picture-card"-->
<!--:auto-upload="false"-->
<!--:http-request="uploadFile"-->
<!--ref="upload"-->
<!-->-->
<!--<i class="el-icon-plus"></i>-->
<!--</el-upload>-->
<!--<el-button @click="subPicForm">提交上传</el-button>-->
</div>
</template>
<
style
>
...
...
@@ -101,7 +115,8 @@
page
,
addGeneral
,
editGeneral
,
delGeneral
delGeneral
,
uploadFiles
}
from
'api/base_info/general'
;
import
rsCode
from
'../../utils/rsCode'
;
...
...
@@ -126,6 +141,8 @@
},
data
()
{
return
{
multiple
:
true
,
formDate
:
""
,
listQuery
:
{
page
:
1
,
limit
:
20
...
...
@@ -354,6 +371,24 @@
}
});
},
uploadFile
(
file
){
this
.
formDate
.
append
(
'files'
,
file
.
file
);
},
subPicForm
(){
this
.
formDate
=
new
FormData
()
this
.
$refs
.
upload
.
submit
();
this
.
formDate
.
append
(
'WS_CODE'
,
"12133"
);
let
config
=
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
}
uploadFiles
(
this
.
formDate
).
then
(
res
=>
{
console
.
log
(
res
)
}).
catch
(
res
=>
{
console
.
log
(
res
)
})
}
}
}
</
script
>
...
...
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