diff --git a/src/views/ea/electronicContracts/index.vue b/src/views/ea/electronicContracts/index.vue index 0db22561..31ab5659 100644 --- a/src/views/ea/electronicContracts/index.vue +++ b/src/views/ea/electronicContracts/index.vue @@ -345,7 +345,12 @@ width="1000px" append-to-body > - + + +
将文件拖到此处,或点击上传
+
+ @@ -485,9 +490,9 @@ - + @@ -573,6 +578,7 @@ import { listSimpleDepts } from "@/api/system/dept"; import { listSimplePosts } from "@/api/system/post"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; +import { getAccessToken, getTenantId } from "@/utils/auth"; export default { name: "ElectronicContracts", @@ -589,6 +595,15 @@ export default { value: "pId", multiple: false, }, + imgType: ".jpeg, .jpg, .png .doc, .xls, .txt, .pdf, .png, .ofd ", + uploadUrl: + process.env.VUE_APP_BASE_API + + "/admin-api/accounting/attachment/upload", // 上传地址地址 + headers: { + Authorization: "Bearer " + getAccessToken(), + "tenant-id": getTenantId(), + }, // 设置上传的请求头 + fileList: [], // 文件列表 getFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/", imgs: null, // 部门树选项 @@ -743,6 +758,11 @@ export default { handleCompanyChange(val) { this.form.companyId = val.id; this.form.company = val.organizationName; + }, + // 上传成功的函数 + handleSuccess(res) { + console.log(res); + this.form.contractAttachment = res.data.url; }, /** * 文件预览