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

Commit 2b1816ed by 李梓桢

image修改报错和注释

parent 254624da
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注列表</div> <div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注列表</div>
<div class="img-title-list-box"> <div class="img-title-list-box">
<div id="img-title-list" style="user-select:none"> <div id="img-title-list" style="user-select:none">
<div v-if="data.length != 0">
<div v-for="(item, index) in data[pictureId].children" <div v-for="(item, index) in data[pictureId].children"
:key="item.id" :key="item.id"
class="listLeft" class="listLeft"
...@@ -82,13 +83,14 @@ ...@@ -82,13 +83,14 @@
> >
</el-checkbox> </el-checkbox>
<!-- <button style="margin-left: auto;"--> <!-- <button style="margin-left: auto;"-->
<!-- v-show = "canvasAllCheck[index] == 2"--> <!-- v-show = "canvasAllCheck[index] == 2"-->
<!-- @click="isRightFn2(index)">取消正确</button>--> <!-- @click="isRightFn2(index)">取消正确</button>-->
<!-- <button style="margin-left: auto;"--> <!-- <button style="margin-left: auto;"-->
<!-- v-show = "canvasAllCheck[index] == 0"--> <!-- v-show = "canvasAllCheck[index] == 0"-->
<!-- @click="isRightFn(index)">标记正确</button>--> <!-- @click="isRightFn(index)">标记正确</button>-->
</div>
</div> </div>
<div style="position: absolute;bottom: 5px;right: 5px;font-size: 15px"> <div style="position: absolute;bottom: 5px;right: 5px;font-size: 15px">
...@@ -345,10 +347,10 @@ export default { ...@@ -345,10 +347,10 @@ export default {
}, },
radio1: function f () { radio1: function f () {
if (this.radio1 == '矩形标注') { if (this.radio1 == '矩形标注') {
console.log('RR') // console.log('RR')
this.canvas.style.cursor = 'crosshair' this.canvas.style.cursor = 'crosshair'
} else if (this.radio1 == '多边形标注') { } else if (this.radio1 == '多边形标注') {
console.log('pp') // console.log('pp')
this.canvas.style.cursor = 'crosshair' this.canvas.style.cursor = 'crosshair'
} else { } else {
this.canvas.style.cursor = 'auto' this.canvas.style.cursor = 'auto'
...@@ -594,8 +596,8 @@ export default { ...@@ -594,8 +596,8 @@ export default {
// _this.ctx.stroke() // _this.ctx.stroke()
}, },
handleNodeClick (data, node) { handleNodeClick (data, node) {
console.log(node) // console.log(node)
console.log(data) // console.log(data)
// console.log('data.id = ' + node.id) // console.log('data.id = ' + node.id)
const parent = node.parent const parent = node.parent
...@@ -605,7 +607,7 @@ export default { ...@@ -605,7 +607,7 @@ export default {
} }
) )
console.log('index = ' + index) // console.log('index = ' + index)
children.splice(index, 1) children.splice(index, 1)
}, },
...@@ -624,7 +626,7 @@ export default { ...@@ -624,7 +626,7 @@ export default {
// alert(len); // alert(len);
// alert(count); // alert(count);
if (count < len - 1) { if (count < len - 1) {
console.log('right') // console.log('right')
this.pictureId++ this.pictureId++
this.scaleSize = 1 this.scaleSize = 1
...@@ -699,7 +701,7 @@ export default { ...@@ -699,7 +701,7 @@ export default {
// alert(count); // alert(count);
if (count > 0) { if (count > 0) {
console.log('left') // console.log('left')
this.pictureId-- this.pictureId--
this.scaleSize = 1 this.scaleSize = 1
...@@ -887,7 +889,7 @@ export default { ...@@ -887,7 +889,7 @@ export default {
this.data[currentImageId].children.push(newLabel) this.data[currentImageId].children.push(newLabel)
// 保存标志置为0 // 保存标志置为0
this.hasSaved = false this.hasSaved = false
console.log(this.data[currentImageId]) // console.log(this.data[currentImageId])
}, },
// deleteLabel () { // deleteLabel () {
// let currentLabelId = 0 // let currentLabelId = 0
...@@ -920,7 +922,7 @@ export default { ...@@ -920,7 +922,7 @@ export default {
}, },
mouseUpHandleelse (event) { mouseUpHandleelse (event) {
window.onmousemove = null window.onmousemove = null
console.log('鼠标松开了') // console.log('鼠标松开了')
}, },
// 监听鼠标事件 // 监听鼠标事件
...@@ -929,7 +931,7 @@ export default { ...@@ -929,7 +931,7 @@ export default {
let _this = this let _this = this
_this.createPTmp = [] _this.createPTmp = []
this.canvas.onmousedown = function (e) { this.canvas.onmousedown = function (e) {
console.log('onmousedown') // console.log('onmousedown')
if (_this.radio1 == '矩形标注') { if (_this.radio1 == '矩形标注') {
_this.canvas.style.cursor = 'crosshair' _this.canvas.style.cursor = 'crosshair'
r1 = _this.mathDiv(e.layerX, _this.scaleSize) r1 = _this.mathDiv(e.layerX, _this.scaleSize)
...@@ -947,7 +949,7 @@ export default { ...@@ -947,7 +949,7 @@ export default {
} }
} }
this.canvas.onmouseup = function (e) { this.canvas.onmouseup = function (e) {
console.log('onmouseup') // console.log('onmouseup')
if (_this.radio1 == '矩形标注') { if (_this.radio1 == '矩形标注') {
_this.canvas.style.cursor = 'crosshair' _this.canvas.style.cursor = 'crosshair'
_this.createR(e, 'end', r1, r2) _this.createR(e, 'end', r1, r2)
...@@ -962,7 +964,7 @@ export default { ...@@ -962,7 +964,7 @@ export default {
} }
} }
this.canvas.ondblclick = async function (e) { this.canvas.ondblclick = async function (e) {
console.log('dblclick') // console.log('dblclick')
if (_this.radio1 == '矩形标注') { if (_this.radio1 == '矩形标注') {
_this.canvas.style.cursor = 'crosshair' _this.canvas.style.cursor = 'crosshair'
} else if (_this.radio1 == '多边形标注') { } else if (_this.radio1 == '多边形标注') {
...@@ -992,7 +994,7 @@ export default { ...@@ -992,7 +994,7 @@ export default {
let _this = this let _this = this
let r let r
if (status == 'begin') { if (status == 'begin') {
console.log('onmousemove') // console.log('onmousemove')
_this.canvas.onmousemove = function (e) { _this.canvas.onmousemove = function (e) {
_this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height) _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height)
...@@ -1022,8 +1024,8 @@ export default { ...@@ -1022,8 +1024,8 @@ export default {
} }
_this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height) _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height)
console.log('X:' + e.layerX + 'Y:' + e.layerY) // console.log('X:' + e.layerX + 'Y:' + e.layerY)
console.log('r1:' + r1 + 'r2:' + r2) // console.log('r1:' + r1 + 'r2:' + r2)
let layerX = _this.mathDiv(e.layerX, _this.scaleSize) let layerX = _this.mathDiv(e.layerX, _this.scaleSize)
let layerY = _this.mathDiv(e.layerY, _this.scaleSize) let layerY = _this.mathDiv(e.layerY, _this.scaleSize)
let rx = layerX - r1 let rx = layerX - r1
...@@ -1034,7 +1036,7 @@ export default { ...@@ -1034,7 +1036,7 @@ export default {
_this.ctx.beginPath() _this.ctx.beginPath()
_this.ctx.fillStyle = 'rgba(51,135,255,0.54)' _this.ctx.fillStyle = 'rgba(51,135,255,0.54)'
_this.ctx.fillRect(r1, r2, rx, ry) _this.ctx.fillRect(r1, r2, rx, ry)
console.log(r1 + ' ' + r2 + ' ' + rx + ' ' + ry) // console.log(r1 + ' ' + r2 + ' ' + rx + ' ' + ry)
// _this.ctx.stroke() // _this.ctx.stroke()
// 把每个标注画出来 // 把每个标注画出来
...@@ -1144,13 +1146,13 @@ export default { ...@@ -1144,13 +1146,13 @@ export default {
save () { save () {
// 先把格式转换回去 // 先把格式转换回去
var outputData = [] var outputData = []
console.log("data") // console.log("data")
console.log(this.data) // console.log(this.data)
var index = 0 var index = 0
this.data.forEach(element => { this.data.forEach(element => {
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])
} }
...@@ -1165,8 +1167,8 @@ export default { ...@@ -1165,8 +1167,8 @@ export default {
outputData.push(newData) outputData.push(newData)
}) })
console.log('outputdata') // console.log('outputdata')
console.log(outputData) // console.log(outputData)
this.submit() this.submit()
...@@ -1178,7 +1180,7 @@ export default { ...@@ -1178,7 +1180,7 @@ export default {
imageList: outputData imageList: outputData
} }
}).then(res => { }).then(res => {
console.log(res) // console.log(res)
if (res.code === 1) { if (res.code === 1) {
// 保存标志置为1 // 保存标志置为1
this.hasSaved = true this.hasSaved = true
......
...@@ -103,10 +103,11 @@ ...@@ -103,10 +103,11 @@
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注列表</div> <div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注列表</div>
<div class="img-title-list-box"> <div class="img-title-list-box">
<div id="img-title-list" style="user-select:none"> <div id="img-title-list" style="user-select:none">
<div v-if="data.length != 0">
<div v-for="(item, index) in data[pictureId].children" :key="item.id" class="listLeft" style="text-align: left" @dblclick="labelInfo(index)" @mouseenter="labelEnter(index)" @mouseleave="labelLeave()"> <div v-for="(item, index) in data[pictureId].children" :key="item.id" class="listLeft" style="text-align: left" @dblclick="labelInfo(index)" @mouseenter="labelEnter(index)" @mouseleave="labelLeave()">
{{index+1}}. &nbsp; {{item.labelName}} {{index+1}}. &nbsp; {{item.labelName}}
</div> </div>
</div>
<!-- <el-tree--> <!-- <el-tree-->
<!-- :data="data"--> <!-- :data="data"-->
<!-- :props="defaultProps"--> <!-- :props="defaultProps"-->
...@@ -234,17 +235,17 @@ export default { ...@@ -234,17 +235,17 @@ export default {
}, },
async mounted () { async mounted () {
let routeParams = this.$route.params let routeParams = this.$route.params
console.log("routeParams") // console.log("routeParams")
console.log(routeParams) // console.log(routeParams)
this.imageName = routeParams.file.url this.imageName = routeParams.file.url
this.relationId = routeParams.relationId this.relationId = routeParams.relationId
this.description = routeParams.piece.template this.description = routeParams.piece.template
console.log(this.baseURL) // console.log(this.baseURL)
let baseURL = this.baseURL let baseURL = this.baseURL
// let src = this.getimageUrl(imageName) // let src = this.getimageUrl(imageName)
// 获取图片列表并转换格式 // 获取图片列表并转换格式
let imageList = await this.getLabelList() let imageList = await this.getLabelList()
console.log(imageList) // console.log(imageList)
this.imageList = imageList.imageList this.imageList = imageList.imageList
// 加载第一张图片 // 加载第一张图片
...@@ -257,11 +258,11 @@ export default { ...@@ -257,11 +258,11 @@ export default {
this.imageUrl = imgUrl this.imageUrl = imgUrl
// 把这个函数放在后面是因为formExchange中可能会用到this.imageUrl // 把这个函数放在后面是因为formExchange中可能会用到this.imageUrl
console.log('input') // console.log('input')
console.log(this.imageList) // console.log(this.imageList)
this.formExchange(this.imageList) this.formExchange(this.imageList)
console.log('output') // console.log('output')
console.log(this.data) // console.log(this.data)
console.log(this.data.length + ' 图片张数') console.log(this.data.length + ' 图片张数')
var img = new Image() var img = new Image()
...@@ -314,7 +315,7 @@ export default { ...@@ -314,7 +315,7 @@ export default {
// 还原数据库里的标注记录 // 还原数据库里的标注记录
let id = _this.pictureId let id = _this.pictureId
console.log('id = ' + id) // console.log('id = ' + id)
_this.data.forEach(function (element, index) { _this.data.forEach(function (element, index) {
var indexPic = index var indexPic = index
...@@ -323,8 +324,8 @@ export default { ...@@ -323,8 +324,8 @@ export default {
// console.log(element) // console.log(element)
var num = [] var num = []
element.pointList.forEach(function (element1) { element.pointList.forEach(function (element1) {
console.log('pointlist') // console.log('pointlist')
console.log(element1) // console.log(element1)
num.push(element1.X) num.push(element1.X)
num.push(element1.Y) num.push(element1.Y)
}) })
...@@ -333,14 +334,14 @@ export default { ...@@ -333,14 +334,14 @@ export default {
// var rx = element.pointList[1].X // var rx = element.pointList[1].X
// var ry = element.pointList[1].Y // var ry = element.pointList[1].Y
// var num = [r1, r2, rx, ry] // var num = [r1, r2, rx, ry]
console.log(num) // console.log(num)
_this.canvasAll[indexPic].push(num) _this.canvasAll[indexPic].push(num)
}) })
}) })
// 还原标注 // 还原标注
_this.restoreCanvas() _this.restoreCanvas()
_this.brush_Listener() //_this.brush_Listener()
} }
this.pictureId = 0 this.pictureId = 0
...@@ -602,8 +603,8 @@ export default { ...@@ -602,8 +603,8 @@ export default {
// _this.ctx.stroke() // _this.ctx.stroke()
}, },
handleNodeClick (data, node) { handleNodeClick (data, node) {
console.log(node) // console.log(node)
console.log(data) // console.log(data)
// console.log('data.id = ' + node.id) // console.log('data.id = ' + node.id)
const parent = node.parent const parent = node.parent
...@@ -613,7 +614,7 @@ export default { ...@@ -613,7 +614,7 @@ export default {
} }
) )
console.log('index = ' + index) // console.log('index = ' + index)
children.splice(index, 1) children.splice(index, 1)
}, },
...@@ -632,7 +633,7 @@ export default { ...@@ -632,7 +633,7 @@ export default {
// alert(len); // alert(len);
// alert(count); // alert(count);
if (count < len - 1) { if (count < len - 1) {
console.log('right') // console.log('right')
this.pictureId++ this.pictureId++
this.scaleSize = 1 this.scaleSize = 1
...@@ -707,7 +708,7 @@ export default { ...@@ -707,7 +708,7 @@ export default {
// alert(count); // alert(count);
if (count > 0) { if (count > 0) {
console.log('left') // console.log('left')
this.pictureId-- this.pictureId--
this.scaleSize = 1 this.scaleSize = 1
...@@ -806,7 +807,7 @@ export default { ...@@ -806,7 +807,7 @@ export default {
let imageList = res.data let imageList = res.data
// console.log(imageList.imageList[0].imageUrl) // console.log(imageList.imageList[0].imageUrl)
// self.$store.commit('setImageData', imageList.imageList) // self.$store.commit('setImageData', imageList.imageList)
console.log(imageList) // console.log(imageList)
return imageList return imageList
} else { } else {
// self.$store.commit('clearImageData') // self.$store.commit('clearImageData')
...@@ -884,7 +885,7 @@ export default { ...@@ -884,7 +885,7 @@ export default {
pointList: pointList pointList: pointList
} }
this.data[currentImageId].children.push(newLabel) this.data[currentImageId].children.push(newLabel)
console.log(this.data[currentImageId]) // console.log(this.data[currentImageId])
}, },
// deleteLabel () { // deleteLabel () {
// let currentLabelId = 0 // let currentLabelId = 0
...@@ -917,7 +918,7 @@ export default { ...@@ -917,7 +918,7 @@ export default {
}, },
mouseUpHandleelse (event) { mouseUpHandleelse (event) {
window.onmousemove = null window.onmousemove = null
console.log('鼠标松开了') // console.log('鼠标松开了')
}, },
addScore() { addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "") if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
......
...@@ -213,20 +213,20 @@ export default { ...@@ -213,20 +213,20 @@ export default {
*/ */
let routeParams = this.$route.params let routeParams = this.$route.params
console.log('routeParams') // console.log('routeParams')
console.log(routeParams) // console.log(routeParams)
this.relationId = routeParams.relationId this.relationId = routeParams.relationId
this.description = routeParams.piece.template this.description = routeParams.piece.template
let res = await this.getLayerList() let res = await this.getLayerList()
console.log(res) // console.log(res)
// 避免第一次标注时数据库中没有内容的情况 // 避免第一次标注时数据库中没有内容的情况
if (res.layerInfo != null) { this.layerData = res.layerInfo.labelList } else { this.layerData = [] } if (res.layerInfo != null) { this.layerData = res.layerInfo.labelList } else { this.layerData = [] }
console.log(this.layerData) // console.log(this.layerData)
if (res.landmarkList != null) { this.landmarkData = res.landmarkList.landmarkEntityList } else { this.landmarkData = [] } if (res.landmarkList != null) { this.landmarkData = res.landmarkList.landmarkEntityList } else { this.landmarkData = [] }
console.log(this.landmarkData) // console.log(this.landmarkData)
this.get_height() this.get_height()
var _this = this var _this = this
...@@ -303,8 +303,8 @@ export default { ...@@ -303,8 +303,8 @@ export default {
Y: e.lnglat.getLat() Y: e.lnglat.getLat()
} }
_this.clickedPosition = value _this.clickedPosition = value
console.log('clicked position: ') // console.log('clicked position: ')
console.log(_this.clickedPosition) // console.log(_this.clickedPosition)
if (_this.radio1 == '地标') { if (_this.radio1 == '地标') {
_this.addlandmark(value) _this.addlandmark(value)
...@@ -315,10 +315,10 @@ export default { ...@@ -315,10 +315,10 @@ export default {
} }
}) })
this.mouseTool.on('draw', function (event) { this.mouseTool.on('draw', function (event) {
console.log(event.obj) // console.log(event.obj)
if (_this.radio1 == '矩形') { if (_this.radio1 == '矩形') {
console.log('northEast :' + event.obj._opts.bounds.northEast.lng + ',' + event.obj._opts.bounds.northEast.lat) // console.log('northEast :' + event.obj._opts.bounds.northEast.lng + ',' + event.obj._opts.bounds.northEast.lat)
console.log('southWest :' + event.obj._opts.bounds.southWest.lng + ',' + event.obj._opts.bounds.southWest.lat) // console.log('southWest :' + event.obj._opts.bounds.southWest.lng + ',' + event.obj._opts.bounds.southWest.lat)
let northEast = { let northEast = {
X: event.obj._opts.bounds.northEast.lng, X: event.obj._opts.bounds.northEast.lng,
Y: event.obj._opts.bounds.northEast.lat Y: event.obj._opts.bounds.northEast.lat
...@@ -328,12 +328,12 @@ export default { ...@@ -328,12 +328,12 @@ export default {
Y: event.obj._opts.bounds.southWest.lat Y: event.obj._opts.bounds.southWest.lat
} }
if (!(northEast.X == southWest.X && northEast.Y == southWest.Y)) { if (!(northEast.X == southWest.X && northEast.Y == southWest.Y)) {
console.log('这是一个矩形') // console.log('这是一个矩形')
_this.addRectangle(northEast, southWest) _this.addRectangle(northEast, southWest)
} }
} else if (_this.radio1 == '多边形') { } else if (_this.radio1 == '多边形') {
console.log(event.obj._opts.path) // console.log(event.obj._opts.path)
console.log('这是一个多边形') // console.log('这是一个多边形')
let path = event.obj._opts.path let path = event.obj._opts.path
if (path.length > 1) { if (path.length > 1) {
_this.addPolygon(path) _this.addPolygon(path)
...@@ -343,7 +343,7 @@ export default { ...@@ -343,7 +343,7 @@ export default {
}, },
// 点标注&区域标注跳转 // 点标注&区域标注跳转
handleClick (tab, event) { handleClick (tab, event) {
console.log(tab, event) // console.log(tab, event)
}, },
// 删除标注 // 删除标注
deleteLabelInList () { deleteLabelInList () {
...@@ -552,7 +552,7 @@ export default { ...@@ -552,7 +552,7 @@ 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)
return { return {
layerInfo: layerInfo, layerInfo: layerInfo,
landmarkList: landmarkList landmarkList: landmarkList
...@@ -604,7 +604,7 @@ export default { ...@@ -604,7 +604,7 @@ export default {
landmarkName: landmarkName landmarkName: landmarkName
} }
this.landmarkData.push(newlandmark) this.landmarkData.push(newlandmark)
console.log(this.landmarkData) // console.log(this.landmarkData)
// 在图层上显示 // 在图层上显示
var marker = new AMap.Marker({ var marker = new AMap.Marker({
...@@ -691,7 +691,7 @@ export default { ...@@ -691,7 +691,7 @@ export default {
pointList: pointList pointList: pointList
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
console.log(this.layerData) // console.log(this.layerData)
this.restore() this.restore()
// 保存标志置为0 // 保存标志置为0
this.hasSaved = false this.hasSaved = false
...@@ -735,7 +735,7 @@ export default { ...@@ -735,7 +735,7 @@ export default {
* 创建多边形数据 * 创建多边形数据
*/ */
makePolygon (labelName, path) { makePolygon (labelName, path) {
console.log(path) // console.log(path)
var pointList = [] var pointList = []
var i = 0 var i = 0
path.forEach(element => { path.forEach(element => {
...@@ -754,7 +754,7 @@ export default { ...@@ -754,7 +754,7 @@ export default {
pointList: pointList pointList: pointList
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
console.log(this.layerData) // console.log(this.layerData)
this.restore() this.restore()
// 保存标志置为0 // 保存标志置为0
this.hasSaved = false this.hasSaved = false
...@@ -769,9 +769,9 @@ export default { ...@@ -769,9 +769,9 @@ export default {
relationId: this.relationId, relationId: this.relationId,
landmarkEntityList: this.landmarkData landmarkEntityList: this.landmarkData
} }
console.log('outputdata') // console.log('outputdata')
console.log(outputlandmarkInfo) // console.log(outputlandmarkInfo)
console.log(outputLayerInfo) // console.log(outputLayerInfo)
this.axios({ this.axios({
method: 'post', method: 'post',
...@@ -781,7 +781,7 @@ export default { ...@@ -781,7 +781,7 @@ export default {
landmarkInfo: outputlandmarkInfo landmarkInfo: outputlandmarkInfo
} }
}).then(res => { }).then(res => {
console.log(res) // console.log(res)
if (res.code === 1) { if (res.code === 1) {
// 保存标志置为1 // 保存标志置为1
this.hasSaved = true this.hasSaved = true
......
...@@ -247,13 +247,13 @@ export default { ...@@ -247,13 +247,13 @@ export default {
*/ */
let routeParams = this.$route.params let routeParams = this.$route.params
console.log('routeParams') // console.log('routeParams')
console.log(routeParams) // console.log(routeParams)
this.relationId = routeParams.relationId this.relationId = routeParams.relationId
this.description = routeParams.piece.template this.description = routeParams.piece.template
let res = await this.getLayerList() let res = await this.getLayerList()
console.log(res) // console.log(res)
// 避免第一次标注时数据库中没有内容的情况 // 避免第一次标注时数据库中没有内容的情况
if (res.layerInfo != null) { if (res.layerInfo != null) {
...@@ -263,7 +263,7 @@ export default { ...@@ -263,7 +263,7 @@ export default {
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;
...@@ -272,7 +272,7 @@ export default { ...@@ -272,7 +272,7 @@ export default {
this.value.push(false) this.value.push(false)
} }
} else { this.landmarkData = [] } } else { this.landmarkData = [] }
console.log(this.landmarkData) // console.log(this.landmarkData)
this.get_height() this.get_height()
var _this = this var _this = this
...@@ -380,8 +380,8 @@ export default { ...@@ -380,8 +380,8 @@ export default {
Y: e.lnglat.getLat() Y: e.lnglat.getLat()
} }
_this.clickedPosition = value _this.clickedPosition = value
console.log('clicked position: ') // console.log('clicked position: ')
console.log(_this.clickedPosition) // console.log(_this.clickedPosition)
if (_this.radio1 == '地标') { if (_this.radio1 == '地标') {
_this.addlandmark(value) _this.addlandmark(value)
...@@ -392,10 +392,10 @@ export default { ...@@ -392,10 +392,10 @@ export default {
} }
}) })
this.mouseTool.on('draw', function (event) { this.mouseTool.on('draw', function (event) {
console.log(event.obj) // console.log(event.obj)
if (_this.radio1 == '矩形') { if (_this.radio1 == '矩形') {
console.log('northEast :' + event.obj._opts.bounds.northEast.lng + ',' + event.obj._opts.bounds.northEast.lat) // console.log('northEast :' + event.obj._opts.bounds.northEast.lng + ',' + event.obj._opts.bounds.northEast.lat)
console.log('southWest :' + event.obj._opts.bounds.southWest.lng + ',' + event.obj._opts.bounds.southWest.lat) // console.log('southWest :' + event.obj._opts.bounds.southWest.lng + ',' + event.obj._opts.bounds.southWest.lat)
let northEast = { let northEast = {
X: event.obj._opts.bounds.northEast.lng, X: event.obj._opts.bounds.northEast.lng,
Y: event.obj._opts.bounds.northEast.lat Y: event.obj._opts.bounds.northEast.lat
...@@ -405,12 +405,12 @@ export default { ...@@ -405,12 +405,12 @@ export default {
Y: event.obj._opts.bounds.southWest.lat Y: event.obj._opts.bounds.southWest.lat
} }
if (!(northEast.X == southWest.X && northEast.Y == southWest.Y)) { if (!(northEast.X == southWest.X && northEast.Y == southWest.Y)) {
console.log('这是一个矩形') // console.log('这是一个矩形')
_this.addRectangle(northEast, southWest) _this.addRectangle(northEast, southWest)
} }
} else if (_this.radio1 == '多边形') { } else if (_this.radio1 == '多边形') {
console.log(event.obj._opts.path) // console.log(event.obj._opts.path)
console.log('这是一个多边形') // console.log('这是一个多边形')
let path = event.obj._opts.path let path = event.obj._opts.path
if (path.length > 1) { if (path.length > 1) {
_this.addPolygon(path) _this.addPolygon(path)
...@@ -420,7 +420,7 @@ export default { ...@@ -420,7 +420,7 @@ export default {
}, },
// 点标注&区域标注跳转 // 点标注&区域标注跳转
handleClick (tab, event) { handleClick (tab, event) {
console.log(tab, event) // console.log(tab, event)
}, },
// 删除标注 // 删除标注
deleteLabelInList () { deleteLabelInList () {
...@@ -632,7 +632,7 @@ export default { ...@@ -632,7 +632,7 @@ 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)
return { return {
layerInfo: layerInfo, layerInfo: layerInfo,
landmarkList: landmarkList landmarkList: landmarkList
...@@ -643,7 +643,7 @@ export default { ...@@ -643,7 +643,7 @@ export default {
} }
} catch (err) { } catch (err) {
self.$store.commit('clearLayerData') self.$store.commit('clearLayerData')
console.log(err) // console.log(err)
alert('请求出错!') alert('请求出错!')
} }
}, },
...@@ -686,7 +686,7 @@ export default { ...@@ -686,7 +686,7 @@ export default {
this.landmarkData.push(newlandmark) this.landmarkData.push(newlandmark)
this.checkLand.push(1) this.checkLand.push(1)
this.value.push(false) this.value.push(false)
console.log(this.landmarkData) // console.log(this.landmarkData)
// 在图层上显示 // 在图层上显示
var marker = new AMap.Marker({ var marker = new AMap.Marker({
...@@ -775,7 +775,7 @@ export default { ...@@ -775,7 +775,7 @@ export default {
this.layerData.push(newLabel) this.layerData.push(newLabel)
this.checkLayer.push(1) this.checkLayer.push(1)
this.value2.push(false) this.value2.push(false)
console.log(this.layerData) // console.log(this.layerData)
this.restore() this.restore()
// 保存标志置为0 // 保存标志置为0
this.hasSaved = false this.hasSaved = false
...@@ -819,7 +819,7 @@ export default { ...@@ -819,7 +819,7 @@ export default {
* 创建多边形数据 * 创建多边形数据
*/ */
makePolygon (labelName, path) { makePolygon (labelName, path) {
console.log(path) // console.log(path)
var pointList = [] var pointList = []
var i = 0 var i = 0
path.forEach(element => { path.forEach(element => {
...@@ -840,7 +840,7 @@ export default { ...@@ -840,7 +840,7 @@ export default {
this.layerData.push(newLabel) this.layerData.push(newLabel)
this.checkLayer.push(1) this.checkLayer.push(1)
this.value2.push(false) this.value2.push(false)
console.log(this.layerData) // console.log(this.layerData)
this.restore() this.restore()
// 保存标志置为0 // 保存标志置为0
this.hasSaved = false this.hasSaved = false
...@@ -878,8 +878,8 @@ export default { ...@@ -878,8 +878,8 @@ export default {
// 2=>标注者标对的,1=>审查者后加的,0=>标错的 // 2=>标注者标对的,1=>审查者后加的,0=>标错的
var yesAll = 0 var yesAll = 0
var yesTmp = 0 var yesTmp = 0
console.log(this.checkLayer) // console.log(this.checkLayer)
console.log(this.checkLand) // console.log(this.checkLand)
this.checkLayer.forEach(e =>{ this.checkLayer.forEach(e =>{
if(e == 2) { if(e == 2) {
yesAll++; yesAll++;
...@@ -914,7 +914,7 @@ export default { ...@@ -914,7 +914,7 @@ export default {
// console.log(this.layerData) // console.log(this.layerData)
// 拿出正确的区域标注信息 // 拿出正确的区域标注信息
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)
...@@ -935,9 +935,9 @@ export default { ...@@ -935,9 +935,9 @@ export default {
relationId: this.relationId, relationId: this.relationId,
landmarkEntityList: tmpLandmark landmarkEntityList: tmpLandmark
} }
console.log('outputdata') // console.log('outputdata')
console.log(outputlandmarkInfo) // console.log(outputlandmarkInfo)
console.log(outputLayerInfo) // console.log(outputLayerInfo)
this.submit() this.submit()
...@@ -949,7 +949,7 @@ export default { ...@@ -949,7 +949,7 @@ export default {
landmarkInfo: outputlandmarkInfo landmarkInfo: outputlandmarkInfo
} }
}).then(res => { }).then(res => {
console.log(res) // console.log(res)
if (res.code === 1) { if (res.code === 1) {
// 保存标志置为1 // 保存标志置为1
this.hasSaved = true this.hasSaved = true
......
...@@ -191,24 +191,24 @@ ...@@ -191,24 +191,24 @@
*/ */
let routeParams = this.$route.params let routeParams = this.$route.params
console.log("routeParams") // console.log("routeParams")
console.log(routeParams) // console.log(routeParams)
this.relationId = routeParams.relationId this.relationId = routeParams.relationId
this.description = routeParams.piece.template this.description = routeParams.piece.template
let res = await this.getLayerList() let res = await this.getLayerList()
console.log(res) // console.log(res)
if (res.layerInfo != null) if (res.layerInfo != null)
this.layerData = res.layerInfo.labelList this.layerData = res.layerInfo.labelList
else else
this.layerData = [] 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
else else
this.landmarkData = [] this.landmarkData = []
console.log(this.landmarkData) // console.log(this.landmarkData)
this.get_height(); this.get_height();
var _this = this; var _this = this;
...@@ -260,8 +260,8 @@ ...@@ -260,8 +260,8 @@
Y : e.lnglat.getLat() Y : e.lnglat.getLat()
} }
_this.clickedPosition = value _this.clickedPosition = value
console.log('clicked position: ') // console.log('clicked position: ')
console.log(_this.clickedPosition) // console.log(_this.clickedPosition)
// if (_this.radio1 == '建立地标') { // if (_this.radio1 == '建立地标') {
// _this.addlandmark(value) // _this.addlandmark(value)
...@@ -300,7 +300,7 @@ ...@@ -300,7 +300,7 @@
}, },
// 点标注&区域标注跳转 // 点标注&区域标注跳转
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); // console.log(tab, event);
}, },
// 删除标注 // 删除标注
deleteLabelInList () { deleteLabelInList () {
...@@ -513,7 +513,7 @@ ...@@ -513,7 +513,7 @@
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)
return { return {
layerInfo : layerInfo, layerInfo : layerInfo,
landmarkList : landmarkList landmarkList : landmarkList
...@@ -568,7 +568,7 @@ ...@@ -568,7 +568,7 @@
landmarkName : landmarkName landmarkName : landmarkName
} }
this.landmarkData.push(newlandmark) this.landmarkData.push(newlandmark)
console.log(this.landmarkData) // console.log(this.landmarkData)
//在图层上显示 //在图层上显示
var marker = new AMap.Marker({ var marker = new AMap.Marker({
...@@ -652,7 +652,7 @@ ...@@ -652,7 +652,7 @@
pointList : pointList pointList : pointList
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
console.log(this.layerData) // console.log(this.layerData)
this.restore() this.restore()
}, },
/** /**
...@@ -694,7 +694,7 @@ ...@@ -694,7 +694,7 @@
* 创建多边形标注数据 * 创建多边形标注数据
*/ */
makePolygon(labelName, path) { makePolygon(labelName, path) {
console.log(path) // console.log(path)
var pointList = [] var pointList = []
var i = 0 var i = 0
path.forEach(element => { path.forEach(element => {
...@@ -713,7 +713,7 @@ ...@@ -713,7 +713,7 @@
pointList : pointList pointList : pointList
} }
this.layerData.push(newLabel) this.layerData.push(newLabel)
console.log(this.layerData) // console.log(this.layerData)
this.restore() this.restore()
}, },
...@@ -728,9 +728,9 @@ ...@@ -728,9 +728,9 @@
relationId : this.relationId , relationId : this.relationId ,
landmarkEntityList : this.landmarkData landmarkEntityList : this.landmarkData
} }
console.log("outputdata") // console.log("outputdata")
console.log(outputlandmarkInfo) // console.log(outputlandmarkInfo)
console.log(outputLayerInfo) // console.log(outputLayerInfo)
this.axios({ this.axios({
method: 'post', method: 'post',
...@@ -740,7 +740,7 @@ ...@@ -740,7 +740,7 @@
landmarkInfo: outputlandmarkInfo landmarkInfo: outputlandmarkInfo
} }
}).then(res => { }).then(res => {
console.log(res) // console.log(res)
if (res.code === 1) { if (res.code === 1) {
this.$alert('保存成功', '保存成功', { this.$alert('保存成功', '保存成功', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
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