Commit 2ce36050 authored by “yiyousong”'s avatar “yiyousong”

fix:修改列表返回按钮

parent 1d0cd293
align: "center",<template>
<template>
<div class="page">
<span style="font-size: 13px"
><b>设备列表</b> (<el-link
style="margin-left: 10px"
type="primary"
:underline="false"
>{{ siteName }}</el-link
<div class="page-header">
<div>
<span style="font-size: 14px"
><b>设备列表</b> (<el-link
style="margin-left: 10px"
type="primary"
:underline="false"
>{{ siteName }}</el-link
>
站点编码:{{ siteCode }} )</span
>
<el-link
style="margin-left: 10px"
type="primary"
@click="switchMap"
:underline="false"
>地图模式</el-link
>
</div>
<el-button style="margin-right: 10px" @click="$router.back()" size="small"
>返回上一级</el-button
>
站点编码:{{ siteCode }} )</span
>
<el-link
style="margin-left: 10px"
type="primary"
@click="switchMap"
:underline="false"
>地图模式</el-link
>
<el-button
style="float: right; margin-right: 10px"
type="text"
icon="el-icon-back"
@click="$router.go(-1)"
size="small"
>返回</el-button
>
</div>
<el-divider></el-divider>
<LayoutTable :data="tableData" :config="tableConfig">
<el-button
......@@ -43,7 +42,11 @@
:disabled="isExport"
>导出</el-button
>
<el-tag slot="table-head-row2-left" size="mini" class="cursord" @click="changeStat(null)"
<el-tag
slot="table-head-row2-left"
size="mini"
class="cursord"
@click="changeStat(null)"
>设备总数:{{ tableData.totalCount }}</el-tag
>
......@@ -73,7 +76,7 @@
style="margin: 5px"
type="danger"
class="cursord"
@click="changeStat(null,0)"
@click="changeStat(null, 0)"
>停用:{{ tableData.stopCount }}</el-tag
>
......@@ -83,7 +86,7 @@
style="margin: 5px"
type="danger"
class="cursord"
@click="changeStat(0)"
@click="changeStat(0)"
>未激活:{{ tableData.unActiveCount }}</el-tag
>
</LayoutTable>
......@@ -292,22 +295,20 @@ export default {
this.$refs.drawerViewform.view(row);
},
changeStat(val, enabled) {
this.query = Object.assign(this.query, { deviceStatus: val });
changeStat(val,enabled){
this.query=Object.assign(this.query,{deviceStatus:val});
if(!enabled){
this.query=Object.assign(this.query,{deviceStatusList:[1,2],enabled:enabled});
}
this.getData();
// delete this.query.deviceStatus
// delete this.query.deviceStatusList
if (!enabled) {
this.query = Object.assign(this.query, {
deviceStatusList: [1, 2],
enabled: enabled,
});
}
this.getData();
// delete this.query.deviceStatus
// delete this.query.deviceStatusList
},
downMsg(row) {
......@@ -560,14 +561,20 @@ export default {
},
};
</script>
<style scoped>
<style lang="less" scoped>
.page-header {
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
.el-divider--horizontal {
margin: 2px 0;
background: 0 0;
border-top: 1px solid #e8eaec;
}
.cursord{
cursor:pointer
.cursord {
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -187,35 +187,35 @@ export default {
label: "设备总数",
align: "center",
prop: "deviceTotal",
formatter: this.formatter,
// formatter: this.formatter,
},
{
label: "在线数量",
align: "center",
prop: "onlineCount",
formatter: this.formatter,
// formatter: this.formatter,
},
{
label: "离线数量",
align: "center",
prop: "offlineCount",
formatter: this.formatter,
// formatter: this.formatter,
},
{
label: "停用数量",
align: "center",
prop: "stopCount",
formatter: this.formatter,
// formatter: this.formatter,
},
{
label: "待激活数量",
align: "center",
prop: "unActiveCount",
formatter: this.formatter,
// formatter: this.formatter,
},
{
label: "操作",
......
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment