Преглед на файлове

Merge branch 'master' of http://git.qmth.com.cn/ExamCloud-3/examcloud-web-admin

weiwenhai преди 6 години
родител
ревизия
69c8d0991d

+ 31 - 75
src/modules/basic/view/campus.vue

@@ -431,7 +431,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.tableData = response.data.list;
         this.total = response.data.total;
         this.loading = false;
@@ -458,24 +458,13 @@ export default {
           type: "warning"
         }).then(() => {
           var url = CORE_API + "/org/enable/" + this.orgIds;
-          this.$http
-            .put(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "启用成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "启用成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -492,24 +481,13 @@ export default {
           type: "warning"
         }).then(() => {
           var url = CORE_API + "/org/disable/" + this.orgIds;
-          this.$http
-            .put(url, {})
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "禁用成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url, {}).then(() => {
+            this.$notify({
+              type: "success",
+              message: "禁用成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -530,49 +508,27 @@ export default {
         if (valid) {
           if (null != this.campusForm.id) {
             url = CORE_API + "/org/updateSubOrg";
-            this.$http.put(url, this.campusForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "修改成功!"
-                });
-                this.searchForm();
-                this.resetForm();
-                this.campusDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.put(url, this.campusForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "修改成功!"
+              });
+              this.searchForm();
+              this.resetForm();
+              this.campusDialog = false;
+            });
           } else {
             //新增
             var url = CORE_API + "/org/addSubOrg";
-            this.$http.post(url, this.campusForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "新增成功!"
-                });
-                this.searchForm();
-                this.resetForm();
-                this.campusDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.post(url, this.campusForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "新增成功!"
+              });
+              this.searchForm();
+              this.resetForm();
+              this.campusDialog = false;
+            });
           }
         } else {
           console.log("error submit!");

+ 72 - 182
src/modules/basic/view/course.vue

@@ -662,49 +662,27 @@ export default {
         specialtyId: specialtyId
       });
       var url = CORE_API + "/courseSpeciatlyRelation/delete?" + param;
-      this.$http
-        .delete(url)
-        .then(() => {
-          this.$notify({
-            type: "success",
-            message: "取消关联成功!"
-          });
-          this.searchSpecialtyPage();
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
+      this.$httpWithMsg.delete(url).then(() => {
+        this.$notify({
+          type: "success",
+          message: "取消关联成功!"
         });
+        this.searchSpecialtyPage();
+      });
     },
     submitAddRelationForm() {
       this.$refs.addRelationForm.validate(valid => {
         if (valid) {
           var param = new URLSearchParams(this.addRelationForm);
           var url = CORE_API + "/courseSpeciatlyRelation/add?" + param;
-          this.$http.post(url, this.speciallyForm).then(
-            () => {
-              this.$notify({
-                type: "success",
-                message: "添加成功!"
-              });
-              this.searchSpecialtyPage();
-              this.addRelationDialog = false;
-            },
-            response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
-            }
-          );
+          this.$httpWithMsg.post(url, this.speciallyForm).then(() => {
+            this.$notify({
+              type: "success",
+              message: "添加成功!"
+            });
+            this.searchSpecialtyPage();
+            this.addRelationDialog = false;
+          });
         } else {
           console.log("error submit!");
           return false;
@@ -713,7 +691,7 @@ export default {
     },
     getSpecialtyList4AddRelation(query) {
       this.specialtyLoading4AddRelation = true;
-      this.$http
+      this.$httpWithMsg
         .get(CORE_API + "/specialty/query?name=" + query)
         .then(response => {
           this.specialtyList4AddRelation = response.data;
@@ -742,7 +720,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.specialtyTableData = response.data.content;
         this.specialtyTotal = response.data.totalElements;
       });
@@ -768,7 +746,7 @@ export default {
     },
     getSpecialtyList4Search(query) {
       this.specialtyLoading4Search = true;
-      this.$http
+      this.$httpWithMsg
         .get(CORE_API + "/specialty/query?name=" + query)
         .then(response => {
           this.specialtyList4Search = response.data;
@@ -789,7 +767,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
       });
@@ -862,26 +840,15 @@ export default {
         //修改
         this.$refs.courseForm.validate(valid => {
           if (valid) {
-            this.$http.put(url, this.courseForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "修改成功!"
-                });
-                this.searchForm();
-                this.resetForm();
-                this.courseDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.put(url, this.courseForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "修改成功!"
+              });
+              this.searchForm();
+              this.resetForm();
+              this.courseDialog = false;
+            });
           } else {
             console.log("error submit!");
             return false;
@@ -890,26 +857,15 @@ export default {
       } else {
         this.$refs.courseForm.validate(valid => {
           if (valid) {
-            this.$http.post(url, this.courseForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "添加成功"
-                });
-                this.searchForm();
-                this.resetForm();
-                this.courseDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.post(url, this.courseForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "添加成功"
+              });
+              this.searchForm();
+              this.resetForm();
+              this.courseDialog = false;
+            });
           } else {
             console.log("error submit!");
             return false;
@@ -939,24 +895,13 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/course/" + row.id;
-        this.$http
-          .delete(url)
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "删除成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.delete(url).then(() => {
+          this.$notify({
+            type: "success",
+            message: "删除成功!"
           });
+          this.searchForm();
+        });
       });
     },
     //删除多条数据
@@ -973,24 +918,13 @@ export default {
           type: "error"
         }).then(() => {
           var url = CORE_API + "/course/" + this.courseIds;
-          this.$http
-            .delete(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "删除成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.delete(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "删除成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -1008,24 +942,13 @@ export default {
           type: "warning"
         }).then(() => {
           var url = CORE_API + "/course/enable/" + this.courseIds;
-          this.$http
-            .put(url, {})
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "开启成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url, {}).then(() => {
+            this.$notify({
+              type: "success",
+              message: "开启成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -1036,24 +959,13 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/course/enable/" + row.id;
-        this.$http
-          .put(url, {})
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "开启成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.put(url, {}).then(() => {
+          this.$notify({
+            type: "success",
+            message: "开启成功!"
           });
+          this.searchForm();
+        });
       });
     },
     //禁用
@@ -1070,24 +982,13 @@ export default {
           type: "error"
         }).then(() => {
           var url = CORE_API + "/course/disable/" + this.courseIds;
-          this.$http
-            .put(url, {})
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "禁用成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url, {}).then(() => {
+            this.$notify({
+              type: "success",
+              message: "禁用成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -1099,24 +1000,13 @@ export default {
         type: "error"
       }).then(() => {
         var url = CORE_API + "/course/disable/" + row.id;
-        this.$http
-          .put(url, {})
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "禁用成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        return this.$httpWithMsg.put(url, {}).then(() => {
+          this.$notify({
+            type: "success",
+            message: "禁用成功!"
           });
+          return this.searchForm();
+        });
       });
     },
     //导入

+ 35 - 90
src/modules/basic/view/exam_site.vue

@@ -297,7 +297,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
         this.loading = false;
@@ -320,47 +320,25 @@ export default {
         if (valid) {
           var url = CORE_API + "/examSite";
           if (this.examSiteForm.id) {
-            this.$http.put(url, this.examSiteForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "修改成功!"
-                });
-                this.searchForm();
-                this.resetForm();
-                this.examSiteDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.put(url, this.examSiteForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "修改成功!"
+              });
+              this.searchForm();
+              this.resetForm();
+              this.examSiteDialog = false;
+            });
           } else {
-            this.$http.post(url, this.examSiteForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "新增成功!"
-                });
-                this.searchForm();
-                this.resetForm();
-                this.examSiteDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.post(url, this.examSiteForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "新增成功!"
+              });
+              this.searchForm();
+              this.resetForm();
+              this.examSiteDialog = false;
+            });
           }
         } else {
           console.log("error submit!");
@@ -403,24 +381,13 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/examSite/" + row.id;
-        this.$http
-          .delete(url)
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "删除成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.delete(url).then(() => {
+          this.$notify({
+            type: "success",
+            message: "删除成功!"
           });
+          this.searchForm();
+        });
       });
     },
     //删除多条数据
@@ -437,44 +404,22 @@ export default {
           type: "error"
         }).then(() => {
           var url = CORE_API + "/examSite/" + this.examSiteIds;
-          this.$http
-            .delete(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "删除成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.delete(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "删除成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
     init() {
       var url = CORE_API + "/org/subOrg/" + this.orgId;
-      this.$http
-        .get(url)
-        .then(response => {
-          this.orgName = response.data.name;
-          this.searchForm();
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
-        });
+      this.$httpWithMsg.get(url).then(response => {
+        this.orgName = response.data.name;
+        this.searchForm();
+      });
     }
   },
   created() {

+ 1 - 10
src/modules/basic/view/index.vue

@@ -121,7 +121,7 @@ export default {
   },
   created() {
     var url = CORE_API + "/rolePrivilege/getUserPrivileges";
-    this.$http
+    this.$httpWithMsg
       .post(
         url,
         {
@@ -132,15 +132,6 @@ export default {
       )
       .then(response => {
         this.menuList = response.data;
-      })
-      .catch(response => {
-        if (response.status == 500) {
-          this.$notify({
-            showClose: true,
-            message: response.data.desc,
-            type: "error"
-          });
-        }
       });
   }
 };

+ 1 - 1
src/modules/basic/view/privilege_group_list.vue

@@ -41,7 +41,7 @@ export default {
   methods: {
     async queryAppList() {
       var url = CORE_API + "/rolePrivilege/getPrivilegeGroupList";
-      const response = await this.$http.get(url);
+      const response = await this.$httpWithMsg.get(url);
       this.privilegeGroupList = response.data;
     },
     editPrivilege(row) {

+ 6 - 39
src/modules/basic/view/privilege_tree.vue

@@ -388,7 +388,7 @@ export default {
                     return;
                 }
                 var url = CORE_API + '/rolePrivilege/addPrivilege';
-                this.$http.post(url, this.addingDialog.privilege).then((response) => {
+                this.$httpWithMsg.post(url, this.addingDialog.privilege).then((response) => {
                     this.$notify({
                         message: '添加成功',
                         type: 'success'
@@ -399,15 +399,7 @@ export default {
                         label: this.addingDialog.privilege.name,
                         children: []
                     }, this.data);
-                }).catch((response) => {
-                    if (response.status == 500) {
-                        this.$notify({
-                            showClose: true,
-                            message: response.data.desc,
-                            type: 'error'
-                        });
-                    }
-                });
+                })
                 this.addingDialog.show = false;
             });
         },
@@ -416,23 +408,14 @@ export default {
                 if (!valid) {
                     return;
                 }
-                console.log(this.updateDialog.privilege);
                 var url = CORE_API + '/rolePrivilege/updatePrivilege';
-                this.$http.put(url, this.updateDialog.privilege).then(() => {
+                this.$httpWithMsg.put(url, this.updateDialog.privilege).then(() => {
                     this.$notify({
                         message: '修改成功',
                         type: 'success'
                     });
                     this.data.label = this.updateDialog.privilege.name;
-                }).catch((response) => {
-                    if (response.status == 500) {
-                        this.$notify({
-                            showClose: true,
-                            message: response.data.desc,
-                            type: 'error'
-                        });
-                    }
-                });
+                })
                 this.updateDialog.show = false;
             });
         },
@@ -451,7 +434,7 @@ export default {
         },
         getPrivilege(id, type) {
             var url = CORE_API + '/rolePrivilege/getPrivilege/' + id;
-            this.$http.get(url).then((response) => {
+            this.$httpWithMsg.get(url).then((response) => {
                 var resp = response.data;
 
                 this.updateDialog.privilege.id = resp.id;
@@ -486,14 +469,6 @@ export default {
                 else if ("for-show" == type) {
                     this.showDialog.show = true;
                 }
-            }).catch((response) => {
-                if (response.status == 500) {
-                    this.$notify({
-                        showClose: true,
-                        message: response.data.desc,
-                        type: 'error'
-                    });
-                }
             });
         },
 
@@ -504,20 +479,12 @@ export default {
                 type: 'warning'
             }).then(() => {
                 var url = CORE_API + '/rolePrivilege/deletePrivilege/' + data.id;
-                this.$http.delete(url).then(() => {
+                return this.$httpWithMsg.delete(url).then(() => {
                     this.$notify({
                         message: '删除成功',
                         type: 'success'
                     });
                     store.remove(data);
-                }).catch((response) => {
-                    if (response.status == 500) {
-                        this.$notify({
-                            showClose: true,
-                            message: response.data.desc,
-                            type: 'error'
-                        });
-                    }
                 });
             }).catch(() => {
                 this.$message({

+ 17 - 36
src/modules/basic/view/role_privilege_settings.vue

@@ -159,15 +159,16 @@ export default {
       var url2 =
         CORE_API + "/rolePrivilege/getPrivilegeIdList/" + orgId + "/" + roleId;
 
-      Promise.all([this.$http.get(url1), this.$http.get(url2)]).then(
-        ([resp1, resp2]) => {
-          console.log("initTree(). treeData:", resp1.data.children);
-          console.log("initTree(). checkedKeys:", resp2.data);
-          this.treeData = resp1.data.children;
-          this.checkedKeys = resp2.data;
-          this.completed = true;
-        }
-      );
+      Promise.all([
+        this.$httpWithMsg.get(url1),
+        this.$httpWithMsg.get(url2)
+      ]).then(([resp1, resp2]) => {
+        console.log("initTree(). treeData:", resp1.data.children);
+        console.log("initTree(). checkedKeys:", resp2.data);
+        this.treeData = resp1.data.children;
+        this.checkedKeys = resp2.data;
+        this.completed = true;
+      });
     },
     /*change事件*/
     change() {
@@ -190,23 +191,12 @@ export default {
         CORE_API +
         "/rolePrivilege/getRoles?includeSuperAdmin=false&rootOrgId=" +
         this.form.orgId;
-      this.$http
-        .post(url)
-        .then(response => {
-          this.roleList = response.data;
-          if (0 < this.roleList.length) {
-            this.form.roleId = this.roleList[0].roleId;
-          }
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
-        });
+      this.$httpWithMsg.post(url).then(response => {
+        this.roleList = response.data;
+        if (0 < this.roleList.length) {
+          this.form.roleId = this.roleList[0].roleId;
+        }
+      });
 
       this.initTree(
         this.form.orgId,
@@ -250,7 +240,7 @@ export default {
     save() {
       console.log("save(). checkedKeys:", this.checkedKeys);
       var url = CORE_API + "/rolePrivilege/updateRolePrivilegeRelations";
-      this.$http
+      this.$httpWithMsg
         .post(url, {
           rootOrgId: this.form.orgId,
           roleId: this.form.roleId,
@@ -263,15 +253,6 @@ export default {
             type: "success"
           });
           this.treeChanged = false;
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
         });
     }
   },

+ 36 - 88
src/modules/basic/view/school.vue

@@ -443,7 +443,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         this.tableData = response.data.list;
         this.total = response.data.total;
         this.loading = false;
@@ -463,24 +463,13 @@ export default {
           type: "warning"
         }).then(() => {
           var url = CORE_API + "/org/enable/" + this.orgIds;
-          this.$http
-            .put(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "启用成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "启用成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -497,24 +486,13 @@ export default {
           type: "warning"
         }).then(() => {
           var url = CORE_API + "/org/disable/" + this.orgIds;
-          this.$http
-            .put(url, {})
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "禁用成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$$httpWithMsg.put(url, {}).then(() => {
+            this.$notify({
+              type: "success",
+              message: "禁用成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -536,47 +514,25 @@ export default {
           if (null != this.schoolForm.id) {
             //修改
             url = CORE_API + "/org/updateRootOrg";
-            this.$http.put(url, this.schoolForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "修改成功!"
-                });
-                this.searchForm();
-                this.schoolDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.put(url, this.schoolForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "修改成功!"
+              });
+              this.searchForm();
+              this.schoolDialog = false;
+            });
           } else {
             //新增
             var url = CORE_API + "/org/addRootOrg";
-            this.$http.post(url, this.schoolForm).then(
-              () => {
-                this.$notify({
-                  type: "success",
-                  message: "新增成功!"
-                });
-                this.searchForm();
-                this.schoolDialog = false;
-              },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
-              }
-            );
+            this.$httpWithMsg.post(url, this.schoolForm).then(() => {
+              this.$notify({
+                type: "success",
+                message: "新增成功!"
+              });
+              this.searchForm();
+              this.schoolDialog = false;
+            });
           }
         } else {
           console.log("error submit!");
@@ -609,21 +565,13 @@ export default {
       this.schoolForm.enable = row.enable ? "true" : "false";
 
       var url = CORE_API + "/org/allProperties/" + row.id;
-      this.$http.get(url).then(
-        response => {
-          this.schoolForm.properties = Object.assign(
-            this.schoolForm.properties,
-            response.data
-          );
-          this.schoolDialog = true;
-        },
-        response => {
-          this.$notify({
-            type: "error",
-            message: response.data.desc
-          });
-        }
-      );
+      this.$httpWithMsg.get(url).then(response => {
+        this.schoolForm.properties = Object.assign(
+          this.schoolForm.properties,
+          response.data
+        );
+        this.schoolDialog = true;
+      });
     },
     //设置产品
     saveOrgFunction() {},

+ 35 - 102
src/modules/basic/view/specially.vue

@@ -502,31 +502,20 @@ export default {
         specialtyId: specialtyId
       });
       var url = CORE_API + "/courseSpeciatlyRelation/delete?" + param;
-      this.$http
-        .delete(url)
-        .then(() => {
-          this.$notify({
-            type: "success",
-            message: "取消关联成功!"
-          });
-          this.searchCoursePage();
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
+      this.$httpWithMsg.delete(url).then(() => {
+        this.$notify({
+          type: "success",
+          message: "取消关联成功!"
         });
+        return this.searchCoursePage();
+      });
     },
     submitAddRelationForm() {
       this.$refs.addRelationForm.validate(valid => {
         if (valid) {
           var param = new URLSearchParams(this.addRelationForm);
           var url = CORE_API + "/courseSpeciatlyRelation/add?" + param;
-          this.$http.post(url, this.speciallyForm).then(
+          this.$httpWithMsg.post(url, this.speciallyForm).then(
             () => {
               this.$notify({
                 type: "success",
@@ -535,16 +524,7 @@ export default {
               this.searchCoursePage();
               this.addRelationDialog = false;
             },
-            response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
-              this.addRelationDialog = false;
-            }
+            () => (this.addRelationDialog = false)
           );
         } else {
           console.log("error submit!");
@@ -568,7 +548,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         console.log(response);
         this.courseTableData = response.data.content;
         this.courseTotal = response.data.totalElements;
@@ -576,7 +556,7 @@ export default {
     },
     getCourses(query) {
       this.courseLoading = true;
-      this.$http
+      this.$httpWithMsg
         .get(CORE_API + "/course/query?name=" + query)
         .then(response => {
           this.courseList4Search = response.data;
@@ -585,7 +565,7 @@ export default {
     },
     getCourses4AddRelation(query) {
       this.courseLoading4AddRelation = true;
-      this.$http
+      this.$httpWithMsg
         .get(CORE_API + "/course/query?name=" + query)
         .then(response => {
           this.courseList4AddRelation = response.data;
@@ -607,22 +587,11 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http
-        .get(url)
-        .then(response => {
-          console.log("response :", response);
-          this.tableData = response.data.content;
-          this.total = response.data.totalElements;
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
-        });
+      this.$httpWithMsg.get(url).then(response => {
+        console.log("response :", response);
+        this.tableData = response.data.content;
+        this.total = response.data.totalElements;
+      });
     },
     handleCurrentChange(val) {
       this.currentPage = val;
@@ -647,7 +616,7 @@ export default {
         this.loading = true;
         var vm = this;
         var url = CORE_API;
-        vm.$http.delete(url).then(() => {
+        vm.$httpWithMsg.delete(url).then(() => {
           this.loading = false;
           this.$notify({
             type: "success",
@@ -664,7 +633,7 @@ export default {
           var url = CORE_API + "/specialty";
           //修改
           if (null != this.speciallyForm.id) {
-            this.$http.put(url, this.speciallyForm).then(
+            this.$httpWithMsg.put(url, this.speciallyForm).then(
               () => {
                 this.$notify({
                   type: "success",
@@ -673,14 +642,7 @@ export default {
                 this.searchForm();
                 this.speciallyDialog = false;
               },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
+              () => {
                 this.searchForm();
                 this.speciallyDialog = false;
               }
@@ -688,7 +650,7 @@ export default {
           }
           //新增
           else {
-            this.$http.post(url, this.speciallyForm).then(
+            this.$httpWithMsg.post(url, this.speciallyForm).then(
               () => {
                 this.$notify({
                   type: "success",
@@ -697,16 +659,9 @@ export default {
                 this.speciallyDialog = false;
                 this.searchForm();
               },
-              response => {
-                if (response.status == 500) {
-                  this.$notify({
-                    showClose: true,
-                    message: response.data.desc,
-                    type: "error"
-                  });
-                }
+              () => {
                 this.speciallyDialog = false;
-                this.searchForm();
+                return this.searchForm();
               }
             );
           }
@@ -746,24 +701,13 @@ export default {
         type: "error"
       }).then(() => {
         var url = CORE_API + "/specialty/" + row.id;
-        this.$http
-          .delete(url)
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "删除成功!"
-            });
-            this.searchForm();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.delete(url).then(() => {
+          this.$notify({
+            type: "success",
+            message: "删除成功!"
           });
+          this.searchForm();
+        });
       });
     },
     //删除多条信息
@@ -784,24 +728,13 @@ export default {
             ids.push(this.multipleSelection[i].id);
           }
           var url = CORE_API + "/specialty/" + ids;
-          this.$http
-            .delete(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "删除成功!"
-              });
-              this.searchForm();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.delete(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "删除成功!"
             });
+            this.searchForm();
+          });
         });
       }
     },
@@ -826,7 +759,7 @@ export default {
     saveCourse() {
       //debugger;
       var url = CORE_API + "/CourseSpeciatly/addCourse/" + this.speciatlyId;
-      this.$http.post(url, this.courseList).then(
+      this.$httpWithMsg.post(url, this.courseList).then(
         () => {
           this.$notify({
             type: "success",

+ 68 - 190
src/modules/basic/view/user.vue

@@ -630,20 +630,9 @@ export default {
         true +
         "&rootOrgId=" +
         this.searchForm.rootOrgId;
-      this.$http
-        .post(url)
-        .then(response => {
-          this.roleList4Search = response.data;
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
-        });
+      this.$httpWithMsg.post(url).then(response => {
+        this.roleList4Search = response.data;
+      });
     },
     rootOrgChanged4InsertOrUpdate() {
       this.orgList4InsertOrUpdate = [];
@@ -654,21 +643,10 @@ export default {
         true +
         "&rootOrgId=" +
         this.userForm.rootOrgId;
-      this.$http
-        .post(url)
-        .then(response => {
-          this.roleList4InsertOrUpdate = response.data;
-          this.rolesChanged();
-        })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
-        });
+      this.$httpWithMsg.post(url).then(response => {
+        this.roleList4InsertOrUpdate = response.data;
+        this.rolesChanged();
+      });
     },
     getOrgList4InsertOrUpdate(query) {
       this.orgLoading4InsertOrUpdate = true;
@@ -679,20 +657,13 @@ export default {
           name: query,
           rootOrgId: this.userForm.rootOrgId
         });
-      this.$http
+      this.$httpWithMsg
         .get(url)
         .then(response => {
           this.orgList4InsertOrUpdate = response.data;
           this.orgLoading4InsertOrUpdate = false;
         })
-        .catch(response => {
-          if (response.status == 500) {
-            this.$notify({
-              showClose: true,
-              message: response.data.desc,
-              type: "error"
-            });
-          }
+        .catch(() => {
           this.orgLoading4InsertOrUpdate = false;
         });
     },
@@ -727,7 +698,7 @@ export default {
         this.pageSize +
         "?" +
         param;
-      this.$http.get(url).then(response => {
+      this.$httpWithMsg.get(url).then(response => {
         console.log(response);
         this.tableData = response.data.list;
         this.total = response.data.total;
@@ -804,22 +775,14 @@ export default {
       this.$refs.addingForm.validate(valid => {
         if (valid) {
           this.userForm.enable = this.enableStr == "true";
-          this.$http.post(url, this.userForm).then(
-            () => {
-              this.$notify({
-                type: "success",
-                message: "添加成功"
-              });
-              this.search();
-              this.addingDialog = false;
-            },
-            resp => {
-              this.$notify({
-                type: "error",
-                message: resp.body.desc
-              });
-            }
-          );
+          this.$httpWithMsg.post(url, this.userForm).then(() => {
+            this.$notify({
+              type: "success",
+              message: "添加成功"
+            });
+            this.search();
+            this.addingDialog = false;
+          });
         } else {
           return false;
         }
@@ -831,22 +794,14 @@ export default {
       this.$refs.updateForm.validate(valid => {
         if (valid) {
           this.userForm.enable = this.enableStr == "true";
-          this.$http.put(url, this.userForm).then(
-            () => {
-              this.$notify({
-                type: "success",
-                message: "添加成功"
-              });
-              this.search();
-              this.updateDialog = false;
-            },
-            resp => {
-              this.$notify({
-                type: "error",
-                message: resp.body.desc
-              });
-            }
-          );
+          this.$httpWithMsg.put(url, this.userForm).then(() => {
+            this.$notify({
+              type: "success",
+              message: "添加成功"
+            });
+            this.search();
+            this.updateDialog = false;
+          });
         } else {
           return false;
         }
@@ -861,24 +816,13 @@ export default {
       })
         .then(() => {
           var url = CORE_API + "/user/resetPass/" + row.id;
-          this.$http
-            .put(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "重置成功!"
-              });
-              this.search();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "重置成功!"
             });
+            return this.search();
+          });
         })
         .catch(e => console.log(e));
     },
@@ -890,24 +834,13 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/user/" + row.id;
-        this.$http
-          .delete(url)
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "删除成功!"
-            });
-            this.search();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.delete(url).then(() => {
+          this.$notify({
+            type: "success",
+            message: "删除成功!"
           });
+          return this.search();
+        });
       });
     },
     //删除多条数据
@@ -924,24 +857,13 @@ export default {
           type: "error"
         }).then(() => {
           var url = CORE_API + "/user/" + this.userIds;
-          this.$http
-            .delete(url)
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "删除成功!"
-              });
-              this.search();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.delete(url).then(() => {
+            this.$notify({
+              type: "success",
+              message: "删除成功!"
             });
+            this.search();
+          });
         });
       }
     },
@@ -959,24 +881,13 @@ export default {
           type: "warning"
         }).then(() => {
           var url = CORE_API + "/user/enable/" + this.userIds;
-          this.$http
-            .put(url, {})
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "开启成功!"
-              });
-              this.search();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url, {}).then(() => {
+            this.$notify({
+              type: "success",
+              message: "开启成功!"
             });
+            return this.search();
+          });
         });
       }
     },
@@ -987,24 +898,13 @@ export default {
         type: "warning"
       }).then(() => {
         var url = CORE_API + "/user/enable/" + row.id;
-        this.$http
-          .put(url, {})
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "开启成功!"
-            });
-            this.search();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.put(url, {}).then(() => {
+          this.$notify({
+            type: "success",
+            message: "开启成功!"
           });
+          this.search();
+        });
       });
     },
     //禁用
@@ -1021,24 +921,13 @@ export default {
           type: "error"
         }).then(() => {
           var url = CORE_API + "/user/disable/" + this.userIds;
-          this.$http
-            .put(url, {})
-            .then(() => {
-              this.$notify({
-                type: "success",
-                message: "禁用成功!"
-              });
-              this.search();
-            })
-            .catch(response => {
-              if (response.status == 500) {
-                this.$notify({
-                  showClose: true,
-                  message: response.data.desc,
-                  type: "error"
-                });
-              }
+          this.$httpWithMsg.put(url, {}).then(() => {
+            this.$notify({
+              type: "success",
+              message: "禁用成功!"
             });
+            this.search();
+          });
         });
       }
     },
@@ -1050,24 +939,13 @@ export default {
         type: "error"
       }).then(() => {
         var url = CORE_API + "/user/disable/" + row.id;
-        this.$http
-          .put(url, {})
-          .then(() => {
-            this.$notify({
-              type: "success",
-              message: "禁用成功!"
-            });
-            this.search();
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
+        this.$httpWithMsg.put(url, {}).then(() => {
+          this.$notify({
+            type: "success",
+            message: "禁用成功!"
           });
+          this.search();
+        });
       });
     },
 

+ 4 - 6
src/modules/examwork/view/examInfo.vue

@@ -55,18 +55,16 @@
         <!-- 弹出窗口 -->
         <el-dialog
           title="请选择考试类型"
-          width="600px"
+          width="650px"
           :visible.sync="examInfoDialog"
         >
-          <el-button-group>
+          <div>
             <el-button @click="toTradition">传统考试</el-button>
             <el-button @click="toOnline">网络考试</el-button>
             <el-button @click="toPractice">练习考试</el-button>
             <el-button @click="toOffline">离线考试</el-button>
-            <el-button @click="toPrint">
-              分布式印刷考试</el-button
-            ></el-button-group
-          >
+            <el-button @click="toPrint"> 分布式印刷考试</el-button>
+          </div>
           <div style="margin-top: 10px;text-align: center;">
             <el-button type="primary" @click="examInfoDialog = false"
               >取 消</el-button

+ 2 - 3
src/modules/oe/views/absent.vue

@@ -18,14 +18,13 @@
         >
       </el-col>
       <el-row>
-        <el-col>
+        <el-col v-show="currentPagePrivileges.ABSENT_EXPORT">
           <div class="block-seperator"></div>
           <span>批量操作:</span>
           <commonExportVue
             :form="form"
             :exportUrl="exportUrl"
             :exportFileName="exportFileName"
-            v-show="currentPagePrivileges.ABSENT_EXPORT"
           ></commonExportVue>
         </el-col>
       </el-row>
@@ -64,7 +63,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page.sync="form.pageNo"
-          :page-sizes="[10, 30, 50, 100]"
+          :page-sizes="[10, 20, 50, 100]"
           :page-size="form.pageSize"
           layout="total, sizes, prev, pager, next, jumper"
           :total="total"

+ 2 - 2
src/modules/oe/views/alreadyAudited.vue

@@ -66,7 +66,7 @@
           </el-col>
         </el-row>
       </commonFormVue>
-      <el-col :span="8">
+      <el-col :span="24">
         <el-button
           @click="search"
           size="small"
@@ -163,7 +163,7 @@
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"

+ 4 - 7
src/modules/oe/views/awaitingAudit.vue

@@ -81,7 +81,7 @@
           </el-col>
         </el-row>
       </commonFormVue>
-      <el-col :span="8">
+      <el-col :span="24">
         <el-button
           @click="search"
           size="small"
@@ -116,13 +116,10 @@
         </el-button>
       </el-col>
       <el-row>
-        <el-col>
+        <el-col v-show="currentPagePrivileges.PANEING_BATCHAUDIT">
           <div class="block-seperator"></div>
           <span>批量操作:</span>
-          <el-dropdown
-            class="button_left"
-            v-show="currentPagePrivileges.PANEING_BATCHAUDIT"
-          >
+          <el-dropdown class="button_left">
             <el-button size="small" type="primary">
               批量审核 <i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
@@ -277,7 +274,7 @@
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"

+ 7 - 8
src/modules/oe/views/captureDetail.vue

@@ -253,7 +253,6 @@ export default {
       this.$router.back();
     },
     disciplineTypeFilter: function(value) {
-      debugger;
       if (value && value.indexOf("&&") > -1) {
         var arr = value.split("&&");
         var detail = "";
@@ -269,13 +268,13 @@ export default {
   created() {
     this.examRecordDataId = this.$route.params.examRecordDataId;
     var fromPage = this.$route.params.from;
-    if (fromPage == "awaitingAudit") {
-      this.currentPaths = ["监考待审", "抓拍详情"];
-    } else if (fromPage == "alreadyAudited") {
-      this.currentPaths = ["监考已审", "抓拍详情"];
-    } else if (fromPage == "examDetail") {
-      this.currentPaths = ["考试明细", "抓拍详情"];
-    }
+    var currentPathJson = {
+      illegalityNameList: ["违纪名单", "抓拍详情"],
+      awaitingAudit: ["监考待审", "抓拍详情"],
+      alreadyAudited: ["监考已审", "抓拍详情"],
+      examDetail: ["考试明细", "抓拍详情"]
+    };
+    this.currentPaths = currentPathJson[fromPage];
     this.getExamAuditData();
     this.listExamCapture();
   }

+ 3 - 4
src/modules/oe/views/examDetail.vue

@@ -38,7 +38,7 @@
           </el-col>
         </el-row>
       </commonFormVue>
-      <el-col :span="8">
+      <el-col :span="24">
         <el-button
           @click="search"
           size="small"
@@ -73,11 +73,10 @@
         </el-button>
       </el-col>
       <el-row>
-        <el-col>
+        <el-col v-show="currentPagePrivileges.EXAM_DETAIL_EXPORT">
           <div class="block-seperator"></div>
           <span>批量操作:</span>
           <commonExportVue
-            v-show="currentPagePrivileges.EXAM_DETAIL_EXPORT"
             :form="form"
             :exportUrl="exportUrl"
             :exportFileName="exportFileName"
@@ -180,7 +179,7 @@
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"

+ 6 - 4
src/modules/oe/views/examScheduling.vue

@@ -43,7 +43,7 @@
           </el-col>
         </el-row>
       </commonFormVue>
-      <el-col :span="8">
+      <el-col :span="24">
         <el-button
           @click="search"
           size="small"
@@ -77,11 +77,13 @@
         >
       </el-col>
       <el-row>
-        <el-col :span="24">
+        <el-col
+          :span="24"
+          v-show="currentPagePrivileges.EXAM_PARTICULARS_EXPORT"
+        >
           <div class="block-seperator"></div>
           <span>批量操作:</span>
           <commonExportVue
-            v-show="currentPagePrivileges.EXAM_PARTICULARS_EXPORT"
             :form="form"
             :exportUrl="exportUrl"
             :exportFileName="exportFileName"
@@ -181,7 +183,7 @@
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"

+ 11 - 4
src/modules/oe/views/illegalityNameList.vue

@@ -39,8 +39,13 @@
           >
             重置
           </el-button>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col v-show="currentPagePrivileges.BREACH_THE_PRINCIPLE_EXPORT">
+          <div class="block-seperator"></div>
+          <span>批量操作:</span>
           <commonExportVue
-            v-show="currentPagePrivileges.BREACH_THE_PRINCIPLE_EXPORT"
             :form="form"
             :exportUrl="exportUrl"
             :exportFileName="exportFileName"
@@ -104,12 +109,12 @@
             <el-table-column sortable label="违纪类型" prop="disciplineType">
             </el-table-column>
           </el-table>
-          <div class="block">
+          <div class="block pull-right">
             <el-pagination
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"
@@ -243,7 +248,9 @@ export default {
       this.search();
     },
     gotoCaptureDetail(examRecordDataId) {
-      this.$router.push({ path: "/oe/captureDetail/" + examRecordDataId });
+      this.$router.push({
+        path: "/oe/captureDetail/" + examRecordDataId + "/illegalityNameList"
+      });
     },
     backFill() {
       var formData = this.$route.query;

+ 2 - 2
src/modules/oe/views/reexamine.vue

@@ -49,12 +49,12 @@
               </template>
             </el-table-column>
           </el-table>
-          <div class="block">
+          <div class="block pull-right">
             <el-pagination
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"

+ 2 - 2
src/modules/oe/views/scoreStatistics.vue

@@ -33,7 +33,7 @@
       </el-row>
 
       <el-row>
-        <el-col :span="24">
+        <el-col :span="24" v-show="currentPagePrivileges.SCORE_STATICS_EXPORT">
           <div class="block-seperator"></div>
           <span>批量操作:</span>
           <el-button
@@ -104,7 +104,7 @@
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page.sync="form.pageNo"
-              :page-sizes="[10, 30, 50, 100]"
+              :page-sizes="[10, 20, 50, 100]"
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"

+ 1 - 1
src/modules/portal/store/currentPaths.js

@@ -1,4 +1,4 @@
-export const UPDATE_CURRENT_PATHS = "UPDATE_CURRENT_PATHS"; //退出登录
+export const UPDATE_CURRENT_PATHS = "UPDATE_CURRENT_PATHS";
 
 export default {
   state: [],

+ 12 - 0
src/modules/portal/store/menuList.js

@@ -0,0 +1,12 @@
+export const UPDATE_MENU_LIST = "UPDATE_MENU_LIST";
+
+export default {
+  state: [],
+  mutations: {
+    [UPDATE_MENU_LIST](state, menuList) {
+      console.log(state, menuList);
+      state.length = 0;
+      state.push(...menuList);
+    }
+  }
+};

+ 2 - 2
src/modules/portal/views/home/Home.vue

@@ -2,10 +2,10 @@
   <el-container>
     <el-header style="padding: 0;">
       <el-menu class="el-menu" mode="horizontal">
-        <el-menu-item index="1" style=" width: 200px;">
+        <el-menu-item index="1" style="width: 200px;">
           <router-link
             to="/home/overview"
-            style="font-size: 20px; line-height: 24px; width: 100%; text-decoration-line: none"
+            style="display: inline-block; font-size: 20px; line-height: 48px; width: 100%; text-decoration-line: none"
             title="回到主页"
           >
             云平台主页

+ 3 - 1
src/modules/portal/views/home/HomeSide.vue

@@ -110,6 +110,7 @@ const routesToMenu = [
 
 import { mapMutations } from "vuex";
 import { UPDATE_CURRENT_PATHS } from "../../store/currentPaths";
+import { UPDATE_MENU_LIST } from "../../store/menuList";
 
 export default {
   name: "HomeSide",
@@ -129,7 +130,7 @@ export default {
     }
   },
   methods: {
-    ...mapMutations([UPDATE_CURRENT_PATHS]),
+    ...mapMutations([UPDATE_CURRENT_PATHS, UPDATE_MENU_LIST]),
     toggoleSidebar() {
       this.isCollapse = !this.isCollapse;
     },
@@ -170,6 +171,7 @@ export default {
     const groupCode = this.group && this.group.groupCode;
     if (groupCode) {
       this.menuList = await this.getUserPrivileges(groupCode);
+      this.UPDATE_MENU_LIST(this.menuList);
       this.updatePath();
     }
   },

+ 46 - 23
src/modules/portal/views/tips/Tips.vue

@@ -3,25 +3,18 @@
     <div class=""><img src="./tips.jpg" /></div>
     <div class="text">
       <div v-for="(menu1, index) in instructions" :key="index" class="menu1">
-        <h4>{{ menu1.menu1Name }}</h4>
+        <h4 v-if="menu1.menu2.filter(m => m.canAccess).length > 0">
+          {{ menu1.menu1Name }}
+        </h4>
         <div v-for="(menu2, index) in menu1.menu2" :key="index" class="menu1">
-          <span class="link">{{ menu2.name }}</span> {{ menu2.detail }}
+          <span v-if="menu2.canAccess">
+            <router-link :to="menu2.link" class="link">
+              {{ menu2.name }}
+            </router-link>
+            {{ menu2.detail }}
+          </span>
         </div>
       </div>
-      <!-- <div class="menu1">
-        <h4>学习中心查询</h4>
-        <div>
-          <span class="link">机构管理——中心列表</span>
-          查询学校下属所有学习中心编码及名称,可按学习中心设置学习中心平台权限,即A学习中心只能查询A中心的相关考试数据。
-        </div>
-      </div>
-      <div>
-        <h4>课程查询</h4>
-        <div>
-          <span class="link">课程管理——课程列表</span>
-          查看所有课程名称及代码,如一门课程即有专科又有本科,课程对应在的教材、试卷不一样时,需要建立专科课程及本科课程。
-        </div>
-      </div> -->
     </div>
   </section>
 </template>
@@ -34,7 +27,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "机构管理——中心列表",
-          // link: "/basic/campus",
+          link: "/basic/campus",
           detail:
             "查询学校下属所有学习中心编码及名称,可按学习中心设置学习中心平台权限,即A学习中心只能查询A中心的相关考试数据。"
         }
@@ -45,7 +38,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "课程管理——课程列表",
-          // link: "/basic/campus",
+          link: "/basic/course",
           detail:
             "查看所有课程名称及代码,如一门课程即有专科又有本科,课程对应在的教材、试卷不一样时,需要建立专科课程及本科课程。"
         }
@@ -56,7 +49,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "用户管理——普通用户管理",
-          // link: "/basic/campus",
+          link: "/basic/user",
           detail:
             "添加、查询、禁用管理平台用户,并可以针对不同用户设置不同的平台模块权限。"
         }
@@ -69,7 +62,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "考试管理——考试信息",
-          // link: "/basic/campus",
+          link: "/examwork/examInfo",
           detail: "安排一场在线考试,设置考试开启、结束时间。"
         }
       ]
@@ -154,9 +147,19 @@ const ALL_INSTRUCTIONS = {
       menu1Name: "考试完成进度查询",
       menu2: [
         {
-          name: "考试进度——考试概览/考试进度详情",
+          name: "考试进度——考试概览",
           // link: "/oe/campus",
-          detail: "可以查看按考试的人数、学习中心、课程数来查看考试完成的进度。"
+          detail: "可以查看按考试、学习中心、课程数来查看考试完成的进度。"
+        }
+      ]
+    },
+    {
+      menu1Name: "考试完成进度查询",
+      menu2: [
+        {
+          name: "考试进度——考试进度详情",
+          // link: "/oe/campus",
+          detail: "可以查看按考试的人数、学习中心、查看考生的完成情况。"
         }
       ]
     }
@@ -167,6 +170,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "项目管理——项目列表",
+          link: "/print/project/list",
           detail:
             "查询学校下传统考试的统计概况信息,如考生人数,试卷数、试卷印刷数量等相关数据。"
         }
@@ -174,6 +178,9 @@ const ALL_INSTRUCTIONS = {
     }
   ]
 };
+
+import { mapState } from "vuex";
+
 export default {
   name: "Tips",
   data() {
@@ -181,10 +188,26 @@ export default {
       instructions: []
     };
   },
-  computed: {},
+  computed: { ...mapState({ menuList: state => state.menuList }) },
   methods: {},
   created() {
     this.instructions = ALL_INSTRUCTIONS[this.$route.path];
+  },
+  watch: {
+    menuList() {
+      const tipsLink = this.menuList.map(m => m.ext5);
+      this.instructions.map(menu => {
+        menu.menu2 = menu.menu2.map(m => {
+          if (tipsLink.includes(m.link)) {
+            m.canAccess = true;
+          } else {
+            m.canAccess = false;
+          }
+          return m;
+        });
+        return menu;
+      });
+    }
   }
 };
 </script>

+ 24 - 11
src/plugins/axios.js

@@ -2,6 +2,8 @@ import Vue from "vue";
 import axios from "axios";
 import router from "../router";
 
+const ERROR_MSG_CONFIG = require("./errorMsgConfig").default;
+
 // Full config:  https://github.com/axios/axios#request-config
 // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
 // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
@@ -145,18 +147,29 @@ _axios.interceptors.response.use(
 
     if (status != 200) {
       const data = error.response.data;
-      if (data && data.desc) {
-        Vue.prototype.$notify({
-          showClose: true,
-          message: data.desc,
-          type: "error"
-        });
+      if (ERROR_MSG_CONFIG.map(v => v.code).includes(data.code)) {
+        const MSG = ERROR_MSG_CONFIG.find(v => v.code === data.code);
+        if (MSG.display) {
+          Vue.prototype.$notify({
+            showClose: true,
+            message: MSG.message,
+            type: "error"
+          });
+        }
       } else {
-        Vue.prototype.$notify({
-          showClose: true,
-          message: "未定义异常: " + JSON.stringify(data, 2),
-          type: "error"
-        });
+        if (data && data.desc) {
+          Vue.prototype.$notify({
+            showClose: true,
+            message: data.desc,
+            type: "error"
+          });
+        } else {
+          Vue.prototype.$notify({
+            showClose: true,
+            message: "未定义异常: " + JSON.stringify(data, 2),
+            type: "error"
+          });
+        }
       }
       return Promise.reject(error);
     }

+ 7 - 0
src/plugins/errorMsgConfig.js

@@ -0,0 +1,7 @@
+export default [
+  {
+    code: "B-001-example",
+    display: false,
+    message: ""
+  }
+];

+ 3 - 1
src/store.js

@@ -2,6 +2,7 @@ import Vue from "vue";
 import Vuex from "vuex";
 import user from "./modules/portal/store/user";
 import currentPaths from "./modules/portal/store/currentPaths";
+import menuList from "./modules/portal/store/menuList";
 
 Vue.use(Vuex);
 
@@ -11,6 +12,7 @@ export default new Vuex.Store({
   actions: {},
   modules: {
     user,
-    currentPaths
+    currentPaths,
+    menuList
   }
 });