|
@@ -40,7 +40,16 @@
|
|
|
</div>
|
|
|
<el-button type="primary" @click="searchClick">搜索</el-button>
|
|
|
</template>
|
|
|
- 还在开发中...
|
|
|
+ <template #extra>
|
|
|
+ <el-button @click="toBackClick">
|
|
|
+ <hc-icon name="arrow-go-back" />
|
|
|
+ <span>返回</span>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :is-index="false" :is-current-row="false" />
|
|
|
+ <template #action>
|
|
|
+ <hc-pages :pages="searchForm" @change="pageChange" />
|
|
|
+ </template>
|
|
|
</hc-card>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -80,12 +89,34 @@ const getInfoData = () => {
|
|
|
}
|
|
|
|
|
|
//搜索表单
|
|
|
-const searchForm = ref({ nodeId: -1, startTime: '', endTime: '', deviceAddr: null })
|
|
|
+const searchForm = ref({ nodeId: -1, startTime: '', endTime: '', deviceAddr: null, current: 1, size: 20, total: 0 })
|
|
|
const searchClick = () => {
|
|
|
console.log(searchForm.value)
|
|
|
console.log(dateTimeArr.value)
|
|
|
}
|
|
|
|
|
|
+//分页被点击
|
|
|
+const pageChange = ({ current, size }) => {
|
|
|
+ searchForm.value.current = current
|
|
|
+ searchForm.value.size = size
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
+
|
|
|
+//历史记录表格
|
|
|
+const tableColumn = [
|
|
|
+ { key: 'name', name: '设备地址' },
|
|
|
+ { key: 'text', name: '温度' },
|
|
|
+ { key: 'color', name: '湿度' },
|
|
|
+ { key: 'time', name: '记录时间' },
|
|
|
+]
|
|
|
+const tableData = ref([])
|
|
|
+
|
|
|
+//获取历史记录数据
|
|
|
+const tableLoading = ref(false)
|
|
|
+const getTableData = async () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
//日期时间选择
|
|
|
const dateTimeArr = ref('')
|
|
|
const shortcuts = [
|
|
@@ -250,6 +281,14 @@ const setChartsData = () => {
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+//返回
|
|
|
+const toBackClick = () => {
|
|
|
+ isShow.value = false
|
|
|
+ tableData.value = []
|
|
|
+ dateTimeArr.value = ''
|
|
|
+ setChartsOption.value = {}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|