|
@@ -367,6 +367,7 @@ export default {
|
|
|
},
|
|
|
curUserRole: userRole,
|
|
|
groupTypeList: groupTypeList,
|
|
|
+ loaded: false,
|
|
|
hasPermit: false,
|
|
|
loading: false,
|
|
|
showGoBack: false,
|
|
@@ -530,11 +531,17 @@ export default {
|
|
|
this.examList = [];
|
|
|
this.tableData = [];
|
|
|
this.projectId = "";
|
|
|
- //console.log("orgId:" + orgId);
|
|
|
if (!this.isEmptyNumber(orgId)) {
|
|
|
let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
|
|
|
this.$http.post(url).then(response => {
|
|
|
this.examList = response.data;
|
|
|
+ if (this.loaded) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.examList.length > 0) {
|
|
|
+ this.formSearch.examId = this.examList[0].examId;
|
|
|
+ this.searchRecords();
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -761,14 +768,22 @@ export default {
|
|
|
goBack() {
|
|
|
/* 返回上级界面 */
|
|
|
this.$router.push({ path: "/print/project/list" });
|
|
|
+ },
|
|
|
+ selectDefault() {
|
|
|
+ if (this.loaded) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.orgList.length > 0) {
|
|
|
+ let firstOrgId = this.orgList[0].orgId;
|
|
|
+ this.formSearch.orgId = firstOrgId;
|
|
|
+ this.searchExamList(firstOrgId);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({ user: state => state.user })
|
|
|
},
|
|
|
created() {
|
|
|
- this.loadOrgList();
|
|
|
-
|
|
|
this.loadUserRole(this.user);
|
|
|
|
|
|
if (this.curUserRole.isSuperLeader || this.curUserRole.isPM) {
|
|
@@ -781,11 +796,16 @@ export default {
|
|
|
let orgId = this.$route.params.orgId;
|
|
|
let examId = this.$route.params.examId;
|
|
|
if (orgId != "0" || examId != "0") {
|
|
|
+ this.loaded = true;
|
|
|
+ this.loadOrgList();
|
|
|
this.searchExamList(orgId);
|
|
|
this.showGoBack = true;
|
|
|
this.formSearch.orgId = parseInt(orgId);
|
|
|
this.formSearch.examId = parseInt(examId);
|
|
|
this.searchRecords();
|
|
|
+ } else {
|
|
|
+ this.loaded = false;
|
|
|
+ this.loadOrgList();
|
|
|
}
|
|
|
}
|
|
|
};
|