Commit 26edaee6 authored by xiexingan's avatar xiexingan

历史数据列表

parent 02941768
......@@ -23,10 +23,10 @@ el-dialog(
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 }}
span(v-if="type == 1")
el-table(
......@@ -113,6 +113,7 @@ export default {
return {
type: null,
pageIndex: 1,
pageSize: 10,
totalPage: 0,
visible: false,
......@@ -121,12 +122,12 @@ export default {
dateValue: ''
},
typeList: [
{ name: '当日' },
{ name: '本周' },
{ name: '当月' },
{ name: '今年' }
{ name: '当日', id: 1 },
{ name: '本周', id: 2 },
{ name: '当月', id: 3 },
{ name: '今年', id: 4 }
],
currentActive: '0',
currentActive: 1,
dataList: [],
chartList: [
{ id: '11', title: '温度', color: '#21ACFC' },
......@@ -152,32 +153,33 @@ export default {
},
methods: {
init(id, type) {
this.type = type
this.dataForm.id = id
init(data, type) {
console.log(11111)
this.type = type // 1=>>> 历史数据 / 2=>>> 统计图表
this.visible = true
if (id) {
// this.$http({
// url: this.$http.adornUrlProduct(`/brandMain/getId/${this.dataForm.id}`),
// method: 'get',
// params: this.$http.adornParams()
// }).then((data) => {
// if (data && data.code === 0) {
// this.dataForm = data.bean
// }
// })
} else {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
})
}
// this.getDataList() //获取历史数据列表
},
// 当日 ,本周
handleDate(i) {
this.currentActive = i
},
getDataList() {},
getDataList(page, rows) {
this.$http({
url: this.$http.adornUrl(`/kanban/getListByTypeAndId `),
method: 'get',
params: {
resourceId: '',
resourceType: '9a570e608d0840499551eca89d76449d', //室外气象站
type: this.currentActive,
page: page || this.pageSize,
rows: rows || this.pageSize
}
}).then((data) => {
if (data && data.code === 0) {
console.log('室外气象站历史数据', data)
}
})
},
showParams(data, type) {
console.log(111)
this.historyVisible = true
......
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