Merge branch 'xy-ly' into fly

master
fanluyan 2 years ago
commit c3c3b72b0d

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save