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
c9074c8c
Commit
c9074c8c
authored
Aug 14, 2020
by
李梓桢
Browse files
Options
Browse Files
Download
Plain Diff
image
parents
1151a80b
01245bac
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
61 deletions
+80
-61
env.js
DAPlatform-front/src/assets/js/env.js
+1
-1
http.js
DAPlatform-front/src/assets/js/http.js
+36
-0
Navigator.vue
DAPlatform-front/src/components/Navigator.vue
+18
-1
ReleaseTask.vue
DAPlatform-front/src/components/ReleaseTask.vue
+1
-1
TaskHall.vue
DAPlatform-front/src/components/TaskHall.vue
+9
-13
main.js
DAPlatform-front/src/main.js
+2
-32
imageAnnotation.cpython-36.pyc
DAPlatform/views/__pycache__/imageAnnotation.cpython-36.pyc
+0
-0
textAnnotation.py
DAPlatform/views/textAnnotation.py
+10
-10
uploadDownload.py
DAPlatform/views/uploadDownload.py
+3
-3
No files found.
DAPlatform-front/src/assets/js/env.js
View file @
c9074c8c
var
baseURL
=
'http://
localhost:9100
/api'
var
baseURL
=
'http://
47.92.1.107
/api'
export
{
baseURL
...
...
DAPlatform-front/src/assets/js/http.js
0 → 100644
View file @
c9074c8c
import
axios
from
'axios'
import
{
baseURL
}
from
'@/assets/js/env.js'
import
{
Message
}
from
'element-ui'
axios
.
defaults
.
baseURL
=
baseURL
axios
.
defaults
.
timeout
=
8000
// 添加响应拦截器
axios
.
interceptors
.
response
.
use
(
function
(
response
)
{
let
res
=
response
.
data
if
(
response
.
config
.
url
===
'/file/getFiles'
)
{
res
.
id
=
response
.
config
.
params
.
pieceId
}
return
res
},
function
(
error
)
{
// 对响应错误做点什么
return
Promise
.
reject
(
error
)
})
// 添加请求拦截器,每次请求设置都请求cookie信息
axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
// 除了登录和注册请求,其余请求如果没有用户信息(即没登录),就跳转到登录页面
if
(
!
window
.
vm
.
$store
.
state
.
userInfo
&&
config
.
url
!==
'/user/signin'
&&
config
.
url
!==
'/user/signup'
)
{
Message
({
type
:
'warning'
,
message
:
'您未登录,请前往登录界面进行操作'
})
window
.
vm
.
$router
.
replace
(
'/'
)
}
return
config
},
function
(
error
)
{
return
Promise
.
reject
(
error
)
})
export
default
axios
DAPlatform-front/src/components/Navigator.vue
View file @
c9074c8c
...
...
@@ -33,7 +33,23 @@ export default {
}
},
beforeMount
()
{
this
.
getTasks
()
console
.
log
(
'2'
)
},
mounted
()
{
var
self
=
this
this
.
axios
.
get
(
'/task/getTasks'
,
{
params
:
{
pageSize
:
self
.
pageSize
,
currentPage
:
self
.
currentPage
,
...
self
.
condition
}
}).
then
(
res
=>
{
console
.
log
(
res
)
self
.
tasks
=
res
.
data
.
tasks
self
.
pageNum
=
res
.
data
.
pageNum
self
.
pageChange
()
})
console
.
log
(
'1'
)
},
methods
:
{
// 任务列表更新
...
...
@@ -50,6 +66,7 @@ export default {
...
self
.
condition
}
}).
then
(
res
=>
{
console
.
log
(
res
)
self
.
tasks
=
res
.
data
.
tasks
self
.
pageNum
=
res
.
data
.
pageNum
self
.
pageChange
()
...
...
DAPlatform-front/src/components/ReleaseTask.vue
View file @
c9074c8c
...
...
@@ -251,7 +251,7 @@
</el-tabs>
<el-row
:gutter=
"20"
>
<el-col
offset=
"1
7"
span=
"7
"
>
<el-col
offset=
"1
5"
span=
"9
"
>
<el-form-item
style=
"margin-top: 20px"
>
<el-input
v-model=
"taskName"
@
input=
"change($event)"
placeholder=
"输入任务名称"
style=
"width: 200px"
></el-input>
<el-button
type=
"primary"
@
click=
"submitForm(taskName)"
style=
"margin-left: 15px"
>
创建任务
</el-button>
...
...
DAPlatform-front/src/components/TaskHall.vue
View file @
c9074c8c
...
...
@@ -5,8 +5,6 @@
<div
class=
"filter-item"
>
任务名称:
<el-input
class=
"filter-input"
prefix-icon=
"el-icon-search"
v-model=
"keyword"
placeholder=
"请输入查询条件"
></el-input>
</div>
<div
class=
"filter-item"
>
<el-button
class=
"filter-button"
type=
"primary"
@
click=
"search()"
>
查询
</el-button>
</div>
<el-divider></el-divider>
...
...
@@ -26,13 +24,11 @@
<div
class=
"notice"
>
<div
class=
"notice-title"
>
公告
</div>
<div
class=
"notice-body"
>
<img
src=
"@/assets/empty.png"
alt=
"暂无公告"
>
</div>
</div>
<div
class=
"notice"
>
<div
class=
"notice-title"
>
公告
</div>
<div
class=
"notice-body"
>
<img
src=
"@/assets/empty.png"
alt=
"暂无公告"
>
<h4>
标注方法:
</h4>
<p>
1.在任务大厅选择想要标注的任务,进入任务详情界面,勾选想要标注的分片,跳转到我的任务界面,对勾选的任务分片进行标注。
</p>
<p>
2.文本标注:进入文本标注页面后,鼠标选中一段文本,自动弹出标注选项,选择对应的实体和属性即可完成标注。
</p>
<p>
3.图像图层标注:点击矩形标注、多边形标注或者地标标注,选择对应标注类型,之后选中图像或图层上的区域,对标注区域命名,最后保存标注结果即可标注成功。
</p>
<!--
<img
src=
"@/assets/empty.png"
alt=
"暂无公告"
>
-->
</div>
</div>
</div>
...
...
@@ -88,6 +84,7 @@ export default {
margin-bottom
:
15px
;
.filter-input{
margin-left
:
20px
;
margin-right
:
20px
;
;
width
:
300px
;
}
}
...
...
@@ -106,10 +103,9 @@ export default {
}
.notice-body
{
background-color
:
white
;
height
:
200px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
10px
;
text-align
:
left
;
font-size
:
14px
;
}
}
}
...
...
DAPlatform-front/src/main.js
View file @
c9074c8c
...
...
@@ -6,18 +6,14 @@ import router from './router'
import
store
from
'./store'
import
ElementUI
from
'element-ui'
import
'element-ui/lib/theme-chalk/index.css'
import
axios
from
'
axio
s'
import
axios
from
'
@/assets/js/http.j
s'
import
VueAxios
from
'vue-axios'
import
*
as
math
from
'mathjs'
// cnpm i default-passive-events -S
import
'default-passive-events'
import
{
baseURL
}
from
'@/assets/js/env.js'
Vue
.
prototype
.
$math
=
math
axios
.
defaults
.
baseURL
=
baseURL
axios
.
defaults
.
timeout
=
8000
Vue
.
prototype
.
baseURL
=
axios
.
defaults
.
baseURL
// 图片标注接口使用
Vue
.
use
(
VueAxios
,
axios
)
...
...
@@ -38,30 +34,4 @@ var vm = new Vue({
template
:
'<App/>'
})
// 添加响应拦截器
axios
.
interceptors
.
response
.
use
(
function
(
response
)
{
let
res
=
response
.
data
if
(
response
.
config
.
url
===
'/file/getFiles'
)
{
res
.
id
=
response
.
config
.
params
.
pieceId
}
return
res
},
function
(
error
)
{
// 对响应错误做点什么
return
Promise
.
reject
(
error
)
})
// 添加请求拦截器,每次请求设置都请求cookie信息
axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
// 除了登录和注册请求,其余请求如果没有用户信息(即没登录),就跳转到登录页面
if
(
!
vm
.
$store
.
state
.
userInfo
&&
config
.
url
!==
'/user/signin'
&&
config
.
url
!==
'/user/signup'
)
{
ElementUI
.
Message
({
type
:
'warning'
,
message
:
'您未登录,请前往登录界面进行操作'
})
vm
.
$router
.
replace
(
'/'
)
}
return
config
},
function
(
error
)
{
return
Promise
.
reject
(
error
)
})
window
.
vm
=
vm
DAPlatform/views/__pycache__/imageAnnotation.cpython-36.pyc
View file @
c9074c8c
No preview for this file type
DAPlatform/views/textAnnotation.py
View file @
c9074c8c
...
...
@@ -18,7 +18,7 @@ def getTokenList():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -51,7 +51,7 @@ def addToken():
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -89,7 +89,7 @@ def deleteToken():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -131,7 +131,7 @@ def revToken():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -172,7 +172,7 @@ def insertDocument():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -221,7 +221,7 @@ def revDocumentState():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -261,7 +261,7 @@ def createTemplated():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'code'
]
=
'0'
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
...
...
@@ -296,7 +296,7 @@ def getTemplated():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'code'
]
=
'0'
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
...
...
@@ -325,7 +325,7 @@ def getOneTemplate():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -358,7 +358,7 @@ def deleteTemplate():
# 判断传入的json数据是否为空
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
DAPlatform/views/uploadDownload.py
View file @
c9074c8c
...
...
@@ -172,7 +172,7 @@ def getFileContent():
return_dict
=
{
'return_code'
:
'200'
,
'return_info'
:
'处理成功'
,
'result'
:
False
}
try
:
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
except
Exception
as
e
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
...
...
@@ -269,7 +269,7 @@ def getExcelContent():
@uploadDownload.route
(
'/downloadContent'
,
methods
=
[
'POST'
])
def
downloadContent
():
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
documentId
=
get_Data
.
get
(
'documentId'
)
result
=
mongodbApi
.
findOne
(
collectionTest
,
{
"documentId"
:
documentId
})
...
...
@@ -284,7 +284,7 @@ def downloadContent():
@uploadDownload.route
(
'/downloadFile'
,
methods
=
[
'POST'
])
def
downloadFile
():
get_Data
=
request
.
get_data
()
get_Data
=
json
.
loads
(
get_Data
)
get_Data
=
json
.
loads
(
get_Data
.
decode
(
'utf-8'
)
)
relationId
=
get_Data
.
get
(
'relationId'
)
result
=
mongodbApi
.
findOne
(
collectionTest
,
{
"relationId"
:
relationId
})
...
...
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