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

Commit ad3029de by 李梓桢

image

parent 13c7deaa
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<el-radio-button label="矩形标注"></el-radio-button> <el-radio-button label="矩形标注"></el-radio-button>
<el-radio-button label="多边形标注"></el-radio-button> <el-radio-button label="多边形标注"></el-radio-button>
</el-radio-group> </el-radio-group>
<el-button @click="save()">保存</el-button>
</div> </div>
</div> </div>
</el-aside> </el-aside>
...@@ -552,7 +553,7 @@ export default { ...@@ -552,7 +553,7 @@ export default {
var children = this.data[this.pictureId].children var children = this.data[this.pictureId].children
var tmp = this.canvasAll[id] var tmp = this.canvasAll[id]
this.labelName = children[index].label this.labelName = children[index].labelName
this.labelPosition = '' this.labelPosition = ''
var lenTmp = tmp[index].length / 2; var lenTmp = tmp[index].length / 2;
var i = 0; var i = 0;
...@@ -813,19 +814,20 @@ export default { ...@@ -813,19 +814,20 @@ export default {
} }
var self = this var self = this
let res = await this.axios({ let res = await this.axios({
method: 'get', method: 'post',
url: '/image/getImage', url: '/image/getImage',
data: params data: params
}) })
if (res.code === 1) { if (res.code === 1) {
let imageList = res.data let imageList = res.data
// console.log(imageList.imageList[0].imageUrl) // console.log(imageList.imageList[0].imageUrl)
self.$store.commit('clearImageData')
self.$store.commit('setImageData', imageList.imageList) self.$store.commit('setImageData', imageList.imageList)
console.log("!!!!!!!!!!!!!!!!") console.log("!!!!!!!!!!!!!!!!")
console.log(this.$store.state.imageData) console.log(this.$store.state.imageData)
} }
} catch (err) { } catch (err) {
this.$store.commit('clearImageData') self.$store.commit('clearImageData')
console.log(err) console.log(err)
alert('请求出错!') alert('请求出错!')
} }
...@@ -853,14 +855,16 @@ export default { ...@@ -853,14 +855,16 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消' cancelButtonText: '取消'
}).then(({ value }) => { }).then(({ value }) => {
if (value == null)
value = 'iss'
labelName = value labelName = value
let currentImageId = this.pictureId let currentImageId = this.pictureId
const newLabel = {label: labelName} const newLabel = {labelName: labelName}
this.data[currentImageId].children.push(newLabel) this.data[currentImageId].children.push(newLabel)
}).catch(() => { }).catch(() => {
labelName = 'iss' labelName = 'iss'
let currentImageId = this.pictureId let currentImageId = this.pictureId
const newLabel = {label: labelName} const newLabel = {labelName: labelName}
this.data[currentImageId].children.push(newLabel) this.data[currentImageId].children.push(newLabel)
}) })
}, },
...@@ -1004,12 +1008,17 @@ export default { ...@@ -1004,12 +1008,17 @@ export default {
} }
outputData.push(newData) outputData.push(newData)
}) })
/**
* 这里还有问题,再添加标签时只有标签名
*/
console.log("outputdata")
console.log(outputData)
this.imageNum = this.data.len this.imageNum = this.data.len
this.axios({ this.axios({
method: 'post', method: 'post',
url: '/image', url: '/image/saveImage',
data: { data: {
outputData imageList: outputData
} }
}).then(res => { }).then(res => {
console.log(res) console.log(res)
......
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