|
@@ -306,6 +306,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
<div class="page pull-right">
|
|
<div class="page pull-right">
|
|
<el-pagination
|
|
<el-pagination
|
|
|
|
+ v-if="paginationShow"
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
:page-size="pageSize"
|
|
:page-size="pageSize"
|
|
@@ -445,6 +446,20 @@ export default {
|
|
this.tableData = response.data.list;
|
|
this.tableData = response.data.list;
|
|
this.total = response.data.total;
|
|
this.total = response.data.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
+
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/basic/campus",
|
|
|
|
+ query: {
|
|
|
|
+ parentId: this.formSearch.parentId,
|
|
|
|
+ code: this.formSearch.code,
|
|
|
|
+ name: this.formSearch.name,
|
|
|
|
+ currentPage: this.currentPage,
|
|
|
|
+ pageSize: this.pageSize
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.$nextTick(function() {
|
|
|
|
+ this.paginationShow = true;
|
|
|
|
+ });
|
|
})
|
|
})
|
|
.finally(() => (this.fileLoading = false));
|
|
.finally(() => (this.fileLoading = false));
|
|
},
|
|
},
|
|
@@ -674,13 +689,60 @@ export default {
|
|
|
|
|
|
this.$httpWithMsg.get(CORE_API + "/org/getRootOrgList").then(response => {
|
|
this.$httpWithMsg.get(CORE_API + "/org/getRootOrgList").then(response => {
|
|
this.rootOrgList = response.data;
|
|
this.rootOrgList = response.data;
|
|
- this.formSearch.parentId = this.user.rootOrgId;
|
|
|
|
|
|
+ if (this.formSearch.parentId === null)
|
|
|
|
+ this.formSearch.parentId = this.user.rootOrgId;
|
|
this.searchForm();
|
|
this.searchForm();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // beforeRouteEnter(to, from, next) {
|
|
|
|
+ // next(vm => {
|
|
|
|
+ // console.log("beforeRouteEnter: formSearch", vm.formSearch);
|
|
|
|
+ // vm.formSearch.parentId = to.$route.query.parentId || "";
|
|
|
|
+ // vm.formSearch.code = to.$route.query.code || "";
|
|
|
|
+ // vm.formSearch.name = to.$route.query.name || "";
|
|
|
|
+ // vm.currentPage = parseInt(to.$route.query.currentPage) || vm.currentPage;
|
|
|
|
+ // vm.pageSize = parseInt(to.$route.query.pageSize) || vm.pageSize;
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
+ // beforeRouteLeave(to, from, next) {
|
|
|
|
+ // // this.$router.push(to);
|
|
|
|
+ // // next();
|
|
|
|
+ // // this.$route.query = {
|
|
|
|
+ // // parentId: this.formSearch.parentId,
|
|
|
|
+ // // code: this.formSearch.code,
|
|
|
|
+ // // name: this.formSearch.name,
|
|
|
|
+ // // currentPage: this.currentPage,
|
|
|
|
+ // // pageSize: this.pageSize
|
|
|
|
+ // // };
|
|
|
|
+ // // next();
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // path: "/basic/campus",
|
|
|
|
+ // query: {
|
|
|
|
+ // parentId: this.formSearch.parentId,
|
|
|
|
+ // code: this.formSearch.code,
|
|
|
|
+ // name: this.formSearch.name,
|
|
|
|
+ // currentPage: this.currentPage,
|
|
|
|
+ // pageSize: this.pageSize
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // console.log("settimeout next");
|
|
|
|
+ // next();
|
|
|
|
+ // }, 500);
|
|
|
|
+ // },
|
|
//初始化查询
|
|
//初始化查询
|
|
created() {
|
|
created() {
|
|
|
|
+ this.formSearch.parentId = parseInt(this.$route.query.parentId);
|
|
|
|
+ if (isNaN(this.formSearch.parentId)) {
|
|
|
|
+ this.formSearch.parentId = null;
|
|
|
|
+ }
|
|
|
|
+ this.formSearch.code = this.$route.query.code || "";
|
|
|
|
+ this.formSearch.name = this.$route.query.name || "";
|
|
|
|
+ this.currentPage =
|
|
|
|
+ parseInt(this.$route.query.currentPage) || this.currentPage;
|
|
|
|
+ this.pageSize = parseInt(this.$route.query.pageSize) || this.pageSize;
|
|
|
|
+
|
|
this.init();
|
|
this.init();
|
|
this.uploadHeaders = {
|
|
this.uploadHeaders = {
|
|
key: this.user.key,
|
|
key: this.user.key,
|