|
@@ -2,49 +2,52 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="equipInfo">
|
|
<div class="equipInfo">
|
|
|
<DateSearch @exportData="exportData" @dateChange="dateChange" ref="timeSearchRefs" @toggleSwitcState="toggleSwitcState"></DateSearch>
|
|
<DateSearch @exportData="exportData" @dateChange="dateChange" ref="timeSearchRefs" @toggleSwitcState="toggleSwitcState"></DateSearch>
|
|
|
- <div class="charts" v-if="switcState">
|
|
|
|
|
- <highcharts
|
|
|
|
|
- class="highcharts"
|
|
|
|
|
- :options="options"
|
|
|
|
|
- v-if="Object.keys(options).length > 0"
|
|
|
|
|
- ></highcharts>
|
|
|
|
|
- <div class="noDataClass" v-else>暂无数据</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-if="!switcState">
|
|
|
|
|
- <el-table :data="tableData" max-height="300" class="customTable" :header-row-class-name="tableth" style="width: 150%">
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- v-for="(item, index) in tableHeadTxt[equipType]"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :prop="item"
|
|
|
|
|
- :fixed="item == 'addtime'?'left':false"
|
|
|
|
|
- :label="equipState_dict[item].name+equipState_dict[item].unit"
|
|
|
|
|
- :width="item=='addtime'?'170px':''"
|
|
|
|
|
- >
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <template v-if="equipState_dict[scope.column.property].value">
|
|
|
|
|
- {{ equipState_dict[scope.column.property].value[scope.row.d_h_t[scope.column.property]] }}
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- <template v-if="scope.column.property=='addtime'">
|
|
|
|
|
- {{ scope.row.d_h_t[scope.column.property]*1000|formatTime }}
|
|
|
|
|
|
|
+ <div v-loading="dataLoading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
|
|
|
|
+ <div class="charts" v-if="switcState">
|
|
|
|
|
+ <highcharts
|
|
|
|
|
+ class="highcharts"
|
|
|
|
|
+ :options="options"
|
|
|
|
|
+ v-if="Object.keys(options).length > 0"
|
|
|
|
|
+ ></highcharts>
|
|
|
|
|
+ <div class="noDataClass" v-else>暂无数据</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="!switcState">
|
|
|
|
|
+ <el-table :data="tableData" max-height="300" class="customTable" :header-row-class-name="tableth" style="width: 150%">
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-for="(item, index) in tableHeadTxt[equipType]"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :prop="item"
|
|
|
|
|
+ :fixed="item == 'addtime'?'left':false"
|
|
|
|
|
+ :label="equipState_dict[item].name+equipState_dict[item].unit"
|
|
|
|
|
+ :width="item=='addtime'?'170px':''"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <template v-if="equipState_dict[scope.column.property].value">
|
|
|
|
|
+ {{ equipState_dict[scope.column.property].value[scope.row.d_h_t[scope.column.property]] }}
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- {{ scope.row.d_h_t[scope.column.property] }}
|
|
|
|
|
|
|
+ <template v-if="scope.column.property=='addtime'">
|
|
|
|
|
+ {{ scope.row.d_h_t[scope.column.property]*1000|formatTime }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ {{ scope.row.d_h_t[scope.column.property] }}
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <el-pagination
|
|
|
|
|
- small
|
|
|
|
|
- background
|
|
|
|
|
- layout="prev, pager, next"
|
|
|
|
|
- :total="total"
|
|
|
|
|
- :current-page="queryInfo.page"
|
|
|
|
|
- @current-change="changePage"
|
|
|
|
|
- ></el-pagination>
|
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <el-pagination
|
|
|
|
|
+ small
|
|
|
|
|
+ background
|
|
|
|
|
+ layout="prev, pager, next"
|
|
|
|
|
+ :total="total"
|
|
|
|
|
+ :current-page="queryInfo.page"
|
|
|
|
|
+ @current-change="changePage"
|
|
|
|
|
+ ></el-pagination>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -77,6 +80,7 @@ export default {
|
|
|
// 表格数据
|
|
// 表格数据
|
|
|
total:0,
|
|
total:0,
|
|
|
tableData:[],
|
|
tableData:[],
|
|
|
|
|
+ dataLoading:false,
|
|
|
// 动态表头
|
|
// 动态表头
|
|
|
tableHeadTxt: {
|
|
tableHeadTxt: {
|
|
|
"2":["addtime","ds", "ws", "tbs", "rps", "tps", "dps", "tt", "ct", "at", "ah", "cv", "bv"],
|
|
"2":["addtime","ds", "ws", "tbs", "rps", "tps", "dps", "tt", "ct", "at", "ah", "cv", "bv"],
|
|
@@ -240,6 +244,7 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
getChartLine(chart,table){
|
|
getChartLine(chart,table){
|
|
|
|
|
+ this.dataLoading = true;
|
|
|
switch(this.equipType){
|
|
switch(this.equipType){
|
|
|
case 2:
|
|
case 2:
|
|
|
if(chart){
|
|
if(chart){
|
|
@@ -275,6 +280,7 @@ export default {
|
|
|
end_time: this.queryInfo.end,
|
|
end_time: this.queryInfo.end,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.data.length !== 0) {
|
|
if (res.data.data.length !== 0) {
|
|
|
var data = res.data.data;
|
|
var data = res.data.data;
|
|
|
for (let item of data) {
|
|
for (let item of data) {
|
|
@@ -321,6 +327,7 @@ export default {
|
|
|
page: this.queryInfo.page,
|
|
page: this.queryInfo.page,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.message == "") {
|
|
if (res.data.message == "") {
|
|
|
this.total = res.data.data.counts;
|
|
this.total = res.data.data.counts;
|
|
|
if(this.total !== 0){
|
|
if(this.total !== 0){
|
|
@@ -367,6 +374,7 @@ export default {
|
|
|
end_time: this.queryInfo.end,
|
|
end_time: this.queryInfo.end,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.data.length) {
|
|
if (res.data.data.length) {
|
|
|
var data = res.data.data;
|
|
var data = res.data.data;
|
|
|
for (let item of data) {
|
|
for (let item of data) {
|
|
@@ -402,6 +410,7 @@ export default {
|
|
|
page: this.queryInfo.page,
|
|
page: this.queryInfo.page,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.message == "") {
|
|
if (res.data.message == "") {
|
|
|
this.total = res.data.data.counts;
|
|
this.total = res.data.data.counts;
|
|
|
if(this.total){
|
|
if(this.total){
|
|
@@ -455,6 +464,7 @@ export default {
|
|
|
end_time: this.queryInfo.end,
|
|
end_time: this.queryInfo.end,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.data.length > 0) {
|
|
if (res.data.data.length > 0) {
|
|
|
var data = res.data.data;
|
|
var data = res.data.data;
|
|
|
for (let item of data) {
|
|
for (let item of data) {
|
|
@@ -489,6 +499,7 @@ export default {
|
|
|
page: this.queryInfo.page,
|
|
page: this.queryInfo.page,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.message == "") {
|
|
if (res.data.message == "") {
|
|
|
this.total = res.data.data.counts;
|
|
this.total = res.data.data.counts;
|
|
|
if(this.total){
|
|
if(this.total){
|
|
@@ -534,6 +545,7 @@ export default {
|
|
|
end_time: this.queryInfo.end,
|
|
end_time: this.queryInfo.end,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.data.length !== 0) {
|
|
if (res.data.data.length !== 0) {
|
|
|
var data = res.data.data;
|
|
var data = res.data.data;
|
|
|
for (let item of data) {
|
|
for (let item of data) {
|
|
@@ -568,6 +580,7 @@ export default {
|
|
|
page: this.queryInfo.page,
|
|
page: this.queryInfo.page,
|
|
|
}),
|
|
}),
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+ this.dataLoading = false;
|
|
|
if (res.data.message == "") {
|
|
if (res.data.message == "") {
|
|
|
this.total = res.data.data.counts;
|
|
this.total = res.data.data.counts;
|
|
|
if(this.total){
|
|
if(this.total){
|