WANG 6 years ago
parent
commit
aa3a4f36b5
1 changed files with 20 additions and 1 deletions
  1. 20 1
      src/modules/examwork/view/offlineExamOrgSettings.vue

+ 20 - 1
src/modules/examwork/view/offlineExamOrgSettings.vue

@@ -238,7 +238,26 @@ export default {
           this.loadingOrg4InsertOrUpdate = false;
         });
     },
-    updateOrgSetting() {},
+    updateOrgSetting() {
+      this.orgSetting.beginTime = this.orgSettingDatetimeRange[0];
+      this.orgSetting.endTime = this.orgSettingDatetimeRange[1];
+      this.$refs.orgSettingForm.validate(valid => {
+        if (valid) {
+          let url = EXAM_WORK_API + "/exam/examOrgSettings";
+          this.$http.post(url, this.orgSetting).then(response => {
+            console.log(response);
+            this.$notify({
+              type: "success",
+              message: "保存成功"
+            });
+            this.search();
+            this.updateOrgSettingDialog = false;
+          });
+        } else {
+          return false;
+        }
+      });
+    },
     back() {
       this.$router.push({ path: "/examwork/examInfo" });
     },