fixedplot

This commit is contained in:
Z 2019-10-02 16:33:36 -05:00
parent 251308a8df
commit 9df303041d
4 changed files with 7 additions and 16 deletions

View File

@ -84,7 +84,7 @@ export default [
// plot prediction graph // plot prediction graph
{ {
url: '/testpredict', url: '/testpppredict',
type: 'get', type: 'get',
response: _ => { response: _ => {
return { return {

View File

@ -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 }
}) })

View File

@ -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

View File

@ -538,24 +538,15 @@ export default {
this.listLoading = true this.listLoading = true
sendAnalyzeRequest().then(response => { sendAnalyzeRequest().then(response => {
var token = response['token'] var token = response['token']
var para = response['future'] var future = response['future']
var past = response['past']
// 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'
},
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'
}
}}) }})
} }
}) })