Commit b3318a56 by xinla

--no commit message

1 parent b5621897
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
import { getDetail, getLineAnalysis, getAnalysis } from '@/api/intelligentShortLink' import { getDetail, getLineAnalysis, getAnalysis } from '@/api/intelligentShortLink'
export default { export default {
name: '', name: '',
components: {}, components: {
TimeSearchTitle: () => import('@/components/common/TimeSearchTitle'),
},
data() { data() {
return { return {
loading: false, loading: false,
...@@ -21,7 +23,6 @@ export default { ...@@ -21,7 +23,6 @@ export default {
let id = this.$route.query.id let id = this.$route.query.id
this.getList(id) this.getList(id)
this.getAnalysis(id) this.getAnalysis(id)
this.getLineAnalysis()
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -86,11 +87,11 @@ export default { ...@@ -86,11 +87,11 @@ export default {
this.loading = false this.loading = false
}) })
}, },
getLineAnalysis() { getLineAnalysis(data) {
let query = { let query = {
id: this.$route.query.id, id: this.$route.query.id,
beginTime: this.dateRange[0], beginTime: data.beginTime,
endTime: this.dateRange[1], endTime: data.endTime,
} }
getLineAnalysis(query).then(({ data }) => { getLineAnalysis(query).then(({ data }) => {
this.xData = data.map((e) => e.xtime) this.xData = data.map((e) => e.xtime)
...@@ -119,17 +120,7 @@ export default { ...@@ -119,17 +120,7 @@ export default {
<div class="title">数据趋势</div> <div class="title">数据趋势</div>
<CardGroupIndex :data="cardData"></CardGroupIndex> <CardGroupIndex :data="cardData"></CardGroupIndex>
<div> <div>
<el-date-picker <TimeSearchTitle @search="getLineAnalysis"></TimeSearchTitle>
v-model="dateRange"
:picker-options="pickerOptions"
class="ml20"
value-format="yyyy-MM-dd"
type="daterange"
:clearable="false"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="getLineAnalysis()"></el-date-picker>
</div> </div>
<ChartLine <ChartLine
:xData="xData" :xData="xData"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!