@@ -53,3 +53,7 @@ export function saveOrg({
);
return httpApp.post("/api/admin/org/save", { ...data, logo });
}
+
+export function syncOrg() {
+ return httpApp.post("/api/admin/sys/sync/org?");
+}
@@ -29,6 +29,7 @@
@click="add"
>新增</el-button
>
+ <el-button type="primary" @click="toSync">同步</el-button>
<!-- <el-button>导入</el-button> -->
</div>
@@ -102,7 +103,7 @@
</template>
<script>
-import { searchOrgs, toggleEnableOrg } from "../../../api/system-org";
+import { searchOrgs, toggleEnableOrg, syncOrg } from "../../../api/system-org";
import OrgManagementDialog from "./OrgManagementDialog";
export default {
@@ -165,6 +166,9 @@ export default {
});
this.searchForm();
},
+ async toSync() {
+ await syncOrg();
+ },
};
</script>