Commit 13e995b9 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

parent 0d3619b1
<template lang='pug'>
<template lang="pug">
card-warp(title="故障报警分析", height="45px", showBackground)
div(slot="content")
el-form(:inline="true", size="mini")
......@@ -6,10 +6,10 @@ card-warp(title="故障报警分析", height="45px", showBackground)
el-button(
size="mini",
type="primary",
@click="handleDate(index)",
@click="handleDate(item.id)",
v-for="(item, index) in typeList",
:key="index",
:class="[index == currentActive ? 'isActive' : '']"
:class="[item.id == currentActive ? 'isActive' : '']"
) {{ item.name }}
.echartsWarp(width="100%", flex)
//- div
......@@ -41,22 +41,40 @@ export default {
data() {
return {
typeList: [
{ name: '当日' },
{ name: '本周' },
{ name: '当月' },
{ name: '今年' }
{ name: '当日', id: 1 },
{ name: '本周', id: 2 },
{ name: '当月', id: 3 },
{ name: '今年', id: 4 }
],
currentActive: '0'
currentActive: 1
}
},
mounted() {
this.getDataList()
},
methods: {
getDataList() {
this.$http({
url: this.$http.adornUrl('/analysis/getFaultAlarmList'),
method: 'get',
params: this.$http.adornParams({
type: this.currentActive
})
}).then((data) => {
if (data && data.code === 0) {
console.log('数据1', data.typeList)
console.log('数据2', data.idList)
// this.data = data.list
}
})
},
tabClick(tab, event) {
console.log(tab, event)
},
// 当日 ,本周
handleDate(i) {
this.currentActive = i
this.getDataList()
}
}
}
......@@ -82,7 +100,7 @@ export default {
color: #000000;
line-height: 40px;
&::before {
content: "";
content: '';
display: inline-block;
width: 10px;
height: 10px;
......
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