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

Commit 3821a229 by 张欣玥

引入math.js改

parent 00ae4d4c
......@@ -232,7 +232,7 @@ export default {
// console.log(this.$store.state.imageData)
this.getLabelList()
console.log('input')
console.log(this.$store.state.imageData)
this.formExchange(this.$store.state.imageData)
......@@ -404,7 +404,8 @@ export default {
goBigger () {
var scale = this.scaleSize
if (scale < 2) {
this.scaleSize = scale + 0.1
// this.scaleSize = scale + 0.1
this.scaleSize = this.$math.add(this.$math.bignumber(scale), this.$math.bignumber(0.1))
} else {
this.scaleSize = 2
}
......@@ -418,7 +419,7 @@ export default {
goSmaller () {
var scale = this.scaleSize
if (scale > 0.5) {
this.scaleSize = scale - 0.1
this.scaleSize = this.$math.subtract(this.$math.bignumber(scale), this.$math.bignumber(0.1))
} else {
this.scaleSize = 0.5
}
......@@ -799,18 +800,18 @@ export default {
}
},
async getLabelList () {
/**
* 这是一个大致的格式转换
*/
try {
this.data = []
let params = {
"relationList" : [
123,
11
]
]
}
var self = this
let res = await this.axios({
......@@ -825,7 +826,7 @@ export default {
self.$store.commit('setImageData', imageList.imageList)
console.log("!!!!!!!!!!!!!!!!")
console.log(this.$store.state.imageData)
}
}
} catch (err) {
self.$store.commit('clearImageData')
console.log(err)
......@@ -1031,7 +1032,7 @@ export default {
}
outputData.push(newData)
})
console.log("outputdata")
console.log(outputData)
this.imageNum = this.data.len
......
......@@ -8,6 +8,9 @@ import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import VueAxios from 'vue-axios'
import * as math from 'mathjs';
Vue.prototype.$math = math
axios.defaults.baseURL = 'http://localhost:9100/api'
axios.defaults.timeout = 8000
......
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