WXL (wul)
5 天以前 39c8b288ec8294e026459dfb1955f0bbc49ebb52
src/views/patient/archives/components/OutpatientPicker.vue
@@ -61,7 +61,7 @@
<script>
import { listPatouthosp } from "@/api/smartor/patouthosp";
import { loadArchives, saveArchives, buildArchiveRecord } from "../types";
import { createArchive } from "../apiAdapter";
import store from "@/store";
export default {
@@ -124,12 +124,14 @@
    },
    handleConfirm() {
      if (!this.currentRow) return;
      const record = buildArchiveRecord(this.currentRow, this.type, this.sourcePage);
      const all = loadArchives();
      all.push(record);
      saveArchives(all);
      this.dialogVisible = false;
      this.$emit("picked", record);
      this.loading = true;
      createArchive(this.currentRow, this.type, this.sourcePage || "outpatient")
        .then((record) => {
          this.dialogVisible = false;
          this.$emit("picked", record);
        })
        .catch(() => {})
        .finally(() => { this.loading = false; });
    },
    handleClose() {
      this.currentRow = null;