some changes.
This commit is contained in:
commit
d7f70bd473
|
@ -84,7 +84,7 @@ export default [
|
||||||
|
|
||||||
// plot prediction graph
|
// plot prediction graph
|
||||||
{
|
{
|
||||||
url: '/testppppredict',
|
url: '/testpppredict',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
response: _ => {
|
response: _ => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -29,7 +29,7 @@ export function sendAnalyzeRequest(token) {
|
||||||
return request({
|
return request({
|
||||||
url: '/testpredict',
|
url: '/testpredict',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// baseURL: 'http://localhost:8010',
|
baseURL: 'http://localhost:8010',
|
||||||
// authorization: token,
|
// authorization: token,
|
||||||
// params: { token }
|
// params: { token }
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { getToken } from '@/utils/auth'
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
||||||
// withCredentials: true, // send cookies when cross-domain requests
|
// withCredentials: true, // send cookies when cross-domain requests
|
||||||
timeout: 5000 // request timeout
|
timeout: 5000000 // request timeout
|
||||||
})
|
})
|
||||||
|
|
||||||
// request interceptor
|
// request interceptor
|
||||||
|
|
|
@ -537,29 +537,40 @@ export default {
|
||||||
this.$router.push({ name: "analyze" })
|
this.$router.push({ name: "analyze" })
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
sendAnalyzeRequest().then(response => {
|
sendAnalyzeRequest().then(response => {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
// this.$router.push({ name: "plotTest", params: {
|
||||||
|
// past: {
|
||||||
|
// yAxisData: [100, 120, 161, 134, 105, 160, 165, 190,200,250],
|
||||||
|
// xAxisData: ['2019-7-13', '2019-7-14', '2019-7-15', '2019-7-16', '2019-7-17', '2019-7-18', '2019-7-19', '2019-7-20','2019-7-21','2019-7-22'] ,
|
||||||
|
// label: 'Past',
|
||||||
|
// colorPicked: '#999997',
|
||||||
|
// twoLines: true,
|
||||||
|
// yAxisData2: [30, 140, 150, 200, 150, 170, 165, 170,150,230],
|
||||||
|
// label2: 'Prediction',
|
||||||
|
// colorPicked2: '#999997'
|
||||||
|
// },
|
||||||
|
// future: {
|
||||||
|
// yAxisData: [260, 230, 270, 285, 295, 300, 310,330],
|
||||||
|
// xAxisData: ['2019-8-13', '2019-8-14', '2019-8-15', '2019-8-16', '2019-8-17', '2019-8-18', '2019-8-19', '2019-8-20'] ,
|
||||||
|
// label: 'Future',
|
||||||
|
// colorPicked: '#519e19'
|
||||||
|
// }
|
||||||
|
// }})
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> 9859e590f9df6a776df33682696951db6f36144f
|
||||||
var token = response['token']
|
var token = response['token']
|
||||||
var para = response['future']
|
var future = response['future']
|
||||||
|
var past = response['past']
|
||||||
|
var past_predict = response['past_predict']
|
||||||
|
|
||||||
// if the response from the server indicating that it's running the analysis, then redirect to a loading view
|
// if the response from the server indicating that it's running the analysis, then redirect to a loading view
|
||||||
if (token == 'success') {
|
if (token == 'success') {
|
||||||
// this.$router.push({ name: "plot" })
|
// this.$router.push({ name: "plot" })
|
||||||
this.$router.push({ name: "plotTest", params: {
|
this.$router.push({ name: "plotTest", params: {
|
||||||
past: {
|
past,
|
||||||
yAxisData: [100, 120, 161, 134, 105, 160, 165, 190,200,250],
|
future
|
||||||
xAxisData: ['2019-7-13', '2019-7-14', '2019-7-15', '2019-7-16', '2019-7-17', '2019-7-18', '2019-7-19', '2019-7-20','2019-7-21','2019-7-22'] ,
|
|
||||||
label: 'Past',
|
|
||||||
colorPicked: '#999997',
|
|
||||||
twoLines: true,
|
|
||||||
yAxisData2: [100, 140, 161, 134, 105, 160, 165, 190,200,250],
|
|
||||||
label2: 'Past2',
|
|
||||||
colorPicked2: '#999997'
|
|
||||||
},
|
|
||||||
future: {
|
|
||||||
yAxisData: [260, 230, 270, 285, 295, 300, 310,330],
|
|
||||||
xAxisData: ['2019-8-13', '2019-8-14', '2019-8-15', '2019-8-16', '2019-8-17', '2019-8-18', '2019-8-19', '2019-8-20'] ,
|
|
||||||
label: 'Future',
|
|
||||||
colorPicked: '#519e19'
|
|
||||||
}
|
|
||||||
}})
|
}})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -187,6 +187,7 @@ export default {
|
||||||
animationDuration: 2800,
|
animationDuration: 2800,
|
||||||
animationEasing: 'cubicInOut'
|
animationEasing: 'cubicInOut'
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,8 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
const validateUsername = (rule, value, callback) => {
|
const validateUsername = (rule, value, callback) => {
|
||||||
if (!validUsername(value)) {
|
if (!validUsername(value)) {
|
||||||
callback(new Error('Please enter the correct user name'))
|
callback()
|
||||||
|
// callback(new Error('Please enter the correct user name'))
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,21 @@ export default {
|
||||||
default: '#999997'
|
default: '#999997'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
past_predict: {
|
||||||
|
xAxisData: {
|
||||||
|
default: [120, 82, 91, 154, 162, 140, 145,230]
|
||||||
|
},
|
||||||
|
yAxisData: {
|
||||||
|
default: ['a', 'x', 'c', 'd', 'e', 'f', 'g', 'h']
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
default: 'Future'
|
||||||
|
},
|
||||||
|
colorPicked: {
|
||||||
|
default: '#999997'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
future: {
|
future: {
|
||||||
xAxisData: {
|
xAxisData: {
|
||||||
default: [120, 82, 91, 154, 162, 140, 145,230]
|
default: [120, 82, 91, 154, 162, 140, 145,230]
|
||||||
|
|
Loading…
Reference in New Issue