routerer-bug,分页

master
13703816893 2 years ago
parent 54bb0df7b2
commit 8e93b039ab

@ -51,7 +51,7 @@ export default {
case "loginout": //退
this.$message.success("退出成功");
this.$store.commit("REMOVE_INFO");
this.$router.push("/");
this.$router.push("/login");
break;
}
},

@ -71,7 +71,6 @@ router.beforeEach((to, from, next) => {
const role = localStorage.getItem("userName");
const token = localStorage.getItem("token");
if (!token && to.path !== "/login") {
alert("1111111111");
next("/login");
} else {
next();

@ -4,10 +4,10 @@ import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
{
path: "/",
redirect: "/login",
},
// {
// path: "/",
// redirect: "/login",
// },
{
path: "/",
component: () =>

@ -69,9 +69,10 @@
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
@ -97,7 +98,7 @@ export default {
deviceTableData: [],
//multipleSelection: [], //
page: 1, //
pageSize: 10, //
pageSize: 20, //
total: 0, //
};
},
@ -166,6 +167,11 @@ export default {
this.page = val;
this.deviceList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.deviceList();
},
},
};
</script>

@ -61,7 +61,7 @@ export default {
this.$message.success("修改成功,请重新登录");
this.isShow = false
this.$store.commit("REMOVE_INFO");
this.$router.push("/");
this.$router.push("/login");
} else {
this.$message.error(res.msg);
}

@ -83,9 +83,10 @@
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
@ -118,7 +119,7 @@ export default {
deviceTableData: [],
//multipleSelection: [], //
page: 1, //
pageSize: 10, //
pageSize: 20, //
total: 0, //
loading: true,
};
@ -196,6 +197,11 @@ export default {
this.page = val;
this.deviceList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.deviceList();
},
},
};
</script>

@ -96,7 +96,7 @@ export default {
data() {
let validCmid = (rule, value, callback) => {
let reg = /^[0-9A-Za-z]{17}$/;
let reg = /^[0-9A-Za-z_/\\/-]{17}$/;
if (!reg.test(value)) {
callback(new Error("装置id为17位编码"));
} else {

@ -147,9 +147,10 @@
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
@ -192,7 +193,7 @@ export default {
multipleSelection: [], //
formphotoInfo: {}, //
page: 1, //
pageSize: 30, //
pageSize: 20, //
total: 0, //
loading: true,
};
@ -380,6 +381,11 @@ export default {
this.page = val;
this.terminalList(); //
},
//
handleSizeChange(val) {
this.pageSize = val;
this.terminalList();
},
},
created() {
this.terminalList();

@ -71,9 +71,10 @@
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
@ -105,7 +106,7 @@ export default {
lineTableData: [],
//multipleSelection: [], //
page: 1, //
pageSize: 10, //
pageSize: 20, //
total: 0, //
loading: true,
};
@ -183,6 +184,11 @@ export default {
this.page = val;
this.lineList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.lineList();
},
},
};
</script>

@ -66,9 +66,10 @@
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
@ -94,7 +95,7 @@ export default {
tableDate: [],
//multipleSelection: [], //
page: 1, //
pageSize: 10, //
pageSize: 20, //
total: 0, //
loading: true,
};
@ -171,6 +172,11 @@ export default {
this.page = val;
this.deviceList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.deviceList();
},
},
};
</script>

@ -2,10 +2,8 @@
<div class="camerChannel">
<div class="deviceBox">
<div class="deviceBtnGroup">
<el-button
type="primary"
icon="el-icon-plus"
@click.native.stop="handleAdddevice()"
<h4>用户管理</h4>
<el-button type="primary" icon="el-icon-plus" @click="handleAdddevice()"
>新增</el-button
>
</div>
@ -42,9 +40,10 @@
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
@ -70,7 +69,7 @@ export default {
deviceTableData: [],
//multipleSelection: [], //
page: 1, //
pageSize: 10, //
pageSize: 20, //
total: 0, //
};
},
@ -139,6 +138,11 @@ export default {
this.page = val;
this.deviceList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.deviceList();
},
},
};
</script>
@ -157,7 +161,8 @@ export default {
}
.deviceBtnGroup {
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
}
.deviceTable {

Loading…
Cancel
Save