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