jc
fanluyan 1 year ago
parent e3e0b966c0
commit d0e2c84d62

@ -35,18 +35,22 @@ a {
/* 整个滚动条 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/* 滚动条上的滚动滑块 */
::-webkit-scrollbar-thumb {
background-color: #ccc;
/* 关键代码 */
border-radius: 32px;
border-radius: 2px;
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
background-color: #f0f0f0;
border-radius: 32px;
border-radius: 2px;
}
.el-table__fixed,
.el-table__fixed-right {
height: auto !important;
bottom: 15px !important;
}

@ -98,6 +98,10 @@ export default {
index: "/property",
title: "资产管理",
subs: [
{
index: "/dyInformation",
title: "电压信息管理",
},
{
index: "/lineInformation",
title: "线路信息管理",

@ -121,6 +121,17 @@ const routes = [
name: "globalTools",
meta: { title: "全局设置", keepAlive: true, requiresAuth: true },
},
{
path: "/dyInformation",
component: () => import("../views/dyInformation/index.vue"),
name: "dyInformation",
meta: {
title: "电压信息管理",
icon: "",
keepAlive: true,
requiresAuth: true,
},
},
{
path: "/lineInformation",
component: () => import("../views/lineInformation/index.vue"),

@ -365,6 +365,38 @@ export function getdyListJoggle(data) {
data,
});
}
//1.电压列表信息
export function getDyListJoggle(data) {
return request({
url: "/xymanager/dy/listAll",
method: "post",
data,
});
}
//2.添加单个或者多个电压信息
export function addDyJoggle(data) {
return request({
url: "/xymanager/dy/add",
method: "post",
data,
});
}
//3.删除电压信息
export function deleteDyJoggle(data) {
return request({
url: "/xymanager/dy/delete",
method: "post",
data,
});
}
//4.修改电压信息
export function updateDyJoggle(data) {
return request({
url: "/xymanager/dy/update",
method: "post",
data,
});
}
//1.线路列表信息
export function getLineListJoggle(data) {
return request({

@ -25,3 +25,20 @@ export function getphotoApi(data) {
data,
});
}
//获取心跳历史
export function getIpList(data) {
return request({
url: "/xymanager/terminal/heartbeat",
method: "get",
params: data,
});
}
//获取装置状态统表
export function gettermAllList(data) {
return request({
url: "/xymanager/terminal/listWithAll",
method: "get",
params: data,
});
}

@ -0,0 +1,128 @@
<template>
<el-dialog
class="addDyDialog"
:title="title"
:visible.sync="isShow"
:close-on-click-modal="false"
width="470px"
>
<el-form
label-position="left"
ref="formInfo"
label-width="100px"
:rules="rules"
:model="formdata"
>
<el-form-item label="电压名称:" prop="name">
<el-input v-model="formdata.name" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addDyJoggle, updateDyJoggle } from "@/utils/api/index";
export default {
props: {
title: String,
},
data() {
return {
isShow: false,
formdata: {},
rules: {
name: [{ required: true, message: "请输入电压名称", trigger: "blur" }],
},
};
},
mounted() {},
methods: {
//
getdataform(val) {
if (val == null) {
return (this.formdata = {});
}
//this.formdata = val;
this.formdata = JSON.parse(JSON.stringify(val));
},
//
submitForm() {
this.$refs.formInfo.validate((valid) => {
if (valid) {
if (this.title == "新增") {
addDyJoggle(this.formdata)
.then((res) => {
this.isShow = false;
this.$message({
duration: 1500,
showClose: true,
message: "添加成功",
type: "success",
});
this.$parent.deviceList();
})
.catch((err) => {
this.$message({
duration: 1500,
showClose: true,
message: "添加失败",
type: "error",
});
});
} else {
console.log(this.formdata);
updateDyJoggle(this.formdata)
.then((res) => {
this.isShow = false;
//this.$message.success("");
this.$message({
duration: 1500,
showClose: true,
message: "修改成功",
type: "success",
});
this.$parent.deviceList();
})
.catch((err) => {
//this.$message.error("");
this.$message({
duration: 1500,
showClose: true,
message: "修改失败",
type: "error",
});
});
}
} else {
console.log("error submit!!");
return false;
}
});
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
},
};
</script>
<style lang="less">
.addDyDialog {
.el-select {
width: 100%;
}
.el-input-number {
width: 100%;
}
.el-input-number .el-input__inner {
text-align: left;
}
}
</style>

@ -0,0 +1,271 @@
<template>
<div class="dyInfoBox">
<div class="deviceBox">
<div class="deviceBtnGroup">
<h4>电压信息管理</h4>
<el-button
type="primary"
icon="el-icon-plus"
@click.native.stop="handleAdddevice()"
>新增</el-button
>
</div>
<div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item>
<el-input
v-model="formdata.search"
placeholder="请输入电压"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
<el-button type="primary" @click="onReset"></el-button>
</el-form-item>
</el-form>
</div>
<div class="deviceTable">
<el-table
ref="multipleTable"
:data="tableDate"
tooltip-effect="dark"
stripe
style="width: 100%"
height="calc(100% - 40px)"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
v-loading="loading"
highlight-current-row
:row-key="getRowKeys"
>
<template slot="empty">
<el-empty :image-size="160" description="暂无数据"></el-empty>
</template>
<el-table-column prop="name" label="电压等级" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.name }}
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.createTime }}
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope">
<el-button
@click.native.stop="handleResive(scope.row)"
type="text"
>修改</el-button
>
<el-button
type="text"
class="deleteText"
@click.native.stop="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
</el-pagination>
</div>
</div>
</div>
<!-- 新增电压 -->
<addDyDialog :title="title" ref="addDialogref"></addDyDialog>
</div>
</template>
<script>
import { getDyListJoggle, deleteDyJoggle } from "@/utils/api/index";
import addDyDialog from "./components/addDyDialog.vue";
export default {
name: "dyInformation",
components: {
addDyDialog,
},
data() {
return {
title: "", //
tableDate: [],
//multipleSelection: [], //
page: 1, //
pageSize: 20, //
total: 0, //
loading: true,
formdata: {
search: "",
},
};
},
created() {},
mounted() {
this.deviceList();
},
methods: {
getRowKeys(row) {
return row.id;
},
//
onSubmit() {
this.page = 1;
this.deviceList();
},
//
onReset() {
this.formdata = {
search: "",
};
this.page = 1;
this.pageSize = 20;
this.deviceList();
},
//
deviceList() {
this.loading = true;
this.$set(this.formdata, "pageindex", this.page);
this.$set(this.formdata, "pagesize", this.pageSize);
getDyListJoggle(this.formdata)
.then((res) => {
this.tableDate = res.data.list;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {});
},
//
handleRowClick(row, column, event) {
this.$refs.multipleTable.toggleRowSelection(row);
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleAdddevice() {
this.title = "新增";
this.$refs.addDialogref.display();
this.$refs.addDialogref.getdataform(null);
},
//
handleResive(data) {
this.title = "修改";
this.$refs.addDialogref.display();
this.$refs.addDialogref.getdataform(data);
},
//
handleDelete(data) {
let deleteArr = [];
deleteArr.push(data.id);
console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaa", deleteArr);
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteDyJoggle({ list: deleteArr }).then((res) => {
if (res.code == 200) {
this.$message({
duration: 1500,
showClose: true,
type: "success",
message: "删除成功!",
});
this.deviceList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: "删除失败!",
});
}
});
})
.catch(() => {
this.$message({
duration: 1500,
showClose: true,
type: "info",
message: "已取消删除",
});
});
},
//
handleCurrentChange(val) {
this.page = val;
this.deviceList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.deviceList();
},
},
};
</script>
<style lang="less">
.dyInfoBox {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #fff;
.deviceBox {
border: 1px solid #dddddd;
height: calc(100% - 24px);
padding: 12px;
border-radius: 4px;
.searchBox {
margin-top: 8px;
.ml10 {
margin-left: 10px;
}
.el-form {
.dybox {
.el-form-item__content {
width: 120px;
}
}
.xlbox {
.el-form-item__content {
width: 160px;
}
}
}
}
}
.deviceBtnGroup {
display: flex;
justify-content: space-between;
align-items: center;
}
.deviceTable {
height: calc(100% - 94px);
//background: #fcc;
}
}
</style>

@ -9,6 +9,17 @@
</div>
<div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item label="电压等级" class="dybox">
<el-select v-model="formdata.dyId">
<el-option
v-for="item in dyOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input
v-model="formdata.search"
@ -123,7 +134,11 @@
</div>
</template>
<script>
import { getLineListJoggle, deleteLineJoggle } from "@/utils/api/index";
import {
getLineListJoggle,
getSearchInfo,
deleteLineJoggle,
} from "@/utils/api/index";
import addLineDialog from "./components/addLineDialog.vue";
import addTowerDialog from "./components/addTowerDialog.vue";
export default {
@ -142,8 +157,11 @@ export default {
total: 0, //
loading: true,
formdata: {
dyId: -1,
search: "",
},
dyOptions: [{ id: -1, name: "全部" }], //
};
},
created() {
@ -159,12 +177,23 @@ export default {
// console.log(this.formdata.search);
},
mounted() {
this.getSearchdy();
this.lineList();
},
methods: {
getRowKeys(row) {
return row.id;
},
//
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = this.dyOptions.concat(res.data.list);
this.formdata.dyId = this.dyOptions[0].id;
})
.catch((err) => {});
},
//线
lineList() {
this.loading = true;
@ -193,7 +222,11 @@ export default {
},
//
onReset() {
this.formdata = {};
this.formdata = {
dyId: -1,
search: "",
};
this.page = 1;
this.pageSize = 20;
this.lineList();

@ -551,7 +551,12 @@ export default {
//
onReset() {
this.formdata = {
dyId: -1,
lineId: -1,
towerId: -1,
search: "",
isonline: -1,
protocol: -1,
};
this.getSearchdy();

@ -0,0 +1,379 @@
<template>
<div class="equipmentStatusBox">
<div class="searchBox" ref="searchref">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item label="电压等级" class="dyclass">
<el-select v-model="formdata.dyid" @change="getSearchxl">
<el-option
v-for="item in dyOptions"
:key="item.id"
:label="item.name"
:value="item.id"
>
{{ item.name }}
</el-option>
</el-select>
</el-form-item>
<el-form-item label="线路名称" class="xlclass">
<el-select v-model="formdata.lineid" @change="getSearchgt" filterable>
<el-option
v-for="item in xlOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="杆塔名称" class="gtclass">
<el-select v-model="formdata.towerid" filterable>
<el-option
v-for="item in gtOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="开始日期" class="dateclass">
<el-date-picker
v-model="formdata.starttime"
type="datetime"
placeholder="开始日期"
value-format="timestamp"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期" class="dateclass">
<el-date-picker
v-model="formdata.endtime"
type="datetime"
placeholder="结束日期"
value-format="timestamp"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-input
v-model="formdata.search"
placeholder="请输入线路/杆塔/设备名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
<el-button type="primary">导出</el-button></el-button>
</el-form-item>
</el-form>
</div>
<div class="deviceTable">
<el-table
v-loading="termLoading"
ref="multipleTable"
:data="termAllList"
tooltip-effect="dark"
stripe
style="width: 100%"
height="calc(100% - 0px)"
fit
>
<template slot="empty">
<el-empty :image-size="160" description="暂无数据"></el-empty>
</template>
<el-table-column label="序号" width="50px" fixed>
<template slot-scope="scope">
{{ (page - 1) * pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="dyName" label="电压等级" fixed> </el-table-column>
<el-table-column prop="lineName" label="线路名称" min-width="180" fixed> </el-table-column>
<el-table-column prop="towerName" label="杆塔名称" min-width="180" show-overflow-tooltip fixed> </el-table-column>
<el-table-column prop="displayName" label="设备名称" min-width="180" fixed> </el-table-column>
<el-table-column prop="cmdid" label="装置id" min-width="180" fixed>
<template slot-scope="scope">
{{ scope.row.cmdid }}
</template
>
</el-table-column>
<el-table-column prop="sim" label="SIM卡号" min-width="180"> </el-table-column>
<el-table-column prop="netType" label="网络类型"> </el-table-column>
<el-table-column prop="onlinestatus" label="状态"> </el-table-column>
<el-table-column prop="model" label="装置型号" min-width="120"> </el-table-column>
<el-table-column prop="bsManufacturer" label="装置厂家"> </el-table-column>
<el-table-column prop="protocolName" label="规约版本" min-width="180"> </el-table-column>
<el-table-column prop="workingDate" label="投运日期" min-width="140"> </el-table-column>
<el-table-column prop="onlinestatus" label="最新运行状态"> </el-table-column>
<el-table-column prop="photoInfo.totalDays" label="在线天数"> </el-table-column>
<el-table-column prop="photoInfo.photoCount" label="图片数量"> </el-table-column>
<el-table-column prop="photoInfo.lastRecvTime" label="最后数据上送时间" min-width="140"> </el-table-column>
<el-table-column prop="photoInfo.lastPhotoTime" label="最后图片上送时间" min-width="140"> </el-table-column>
<el-table-column prop="" label="最新基本信息采集时间" min-width="140"> </el-table-column>
<el-table-column prop="" label="装置名称"> </el-table-column>
<el-table-column prop="" label="装置型号"> </el-table-column>
<el-table-column prop="" label="装置版本号"> </el-table-column>
<el-table-column prop="" label="生产厂家"> </el-table-column>
<el-table-column prop="" label="生产日期"> </el-table-column>
<el-table-column prop="" label="出厂编号"> </el-table-column>
<el-table-column prop="workingStatus.wsUpdateTime" label="最新工作状态采集时间" min-width="140">
<template slot-scope="scope">
{{
scope.row.workingStatus.wsUpdateTime == 0 || scope.row.workingStatus.wsUpdateTime == null
? ""
: $moment(scope.row.workingStatus.wsUpdateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}</template
> </el-table-column>
<el-table-column prop="batteryVoltage" label="电源电压"> </el-table-column>
<el-table-column prop="opTemperature" label="工作温度"> </el-table-column>
<el-table-column prop="batteryCapacity" label="电池电量"> </el-table-column>
<el-table-column prop="floatingCharge" label="浮充状态"> </el-table-column>
<el-table-column prop="totalWorkingTime" label="工作总时间"> </el-table-column>
<el-table-column prop="workingTime" label="连续工作时间"> </el-table-column>
<el-table-column prop="connectionState" label="网络连接状态"> </el-table-column>
<el-table-column prop="workingStatus.wsUpdateTime" label="最新运行状态采集时间" min-width="140">
<template slot-scope="scope">
{{
scope.row.workingStatus.wsUpdateTime == 0 || scope.row.workingStatus.wsUpdateTime == null
? ""
: $moment(scope.row.workingStatus.wsUpdateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}</template
>
</el-table-column>
<el-table-column prop="workingStatus.signalStrength4g" label="4G信号强度"> </el-table-column>
<el-table-column prop="workingStatus.signalStrength2g" label="2G信号强度"> </el-table-column>
<el-table-column prop="workingStatus.remainingRam" label="剩余运行内存"> </el-table-column>
<el-table-column prop="workingStatus.remainingRom" label="剩余存储内"> </el-table-column>
<el-table-column prop="lastGps.updatetime" label="最新GPS位置采集时间" min-width="140"> </el-table-column>
<el-table-column prop="lastGps.radius" label="半径"> </el-table-column>
<el-table-column prop="lastGps.latitude" label="维度"> </el-table-column>
<el-table-column prop="lastGps.longitude" label="经度"> </el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
</el-pagination>
</div>
</div>
<!-- <ipDialog ref="ipDialogref"></ipDialog>
<photoDialog ref="photoDialogref"></photoDialog> -->
</div>
</template>
<script>
import { gettermAllList, getSearchInfo } from "@/utils/api/reportApi";
// import ipDialog from "./components/ipDialog";
// import photoDialog from "./components/termAllList";
export default {
name: "photoStatisBox",
components: {
// ipDialog,
// photoDialog,
},
data() {
return {
pickerOptions: {
disabledDate(date) {
return date.getTime() > Date.now(); //
},
},
termAllList: [],
dyOptions: [{ id: -1, name: "全部" }], //
xlOptions: [{ id: -1, name: "全部" }], //线
gtOptions: [{ id: -1, name: "全部" }], //
formdata: {
dyid: -1,
lineid: -1,
towerid: -1,
starttime: new Date(new Date().setHours(0, 0, 0, 0)).getTime(), // 00:00:00
endtime: new Date(new Date().setHours(23, 59, 59, 0)).getTime(), // 23:59:59
search: "",
},
page: 1, //
pageSize: 20, //
total: 0, //
termLoading: false,
};
},
created() {},
mounted() {
this.getSearchdy();
},
watch: {},
methods: {
//
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = this.dyOptions.concat(res.data.list);
console.log(this.dyOptions);
this.getSearchxl();
})
.catch((err) => {});
},
//线
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyid })
.then((res) => {
this.xlOptions = this.xlOptions.concat(res.data.list);
this.getSearchgt();
})
.catch((err) => {});
},
//
getSearchgt() {
getSearchInfo({ type: 3, id: this.formdata.lineid })
.then((res) => {
this.gtOptions = this.gtOptions.concat(res.data.list);
this.onSubmit();
})
.catch((err) => {});
},
onSubmit() {
if (this.formdata.starttime > this.formdata.endtime) {
return this.$message({
duration: 1500,
showClose: true,
message: "开始日期不能大于结束日期",
type: "warning",
});
}
this.page = 1;
this.getAllFun();
},
//
getAllFun() {
console.log(this.formdata);
this.termLoading = true;
let params = {
start: this.formdata.starttime / 1000,
end: this.formdata.endtime / 1000,
pageNum: this.page,
pageSize: this.pageSize,
};
//
if (this.formdata.dyid !== -1) {
params.dyId = this.formdata.dyid;
}
if (this.formdata.lineid !== -1) {
params.lineId = this.formdata.lineid;
}
if (this.formdata.towerid !== -1) {
params.towerId = this.formdata.towerid;
}
if (this.formdata.channelid !== -1) {
params.channelId = this.formdata.channelid;
}
if (this.formdata.search !== "") {
params.search = this.formdata.search;
}
setTimeout(() => {
gettermAllList(params)
.then((res) => {
console.log(res);
this.termAllList = res.data.list;
this.total = res.data.total;
this.termLoading = false;
})
.catch((err) => {
this.termLoading = false;
});
}, 100);
},
//
handleCurrentChange(val) {
this.page = val;
this.getAllFun();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.getAllFun();
},
// //
// handleShowPhoto(row) {
// let params = this.formdata;
// this.$refs.photoDialogref.display(row, params);
// },
// // ip
// handleShowIp(row) {
// this.$refs.ipDialogref.display(row);
// },
},
};
</script>
<style lang="less">
.equipmentStatusBox {
height: 100%;
.searchBox {
.dyclass {
.el-select {
width: 120px;
}
}
.xlclass {
.el-select {
width: 150px;
}
}
.gtclass {
.el-select {
width: 180px;
}
}
.tdclass {
.el-select {
width: 80px;
}
}
.dateclass {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 190px;
}
}
}
.deviceTable {
height: calc(100% - 94px);
//background: #fcc;
.el-table {
.cell {
text-align: center;
vertical-align: middle; /* 如果需要垂直居中 */
}
}
}
}
</style>

@ -1,9 +1,13 @@
<template>
<div class="reportDataBox">
<!-- <div class="reoprtContain"></div> -->
<el-tabs type="border-card">
<el-tab-pane label="照片统计"> <photostatis></photostatis> </el-tab-pane>
<el-tab-pane label="设备状态列表">设备状态查询</el-tab-pane>
<el-tabs type="border-card" @tab-click="handleTabClick">
<el-tab-pane label="照片统计">
<photostatis ref="photoStatisRef"></photostatis>
</el-tab-pane>
<el-tab-pane label="设备状态列表"
><equipmentStatus ref="equipmentStatusRef"></equipmentStatus
></el-tab-pane>
<!-- <el-tab-pane label="角色管理">角色管理</el-tab-pane>
<el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane> -->
</el-tabs>
@ -13,10 +17,12 @@
import {} from "@/utils/api/index";
import photostatis from "./photostatis/index";
import equipmentStatus from "./equipmentStatus/index";
export default {
name: "reportData",
components: {
photostatis,
equipmentStatus,
},
data() {
return {};
@ -24,7 +30,24 @@ export default {
created() {},
mounted() {},
watch: {},
methods: {},
methods: {
handleTabClick(tab, event) {
//
const tabName = tab.label;
if (tabName === "照片统计") {
//
if (this.$refs.photoStatisRef) {
this.$refs.photoStatisRef.onSubmit(); // someMethod
}
} else if (tabName === "设备状态列表") {
//
if (this.$refs.equipmentStatusRef) {
this.$refs.equipmentStatusRef.onSubmit(); // someOtherMethod
}
}
//
},
},
};
</script>
<style lang="less">

@ -4,16 +4,53 @@
title="历史IP信息"
:visible.sync="isShow"
:close-on-click-modal="false"
width="420px"
>
<div class="ipContain">这里时ip</div>
width="820px"
><div class="headInfo">
<span class="zzid">装置编号{{ rowData.cmdid }}</span>
<span class="pictotal">总数{{ ipListData.length }}</span>
</div>
<div class="ipContain">
<el-table
v-loading="iploading"
ref="multipleTable"
:data="ipListData"
tooltip-effect="dark"
stripe
style="width: 100%"
height="calc(100% - 0px)"
fit
>
<template slot="empty">
<el-empty :image-size="160" description="暂无数据"></el-empty>
</template>
<el-table-column label="序号" width="50px">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="心跳时间" prop="heartbeatTime">
<template slot-scope="scope">
{{
scope.row.heartbeatTime == null || scope.row.heartbeatTime == 0
? ""
: $moment(scope.row.heartbeatTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}
</template>
</el-table-column>
<el-table-column label="IP" prop="heartbeatIp"> </el-table-column>
<el-table-column label="端口" prop="heartbeatPort"> </el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {} from "@/utils/api/index";
import { getIpList } from "@/utils/api/reportApi";
export default {
props: {},
@ -22,14 +59,33 @@ export default {
return {
isShow: false,
rowData: "",
iploading: false,
ipListData: [],
};
},
methods: {
//
getIPList() {
this.iploading = true;
setTimeout(() => {
getIpList({
termId: this.rowData.id,
})
.then((res) => {
console.log(res);
this.ipListData = res.data;
// this.total = res.data.total;
this.iploading = false;
})
.catch((err) => {
this.iploading = false;
console.log(err);
});
}, 100);
},
display(row) {
this.isShow = true;
this.rowData = row;
this.getIPList();
},
hide() {
this.isShow = false;
@ -41,5 +97,34 @@ export default {
</script>
<style lang="less">
.ipDialog {
.el-dialog {
height: 70%;
.el-dialog__body {
height: calc(100% - 126px);
}
}
.el-table {
.cell {
text-align: center;
vertical-align: middle; /* 如果需要垂直居中 */
}
}
.ipContain {
height: 100%;
}
.headInfo {
position: absolute;
top: 22px;
left: 154px;
display: flex;
align-items: center;
font-size: 14px;
.zzid {
color: #333;
}
.pictotal {
margin-left: 12px;
}
}
}
</style>

@ -161,6 +161,12 @@ export default {
.el-dialog {
height: 100%;
margin: 0px;
.el-table {
.cell {
text-align: center;
vertical-align: middle; /* 如果需要垂直居中 */
}
}
.headInfo {
position: absolute;
top: 22px;

@ -98,7 +98,13 @@
<el-table-column prop="id" label="ID" width="80px"> </el-table-column>
<el-table-column prop="dyName" label="电压等级"> </el-table-column>
<el-table-column prop="lineName" label="线路名称"> </el-table-column>
<el-table-column prop="towerName" label="杆塔名称"> </el-table-column>
<el-table-column
prop="towerName"
label="杆塔名称"
width="180"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="cmdid" label="装置id">
<template slot-scope="scope">
<el-link
@ -136,8 +142,19 @@
{{ scope.row.photoInfo.lastRecvTime }}
</template>
</el-table-column>
<el-table-column prop="" label="重启次数"> </el-table-column>
<el-table-column prop="" label="最后重启时间"> </el-table-column>
<el-table-column prop="rebootCount" label="重启次数"> </el-table-column>
<el-table-column prop="workingStatus.bootTime" label="最后重启时间">
<template slot-scope="scope">
{{
scope.row.workingStatus.bootTime == null ||
scope.row.workingStatus.bootTime == 0
? ""
: $moment(scope.row.workingStatus.bootTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}
</template>
</el-table-column>
<el-table-column prop="photoCount" label="照片数量">
<template slot-scope="scope">
{{ scope.row.photoInfo.photoCount }}
@ -162,7 +179,7 @@
</div>
</template>
<script>
import { getphotoList, getSearchInfo } from "@/utils/api/reportApi";
import { gettermAllList, getSearchInfo } from "@/utils/api/reportApi";
import ipDialog from "./components/ipDialog";
import photoDialog from "./components/photoList";
export default {
@ -278,7 +295,7 @@ export default {
params.search = this.formdata.search;
}
setTimeout(() => {
getphotoList(params)
gettermAllList(params)
.then((res) => {
console.log(res);
this.photoList = res.data.list;

@ -193,6 +193,7 @@ export default {
},
beforeUpload(file) {
const fileName = file.name;
console.log(fileName);
if (fileName.length > 19) {
this.$message.error("文件名长度不能超过 19 个字符!");
return false; //

@ -188,7 +188,7 @@ export default {
<style lang="less">
.blindMenuDialog {
.treeBoxList {
height: 500px;
height: 520px;
overflow: auto;
display: flex;
justify-content: space-between;

@ -12,7 +12,7 @@
</div>
<div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<!-- <el-form-item label="电压等级" class="dybox">
<el-form-item label="电压等级" class="dybox">
<el-select v-model="formdata.dyId" @change="getSearchxl">
<el-option
v-for="item in dyOptions"
@ -23,11 +23,7 @@
</el-select>
</el-form-item>
<el-form-item label="线路名称" class="xlbox">
<el-select
v-model="formdata.lineId"
@change="getSearchgt"
filterable
>
<el-select v-model="formdata.lineId" filterable>
<el-option
v-for="item in xlOptions"
:key="item.id"
@ -36,16 +32,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="杆塔名称">
<el-select v-model="formdata.towerId" filterable>
<el-option
v-for="item in gtOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item> -->
<el-form-item>
<el-input
v-model="formdata.search"
@ -73,22 +59,14 @@
highlight-current-row
:row-key="getRowKeys"
>
<!-- <el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column> -->
<template slot="empty">
<el-empty :image-size="160" description="暂无数据"></el-empty>
</template>
<!-- <el-table-column
prop="dyLevelname"
label="电压等级"
show-overflow-tooltip
>
<el-table-column prop="dyname" label="电压等级" show-overflow-tooltip>
<template slot-scope="scope">
{{
scope.row.dyLevelname
}}
{{ scope.row.dyname }}
</template>
</el-table-column> -->
</el-table-column>
<el-table-column
prop="lineName"
label="线路名称"
@ -183,12 +161,10 @@ export default {
loading: true,
dyOptions: [{ id: -1, name: "全部" }], //
xlOptions: [{ id: -1, name: "全部" }], //线
gtOptions: [{ id: -1, name: "全部" }], //
formdata: {
dyId: -1,
lineId: -1,
towerId: -1,
search: "",
},
};
@ -234,7 +210,6 @@ export default {
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = [{ id: -1, name: "全部" }];
this.dyOptions = this.dyOptions.concat(res.data.list);
this.formdata.dyId = this.dyOptions[0].id;
this.getSearchxl();
@ -245,23 +220,12 @@ export default {
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyId })
.then((res) => {
this.xlOptions = [{ id: -1, name: "全部" }];
this.xlOptions = this.xlOptions.concat(res.data.list);
this.formdata.lineId = this.xlOptions[0].id;
this.getSearchgt();
})
.catch((err) => {});
},
//
getSearchgt() {
getSearchInfo({ type: 3, id: this.formdata.lineId })
.then((res) => {
this.gtOptions = [{ id: -1, name: "全部" }];
this.gtOptions = this.gtOptions.concat(res.data.list);
this.formdata.towerId = this.gtOptions[0].id;
})
.catch((err) => {});
},
//
onSubmit() {
this.page = 1;
@ -269,7 +233,11 @@ export default {
},
//
onReset() {
this.formdata = {};
this.formdata = {
dyId: -1,
lineId: -1,
search: "",
};
this.page = 1;
this.pageSize = 20;
this.deviceList();

Loading…
Cancel
Save