xiatian 3 年之前
父节点
当前提交
891b51d2b5
共有 1 个文件被更改,包括 15 次插入1 次删除
  1. 15 1
      src/modules/questions/views/School.vue

+ 15 - 1
src/modules/questions/views/School.vue

@@ -46,10 +46,15 @@
             >禁用</el-button
           >
         </div>
-        <div>
+        <!-- <div>
           <el-button type="primary" icon="icon icon-plus-white" @click="insert"
             >新增</el-button
           >
+        </div> -->
+        <div>
+          <el-button type="primary" icon="icon icon-plus-white" @click="syncOrg"
+            >同步</el-button
+          >
         </div>
       </div>
     </div>
@@ -434,6 +439,15 @@ export default {
     resetForm() {
       this.$refs.schoolForm.resetFields();
     },
+    syncOrg() {
+      var url = QUESTION_API + "/org/sync";
+      this.$httpWithMsg.put(url, this.schoolForm).then(() => {
+        this.$notify({
+          type: "success",
+          message: "操作成功",
+        });
+      });
+    },
     //提交
     submitForm() {
       this.$refs.schoolForm.validate((valid) => {