文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit f7436f9c by 李梓桢

image

parent ac8676d1
......@@ -110,6 +110,7 @@ export default {
name: 'imageAnnotation',
data () {
return {
pictureId: 1,
scaleSize: 1,
height_res: 0,
activeIndex1: 1,
......@@ -118,7 +119,7 @@ export default {
"relationId": 123,
"imageUrl": "...",
"labelList": [{
"labelId": "1",
"labelId": 0,
"labelName": "label1",
"pointList": [{
"pointId": "1-1",
......@@ -130,7 +131,7 @@ export default {
"Y": 2.3
}]
},{
"labelId": "2",
"labelId": 1,
"labelName": "label2",
"pointList": [{
"pointId": "2-1",
......@@ -211,10 +212,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.deleteLabel();
this.$message({
type: 'success',
message: '删除成功!'
})
});
}).catch(() => {
this.$message({
type: 'info',
......@@ -265,6 +267,7 @@ export default {
label: '图片1',
url: 'https://juanmdbucket.oss-cn-beijing.aliyuncs.com/20200301231737.png',
children: [{
id: 0,
label: '二级 1-1'
}]
}, {
......@@ -289,14 +292,20 @@ export default {
this.imageNum = 3;
},
addLabel() {
let currentImageId = 1;
let currentImageId = this.pictureId;
const newLabel = {label: 'new label'};
for (let index = 0; index < this.imageNum; index++) {
if (this.data[index].id == currentImageId) {
this.data[index].children.push(newLabel);
}
}
this.data[currentImageId].children.push(newLabel);
// for (let index = 0; index < this.imageNum; index++) {
// if (this.data[index].id == currentImageId) {
// this.data[index].children.push(newLabel);
// }
// }
},
deleteLabel() {
let currentLabelId = 0;
let currentImageId = this.pictureId;
this.data[currentImageId].children.splice(currentLabelId, 1);
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment