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

Commit 4bd56bcb by 张欣玥

加了图片图层check里的correct

parent 749c922e
......@@ -204,7 +204,7 @@ export default {
let baseURL = this.baseURL
// 获取图片列表并转换格式
let imageList = await this.getLabelList()
// console.log(imageList)
console.log(imageList)
this.imageList = imageList.imageList
// 加载第一张图片
......@@ -276,6 +276,7 @@ export default {
// 还原数据库里的标注记录
let id = _this.pictureId
// console.log('id = ' + id)
// console.log(_this.data)
_this.data.forEach(function (element, index) {
var indexPic = index
......@@ -286,8 +287,13 @@ export default {
num.push(element1.Y)
})
_this.canvasAll[indexPic].push(num)
_this.canvasAllCheck.push(0)
_this.value.push(false)
_this.canvasAllCheck.push(element.correct)
if(element.correct == 0){
_this.value.push(false)
} else {
_this.value.push(true)
}
})
})
// 还原标注
......@@ -332,14 +338,19 @@ export default {
watch: {
value: function fn() {
var tmp = this.canvasAllCheck;
let _this = this
this.value.forEach((e, index) => {
if (tmp[index] == 0) {
if (e == true) {
_this.data[0].children[index].correct = 2;
tmp[index] = 2;
console.log(_this.data)
}
} else if (tmp[index] == 2) {
if (e == false) {
_this.data[0].children[index].correct = 0;
tmp[index] = 0;
console.log(_this.data)
}
}
})
......@@ -882,6 +893,7 @@ export default {
}
// pointList完成
const newLabel = {
correct: 1,
labelId: currentLabelId,
labelName: labelName,
pointList: pointList
......@@ -1053,6 +1065,7 @@ export default {
// _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height)
_this.canvasAll[id].push(num)
_this.canvasAllCheck.push(1)
_this.value.push(false)
_this.restoreCanvas()
......@@ -1192,7 +1205,7 @@ export default {
// //message: `action: ${action}`
// })
}
})
this.$router.push({ path: "/check" })
......
......@@ -209,8 +209,12 @@ export default {
data () {
return {
computeScore: 0,
value: [],
value2: [],
value: [],// 地标checkbox
value2: [],// 区域标注checkbox
checkLayer: [], // 区域标注审核结果
checkLand: [], // 地标标注审核结果
layerData: null, // layerdata存放标注数据
landmarkData: null, // 存放地标数据
activeName: 'first',
isPoint: true,
centerX: 0,
......@@ -226,10 +230,7 @@ export default {
radio1: '地标',
activeIndex1: 1,
hasSaved: 1, // 保存标志
checkLayer: [],
checkLand: [],
layerData: null, // layerdata存放标注数据
landmarkData: null, // 存放地标数据
relationId: null, // 当前任务的relationID
clickedPosition: null, // 保存最新一次点击的结果,没有使用
map: null,
......@@ -258,18 +259,33 @@ export default {
// 避免第一次标注时数据库中没有内容的情况
if (res.layerInfo != null) {
this.layerData = res.layerInfo.labelList;
console.log('this.layerData')
console.log(this.layerData)
for (let i = 0;i < this.layerData.length;i++) {
this.checkLayer.push(0)
this.value2.push(false)
let tmpCorrect = this.layerData[i].correct
this.checkLayer.push(tmpCorrect)
if (tmpCorrect != 0) {
this.value2.push(true)
} else {
this.value2.push(false)
}
}
} else { this.layerData = [] }
// console.log(this.layerData)
if (res.landmarkList != null) {
this.landmarkData = res.landmarkList.landmarkEntityList;
console.log('this.landmarkData')
console.log(this.landmarkData)
for (let i = 0;i < this.landmarkData.length;i++) {
this.checkLand.push(0)
this.value.push(false)
let tmpCorrect = this.landmarkData[i].correct
// alert(tmpCorrect)
this.checkLand.push(tmpCorrect)
if (tmpCorrect != 0) {
this.value.push(true)
} else {
this.value.push(false)
}
}
} else { this.landmarkData = [] }
// console.log(this.landmarkData)
......@@ -312,14 +328,26 @@ export default {
watch: {
value: function fn() {
var tmp = this.checkLand;
this.value.forEach((e, index) => {
console.log('tmp')
console.log(tmp[index])
console.log(e)
if (tmp[index] == 0) {
if (e == true) {
tmp[index] = 2;
this.landmarkData[index].correct = 2;
console.log('this.landmarkData[index]')
console.log(this.landmarkData[index])
}
} else if (tmp[index] == 2) {
if (e == false) {
tmp[index] = 0;
this.landmarkData[index].correct = 0;
console.log('this.landmarkData[index]')
console.log(this.landmarkData[index])
}
}
})
......@@ -332,10 +360,17 @@ export default {
if (tmp[index] == 0) {
if (e == true) {
tmp[index] = 2;
this.layerData[index].correct = 2;
console.log('this.layerData[index]')
console.log(this.layerData[index])
}
} else if (tmp[index] == 2) {
if (e == false) {
tmp[index] = 0;
this.layerData[index].correct = 0;
console.log('this.layerData[index]')
console.log(this.layerData[index])
}
}
})
......@@ -632,7 +667,8 @@ export default {
if (res.code === 1) {
let layerInfo = res.data.layerInfo
let landmarkList = res.data.landmarkList
// console.log(res.data)
console.log(res.data)
// 0是标注者标注错误的,1是标注者标注正确的,2是审核者自己添加的
return {
layerInfo: layerInfo,
landmarkList: landmarkList
......@@ -680,6 +716,7 @@ export default {
let newlandmark = {
X: position.X,
Y: position.Y,
correct: 1,
landmarkId: currentId,
landmarkName: landmarkName
}
......@@ -770,7 +807,8 @@ export default {
const newLabel = {
labelId: currentId,
labelName: labelName,
pointList: pointList
pointList: pointList,
correct: 1
}
this.layerData.push(newLabel)
this.checkLayer.push(1)
......@@ -835,7 +873,8 @@ export default {
const newLabel = {
labelId: currentId,
labelName: labelName,
pointList: pointList
pointList: pointList,
correct: 1
}
this.layerData.push(newLabel)
this.checkLayer.push(1)
......
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