Commit 4388c431 authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

parent edaadba2
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<div slot="content" style="height: calc(100% - 70px)"> <div slot="content" style="height: calc(100% - 70px)">
<div> <div>
<el-tabs class="en-tabs" v-model="activetap"> <el-tabs class="en-tabs" v-model="activetap" @tab-click="tabClick">
<el-tab-pane <el-tab-pane
:label="item.label" :label="item.label"
:name="item.value" :name="item.value"
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
v-model="startTime" v-model="startTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
> >
</el-date-picker> </el-date-picker>
...@@ -32,12 +33,17 @@ ...@@ -32,12 +33,17 @@
v-model="endTime" v-model="endTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-button type="primary" size="mini" icon="el-icon-search" <el-button
type="primary"
size="mini"
icon="el-icon-search"
@click="getDataList()"
>查询</el-button >查询</el-button
> >
<!-- <el-form-item label="时间范围:"> <!-- <el-form-item label="时间范围:">
...@@ -122,22 +128,24 @@ export default { ...@@ -122,22 +128,24 @@ export default {
] ]
} }
}, },
watch: {
activetap() {
this.getDataList()
}
},
mounted() { mounted() {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
tabClick(tab, event) {
// console.log(tab, event)
this.startTime = ''
this.endTime = ''
this.getDataList()
},
getDataList() { getDataList() {
this.$http({ this.$http({
url: this.$http.adornUrl('/analysis/getEnergyFx'), url: this.$http.adornUrl('/analysis/getEnergyFx'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
resourceType: this.activetap, //资源点类型 resourceType: this.activetap, //资源点类型
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
...@@ -16,14 +16,16 @@ card-warp(title="故障报警分析", height="45px", showBackground) ...@@ -16,14 +16,16 @@ card-warp(title="故障报警分析", height="45px", showBackground)
v-model="startTime" v-model="startTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
span( style="padding: 0 10px") 至 span( style="padding: 0 10px") 至
el-date-picker( el-date-picker(
v-model="endTime" v-model="endTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search") 查询 el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search" @click="getDataList()") 查询
.echartsWarp(width="100%", flex) .echartsWarp(width="100%", flex)
div div
...@@ -44,6 +46,8 @@ export default { ...@@ -44,6 +46,8 @@ export default {
}, },
data() { data() {
return { return {
startTime: '',
endTime: '',
dateTypeList: [ dateTypeList: [
{ name: '当日', id: 1 }, { name: '当日', id: 1 },
{ name: '本周', id: 2 }, { name: '本周', id: 2 },
...@@ -65,7 +69,8 @@ export default { ...@@ -65,7 +69,8 @@ export default {
url: this.$http.adornUrl('/analysis/getFaultAlarmList'), url: this.$http.adornUrl('/analysis/getFaultAlarmList'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
...@@ -73,7 +78,7 @@ export default { ...@@ -73,7 +78,7 @@ export default {
console.log('数据2', data.idList) console.log('数据2', data.idList)
this.typeList = data.typeList this.typeList = data.typeList
this.idList = data.idList this.idList = data.idList
this.legendData = this.idList.filter(e => e.name) this.legendData = this.idList.filter((e) => e.name)
} }
}) })
}, },
......
...@@ -24,14 +24,16 @@ card-warp(title="室内气象分析", height="45px") ...@@ -24,14 +24,16 @@ card-warp(title="室内气象分析", height="45px")
v-model="startTime" v-model="startTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
span( style="padding: 0 10px") 至 span( style="padding: 0 10px") 至
el-date-picker( el-date-picker(
v-model="endTime" v-model="endTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search") 查询 el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search" @click="getDataList()") 查询
.echartsWarp(width="100%", flex) .echartsWarp(width="100%", flex)
div(v-for='item in chartList' :key='item.id') div(v-for='item in chartList' :key='item.id')
chart(:id="item.id", :data="item.data", :title="item.title", :color="item.color") chart(:id="item.id", :data="item.data", :title="item.title", :color="item.color")
...@@ -69,6 +71,8 @@ export default { ...@@ -69,6 +71,8 @@ export default {
methods: { methods: {
tabClick(tab, event) { tabClick(tab, event) {
// console.log(tab, event) // console.log(tab, event)
this.startTime = ''
this.endTime = ''
this.getDataList() this.getDataList()
}, },
getDataList() { getDataList() {
...@@ -78,7 +82,8 @@ export default { ...@@ -78,7 +82,8 @@ export default {
params: this.$http.adornParams({ params: this.$http.adornParams({
resourceId: '', resourceId: '',
region: Number(this.activeName), //区域类型 region: Number(this.activeName), //区域类型
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
...@@ -19,13 +19,15 @@ card-warp(title="室外气象分析", height="45px", showBackground) ...@@ -19,13 +19,15 @@ card-warp(title="室外气象分析", height="45px", showBackground)
el-date-picker( el-date-picker(
v-model="startTime" v-model="startTime"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="开始日期") placeholder="开始日期")
span &emsp;至&emsp; span &emsp;至&emsp;
el-date-picker( el-date-picker(
v-model="endTime" v-model="endTime"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="结束日期") placeholder="结束日期")
el-button(type="primary" size="mini" icon="el-icon-search" @click="getDataList()") 查询
.echartsWarp(width="100%", flex) .echartsWarp(width="100%", flex)
div(v-for='item in chartList' :key='item.id') div(v-for='item in chartList' :key='item.id')
chart(:id="item.id", :data="item.data", :title="item.title", :color="item.color") chart(:id="item.id", :data="item.data", :title="item.title", :color="item.color")
...@@ -72,7 +74,8 @@ export default { ...@@ -72,7 +74,8 @@ export default {
url: this.$http.adornUrl('/analysis/getSwqxzInfoTj'), url: this.$http.adornUrl('/analysis/getSwqxzInfoTj'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
...@@ -19,14 +19,16 @@ ...@@ -19,14 +19,16 @@
v-model="startTime" v-model="startTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
span( style="padding: 0 10px") 至 span( style="padding: 0 10px") 至
el-date-picker( el-date-picker(
v-model="endTime" v-model="endTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search") 查询 el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search" @click="getList()") 查询
span(v-if="type==1") span(v-if="type==1")
el-table( :data='dataList' size="mini" ,style='width: 100%;' :header-cell-style="{ background: '#EEF8FF', color: '#333333' }") el-table( :data='dataList' size="mini" ,style='width: 100%;' :header-cell-style="{ background: '#EEF8FF', color: '#333333' }")
el-table-column( :resizable="false" type='index', header-align='center', align='center', label='序号') el-table-column( :resizable="false" type='index', header-align='center', align='center', label='序号')
...@@ -83,6 +85,8 @@ export default { ...@@ -83,6 +85,8 @@ export default {
methods: { methods: {
init(data, type) { init(data, type) {
this.startTime = ''
this.endTime = ''
this.dataForm = data this.dataForm = data
this.type = type this.type = type
this.visible = true this.visible = true
...@@ -93,6 +97,13 @@ export default { ...@@ -93,6 +97,13 @@ export default {
this.getDataListTb() this.getDataListTb()
} }
}, },
getList() {
if (this.type === 1) {
this.getDataList() //获取历史数据列表
} else if (this.type === 2) {
this.getDataListTb()
}
},
getDataList(page, size) { getDataList(page, size) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/kanban/getListByTypeAndId`), url: this.$http.adornUrl(`/kanban/getListByTypeAndId`),
...@@ -100,7 +111,8 @@ export default { ...@@ -100,7 +111,8 @@ export default {
params: this.$http.adornParams({ params: this.$http.adornParams({
resourceId: this.dataForm.id, resourceId: this.dataForm.id,
resourceType: this.dataForm.type, resourceType: this.dataForm.type,
type: this.currentActive, startTime: this.startTime,
endTime: this.endTime,
page: page || this.pageIndex, page: page || this.pageIndex,
rows: size || this.pageSize rows: size || this.pageSize
}) })
...@@ -122,7 +134,8 @@ export default { ...@@ -122,7 +134,8 @@ export default {
params: this.$http.adornParams({ params: this.$http.adornParams({
region: this.dataForm.region, region: this.dataForm.region,
resourceId: this.dataForm.id, resourceId: this.dataForm.id,
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
...@@ -33,14 +33,16 @@ el-dialog( ...@@ -33,14 +33,16 @@ el-dialog(
v-model="startTime" v-model="startTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
span( style="padding: 0 10px") 至 span( style="padding: 0 10px") 至
el-date-picker( el-date-picker(
v-model="endTime" v-model="endTime"
align="right" align="right"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期") placeholder="选择日期")
el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search") 查询 el-button( type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search" @click="getList()") 查询
span(v-if="type == 1") span(v-if="type == 1")
el-table( el-table(
:data="dataList", :data="dataList",
...@@ -187,6 +189,8 @@ export default { ...@@ -187,6 +189,8 @@ export default {
methods: { methods: {
init(data, type) { init(data, type) {
this.startTime = ''
this.endTime = ''
this.dataForm = data this.dataForm = data
this.type = type // 1=>>> 历史数据 / 2=>>> 统计图表 this.type = type // 1=>>> 历史数据 / 2=>>> 统计图表
this.visible = true this.visible = true
...@@ -197,6 +201,13 @@ export default { ...@@ -197,6 +201,13 @@ export default {
this.getDataListTb() this.getDataListTb()
} }
}, },
getList() {
if (this.type === 1) {
this.getDataList() //获取历史数据列表
} else if (this.type === 2) {
this.getDataListTb()
}
},
// 当日 ,本周 // 当日 ,本周
handleDate(i) { handleDate(i) {
this.currentActive = i this.currentActive = i
...@@ -213,7 +224,8 @@ export default { ...@@ -213,7 +224,8 @@ export default {
params: this.$http.adornParams({ params: this.$http.adornParams({
resourceId: this.dataForm.id, resourceId: this.dataForm.id,
resourceType: this.dataForm.type, //室外气象站 resourceType: this.dataForm.type, //室外气象站
type: this.currentActive, startTime: this.startTime,
endTime: this.endTime,
page: page || this.pageIndex, page: page || this.pageIndex,
rows: size || this.pageSize rows: size || this.pageSize
}) })
...@@ -233,7 +245,8 @@ export default { ...@@ -233,7 +245,8 @@ export default {
url: this.$http.adornUrl('/analysis/getSwqxzInfoTj'), url: this.$http.adornUrl('/analysis/getSwqxzInfoTj'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
...@@ -288,7 +288,8 @@ export default { ...@@ -288,7 +288,8 @@ export default {
url: this.$http.adornUrl('/analysis/getSwqxzInfoTj'), url: this.$http.adornUrl('/analysis/getSwqxzInfoTj'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
type: this.type startTime: '',
endTime: ''
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
...@@ -24,12 +24,31 @@ ...@@ -24,12 +24,31 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间范围:"> <el-form-item label="时间范围:">
<el-date-picker v-model="startTime" style="width:172px" size="mini" type="date" placeholder="选择日期" > <el-date-picker
v-model="startTime"
style="width: 172px"
size="mini"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker> </el-date-picker>
<span style="padding:0 10px"></span> <span style="padding: 0 10px"></span>
<el-date-picker v-model="endTime" style="width:172px" size="mini" type="date" placeholder="选择日期"> <el-date-picker
v-model="endTime"
style="width: 172px"
size="mini"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker> </el-date-picker>
<el-button type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search" <el-button
type="primary"
style="margin-left: 10px"
size="mini"
icon="el-icon-search"
@click="getDataList()"
>查询</el-button >查询</el-button
> >
<!-- <el-button <!-- <el-button
...@@ -114,7 +133,8 @@ export default { ...@@ -114,7 +133,8 @@ export default {
params: this.$http.adornParams({ params: this.$http.adornParams({
resourceId: this.dataForm.id, //资源点id resourceId: this.dataForm.id, //资源点id
resourceType: this.dataForm.type, //资源点类型 resourceType: this.dataForm.type, //资源点类型
type: this.currentActive, startTime: this.startTime,
endTime: this.endTime,
page: page || this.pageIndex, page: page || this.pageIndex,
rows: size || this.pageSize rows: size || this.pageSize
}) })
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:append-to-body="true" :append-to-body="true"
@close="cancelhandlePic" @close="cancelhandlePic"
width="1200px" width="1200px"
> >
<el-form :inline="true" :model="dataForm"> <el-form :inline="true" :model="dataForm">
<el-form-item label="设备名称:" prop="name" style="margin-bottom: 0"> <el-form-item label="设备名称:" prop="name" style="margin-bottom: 0">
...@@ -25,7 +24,6 @@ ...@@ -25,7 +24,6 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="数据起止阶段:"> <el-form-item label="数据起止阶段:">
<!-- <el-button <!-- <el-button
size="mini" size="mini"
type="primary" type="primary"
...@@ -35,18 +33,42 @@ ...@@ -35,18 +33,42 @@
:class="[item.id == currentActive ? 'isActive' : '']" :class="[item.id == currentActive ? 'isActive' : '']"
>{{ item.name }} >{{ item.name }}
</el-button> --> </el-button> -->
<el-date-picker v-model="startTime" style="width:172px" size="mini" type="date" placeholder="选择日期"> <el-date-picker
v-model="startTime"
style="width: 172px"
size="mini"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker> </el-date-picker>
<span style="padding:0 10px"></span> <span style="padding: 0 10px"></span>
<el-date-picker v-model="endTime" style="width:172px" size="mini" type="date" placeholder="选择日期"> <el-date-picker
v-model="endTime"
style="width: 172px"
size="mini"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker> </el-date-picker>
<el-button type="primary" style='margin-left:10px;' size="mini" icon="el-icon-search" <el-button
type="primary"
style="margin-left: 10px"
size="mini"
icon="el-icon-search"
@click="getDataListTb()"
>查询</el-button >查询</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="statisticModalVisible" id="categoryId" style="height: 400px"> <div v-if="statisticModalVisible" id="categoryId" style="height: 400px">
<chart id="111" :data="data" title="能耗数据(kwh)" color="#21ACFC"></chart> <chart
id="111"
:data="data"
title="能耗数据(kwh)"
color="#21ACFC"
></chart>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -90,7 +112,8 @@ export default { ...@@ -90,7 +112,8 @@ export default {
params: this.$http.adornParams({ params: this.$http.adornParams({
resourceType: this.dataForm.type, resourceType: this.dataForm.type,
resourceId: this.dataForm.id, resourceId: this.dataForm.id,
type: this.currentActive startTime: this.startTime,
endTime: this.endTime
}) })
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
......
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