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

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

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

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

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

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

Loading…
Cancel
Save