revert 优化首页数据
main
ly.fan 1 year ago
parent d6c0fd6843
commit ac5a00ef4a

@ -1,22 +1,22 @@
import request from "@/utils/request"; import request from '@/utils/request';
import { UPMS_SREVICE } from "@/api/module/urls"; import { UPMS_SREVICE } from '@/api/module/urls'
/** /**
* 获取lxId * 获取lxId
*/ */
export function getLxId(jgid, mtid) { export function getLxId(jgid,mtid) {
return request({ return request({
url: "/EquipController/queryLx/" + jgid + "/" + mtid, url: '/EquipController/queryLx/' + jgid + '/' + mtid,
method: "get", method: 'get'
}); })
} }
/** /**
* 获取EqmId * 获取EqmId
*/ */
export function getEqmId(jgid, lxid, mtid) { export function getEqmId(jgid,lxid,mtid) {
return request({ return request({
url: "/EquipController/queryEqmId/" + jgid + "/" + lxid + "/" + mtid, url: '/EquipController/queryEqmId/' + jgid + '/' + lxid + '/' + mtid,
method: "get", method: 'get'
}); })
} }
/** /**
* 油色谱 * 油色谱
@ -24,16 +24,16 @@ export function getEqmId(jgid, lxid, mtid) {
// 表格数据 // 表格数据
export function oilChromaControllerTable(eqmid) { export function oilChromaControllerTable(eqmid) {
return request({ return request({
url: "/oilChromaController/queryTableData/" + eqmid, url: '/oilChromaController/queryTableData/' + eqmid,
method: "get", method: 'get'
}); })
} }
// 趋势图数据 // 趋势图数据
export function oilChromaControllerLine(eqmid) { export function oilChromaControllerLine(eqmid) {
return request({ return request({
url: "/oilChromaController/queryLineData/" + eqmid, url: '/oilChromaController/queryLineData/' + eqmid,
method: "get", method: 'get'
}); })
} }
/** /**
@ -42,172 +42,110 @@ export function oilChromaControllerLine(eqmid) {
// 表格数据 // 表格数据
export function ironCoreJoinClampControllerTable({ ...idGather }) { export function ironCoreJoinClampControllerTable({ ...idGather }) {
return request({ return request({
url: url: '/ironCoreJoinClampController/queryTableData/' + idGather.ironCoreId + '/' + idGather.clampId,
"/ironCoreJoinClampController/queryTableData/" + method: 'get'
idGather.ironCoreId + })
"/" +
idGather.clampId,
method: "get",
});
} }
// 趋势图数据 // 趋势图数据
export function ironCoreJoinClampControllerLine({ ...idGather }) { export function ironCoreJoinClampControllerLine({ ...idGather }) {
return request({ return request({
url: url: '/ironCoreJoinClampController/queryLineData/' + idGather.ironCoreId + '/' + idGather.clampId,
"/ironCoreJoinClampController/queryLineData/" + method: 'get'
idGather.ironCoreId + })
"/" +
idGather.clampId,
method: "get",
});
} }
/** /**
* 电缆环流 * 电缆环流
*/ */
// 表格数据 // 表格数据
export function cableCircleControllerTable(arr) { export function cableCircleControllerTable(arr) {
return request({ return request({
url: url: '/cableCircleController/queryTableData/' + arr[0]+'/'+ arr[1]+'/'+ arr[2]+'/'+ arr[3]+'/'+ arr[4]+'/'+ arr[5],
"/cableCircleController/queryTableData/" + method: 'get'
arr[0] + })
"/" +
arr[1] +
"/" +
arr[2] +
"/" +
arr[3] +
"/" +
arr[4] +
"/" +
arr[5],
method: "get",
});
} }
// 趋势图数据 // 趋势图数据
export function cableCircleControllerLine(arr) { export function cableCircleControllerLine(arr) {
return request({ return request({
url: url: '/cableCircleController/queryLineData/' + arr[0]+'/'+ arr[1]+'/'+ arr[2]+'/'+ arr[3]+'/'+ arr[4]+'/'+ arr[5],
"/cableCircleController/queryLineData/" + method: 'get'
arr[0] + })
"/" +
arr[1] +
"/" +
arr[2] +
"/" +
arr[3] +
"/" +
arr[4] +
"/" +
arr[5],
method: "get",
});
} }
/** /**
* 红外 * 红外
*/ */
// 表格数据 // 表格数据
export function InfraredThermographyControllerTable(arr) { export function InfraredThermographyControllerTable(arr) {
return request({ return request({
url: url: '/InfraredThermographyController/queryTableData/' + arr[0]+'/'+ arr[1]+'/'+ arr[2],
"/InfraredThermographyController/queryTableData/" + method: 'get'
arr[0] + })
"/" +
arr[1] +
"/" +
arr[2],
method: "get",
});
} }
// 趋势图数据 // 趋势图数据
export function InfraredThermographyControllerLine(arr) { export function InfraredThermographyControllerLine(arr) {
return request({ return request({
url: url: '/InfraredThermographyController/queryLineData/' + arr[0]+'/'+ arr[1]+'/'+ arr[2],
"/InfraredThermographyController/queryLineData/" + method: 'get'
arr[0] + })
"/" +
arr[1] +
"/" +
arr[2],
method: "get",
});
} }
/** /**
* 局放 * 局放
*/ */
// 表格数据 // 表格数据
export function CablePartialDischargeControllerTable(arr) { export function CablePartialDischargeControllerTable(arr) {
return request({ return request({
url: url: '/cablePartialDischargeController/queryTableData/' + arr[0]+'/'+ arr[1]+'/'+ arr[2],
"/cablePartialDischargeController/queryTableData/" + method: 'get'
arr[0] + })
"/" +
arr[1] +
"/" +
arr[2],
method: "get",
});
} }
// 趋势图数据 // 趋势图数据
// export function CablePartialDischargeControllerLine(arr) { export function CablePartialDischargeControllerLine(arr) {
// return request({
// url:
// "/cablePartialDischargeController/queryLineData/" +
// arr[0] +
// "/" +
// arr[1] +
// "/" +
// arr[2],
// method: "get",
// });
// }
export function CablePartialDischargeControllerLine(eqmid) {
return request({ return request({
url: "/cablePartialDischargeController/queryJfLineData/" + eqmid, url: '/cablePartialDischargeController/queryLineData/' + arr[0]+'/'+ arr[1]+'/'+ arr[2],
method: "get", method: 'get'
}); })
} }
/** /**
* 监测装置 * 监测装置
*/ */
/** /**
* GIS * GIS
*/ */
// 表格数据 // 表格数据
export function SF6ControllerTable(eqmid) { export function SF6ControllerTable(eqmid) {
return request({ return request({
url: "/SF6Controller/queryTableData/" + eqmid, url: '/SF6Controller/queryTableData/' + eqmid,
method: "get", method: 'get'
}); })
} }
// 趋势图数据 // 趋势图数据
export function SF6ControllerLine(eqmid) { export function SF6ControllerLine(eqmid) {
return request({ return request({
url: "/SF6EnvController/queryLineData/" + eqmid, url: '/SF6Controller/queryLineData/' + eqmid,
method: "get", method: 'get'
}); })
} }
/** /**
* 避雷器 * 避雷器
*/ */
// 表格数据 // 表格数据
export function BlackBlqControllerTable(eqmid) { export function BlackBlqControllerTable(eqmid) {
return request({ return request({
url: "/BlqController/queryTableData/" + eqmid, url: '/BlqController/queryTableData/' + eqmid,
method: "get", method: 'get'
}); })
} }
// 趋势图数据 // 趋势图数据
export function BlackBlqControllerLine(eqmid) { export function BlackBlqControllerLine(eqmid) {
return request({ return request({
url: "/BlqController/queryLineData/" + eqmid, url: '/BlqController/queryLineData/' + eqmid,
method: "get", method: 'get'
}); })
} }
/** /**
@ -216,9 +154,9 @@ export function BlackBlqControllerLine(eqmid) {
// 设备总数 // 设备总数
export function getEquNum() { export function getEquNum() {
return request({ return request({
url: "/EquipController/queryEquipNum", url: '/EquipController/queryEquipNum',
method: "get", method: 'get'
}); })
} }
/** /**
@ -227,77 +165,50 @@ export function getEquNum() {
// 变电设备类型 // 变电设备类型
export function getJgType() { export function getJgType() {
return request({ return request({
url: "/EquipController/queryJg", url: '/EquipController/queryJg',
method: "get", method: 'get'
}); })
} }
// 设备小类 // 设备小类
export function getLxType(jgid) { export function getLxType(jgid) {
return request({ return request({
url: "/EquipController/getLxType/" + jgid, url: '/EquipController/getLxType/' + jgid,
method: "get", method: 'get'
}); })
} }
// 监测设备类型 // 监测设备类型
export function getEqType(jgid, lxid) { export function getEqType(jgid,lxid) {
return request({ return request({
url: "/EquipController/getEqType/" + jgid + "/" + lxid, url: '/EquipController/getEqType/' + jgid +'/'+ lxid,
method: "get", method: 'get'
}); })
} }
// 告警列表 // 告警列表
export function queryAlarm(params) { export function queryAlarm(params) {
return request({ return request({
url: "/cableCirculationController/page", url: '/cableCirculationController/page',
method: "post", method: 'post',
data: params, data: params
}); })
} }
// 告警详情列表 // 告警详情列表
export function queryAlarmDetail(params) { export function queryAlarmDetail(params) {
return request({ return request({
url: "/cableCirculationController/secondPage", url: '/cableCirculationController/secondPage',
method: "post", method: 'post',
data: params, data: params
}); })
} }
// 告警处理 // 告警处理
export function dealwarning(params) { export function dealwarning(params) {
return request({ return request({
url: "/cableCirculationController/deal", url: '/cableCirculationController/deal',
method: "post", method: 'post',
data: params, data: params
}); })
} }
//获取SF6环境
export function getSf6Api() {
return request({
url: "/EquipController/getSf6",
method: "get",
});
}
//获取避雷器
export function getblqApi() {
return request({
url: "/EquipController/getblq",
method: "get",
});
}
//获取局放
export function getjfApi() {
return request({
url: "/EquipController/getjf",
method: "get",
});
}

@ -17,9 +17,9 @@
:style="'background-image:url(' + arrester + ');'" :style="'background-image:url(' + arrester + ');'"
v-show="cardShow" v-show="cardShow"
> >
<!-- <div class="tendencyChartText" @click="tendencyChartChange('5')"> <div class="tendencyChartText" @click="tendencyChartChange('5')">
趋势图 趋势图
</div> --> </div>
<div class="cardTitle"> <div class="cardTitle">
<div> <div>
<span>避雷器 - </span> <span>避雷器 - </span>
@ -56,26 +56,12 @@
</div> </div>
</div> </div>
<div class="cardContent"> <div class="cardContent">
<el-table <Tablemodule
class="blqTable"
:data="blqtableData"
highlight-current-row
border
style="width: 100%"
size="mini"
height="7vw"
@row-click="handleRowClick"
>
<el-table-column prop="id" label="id" width="50"> </el-table-column>
<el-table-column prop="jmc" label="区间"> </el-table-column>
<el-table-column prop="name" label="名称"> </el-table-column>
</el-table>
<!-- <Tablemodule
:table-loading="loading" :table-loading="loading"
:option="tableData.column" :option="tableData.column"
:data="tableData.data" :data="tableData.data"
></Tablemodule> ></Tablemodule>
<div class="cardDate">采样时间 {{ samplingDate }}</div> --> <div class="cardDate">采样时间 {{ samplingDate }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -87,7 +73,6 @@ import {
getLxId, getLxId,
BlackBlqControllerTable, BlackBlqControllerTable,
BlackBlqControllerLine, BlackBlqControllerLine,
getblqApi,
} from "@/api/home/home"; } from "@/api/home/home";
// //
import { echartData } from "@/utils/common"; import { echartData } from "@/utils/common";
@ -141,9 +126,6 @@ export default {
xAxisData: [], xAxisData: [],
seriesData: [], seriesData: [],
selectIdList: [], selectIdList: [],
//
blqtableData: [],
blqName: "",
}; };
}, },
created() { created() {
@ -154,15 +136,6 @@ export default {
}, },
methods: { methods: {
init() { init() {
getblqApi().then((response) => {
const { code, data, msg } = response;
if (code === 200) {
console.log("bileiqi", data);
this.blqtableData = data;
} else {
this.msgError(msg);
}
});
getLxId(3, 4) getLxId(3, 4)
.then((response) => { .then((response) => {
const { code, data, msg } = response; const { code, data, msg } = response;
@ -193,13 +166,6 @@ export default {
this.msgError(err.msg); this.msgError(err.msg);
}); });
}, },
//
handleRowClick(row, column, event) {
console.log(row); //
this.blqName = row.name;
this.tableDataFun(row.id);
this.echartDataFun(row.id, "1");
},
tableDataFun(data) { tableDataFun(data) {
this.loading = true; this.loading = true;
BlackBlqControllerTable(data).then((response) => { BlackBlqControllerTable(data).then((response) => {
@ -246,17 +212,16 @@ export default {
} }
this.seriesData = arr; this.seriesData = arr;
this.xAxisData = data[0].dtimes; this.xAxisData = data[0].dtimes;
this.tendencyChartChange("5"); if (type === '2') {
// if (type === "2") { this.tendencyChartChange();
// this.tendencyChartChange(); }
// }
} else { } else {
this.msgError(msg); this.msgError(msg);
} }
}); });
}, },
// //
changeStatus: function($event) { changeStatus: function ($event) {
if (!$event) { if (!$event) {
this.cardShow = false; this.cardShow = false;
this.hideSwitchShow = true; this.hideSwitchShow = true;
@ -269,20 +234,17 @@ export default {
}, },
dropdownClick(command) { dropdownClick(command) {
this.tableDataFun(this.selectIdList[command]); this.tableDataFun(this.selectIdList[command]);
this.echartDataFun(this.selectIdList[command], "2"); //2 this.echartDataFun(this.selectIdList[command], "2");//2
}, },
tendencyChartChange(type) { tendencyChartChange(type) {
console.log(type);
console.log(this.legendData);
console.log(this.xAxisData);
console.log(this.seriesData);
console.log(this.blqName);
this.$emit( this.$emit(
"dataDispose", "dataDispose",
this.legendData, this.legendData,
this.xAxisData, this.xAxisData,
this.seriesData, this.seriesData,
this.blqName this.dropdownData.length !== 0
? "避雷器 -" + this.dropdownData[0].name
: "避雷器 "
); );
}, },
}, },
@ -321,75 +283,4 @@ export default {
padding: 40px 0 !important; padding: 40px 0 !important;
box-sizing: border-box; box-sizing: border-box;
} }
.cardContent {
.blqTable {
/deep/ thead {
color: #03bcff;
}
/deep/ th.el-table__cell {
background-color: transparent !important;
}
/deep/tr {
background-color: transparent !important;
}
color: #03bcff;
background-color: transparent !important;
/deep/ .el-table__cell {
padding: 0.18vw 0;
text-align: center;
}
}
/deep/.el-table--border {
border: 1px solid #03bcff;
}
/deep/.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table--border .el-table__cell,
.el-table__body-wrapper
.el-table--border.is-scrolling-left
~ .el-table__fixed {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table--border .el-table__cell,
.el-table__body-wrapper
.el-table--border.is-scrolling-left
~ .el-table__fixed {
border-right: 1px solid #03bcff;
}
/deep/.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background-color: #296479;
cursor: pointer;
}
/deep/.el-table::before {
height: 0;
}
/deep/.el-table__body tr.current-row > td.el-table__cell {
background-color: #296479;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb {
//background-color: #ccc;
/* 关键代码 */
border-radius: 32px;
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
//background-color: #f0f0f0;
border-radius: 32px;
}
}
</style> </style>

@ -3,8 +3,7 @@
<!-- 1#主变 油色谱 --> <!-- 1#主变 油色谱 -->
<!-- 标题和内容 --> <!-- 标题和内容 -->
<div class="pageCardTitle" v-show="hideSwitchShow"> <div class="pageCardTitle" v-show="hideSwitchShow">
<!-- {{ dropdownData.length !== 0 ? "SF6 -" + dropdownData[0].name : "SF6 " }} --> {{ dropdownData.length !== 0 ? "SF6 -" + dropdownData[0].name : "SF6 " }}
SF6环境
<div class="iconSvg closeSvg" @click="changeStatus(true)"> <div class="iconSvg closeSvg" @click="changeStatus(true)">
<svg-icon slot="prefix" icon-class="close" className="svg" /> <svg-icon slot="prefix" icon-class="close" className="svg" />
</div> </div>
@ -14,14 +13,14 @@
:style="'background-image:url(' + breaker + ');'" :style="'background-image:url(' + breaker + ');'"
v-show="cardShow" v-show="cardShow"
> >
<!-- <div class="tendencyChartText" @click="tendencyChartChange('5')"> <div class="tendencyChartText" @click="tendencyChartChange('5')">
趋势图 趋势图
</div> --> </div>
<div class="cardTitle"> <div class="cardTitle">
<div> <div>
<span>SF6环境</span> <span>SF6 - </span>
<!-- 下拉框有数据 --> <!-- 下拉框有数据 -->
<!-- <el-dropdown <el-dropdown
v-if="dropdownData.length !== 0" v-if="dropdownData.length !== 0"
@command="dropdownClick" @command="dropdownClick"
> >
@ -37,42 +36,28 @@
>{{ item.name }} >{{ item.name }}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> --> </el-dropdown>
<!-- 无下拉数据 --> <!-- 无下拉数据 -->
<!-- <el-dropdown v-else class="cursor" trigger="click"> <el-dropdown v-else class="cursor" trigger="click">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
SF6<i class="el-icon-arrow-down el-icon--right" /> SF6<i class="el-icon-arrow-down el-icon--right" />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>暂无数据 </el-dropdown-item> <el-dropdown-item>暂无数据 </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> --> </el-dropdown>
</div> </div>
<div class="iconSvg" @click="changeStatus(false)"> <div class="iconSvg" @click="changeStatus(false)">
<svg-icon slot="prefix" icon-class="open" className="svg" /> <svg-icon slot="prefix" icon-class="open" className="svg" />
</div> </div>
</div> </div>
<div class="cardContent"> <div class="cardContent">
<el-table <Tablemodule
class="sf6Table"
:data="sf6tableData"
highlight-current-row
border
style="width: 100%"
size="mini"
height="8vw"
@row-click="handleRowClick"
>
<el-table-column prop="id" label="id" width="50"> </el-table-column>
<el-table-column prop="jmc" label="区间"> </el-table-column>
<el-table-column prop="name" label="名称"> </el-table-column>
</el-table>
<!-- <Tablemodule
:table-loading="loading" :table-loading="loading"
:option="tableData.column" :option="tableData.column"
:data="tableData.data" :data="tableData.data"
></Tablemodule> ></Tablemodule>
<div class="cardDate">采样时间 {{ samplingDate }}</div> --> <div class="cardDate">采样时间 {{ samplingDate }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -84,7 +69,6 @@ import {
SF6ControllerLine, SF6ControllerLine,
getLxId, getLxId,
getEqmId, getEqmId,
getSf6Api,
} from "@/api/home/home"; } from "@/api/home/home";
// //
import { echartData } from "@/utils/common"; import { echartData } from "@/utils/common";
@ -137,8 +121,6 @@ export default {
xAxisData: [], xAxisData: [],
seriesData: [], seriesData: [],
selectIdList: [], selectIdList: [],
//
sf6tableData: [],
}; };
}, },
created() { created() {
@ -149,15 +131,6 @@ export default {
}, },
methods: { methods: {
init() { init() {
getSf6Api().then((response) => {
const { code, data, msg } = response;
if (code === 200) {
console.log("sf6", data);
this.sf6tableData = data;
} else {
this.msgError(msg);
}
});
getLxId(2, 8) getLxId(2, 8)
.then((response) => { .then((response) => {
const { code, data, msg } = response; const { code, data, msg } = response;
@ -188,16 +161,6 @@ export default {
this.msgError(err.msg); this.msgError(err.msg);
}); });
}, },
//
handleRowClick(row, column, event) {
console.log(row); //
this.tableDataFun(row.id);
this.echartDataFun(row.id, "1");
// this.$nextTick(() => {
// this.echartDataFun(row.id, "1");
// this.tendencyChartChange("5");
// });
},
tableDataFun(data) { tableDataFun(data) {
this.loading = true; this.loading = true;
SF6ControllerTable(data).then((response) => { SF6ControllerTable(data).then((response) => {
@ -244,17 +207,16 @@ export default {
} }
this.seriesData = arr; this.seriesData = arr;
this.xAxisData = data[0].dtimes; this.xAxisData = data[0].dtimes;
if (type === '2') {
this.tendencyChartChange(); this.tendencyChartChange();
// if (type === "2") { }
// this.tendencyChartChange();
// }
} else { } else {
this.msgError(msg); this.msgError(msg);
} }
}); });
}, },
// //
changeStatus: function($event) { changeStatus: function ($event) {
if (!$event) { if (!$event) {
this.cardShow = false; this.cardShow = false;
this.hideSwitchShow = true; this.hideSwitchShow = true;
@ -267,7 +229,7 @@ export default {
}, },
dropdownClick(command) { dropdownClick(command) {
this.tableDataFun(this.selectIdList[command]); this.tableDataFun(this.selectIdList[command]);
this.echartDataFun(this.selectIdList[command], "2"); //2 this.echartDataFun(this.selectIdList[command], "2");//2
}, },
tendencyChartChange(type) { tendencyChartChange(type) {
// home // home
@ -303,75 +265,4 @@ export default {
padding: 20px 0 !important; padding: 20px 0 !important;
box-sizing: border-box; box-sizing: border-box;
} }
.cardContent {
.sf6Table {
/deep/ thead {
color: #03bcff;
}
/deep/ th.el-table__cell {
background-color: transparent !important;
}
/deep/tr {
background-color: transparent !important;
}
color: #03bcff;
background-color: transparent !important;
/deep/ .el-table__cell {
padding: 0.18vw 0;
text-align: center;
}
}
/deep/.el-table--border {
border: 1px solid #03bcff;
}
/deep/.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table--border .el-table__cell,
.el-table__body-wrapper
.el-table--border.is-scrolling-left
~ .el-table__fixed {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table--border .el-table__cell,
.el-table__body-wrapper
.el-table--border.is-scrolling-left
~ .el-table__fixed {
border-right: 1px solid #03bcff;
}
/deep/.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background-color: #296479;
cursor: pointer;
}
/deep/.el-table::before {
height: 0;
}
/deep/.el-table__body tr.current-row > td.el-table__cell {
background-color: #296479;
}
::-webkit-scrollbar {
width: 8px !important;
height: 8px !important;
}
/* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb {
//background-color: #ccc;
/* 关键代码 */
border-radius: 32px;
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
//background-color: #f0f0f0;
border-radius: 32px;
}
}
</style> </style>

@ -3,10 +3,7 @@
<!-- 1#主变 油色谱 --> <!-- 1#主变 油色谱 -->
<!-- 标题和内容 --> <!-- 标题和内容 -->
<div class="pageCardTitle" v-show="hideSwitchShow"> <div class="pageCardTitle" v-show="hideSwitchShow">
<div> <div><span>监测装置总数</span><span> | </span><span>{{ number.totalNum }}</span></div>
<span>监测装置总数</span><span> | </span
><span>{{ devNumberTotal }}</span>
</div>
<div class="iconSvg closeSvg" @click="changeStatus(true)"> <div class="iconSvg closeSvg" @click="changeStatus(true)">
<svg-icon slot="prefix" icon-class="close" className="svg" /> <svg-icon slot="prefix" icon-class="close" className="svg" />
</div> </div>
@ -18,31 +15,18 @@
> >
<div class="cardTitle"> <div class="cardTitle">
<div> <div>
<span>监测装置总数</span><span> | </span <span>监测装置总数</span><span> | </span><span>{{ number.totalNum }}</span>
><span>{{ devNumberTotal }}</span>
</div> </div>
<div class="iconSvg" @click="changeStatus(false)"> <div class="iconSvg" @click="changeStatus(false)">
<svg-icon slot="prefix" icon-class="open" className="svg" /> <svg-icon slot="prefix" icon-class="open" className="svg" />
</div> </div>
</div> </div>
<div class="cardContent"> <div class="cardContent">
<div class="devTotalNum"> <Tablemodule
<ul>
<li class="devLi">
<span>主设备类型</span>
<span>装置数量</span>
</li>
<li class="devLi" v-for="(item, index) in devListNum">
<span>{{ item.name }}</span>
<span>{{ item.num }}</span>
</li>
</ul>
</div>
<!-- <Tablemodule
:table-loading="loading" :table-loading="loading"
:option="tableData.column" :option="tableData.column"
:data="tableData.data" :data="tableData.data"
></Tablemodule> --> ></Tablemodule>
</div> </div>
</div> </div>
</div> </div>
@ -86,41 +70,38 @@ export default {
data: [ data: [
{ {
type: "变压器", type: "变压器",
num: "0", num: '0',
prop: "byqNum", prop: "byqNum",
}, },
{ {
type: "GIS", type: "GIS",
num: "0", num: '0',
prop: "gisNum", prop: "gisNum",
}, },
{ {
type: "避雷器", type: "避雷器",
num: "0", num: '0',
prop: "blqNum", prop: "blqNum",
}, },
{ {
type: "开关柜", type: "开关柜",
num: "0", num: '0',
prop: "cwNum", prop: "cwNum",
}, },
{ {
type: "电缆", type: "电缆",
num: "0", num: '0',
prop: "dlNum", prop: "dlNum",
}, },
{ {
type: "发电机", type: "发电机",
num: "0", num: '0',
prop: "otherNum", prop: "otherNum",
}, },
], ],
}, },
samplingDate: "2021-10-11 15:15:30", samplingDate: "2021-10-11 15:15:30",
number: {}, number: {},
//
devListNum: [],
devNumberTotal: "",
}; };
}, },
created() { created() {
@ -128,7 +109,7 @@ export default {
}, },
methods: { methods: {
// //
changeStatus: function($event) { changeStatus: function ($event) {
if (!$event) { if (!$event) {
this.cardShow = false; this.cardShow = false;
this.hideSwitchShow = true; this.hideSwitchShow = true;
@ -150,26 +131,20 @@ export default {
}, },
// //
getEquNum() { getEquNum() {
this.loading = true; this.loading=true
getEquNum().then((response) => { getEquNum().then((response) => {
const { code, data, msg } = response; const { code, data, msg } = response;
if (code === 200) { if (code === 200) {
this.devListNum = data.list; this.number = data;
this.devNumberTotal = data.totalNum; const arr = this.tableData.data;
console.log("aaaaaaaa", this.number); for (let index = 0; index < arr.length; index++) {
// const arr = this.tableData.data; const element = arr[index];
// console.log("aaaaaaaaaa", arr); for (const key in data) {
// for (let index = 0; index < arr.length; index++) { if (element.prop === key) {
// const element = arr[index]; arr[index].num = data[key].toString();
// console.log(element); }
// for (const key in data) { }
// console.log(key); }
// if (element.prop === key) {
// console.log(data[key]);
// arr[index].num = data[key].toString();
// }
// }
// }
} else { } else {
this.msgError(msg); this.msgError(msg);
} }
@ -197,29 +172,5 @@ export default {
.pageCard .cardContent { .pageCard .cardContent {
padding: 30px !important; padding: 30px !important;
box-sizing: border-box; box-sizing: border-box;
.devTotalNum {
border: 1px solid #03bcff;
font-size: 0.625vw;
color: #03bcff !important;
border-bottom: none;
ul {
margin: 0;
padding: 0;
li {
list-style: none;
display: flex;
//align-items: center;
justify-content: space-around;
span {
padding: 0.2vw 0;
flex: 1;
border-bottom: 1px solid #03bcff;
&:first-child {
border-right: 1px solid #03bcff;
}
}
}
}
}
} }
</style> </style>

@ -14,13 +14,13 @@
v-show="cardShow" v-show="cardShow"
> >
<!-- tendencyChart文字标题 --> <!-- tendencyChart文字标题 -->
<!-- <div class="tendencyChartText" @click="tendencyChartChange()"></div> --> <div class="tendencyChartText" @click="tendencyChartChange()"></div>
<div class="cardTitle"> <div class="cardTitle">
<div class="tabDropdown"> <div class="tabDropdown">
局放 - {{ jfName }} <el-scrollbar style="height: 100%">
<!-- <el-scrollbar style="height: 100%">
<div class="tabDropdownBox"> <div class="tabDropdownBox">
<div class="tabDropdownSelect"> <div class="tabDropdownSelect">
<!-- 第一级 -->
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{ dropdownFirstNmae {{ dropdownFirstNmae
@ -37,6 +37,7 @@
</el-dropdown> </el-dropdown>
</div> </div>
<div class="tabDropdownSelect"> <div class="tabDropdownSelect">
<!-- 第二级 -->
<el-dropdown @command="handleCommandSecond"> <el-dropdown @command="handleCommandSecond">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{ dropdownSecondNmae {{ dropdownSecondNmae
@ -53,7 +54,7 @@
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
</el-scrollbar> --> </el-scrollbar>
</div> </div>
<div class="iconSvg" @click="changeStatus(false)"> <div class="iconSvg" @click="changeStatus(false)">
<svg-icon slot="prefix" icon-class="open" className="svg" /> <svg-icon slot="prefix" icon-class="open" className="svg" />
@ -61,41 +62,26 @@
</div> </div>
<div class="cardContent"> <div class="cardContent">
<!-- 电缆环流 --> <!-- 电缆环流 -->
<!-- <Tablemodule <Tablemodule
v-if="selectType === 'hl'" v-if="selectType === 'hl'"
:table-loading="loading" :table-loading="loading"
:option="hlTableData.column" :option="hlTableData.column"
:data="hlTableData.data" :data="hlTableData.data"
></Tablemodule> --> ></Tablemodule>
<!-- 红外 --> <!-- 红外 -->
<!-- <Tablemodule <Tablemodule
v-else-if="selectType === 'hw'" v-else-if="selectType === 'hw'"
:table-loading="loading" :table-loading="loading"
:option="hwTableData.column" :option="hwTableData.column"
:data="hwTableData.data" :data="hwTableData.data"
></Tablemodule> --> ></Tablemodule>
<!-- 局放 --> <!-- 局放 -->
<el-table <Tablemodule
v-if="selectType === 'jf'" v-else-if="selectType === 'jf'"
class="jfTable"
:data="jftableData"
highlight-current-row
border
style="width: 100%"
size="mini"
height="7vw"
@row-click="handleRowClick"
>
<el-table-column prop="id" label="id" width="50"> </el-table-column>
<el-table-column prop="jmc" label="区间"> </el-table-column>
<el-table-column prop="name" label="名称"> </el-table-column>
</el-table>
<!-- <Tablemodule
v-if="selectType === 'jf'"
:table-loading="loading" :table-loading="loading"
:option="jfTableData.column" :option="jfTableData.column"
:data="jfTableData.data" :data="jfTableData.data"
></Tablemodule> --> ></Tablemodule>
<!-- 电缆沟 --> <!-- 电缆沟 -->
<!-- <Tablemodule <!-- <Tablemodule
vv-else-if="selectType === 'jf'" vv-else-if="selectType === 'jf'"
@ -118,7 +104,6 @@ import {
CablePartialDischargeControllerLine, CablePartialDischargeControllerLine,
getLxType, getLxType,
getEqType, getEqType,
getjfApi,
} from "@/api/home/home"; } from "@/api/home/home";
// //
import { echartData } from "@/utils/common"; import { echartData } from "@/utils/common";
@ -149,13 +134,13 @@ export default {
}, },
], ],
dropdownFirstNmae: "", dropdownFirstNmae: "",
dropdownSecondNmae: "局放", dropdownSecondNmae: "环流",
dropdownSecondData: [ dropdownSecondData: [
// { {
// name: "", name: "环流",
// type: "hl", type: "hl",
// id: [], id: [],
// }, },
// { // {
// name: "", // name: "",
// type: "dlg", // type: "dlg",
@ -166,11 +151,11 @@ export default {
type: "jf", type: "jf",
id: [], id: [],
}, },
// { {
// name: "", name: "红外",
// type: "hw", type: "hw",
// id: [], id: [],
// }, },
], ],
hlTableData: { hlTableData: {
column: [ column: [
@ -251,10 +236,7 @@ export default {
legendData: [], legendData: [],
xAxisData: [], xAxisData: [],
seriesData: [], seriesData: [],
selectType: "jf", selectType: "hl",
//
jftableData: [],
jfName: "",
}; };
}, },
created() { created() {
@ -265,15 +247,6 @@ export default {
}, },
methods: { methods: {
init() { init() {
getjfApi().then((response) => {
const { code, data, msg } = response;
if (code === 200) {
console.log("bileiqi", data);
this.jftableData = data;
} else {
this.msgError(msg);
}
});
getLxType(5) getLxType(5)
.then((response) => { .then((response) => {
const { code, data, msg } = response; const { code, data, msg } = response;
@ -297,13 +270,6 @@ export default {
this.msgError(err.msg); this.msgError(err.msg);
}); });
}, },
//
handleRowClick(row, column, event) {
console.log(row); //
this.jfName = row.name;
this.tableTataFun(row.id, "jf");
this.echartDataFun(row.id, "jf", "2"); //2
},
// id // id
selectIdFun(id, type) { selectIdFun(id, type) {
this.dropdownSecondData.forEach((element) => { this.dropdownSecondData.forEach((element) => {
@ -448,28 +414,49 @@ export default {
} }
}, },
echartDataFun(idArr, type, way) { echartDataFun(idArr, type, way) {
CablePartialDischargeControllerLine(idArr).then((response) => { if (way === "2") {
this.tendencyChartChange();
}
let url = cableCircleControllerLine;
if (type === "hl") {
url = cableCircleControllerLine;
} else if (type === "hw") {
url = InfraredThermographyControllerLine;
} else if (type === "jf") {
url = CablePartialDischargeControllerLine;
}
if (idArr.length !== 0) {
url(idArr).then((response) => {
const { code, data, msg } = response; const { code, data, msg } = response;
const arr = []; const arr = [];
let disposeData = [];
if (code === 200 && data.length !== 0) { if (code === 200 && data.length !== 0) {
for (let index = 0; index < data.length; index++) { if (type === "hl") {
const element = data[index]; disposeData = data;
} else {
disposeData = this.echartDataClearup(data, type);
}
for (let index = 0; index < disposeData.length; index++) {
const element = disposeData[index];
this.legendData.push(element.equipment); this.legendData.push(element.equipment);
arr.push({ arr.push({
name: element.equipment, name: element.equipment,
data: echartData(element.currentVals), data: element.currentVals
? echartData(element.currentVals)
: [],
}); });
} }
this.seriesData = arr; this.seriesData = arr;
this.xAxisData = data[0].dtimes; this.xAxisData = disposeData[0].dtimes;
this.tendencyChartChange("5");
// if (type === "2") {
// this.tendencyChartChange();
// }
} else { } else {
this.msgError(msg); this.msgError(msg);
} }
}); });
} else {
this.legendData = [];
this.xAxisData = [];
this.seriesData = [];
}
}, },
// echart // echart
echartDataClearup(arr, type) { echartDataClearup(arr, type) {
@ -596,9 +583,8 @@ export default {
// } // }
}, },
// //
changeStatus: function($event) { changeStatus: function ($event) {
this.pageCardTitle = this.pageCardTitle=this.dropdownFirstNmae +'-'+ this.dropdownSecondNmae
this.dropdownFirstNmae + "-" + this.dropdownSecondNmae;
if (!$event) { if (!$event) {
this.cardShow = false; this.cardShow = false;
this.hideSwitchShow = true; this.hideSwitchShow = true;
@ -615,7 +601,7 @@ export default {
this.legendData, this.legendData,
this.xAxisData, this.xAxisData,
this.seriesData, this.seriesData,
this.jfName this.dropdownFirstNmae + this.dropdownSecondNmae
); );
}, },
}, },
@ -658,75 +644,4 @@ export default {
padding: 20px 0 !important; padding: 20px 0 !important;
box-sizing: border-box; box-sizing: border-box;
} }
.cardContent {
.jfTable {
/deep/ thead {
color: #03bcff;
}
/deep/ th.el-table__cell {
background-color: transparent !important;
}
/deep/tr {
background-color: transparent !important;
}
color: #03bcff;
background-color: transparent !important;
/deep/ .el-table__cell {
padding: 0.18vw 0;
text-align: center;
}
}
/deep/.el-table--border {
border: 1px solid #03bcff;
}
/deep/.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table--border .el-table__cell,
.el-table__body-wrapper
.el-table--border.is-scrolling-left
~ .el-table__fixed {
border-bottom: 1px solid #03bcff;
}
/deep/.el-table--border .el-table__cell,
.el-table__body-wrapper
.el-table--border.is-scrolling-left
~ .el-table__fixed {
border-right: 1px solid #03bcff;
}
/deep/.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background-color: #296479;
cursor: pointer;
}
/deep/.el-table::before {
height: 0;
}
/deep/.el-table__body tr.current-row > td.el-table__cell {
background-color: #296479;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb {
//background-color: #ccc;
/* 关键代码 */
border-radius: 32px;
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
//background-color: #f0f0f0;
border-radius: 32px;
}
}
</style> </style>
Loading…
Cancel
Save