newCac1.0
fanluyan 8 months ago
parent 78c7f6e5a0
commit e4702517fc

@ -52,7 +52,7 @@ export default {
{
path: "/equipment",
name: "设备台账管理",
name: "台账管理",
},
// {
// path: "/systemManagement",

@ -2,7 +2,7 @@
<div class="clientDownFileBox">
<div class="equimentList">
<div class="sideNav">
<h3><i class="el-icon-s-tools"></i>客户端下载文件配置</h3>
<h3><i class="el-icon-s-tools"></i>客户端采集文件配置</h3>
<ul class="navList">
<li v-for="(item, index) in navlist" :key="index">
<router-link :to="item.path">

@ -19,20 +19,22 @@
</el-button>
<el-button
class="rightbtn"
v-if="msgTitle == '设备类型实时数据'"
@click="exporTypeData"
type="primary"
style="margin-left: 16px"
>
按设备类型导出
导出
</el-button>
<el-button
v-else
class="rightbtn"
@click="exporZsbData"
type="primary"
style="margin-left: 16px"
>
按主设备导出
导出
</el-button>
<el-drawer title="选择条件" :visible.sync="typedrawer" direction="ttb">
<div class="greyBox">
@ -117,10 +119,12 @@
>历史数据</el-button
>
</div>
<el-tooltip placement="top-start">
<el-tooltip placement="bottom-start">
<div slot="content">
<div class="textitem">
<h3 class="headTitle" :title="item.name">{{ item.name }}</h3>
<h3 class="headTitle" :title="item.name">
{{ item.jgName }}/{{ item.zsbName }}/{{ item.name }}
</h3>
<p>
采集时间
<span v-if="item.lastData" class="timeclass">
@ -212,7 +216,7 @@ import {
zsbListAllApi,
monitoringListAllApi,
// getDetailApi,
modevtypeListAllApi,
getlistAllCountApi,
} from "@/utils/api/index";
import historyDialog from "./components/historyDialog";
export default {
@ -221,6 +225,7 @@ export default {
data() {
return {
msgTitle: "设备类型实时数据",
deviceTitle: "",
typedrawer: false,
areadrawer: false,
deviceTypeVal: null,
@ -263,24 +268,32 @@ export default {
},
//
getdeviceTypeAll() {
modevtypeListAllApi()
getlistAllCountApi()
.then((res) => {
console.log(res);
this.deviceTypeList = res.data;
this.deviceTypeList = res.data.filter(
(item) => item.sensorCount !== 0
);
// localStorage areaVal
const storeddeviceTypeVal = localStorage.getItem("deviceTypeVal");
const deviceInfoVal = localStorage.getItem("deviceTitle");
if (storeddeviceTypeVal) {
// localStorage areaVal id this.areaVal
this.areaVal = JSON.parse(storeddeviceTypeVal);
this.deviceTitle = JSON.parse(deviceInfoVal);
} else {
// 使 res.data[0].id
this.deviceTypeVal = res.data[0]?.id; // 使 res.data[0] undefined
this.deviceTitle = res.data[0].mc;
// areaVal localStorage
localStorage.setItem(
"deviceTypeVal",
JSON.stringify(this.deviceTypeVal)
);
localStorage.setItem(
"deviceTitle",
JSON.stringify(this.deviceTitle)
);
}
this.getTypeAllList();
this.startIntervalIfNeededType();
@ -292,8 +305,12 @@ export default {
},
handletypeChange(value) {
this.deviceTypeVal = value;
const typeArr = this.deviceTypeList.find((item) => item.id === value);
console.log(typeArr.mc);
this.deviceTitle = typeArr.mc;
localStorage.removeItem("deviceTypeVal");
localStorage.setItem("deviceTypeVal", JSON.stringify(value));
localStorage.setItem("deviceTitle", JSON.stringify(typeArr.mc));
this.jksbAllList = [];
this.getTypeAllList();
this.startIntervalIfNeededType();
@ -401,6 +418,7 @@ export default {
handlezsbChange(value) {
this.zsbVal = value;
localStorage.setItem("zsbVal", JSON.stringify(value));
// getjcsbAllList
this.getjcsbAllList();
@ -464,6 +482,9 @@ export default {
margin: 10px 0px;
display: flex;
align-items: center;
.rightbtn {
margin-left: auto !important;
}
.el-drawer__wrapper {
.el-drawer__header {
margin-bottom: 14px;

Loading…
Cancel
Save