jc1.0
fanluyan 1 year ago
parent 286e46b3b8
commit a31863b159

@ -65,6 +65,7 @@ export default {
message: "退出成功",
type: "success",
});
localStorage.clear();
//this.$store.commit("REMOVE_INFO");
this.$router.push("/login");
// console.log(this.$cookies.get("Admin-Token"));

@ -33,15 +33,15 @@ Vue.config.productionTip = false;
//使用钩子函数对路由进行权限跳转
router.beforeEach((to, from, next) => {
document.title = `${to.meta.title} | 状态监测数据汇集系统`;
//next();
const token = localStorage.getItem("token");
if (!token && to.path !== "/login") {
next({
path: "/login",
});
} else {
next();
// const token = localStorage.getItem("token");
// if (!token && to.path !== "/login") {
// next({
// path: "/login",
// });
// } else {
// next();
// }
}
});
new Vue({

@ -395,7 +395,7 @@ export default {
this.currentId = data.id;
this.page = 1;
this.pageSize = 20;
// this.handleSearch();
//this.handleSearch();
//
this.getAllTimeTable();
},
@ -547,14 +547,20 @@ export default {
getDetailTable(id, dayval, stime, eTime) {
console.log(id, stime, eTime);
this.tableLoading = true;
getDetailApi({
// API
const apiParams = {
id: id,
numPerDay: dayval,
startTime: stime,
endTime: eTime,
pageNum: this.page,
pageSize: this.pageSize,
})
};
// dayval-1numPerDay
if (dayval !== -1) {
apiParams.numPerDay = dayval;
}
getDetailApi(apiParams)
.then((res) => {
console.log(res);
if (res.success) {
@ -583,6 +589,7 @@ export default {
}
})
.catch((err) => {
this.tableLoading = false;
console.log(err); //
});
},

@ -223,7 +223,7 @@ export default {
},
getmonitoringAllList() {
this.monitoringLoading = true;
monitoringListApi({ pageNum: this.page - 1, pageSize: this.pageSize })
monitoringListApi({ pageNum: this.page, pageSize: this.pageSize })
.then((res) => {
console.log(res);
this.monitoringTableData = res.data.content;

@ -99,6 +99,7 @@ export default {
if (res.success) {
console.log(res.data);
//this.$router.push("/weather");
localStorage.setItem("token", "13747c96ff9f434cb09ecf78e4b9a8bc");
this.$message({
duration: 1500,
showClose: true,

Loading…
Cancel
Save