|
@@ -3,13 +3,13 @@
|
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
|
<div class="radio-group">
|
|
<div class="radio-group">
|
|
|
<el-radio-group
|
|
<el-radio-group
|
|
|
- v-model="params.tabIndex"
|
|
|
|
|
|
|
+ v-model="params.pageVo.notification"
|
|
|
@change="changeTab">
|
|
@change="changeTab">
|
|
|
<el-radio-button
|
|
<el-radio-button
|
|
|
- v-for="(item,index) in dateRangeTab"
|
|
|
|
|
|
|
+ v-for="(item,index) in typeTabs"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- :label="index">
|
|
|
|
|
- {{item.name + " (" + item.total + ")"}}
|
|
|
|
|
|
|
+ :label="item.value">
|
|
|
|
|
+ {{item.name}}
|
|
|
</el-radio-button>
|
|
</el-radio-button>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</div>
|
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
<el-table
|
|
<el-table
|
|
|
v-loading="table.loading"
|
|
v-loading="table.loading"
|
|
|
:data="table.list"
|
|
:data="table.list"
|
|
|
- style="width: 100%;min-height: 65vh;">
|
|
|
|
|
|
|
+ style="width: 100%;min-height: 58vh;">
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="Site ID"
|
|
label="Site ID"
|
|
|
align="center"
|
|
align="center"
|
|
@@ -88,7 +88,8 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
|
-import error from '@/http/api/error'
|
|
|
|
|
|
|
+import api from '@/http/api/incident'
|
|
|
|
|
+import { Base64 } from 'js-base64';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -96,44 +97,48 @@ export default {
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
pageVo: {
|
|
pageVo: {
|
|
|
- criteria: ""
|
|
|
|
|
- },
|
|
|
|
|
- tabIndex: 0
|
|
|
|
|
|
|
+ criteria: "",
|
|
|
|
|
+ notification: ""
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
table: {
|
|
table: {
|
|
|
loading: false,
|
|
loading: false,
|
|
|
list: [],
|
|
list: [],
|
|
|
total: 0
|
|
total: 0
|
|
|
},
|
|
},
|
|
|
- dateRangeTab: [{
|
|
|
|
|
- name: "Boot Notification",
|
|
|
|
|
- total: 1
|
|
|
|
|
- },{
|
|
|
|
|
- name: "Disconnected",
|
|
|
|
|
- total: 1
|
|
|
|
|
- },{
|
|
|
|
|
- name: "Faulted",
|
|
|
|
|
- total: 1
|
|
|
|
|
- },{
|
|
|
|
|
- name: "Connected",
|
|
|
|
|
- total: 1
|
|
|
|
|
- },{
|
|
|
|
|
- name: "Charging",
|
|
|
|
|
- total: 1
|
|
|
|
|
- },{
|
|
|
|
|
- name: "Finishing",
|
|
|
|
|
- total: 1
|
|
|
|
|
|
|
+ typeTabs: [{
|
|
|
|
|
+ name: "Loading...",
|
|
|
|
|
+ value: "-"
|
|
|
}]
|
|
}]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: { Pagination },
|
|
components: { Pagination },
|
|
|
created() {
|
|
created() {
|
|
|
- this.getTableData()
|
|
|
|
|
|
|
+ this.getTabList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getTabList() {
|
|
|
|
|
+ this.table.loading = true;
|
|
|
|
|
+ api.getConnectivityTabs().then(res => {
|
|
|
|
|
+ if (res.data) {
|
|
|
|
|
+ this.typeTabs = res.data;
|
|
|
|
|
+ const type = window.sessionStorage.getItem("notification")
|
|
|
|
|
+ if (type) this.params.pageVo.notification = type;
|
|
|
|
|
+ this.getTableData();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.table.loading = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: err
|
|
|
|
|
+ })
|
|
|
|
|
+ this.table.loading = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getTableData() {
|
|
getTableData() {
|
|
|
this.table.loading = true;
|
|
this.table.loading = true;
|
|
|
- error.getConnectivityPages(this.params).then(res => {
|
|
|
|
|
|
|
+ api.getConnectivityPages(this.params).then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
this.table.list = res.data
|
|
this.table.list = res.data
|
|
|
this.table.total = res.total
|
|
this.table.total = res.total
|
|
@@ -148,14 +153,20 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
changeTab() {
|
|
changeTab() {
|
|
|
-
|
|
|
|
|
|
|
+ window.sessionStorage.setItem("notification", this.params.pageVo.notification)
|
|
|
|
|
+ this.getTableData();
|
|
|
},
|
|
},
|
|
|
handleCommand(func, item) {
|
|
handleCommand(func, item) {
|
|
|
this[func](item)
|
|
this[func](item)
|
|
|
},
|
|
},
|
|
|
viewDetail(row) {
|
|
viewDetail(row) {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ sitePk: row.sitePk,
|
|
|
|
|
+ //siteName: row.siteName,
|
|
|
|
|
+ chargeBoxId: row.chargeBoxId
|
|
|
|
|
+ }
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/incident/charger-connectivity/info/" + row.chargerConnectivityId
|
|
|
|
|
|
|
+ path: "/incident/charger-connectivity/info/" + Base64.encode(JSON.stringify(params))
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -166,6 +177,7 @@ export default {
|
|
|
@import '../../styles/element-ui.scss';
|
|
@import '../../styles/element-ui.scss';
|
|
|
.radio-group {
|
|
.radio-group {
|
|
|
padding-top: 5px;
|
|
padding-top: 5px;
|
|
|
|
|
+ user-select: none;
|
|
|
}
|
|
}
|
|
|
.radio-group ::v-deep .el-radio-button {
|
|
.radio-group ::v-deep .el-radio-button {
|
|
|
padding: 5px;
|
|
padding: 5px;
|