|
|
@@ -72,6 +72,7 @@
|
|
|
<el-col :span="12" style="text-align: right;">
|
|
|
<el-upload
|
|
|
:action="uploadUrl"
|
|
|
+ :headers="headers"
|
|
|
:file-list="[]"
|
|
|
:on-progress="handleProgress"
|
|
|
:before-upload="beforeUpload"
|
|
|
@@ -143,6 +144,7 @@
|
|
|
import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial, exportMaterial } from "@/api/store/material";
|
|
|
import { getAllMaterialGroup,listMaterialGroup, getMaterialGroup, delMaterialGroup, addMaterialGroup, updateMaterialGroup, exportMaterialGroup } from "@/api/store/materialGroup";
|
|
|
import { Loading } from 'element-ui';
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
export default {
|
|
|
name: 'ImageSelect',
|
|
|
props: {
|
|
|
@@ -206,6 +208,13 @@ export default {
|
|
|
urls: []
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ headers() {
|
|
|
+ return {
|
|
|
+ Authorization: "Bearer " + getToken(),
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted(){
|
|
|
this.getAllMaterialGroup();
|
|
|
},
|