Commit b4811335 authored by ZhangKai's avatar ZhangKai

add: 统计功能页面添加路口选择筛选条件

parent 246b06c6
......@@ -102,6 +102,21 @@
/>
</el-select>
</el-form-item>
<el-form-item label="路口选择" prop="crossName">
<el-select
v-model="queryParams.crossName"
clearable
placeholder="全部"
style="width: 100%"
>
<el-option
v-for="(item, index) in crossNameOption"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
</el-form-item>
......@@ -109,9 +124,9 @@
<!-- echarts图容器 -->
<div v-loading="loading" class="echarts-box">
<!-- 时间段车流量波动展示 -->
<div ref="flowNumberChart" class="flow-number"/>
<div ref="flowNumberChart" class="flow-number" />
<!-- 车型流量占比统计 -->
<div ref="flowRatioChart" class="flow-ratio"/>
<div ref="flowRatioChart" class="flow-ratio" />
</div>
</div>
</template>
......@@ -125,6 +140,7 @@ import * as echarts from 'echarts'
import {
queryTrafficFlowRatio
} from '@/api/business/dataStatistics'
import { selectDisCrossname } from '@/api/business/settingDevice'
// Vue.prototype.$echarts = echarts
......@@ -173,6 +189,8 @@ export default {
regionName: '',
// 区域名称列表
regionNameList: [],
// 路口选项
crossNameOption: [],
// 道路名称
roadName: '',
// 道路名称列表
......@@ -265,6 +283,7 @@ export default {
},
created() {
this.getNowDate()
this.getRoad()
this.getTrafficFlowRatio()
},
mounted() {
......@@ -479,6 +498,17 @@ export default {
selectedDate.setDate(firstDayOfWeek)
// 更新 v-model 的值为所选周的周一日期
this.queryParams.timePoint = selectedDate.toISOString().split('T')[0]
},
/** 获取路口相关信息*/
getRoad() {
selectDisCrossname(this.userId).then(res => {
this.crossNameOption = res.data.map(item => {
return {
label: item,
value: item
}
})
})
}
}
}
......
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