Commit 26edaee6 authored by xiexingan's avatar xiexingan

历史数据列表

parent 02941768
...@@ -23,10 +23,10 @@ el-dialog( ...@@ -23,10 +23,10 @@ el-dialog(
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 }}
span(v-if="type == 1") span(v-if="type == 1")
el-table( el-table(
...@@ -113,6 +113,7 @@ export default { ...@@ -113,6 +113,7 @@ export default {
return { return {
type: null, type: null,
pageIndex: 1,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
visible: false, visible: false,
...@@ -121,12 +122,12 @@ export default { ...@@ -121,12 +122,12 @@ export default {
dateValue: '' dateValue: ''
}, },
typeList: [ typeList: [
{ name: '当日' }, { name: '当日', id: 1 },
{ name: '本周' }, { name: '本周', id: 2 },
{ name: '当月' }, { name: '当月', id: 3 },
{ name: '今年' } { name: '今年', id: 4 }
], ],
currentActive: '0', currentActive: 1,
dataList: [], dataList: [],
chartList: [ chartList: [
{ id: '11', title: '温度', color: '#21ACFC' }, { id: '11', title: '温度', color: '#21ACFC' },
...@@ -152,32 +153,33 @@ export default { ...@@ -152,32 +153,33 @@ export default {
}, },
methods: { methods: {
init(id, type) { init(data, type) {
this.type = type console.log(11111)
this.dataForm.id = id this.type = type // 1=>>> 历史数据 / 2=>>> 统计图表
this.visible = true this.visible = true
if (id) { // this.getDataList() //获取历史数据列表
// 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()
})
}
}, },
// 当日 ,本周 // 当日 ,本周
handleDate(i) { handleDate(i) {
this.currentActive = 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) { showParams(data, type) {
console.log(111) console.log(111)
this.historyVisible = true 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