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

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

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

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

Loading…
Cancel
Save