Commit 6876d186 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

parent c4e5efad
...@@ -40,24 +40,23 @@ import chart from '@/pages/components/chart.vue' ...@@ -40,24 +40,23 @@ import chart from '@/pages/components/chart.vue'
import pie from './pie' import pie from './pie'
export default { export default {
components: { components: {
tablePagination, tablePagination,
chart, chart,
pie pie
},
}, data() {
data () {
return { return {
typeList: [ typeList: [
{ name: '当日' }, { name: '当日' },
{ name: '本周' }, { name: '本周' },
{ name: '当月' }, { name: '当月' },
{ name: '今年' } { name: '今年' }
], ],
currentActive: '0', currentActive: '0',
type: null, type: null,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
visible: false, visible: false,
dataForm: { dataForm: {
name: '', name: '',
...@@ -67,11 +66,7 @@ export default { ...@@ -67,11 +66,7 @@ export default {
chartList: [ chartList: [
{ id: '11', title: '温度', color: '#21ACFC' }, { id: '11', title: '温度', color: '#21ACFC' },
{ id: '22', title: '湿度', color: '#36CBCB' }, { id: '22', title: '湿度', color: '#36CBCB' },
{ id: '33', title: '风速', color: '#3AA0FF' }, { id: '33', title: 'CO2', color: '#4ECB74' }
{ id: '44', title: '光照', color: '#FAD337' },
{ id: '55', title: 'CO2', color: '#4ECB74' },
{ id: '66', title: 'PM2.5', color: '#999999' },
{ id: '77', title: '辐射', color: '#975FE4' }
], ],
data: [ data: [
['2019-8-14 8:00:00', 70], ['2019-8-14 8:00:00', 70],
...@@ -81,17 +76,14 @@ export default { ...@@ -81,17 +76,14 @@ export default {
['2019-8-14 8:00:06', 10], ['2019-8-14 8:00:06', 10],
['2019-8-14 8:00:20', 31] ['2019-8-14 8:00:20', 31]
], ],
dataRule: { dataRule: {}
name: [ { required: true, message: '不能为空', trigger: 'blur' }]
}
} }
}, },
methods: { methods: {
init (id, type) { init(id, type) {
this.type = type this.type = type
this.dataForm.id = id this.dataForm.id = id
this.visible = true this.visible = true
if (id) { if (id) {
...@@ -110,71 +102,69 @@ export default { ...@@ -110,71 +102,69 @@ export default {
}) })
} }
}, },
getDataList() { getDataList() {},
// 当日 ,本周
},
// 当日 ,本周
handleDate(i) { handleDate(i) {
this.currentActive = i this.currentActive = i
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// this.$http({ // this.$http({
// url: this.$http.adornUrlProduct(`/brandMain/${!this.dataForm.id ? 'save' : 'update'}`), // url: this.$http.adornUrlProduct(`/brandMain/${!this.dataForm.id ? 'save' : 'update'}`),
// method: 'post', // method: 'post',
// data: this.dataForm // data: this.dataForm
// }).then((data) => { // }).then((data) => {
// if (data && data.code === 0) { // if (data && data.code === 0) {
// this.$message({ // this.$message({
// message: '操作成功', // message: '操作成功',
// type: 'success', // type: 'success',
// duration: 1500, // duration: 1500,
// onClose: () => { // onClose: () => {
// this.visible = false // this.visible = false
// this.$emit('refreshdatalist') // this.$emit('refreshdatalist')
// } // }
// }) // })
// } else { // } else {
// this.$message.error(data.msg) // this.$message.error(data.msg)
// } // }
// }) // })
} }
}) })
} }
} }
} }
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.echartsWarp { .echartsWarp {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
height: calc(100vh - 530px); height: calc(100vh - 530px);
margin-bottom: 90px; margin-bottom: 90px;
// border: 1px solid; // border: 1px solid;
> div { > div {
width: 22%; width: 22%;
height: calc(85% / 2); height: calc(85% / 2);
padding: 10px 10px 0 10px; padding: 10px 10px 0 10px;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
.title { .title {
font-size: 16px; font-size: 16px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: 600; font-weight: 600;
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;
border-radius: 50%; border-radius: 50%;
background: #0097ff; background: #0097ff;
margin: 0 10px; margin: 0 10px;
} }
}
} }
}
} }
</style> </style>
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