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

Commit 2e17db84 by 王腾

image

parent 97bd2c8e
...@@ -868,6 +868,7 @@ export default { ...@@ -868,6 +868,7 @@ export default {
const newLabel = { const newLabel = {
labelId: currentLabelId, labelId: currentLabelId,
labelName: labelName, labelName: labelName,
correct: 0,
pointList: pointList pointList: pointList
} }
this.data[currentImageId].children.push(newLabel) this.data[currentImageId].children.push(newLabel)
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
let baseURL = this.baseURL let baseURL = this.baseURL
// 获取图片列表并转换格式 // 获取图片列表并转换格式
let imageList = await this.getLabelList() let imageList = await this.getLabelList()
// console.log(imageList) console.log(imageList)
this.imageList = imageList.imageList this.imageList = imageList.imageList
// 加载第一张图片 // 加载第一张图片
...@@ -276,6 +276,7 @@ export default { ...@@ -276,6 +276,7 @@ export default {
// 还原数据库里的标注记录 // 还原数据库里的标注记录
let id = _this.pictureId let id = _this.pictureId
// console.log('id = ' + id) // console.log('id = ' + id)
// console.log(_this.data)
_this.data.forEach(function (element, index) { _this.data.forEach(function (element, index) {
var indexPic = index var indexPic = index
...@@ -286,8 +287,13 @@ export default { ...@@ -286,8 +287,13 @@ export default {
num.push(element1.Y) num.push(element1.Y)
}) })
_this.canvasAll[indexPic].push(num) _this.canvasAll[indexPic].push(num)
_this.canvasAllCheck.push(0)
_this.canvasAllCheck.push(element.correct)
if(element.correct == 0){
_this.value.push(false) _this.value.push(false)
} else {
_this.value.push(true)
}
}) })
}) })
// 还原标注 // 还原标注
...@@ -332,14 +338,19 @@ export default { ...@@ -332,14 +338,19 @@ export default {
watch: { watch: {
value: function fn() { value: function fn() {
var tmp = this.canvasAllCheck; var tmp = this.canvasAllCheck;
let _this = this
this.value.forEach((e, index) => { this.value.forEach((e, index) => {
if (tmp[index] == 0) { if (tmp[index] == 0) {
if (e == true) { if (e == true) {
_this.data[0].children[index].correct = 2;
tmp[index] = 2; tmp[index] = 2;
console.log(_this.data)
} }
} else if (tmp[index] == 2) { } else if (tmp[index] == 2) {
if (e == false) { if (e == false) {
_this.data[0].children[index].correct = 0;
tmp[index] = 0; tmp[index] = 0;
console.log(_this.data)
} }
} }
}) })
...@@ -882,6 +893,7 @@ export default { ...@@ -882,6 +893,7 @@ export default {
} }
// pointList完成 // pointList完成
const newLabel = { const newLabel = {
correct: 1,
labelId: currentLabelId, labelId: currentLabelId,
labelName: labelName, labelName: labelName,
pointList: pointList pointList: pointList
...@@ -1053,6 +1065,7 @@ export default { ...@@ -1053,6 +1065,7 @@ export default {
// _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height) // _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height)
_this.canvasAll[id].push(num) _this.canvasAll[id].push(num)
_this.canvasAllCheck.push(1) _this.canvasAllCheck.push(1)
_this.value.push(false) _this.value.push(false)
_this.restoreCanvas() _this.restoreCanvas()
...@@ -1153,9 +1166,9 @@ export default { ...@@ -1153,9 +1166,9 @@ export default {
var tmp = [] var tmp = []
for (var i = 0 ; i < element.children.length; i ++) { for (var i = 0 ; i < element.children.length; i ++) {
// console.log(this.canvasAllCheck[i]) // console.log(this.canvasAllCheck[i])
if (this.canvasAllCheck[i] == 1 || this.canvasAllCheck[i] == 2) { //if (this.canvasAllCheck[i] == 1 || this.canvasAllCheck[i] == 2) {
tmp.push(element.children[i]) tmp.push(element.children[i])
} //}
} }
// console.log(element.children) // console.log(element.children)
// console.log(tmp) // console.log(tmp)
...@@ -1168,7 +1181,7 @@ export default { ...@@ -1168,7 +1181,7 @@ export default {
}) })
// console.log('outputdata') // console.log('outputdata')
// console.log(outputData) console.log(outputData)
this.submit() this.submit()
......
...@@ -601,6 +601,7 @@ export default { ...@@ -601,6 +601,7 @@ export default {
X: position.X, X: position.X,
Y: position.Y, Y: position.Y,
landmarkId: currentId, landmarkId: currentId,
correct: 0,
landmarkName: landmarkName landmarkName: landmarkName
} }
this.landmarkData.push(newlandmark) this.landmarkData.push(newlandmark)
...@@ -688,6 +689,7 @@ export default { ...@@ -688,6 +689,7 @@ export default {
const newLabel = { const newLabel = {
labelId: currentId, labelId: currentId,
labelName: labelName, labelName: labelName,
correct: 0,
pointList: pointList pointList: pointList
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
...@@ -751,6 +753,7 @@ export default { ...@@ -751,6 +753,7 @@ export default {
const newLabel = { const newLabel = {
labelId: currentId, labelId: currentId,
labelName: labelName, labelName: labelName,
correct: 0,
pointList: pointList pointList: pointList
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
......
...@@ -209,8 +209,12 @@ export default { ...@@ -209,8 +209,12 @@ export default {
data () { data () {
return { return {
computeScore: 0, computeScore: 0,
value: [], value: [],// 地标checkbox
value2: [], value2: [],// 区域标注checkbox
checkLayer: [], // 区域标注审核结果
checkLand: [], // 地标标注审核结果
layerData: null, // layerdata存放标注数据
landmarkData: null, // 存放地标数据
activeName: 'first', activeName: 'first',
isPoint: true, isPoint: true,
centerX: 0, centerX: 0,
...@@ -226,10 +230,7 @@ export default { ...@@ -226,10 +230,7 @@ export default {
radio1: '地标', radio1: '地标',
activeIndex1: 1, activeIndex1: 1,
hasSaved: 1, // 保存标志 hasSaved: 1, // 保存标志
checkLayer: [],
checkLand: [],
layerData: null, // layerdata存放标注数据
landmarkData: null, // 存放地标数据
relationId: null, // 当前任务的relationID relationId: null, // 当前任务的relationID
clickedPosition: null, // 保存最新一次点击的结果,没有使用 clickedPosition: null, // 保存最新一次点击的结果,没有使用
map: null, map: null,
...@@ -258,19 +259,34 @@ export default { ...@@ -258,19 +259,34 @@ export default {
// 避免第一次标注时数据库中没有内容的情况 // 避免第一次标注时数据库中没有内容的情况
if (res.layerInfo != null) { if (res.layerInfo != null) {
this.layerData = res.layerInfo.labelList; this.layerData = res.layerInfo.labelList;
console.log('this.layerData')
console.log(this.layerData)
for (let i = 0;i < this.layerData.length;i++) { for (let i = 0;i < this.layerData.length;i++) {
this.checkLayer.push(0) let tmpCorrect = this.layerData[i].correct
this.checkLayer.push(tmpCorrect)
if (tmpCorrect != 0) {
this.value2.push(true)
} else {
this.value2.push(false) this.value2.push(false)
} }
}
} else { this.layerData = [] } } else { this.layerData = [] }
// console.log(this.layerData) // console.log(this.layerData)
if (res.landmarkList != null) { if (res.landmarkList != null) {
this.landmarkData = res.landmarkList.landmarkEntityList; this.landmarkData = res.landmarkList.landmarkEntityList;
console.log('this.landmarkData')
console.log(this.landmarkData)
for (let i = 0;i < this.landmarkData.length;i++) { for (let i = 0;i < this.landmarkData.length;i++) {
this.checkLand.push(0) let tmpCorrect = this.landmarkData[i].correct
// alert(tmpCorrect)
this.checkLand.push(tmpCorrect)
if (tmpCorrect != 0) {
this.value.push(true)
} else {
this.value.push(false) this.value.push(false)
} }
}
} else { this.landmarkData = [] } } else { this.landmarkData = [] }
// console.log(this.landmarkData) // console.log(this.landmarkData)
...@@ -312,14 +328,26 @@ export default { ...@@ -312,14 +328,26 @@ export default {
watch: { watch: {
value: function fn() { value: function fn() {
var tmp = this.checkLand; var tmp = this.checkLand;
this.value.forEach((e, index) => { this.value.forEach((e, index) => {
console.log('tmp')
console.log(tmp[index])
console.log(e)
if (tmp[index] == 0) { if (tmp[index] == 0) {
if (e == true) { if (e == true) {
tmp[index] = 2; tmp[index] = 2;
this.landmarkData[index].correct = 2;
console.log('this.landmarkData[index]')
console.log(this.landmarkData[index])
} }
} else if (tmp[index] == 2) { } else if (tmp[index] == 2) {
if (e == false) { if (e == false) {
tmp[index] = 0; tmp[index] = 0;
this.landmarkData[index].correct = 0;
console.log('this.landmarkData[index]')
console.log(this.landmarkData[index])
} }
} }
}) })
...@@ -332,10 +360,17 @@ export default { ...@@ -332,10 +360,17 @@ export default {
if (tmp[index] == 0) { if (tmp[index] == 0) {
if (e == true) { if (e == true) {
tmp[index] = 2; tmp[index] = 2;
this.layerData[index].correct = 2;
console.log('this.layerData[index]')
console.log(this.layerData[index])
} }
} else if (tmp[index] == 2) { } else if (tmp[index] == 2) {
if (e == false) { if (e == false) {
tmp[index] = 0; tmp[index] = 0;
this.layerData[index].correct = 0;
console.log('this.layerData[index]')
console.log(this.layerData[index])
} }
} }
}) })
...@@ -632,7 +667,8 @@ export default { ...@@ -632,7 +667,8 @@ export default {
if (res.code === 1) { if (res.code === 1) {
let layerInfo = res.data.layerInfo let layerInfo = res.data.layerInfo
let landmarkList = res.data.landmarkList let landmarkList = res.data.landmarkList
// console.log(res.data) console.log(res.data)
// 0是标注者标注错误的,1是标注者标注正确的,2是审核者自己添加的
return { return {
layerInfo: layerInfo, layerInfo: layerInfo,
landmarkList: landmarkList landmarkList: landmarkList
...@@ -680,6 +716,7 @@ export default { ...@@ -680,6 +716,7 @@ export default {
let newlandmark = { let newlandmark = {
X: position.X, X: position.X,
Y: position.Y, Y: position.Y,
correct: 1,
landmarkId: currentId, landmarkId: currentId,
landmarkName: landmarkName landmarkName: landmarkName
} }
...@@ -770,7 +807,8 @@ export default { ...@@ -770,7 +807,8 @@ export default {
const newLabel = { const newLabel = {
labelId: currentId, labelId: currentId,
labelName: labelName, labelName: labelName,
pointList: pointList pointList: pointList,
correct: 1
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
this.checkLayer.push(1) this.checkLayer.push(1)
...@@ -835,7 +873,8 @@ export default { ...@@ -835,7 +873,8 @@ export default {
const newLabel = { const newLabel = {
labelId: currentId, labelId: currentId,
labelName: labelName, labelName: labelName,
pointList: pointList pointList: pointList,
correct: 1
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
this.checkLayer.push(1) this.checkLayer.push(1)
...@@ -917,7 +956,7 @@ export default { ...@@ -917,7 +956,7 @@ export default {
// console.log(this.checkLayer) // console.log(this.checkLayer)
var tmpLabel = [] var tmpLabel = []
for (var i = 0; i < this.layerData.length; i ++) { for (var i = 0; i < this.layerData.length; i ++) {
if(this.checkLayer[i] == 2 || this.checkLayer[i] == 1) //if(this.checkLayer[i] == 2 || this.checkLayer[i] == 1)
tmpLabel.push(this.layerData[i]) tmpLabel.push(this.layerData[i])
} }
let outputLayerInfo = { let outputLayerInfo = {
...@@ -928,7 +967,7 @@ export default { ...@@ -928,7 +967,7 @@ export default {
// 拿出正确的地标信息 // 拿出正确的地标信息
var tmpLandmark = [] var tmpLandmark = []
for (var i = 0; i < this.landmarkData.length; i ++) { for (var i = 0; i < this.landmarkData.length; i ++) {
if(this.checkLand[i] == 2 || this.checkLand[i] == 1) //if(this.checkLand[i] == 2 || this.checkLand[i] == 1)
tmpLandmark.push(this.landmarkData[i]) tmpLandmark.push(this.landmarkData[i])
} }
let outputlandmarkInfo = { let outputlandmarkInfo = {
......
...@@ -28,7 +28,7 @@ app.register_blueprint(data) ...@@ -28,7 +28,7 @@ app.register_blueprint(data)
app.register_blueprint(image) app.register_blueprint(image)
if __name__ == '__main__': if __name__ == '__main__':
app.run(debug=True, host='127.0.0.1', port=9100) app.run(debug=True, host='47.92.1.107', port=9100)
@app.route('/') @app.route('/')
......
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