Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
Details
Activity
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
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
734bb0fe
Commit
734bb0fe
authored
Jun 24, 2020
by
李严凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建任务修改
parent
e7f3c96d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
31 deletions
+51
-31
ReleaseTask.vue
DAPlatform-front/src/components/ReleaseTask.vue
+50
-31
app.py
DAPlatform/app.py
+1
-0
No files found.
DAPlatform-front/src/components/ReleaseTask.vue
View file @
734bb0fe
...
...
@@ -18,19 +18,19 @@
:key=
"domain.key"
:prop=
"'domains.' + index + '.value'"
>
<el-collapse-item
:title=
"'文本任务分片'+(
+
+index)"
:title=
"'文本任务分片'+(
1
+index)"
:name=
"index"
style=
"border-bottom: 1px solid;border-bottom-color:white;font-size: 14px"
>
<!-- 上传图片-->
<el-row
:gutter=
"20"
>
<el-col
span=
"8"
>
<el-upload
class=
"upload-demo"
action=
"http:://localhost:9100/api/files/upload"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
action=
"https://jsonplaceholder.typicode.com/posts/"
:on-preview=
"handlePreviewF"
:on-remove=
"handleRemoveF"
:on-success=
"uploadSuccessF"
multiple
:http-request=
"uploadFile"
:limit=
"7"
:data=
"'3:'+(index)"
:on-exceed=
"handleExceed"
...
...
@@ -76,19 +76,20 @@
:key=
"domain.key"
:prop=
"'domains.' + index + '.value'"
>
<el-collapse-item
:title=
"'图片任务分片'+(
+
+index)"
:title=
"'图片任务分片'+(
1
+index)"
:name=
"index"
style=
"border-bottom: 1px solid;border-bottom-color:white;font-size: 14px"
>
<!-- 上传图片-->
<el-row
:gutter=
"20"
>
<el-col
span=
"6"
>
<el-upload
class=
"upload-demo"
action=
"http
:://localhost:9100/api/files/upload
"
action=
"http
s://jsonplaceholder.typicode.com/posts/
"
:on-preview=
"handlePreview"
:on-remove=
"removeSuccess"
:before-remove=
"beforeRemove"
:on-success=
"uploadSuccessP"
:data=
"'3:'+(index)"
:http-request=
"uploadFile"
multiple
:limit=
"7"
:on-exceed=
"handleExceed"
...
...
@@ -120,11 +121,11 @@
<el-form-item>
<!-- 采用手风琴实现折叠-->
<el-collapse
v-model=
"activeName"
accordion
>
<el-form-item
v-for=
"(domain, index) in dynamicValidateForm.layerDo
am
ins"
<el-form-item
v-for=
"(domain, index) in dynamicValidateForm.layerDo
ma
ins"
:key=
"domain.key"
:prop=
"'domains.' + index + '.value'"
>
<el-collapse-item
:title=
"'图层任务分片'+(
+
+index)"
:title=
"'图层任务分片'+(
1
+index)"
:name=
"index"
style=
"border-bottom: 1px solid;border-bottom-color:white;font-size: 14px;"
>
<!-- 上传图片-->
<el-row
:gutter=
"20"
>
...
...
@@ -132,11 +133,11 @@
<!-- 上传文件传参3表示图层分片,index表示第几个分片,用“:”分割-->
<el-upload
class=
"upload-demo"
action=
"http
:://localhost:9100/api/files/upload
"
action=
"http
s://jsonplaceholder.typicode.com/posts/
"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
:on-success=
"uploadSuccessL"
:http-request=
"uploadFile"
multiple
:data=
"'3:'+(index)"
:limit=
"7"
...
...
@@ -215,20 +216,7 @@
</div>
</
template
>
<
script
>
// export default {
// }
export
default
{
methods
:
{
handleRemove
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
)
},
handlePreview
(
file
)
{
console
.
log
(
file
)
}
}
}
</
script
>
<
style
scope
lang=
"scss"
>
@import
'../assets/scss/config.scss'
;
...
...
@@ -358,6 +346,7 @@ export default {
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
)),
fName
:
''
,
url
:
''
,
taskName
:
''
};
},
...
...
@@ -367,29 +356,58 @@ export default {
}
},
methods
:
{
uploadFile
(
fileObj
){
let
formData
=
new
FormData
();
formData
.
set
(
"file"
,
fileObj
.
file
);
this
.
axios
({
method
:
'post'
,
url
:
'http:://localhost:9100/api/files/upload'
,
params
:
formData
,
headers
:{
"Content-type"
:
"multipart/form-data"
}
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
alert
(
"文件上传失败,请重新上传"
);
else
{
console
(
res
.
data
.
url
);
}
})
},
setIndex
(
index
){
this
.
Index
=
index
;
},
//上传文件
uploadSuccessF
(
response
,
file
,
fileList
){
this
.
fName
=
file
.
name
;
this
.
dynamicValidateForm
.
domains
[
this
.
Index
-
1
].
fileName
.
push
(
this
.
fName
);
this
.
url
=
file
.
url
;
this
.
dynamicValidateForm
.
domains
[
this
.
Index
].
fileName
.
push
({
name
:
this
.
fName
,
url
:
this
.
url
});
//console.log(this.fName);
//console.log(this.taskName);
// console.log(this.dynamicValidateForm.domains[this.Index].fileName);
},
uploadSuccessP
(
response
,
file
,
fileList
){
this
.
fName
=
file
.
name
;
this
.
dynamicValidateForm
.
pictureDomains
[
this
.
Index
-
1
].
fileName
.
push
(
this
.
fName
);
this
.
url
=
file
.
url
;
this
.
dynamicValidateForm
.
pictureDomains
[
this
.
Index
].
fileName
.
push
({
name
:
this
.
fName
,
url
:
this
.
url
});
//console.log(this.fName);
//console.log(this.taskName);
},
uploadSuccessL
(
response
,
file
,
fileList
){
this
.
fName
=
file
.
name
;
this
.
dynamicValidateForm
.
layerDoamins
[
this
.
Index
-
1
].
fileName
.
push
(
this
.
fName
);
this
.
url
=
file
.
url
;
this
.
dynamicValidateForm
.
layerDoamins
[
this
.
Index
].
fileName
.
push
({
name
:
this
.
fName
,
url
:
this
.
url
});
// console.log(this.fName);
// console.log(this.dynamicValidateForm.layerDoamins[this.Index].fileName);
},
removeSuccess
(
file
,
fileList
){
console
.
log
(
"del:"
+
file
.
name
);
//删除上传的文件
handleRemoveF
(
file
,
fileList
){
},
handleRemoveP
(
file
,
fileList
){
},
handleRemoveL
(
file
,
fileList
){
},
submitForm
(
formName
)
{
console
.
log
(
this
.
dynamicValidateForm
);
...
...
@@ -461,8 +479,9 @@ export default {
key
:
Date
.
now
()
});
}
//添加图层分片
else
if
(
ptype
==
3
){
this
.
dynamicValidateForm
.
layerDo
am
ins
.
push
({
this
.
dynamicValidateForm
.
layerDo
ma
ins
.
push
({
fileName
:
new
Array
(),
textarea
:
''
,
key
:
Date
.
now
()
...
...
DAPlatform/app.py
View file @
734bb0fe
from
flask
import
Flask
from
flask_cors
import
CORS
# from views.uploadDownload import uploadDownload
# from views.textAnnotation import textAnnotation
from
views.user
import
user
...
...
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