|
|
@@ -102,6 +102,8 @@ import { useRouter, useRoute } from "vue-router";
|
|
102
|
102
|
import { useDict } from "@/hooks/dict";
|
|
103
|
103
|
// import { closeTagAndOpenLastTag } from '@/router/Routermethods';
|
|
104
|
104
|
import store from "@/store";
|
|
|
105
|
+import { useGetters } from "@/hooks/storeHooks";
|
|
|
106
|
+const { access_token } = useGetters(["access_token"])
|
|
105
|
107
|
|
|
106
|
108
|
const { indound_type, is_available } = useDict("indound_type", "is_available");
|
|
107
|
109
|
const router = useRouter();
|
|
|
@@ -111,7 +113,7 @@ const data = reactive({
|
|
111
|
113
|
auditData: [],
|
|
112
|
114
|
isShow: false,
|
|
113
|
115
|
fileUrl: "/admin/sysFile/uploadVoucher",
|
|
114
|
|
- myHeader: { Authorization: "Bearer " + sessionStorage.getItem("access_token") }
|
|
|
116
|
+ myHeader: { Authorization: "Bearer " + access_token.value }
|
|
115
|
117
|
});
|
|
116
|
118
|
let page = reactive({
|
|
117
|
119
|
currentPage: 1,
|
|
|
@@ -240,7 +242,7 @@ const fileDownload = (filePart: any, fileName: string) => {
|
|
240
|
242
|
var xhr = new XMLHttpRequest();
|
|
241
|
243
|
var formData = new FormData();
|
|
242
|
244
|
xhr.open("get", "/admin/sysFile/" + filePart);
|
|
243
|
|
- xhr.setRequestHeader("Authorization", "Bearer " + sessionStorage.getItem("access_token"));
|
|
|
245
|
+ xhr.setRequestHeader("Authorization", "Bearer " + access_token.value);
|
|
244
|
246
|
xhr.responseType = "blob";
|
|
245
|
247
|
xhr.onload = function (e) {
|
|
246
|
248
|
if (this.status == 200) {
|