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
536b6333
Commit
536b6333
authored
Jun 27, 2020
by
李梓桢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image前后端接口完成
parent
3f0c3456
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
99 deletions
+109
-99
imageAnnotiation.vue
...front/src/components/imageAnnotation/imageAnnotiation.vue
+48
-27
api.js
DAPlatform-front/src/mock/api.js
+58
-72
package-lock.json
package-lock.json
+3
-0
No files found.
DAPlatform-front/src/components/imageAnnotation/imageAnnotiation.vue
View file @
536b6333
...
@@ -621,24 +621,24 @@ export default {
...
@@ -621,24 +621,24 @@ export default {
changeToolBar
(
val
)
{
changeToolBar
(
val
)
{
this
.
activeIndex1
=
val
this
.
activeIndex1
=
val
},
},
deleteAnnotation
:
function
()
{
//
deleteAnnotation: function () {
this
.
$confirm
(
'确定删除此标注'
,
'提示'
,
{
//
this.$confirm('确定删除此标注', '提示', {
confirmButtonText
:
'确定'
,
//
confirmButtonText: '确定',
cancelButtonText
:
'取消'
,
//
cancelButtonText: '取消',
type
:
'warning'
//
type: 'warning'
}).
then
(()
=>
{
//
}).then(() => {
this
.
deleteLabel
()
//
this.deleteLabel()
this
.
$message
({
//
this.$message({
type
:
'success'
,
//
type: 'success',
message
:
'删除成功!'
//
message: '删除成功!'
})
//
})
}).
catch
(()
=>
{
//
}).catch(() => {
this
.
$message
({
//
this.$message({
type
:
'info'
,
//
type: 'info',
message
:
'已取消删除'
//
message: '已取消删除'
})
//
})
})
//
})
},
//
},
loadPicture
()
{
loadPicture
()
{
var
len
=
this
.
data
.
length
var
len
=
this
.
data
.
length
var
count
=
this
.
pictureId
var
count
=
this
.
pictureId
...
@@ -858,9 +858,7 @@ export default {
...
@@ -858,9 +858,7 @@ export default {
if
(
value
==
null
)
if
(
value
==
null
)
value
=
'iss'
value
=
'iss'
labelName
=
value
labelName
=
value
let
currentImageId
=
this
.
pictureId
this
.
makeLabel
(
labelName
)
const
newLabel
=
{
labelName
:
labelName
}
this
.
data
[
currentImageId
].
children
.
push
(
newLabel
)
}).
catch
(()
=>
{
}).
catch
(()
=>
{
labelName
=
'iss'
labelName
=
'iss'
let
currentImageId
=
this
.
pictureId
let
currentImageId
=
this
.
pictureId
...
@@ -868,11 +866,36 @@ export default {
...
@@ -868,11 +866,36 @@ export default {
this
.
data
[
currentImageId
].
children
.
push
(
newLabel
)
this
.
data
[
currentImageId
].
children
.
push
(
newLabel
)
})
})
},
},
deleteLabel
()
{
//创建储存用的标签数据
let
currentLabelId
=
0
makeLabel
(
labelName
)
{
let
currentImageId
=
this
.
pictureId
let
currentImageId
=
this
.
pictureId
this
.
data
[
currentImageId
].
children
.
splice
(
currentLabelId
,
1
)
let
currentLabelId
=
this
.
data
[
currentImageId
].
children
.
length
//以下部分创建PointList
var
tmpPointList
=
this
.
canvasAll
[
currentImageId
]
var
lenTmp
=
tmpPointList
[
currentLabelId
].
length
/
2
let
pointList
=
[]
for
(
var
i
=
0
;
i
<
lenTmp
;
i
++
)
{
let
tmp
=
{
pointId
:
i
,
X
:
tmpPointList
[
currentLabelId
][
2
*
i
],
Y
:
tmpPointList
[
currentLabelId
][
2
*
i
+
1
]
}
pointList
.
push
(
tmp
)
}
//pointList完成
const
newLabel
=
{
labelId
:
currentLabelId
,
labelName
:
labelName
,
pointList
:
pointList
}
this
.
data
[
currentImageId
].
children
.
push
(
newLabel
)
console
.
log
(
this
.
data
[
currentImageId
])
},
},
// deleteLabel () {
// let currentLabelId = 0
// let currentImageId = this.pictureId
// this.data[currentImageId].children.splice(currentLabelId, 1)
// },
/**
/**
* 从图片url中拿到图片名
* 从图片url中拿到图片名
*/
*/
...
@@ -1008,9 +1031,7 @@ export default {
...
@@ -1008,9 +1031,7 @@ export default {
}
}
outputData
.
push
(
newData
)
outputData
.
push
(
newData
)
})
})
/**
* 这里还有问题,再添加标签时只有标签名
*/
console
.
log
(
"outputdata"
)
console
.
log
(
"outputdata"
)
console
.
log
(
outputData
)
console
.
log
(
outputData
)
this
.
imageNum
=
this
.
data
.
len
this
.
imageNum
=
this
.
data
.
len
...
...
DAPlatform-front/src/mock/api.js
View file @
536b6333
...
@@ -9,81 +9,67 @@ import Mock from 'mockjs'
...
@@ -9,81 +9,67 @@ import Mock from 'mockjs'
// }]
// }]
// })
// })
// Mock.mock('http://localhost:9100/api/image', {
// Mock.mock('http://localhost:9100/api/image
/getImage
', {
// code: 1,
// code: 1,
// data: [{
// data: {
// relationId: 123,
// "imageList": [{
// imageUrl: 'https://juanmdbucket.oss-cn-beijing.aliyuncs.com/20200301231737.png',
// "relationId": 123,
// labelList: [{
// "imageUrl": "https://juanmdbucket.oss-cn-beijing.aliyuncs.com/20200301231737.png",
// labelId: 0,
// "labelList": [{
// labelName: 'label24',
// "labelId": 0,
// pointList: [{
// "labelName": "label1",
// pointId: '1-1',
// "pointList": [{
// X: 500,
// "pointId": 0,
// Y: 300
// "X": 500,
// }, {
// "Y": 300
// pointId: '1-2',
// }, {
// X: 600,
// "pointId": 1,
// Y: 300
// "X": 600,
// }, {
// "Y": 300
// pointId: '1-3',
// }, {
// X: 700,
// "pointId": 2,
// Y: 350
// "X": 700,
// }, {
// "Y": 350
// pointId: '1-4',
// }, {
// X: 600,
// "pointId": 3,
// Y: 400
// "X": 600,
// }, {
// "Y": 400
// pointId: '1-5',
// }, {
// X: 450,
// "pointId": 4,
// Y: 350
// "X": 450,
// "Y": 350
// }]
// }]
// },{
// "relationId": 11,
// "imageUrl": "https://juanmdbucket.oss-cn-beijing.aliyuncs.com/20200526170357.jpg",
// "labelList": [{
// "labelId": 0,
// "labelName": "label1",
// "pointList": [{
// "pointId": 0,
// "X": 500,
// "Y": 300
// }, {
// "pointId": 1,
// "X": 600,
// "Y": 300
// }, {
// "pointId": 2,
// "X": 700,
// "Y": 350
// }, {
// "pointId": 3,
// "X": 600,
// "Y": 400
// }, {
// "pointId": 4,
// "X": 450,
// "Y": 350
// }]
// }]
// }]
// }, {
// labelId: 1,
// labelName: 'label2',
// pointList: [{
// pointId: '2-1',
// X: 100,
// Y: 100
// }, {
// pointId: '2-2',
// X: 200,
// Y: 100
// }, {
// pointId: '2-2',
// X: 200,
// Y: 200
// }, {
// pointId: '2-2',
// X: 100,
// Y: 200
// }]
// }]
// }, {
// relationId: 233,
// imageUrl: 'https://juanmdbucket.oss-cn-beijing.aliyuncs.com/20200526170357.jpg',
// labelList: [{
// labelId: 0,
// labelName: 'label1',
// pointList: [{
// pointId: '1-1',
// X: 100,
// Y: 100
// }, {
// pointId: '1-2',
// X: 300,
// Y: 100
// }, {
// pointId: '1-2',
// X: 300,
// Y: 300
// }, {
// pointId: '1-2',
// X: 100,
// Y: 300
// }]
// }]
// }]
// }]
// }
// })
// })
// Mock.mock(/http:\/\/localhost:9100\/api\/getPieces\?id=[0-9]+/, {
// Mock.mock(/http:\/\/localhost:9100\/api\/getPieces\?id=[0-9]+/, {
...
...
package-lock.json
0 → 100644
View file @
536b6333
{
"lockfileVersion"
:
1
}
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