commit
2d0a902599
|
@ -75,6 +75,7 @@
|
||||||
"vue-splitpane": "1.0.4",
|
"vue-splitpane": "1.0.4",
|
||||||
"vue-upload-component": "^2.8.20",
|
"vue-upload-component": "^2.8.20",
|
||||||
"vuedraggable": "2.20.0",
|
"vuedraggable": "2.20.0",
|
||||||
|
"vuejs-datepicker": "^1.6.2",
|
||||||
"vuex": "3.1.0",
|
"vuex": "3.1.0",
|
||||||
"xlsx": "0.14.1"
|
"xlsx": "0.14.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,3 +31,12 @@ export function sendAnalyzeRequest(token) {
|
||||||
params: { token }
|
params: { token }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function sendAnalyzeOnDateRequest(token, fromDate, toDate) {
|
||||||
|
return request({
|
||||||
|
url: '/predictOnDate',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: 'http://localhost:8888',
|
||||||
|
params: { token, fromDate, toDate }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<div id="app">
|
||||||
|
<vuejs-datepicker></vuejs-datepicker>
|
||||||
|
</div>
|
||||||
|
<script src="https://unpkg.com/vue"></script>
|
||||||
|
<script src="https://unpkg.com/vuejs-datepicker"></script>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'testView',
|
||||||
|
components: {
|
||||||
|
vuejsDatepicker
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -16,10 +16,10 @@
|
||||||
</script> -->
|
</script> -->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="vue-spinner">
|
<div class="vue-spinner">
|
||||||
<Circle9 />
|
<Circle9></Circle9>
|
||||||
<h1>Analyzing....</h1>
|
<h1>Analyzing....</h1>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -516,18 +516,17 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
onSendAnalyzeRequest() {
|
onSendAnalyzeRequest() {
|
||||||
this.$router.push({ name: 'analyze' })
|
this.$router.push({ name: "analyze" })
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
sendAnalyzeRequest().then(response => {
|
sendAnalyzeRequest().then(response => {
|
||||||
// console.log("success!")
|
// console.log("success!")
|
||||||
// console.log(response['token'])
|
|
||||||
// this.list = response.data.items
|
// this.list = response.data.items
|
||||||
// this.listLoading = false
|
// this.listLoading = false
|
||||||
/*eslint-disable*/
|
var token = response['token']
|
||||||
token = response['token']
|
|
||||||
// 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 (this.list.indexOf('anylyzing') >= 0) {
|
if (token == 'success') {
|
||||||
// this.$router.push('@/views/Analyzing/analyzing')
|
this.$router.push({ name: "plot" })
|
||||||
|
|
||||||
// sendAnalyzeRequest().then(response => {
|
// sendAnalyzeRequest().then(response => {
|
||||||
// this.list = response.data.items
|
// this.list = response.data.items
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span style="font-weight: bold">You could also run the analysis on the data from the specific date range</span><br>
|
||||||
|
<span>From: </span>
|
||||||
|
<Datepicker v-model="state.from" style="display: inline-block" :bootstrap-styling="true">
|
||||||
|
</Datepicker>
|
||||||
|
<span>To: </span>
|
||||||
|
<Datepicker v-model="state.to" style="display: inline-block" :bootstrap-styling="true"></Datepicker>
|
||||||
|
<button type="button" class="btn btn-success" @click="onSendAnalyzeOnDateRequest">Apply</button>
|
||||||
|
</div>
|
||||||
|
<iframe src="http://localhost:808" width=1300 height=600></iframe>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Datepicker from 'vuejs-datepicker'
|
||||||
|
import { sendAnalyzeOnDateRequest } from '@/api/user'
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
export default {
|
||||||
|
name: 'plot',
|
||||||
|
components: {
|
||||||
|
Datepicker
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
state: { from: new Date(), to: new Date() }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onSendAnalyzeOnDateRequest() {
|
||||||
|
this.$router.push({ name: "analyze" })
|
||||||
|
this.listLoading = true
|
||||||
|
sendAnalyzeOnDateRequest(getToken(), this.state.from, this.state.to).then(response => {
|
||||||
|
var token = response['token']
|
||||||
|
|
||||||
|
// if the response from the server indicating that it's running the analysis, then redirect to a loading view
|
||||||
|
if (token == 'success') {
|
||||||
|
this.$router.push({ name: "plot" })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue