diff --git a/src/pages/mediation-page/components/LayoutContent.vue b/src/pages/mediation-page/components/LayoutContent.vue index 6356110..1422c9a 100644 --- a/src/pages/mediation-page/components/LayoutContent.vue +++ b/src/pages/mediation-page/components/LayoutContent.vue @@ -208,24 +208,25 @@
-
- 案件材料 - 上传案件材料 -
-
- -
- 预览 - 删除 - 下载 -
-
+ + + + + + + + + + + + + + + + + + +
@@ -361,33 +362,7 @@
-
- - 上传案件材料 - -
-
- 材料类型 - 文件 - 操作人 - 操作时间 - 操作 -
- -
- 起诉状 - dsadasdsadada.pdf - 张三 - 2024-09-09 12:12:12 - - 预览 - 删除 - 文件下载 - -
- -
+
@@ -420,27 +395,24 @@
- - + + \ No newline at end of file diff --git a/src/pages/mediation-page/components/caseMaterialLeft.vue b/src/pages/mediation-page/components/caseMaterialLeft.vue new file mode 100644 index 0000000..16c6b72 --- /dev/null +++ b/src/pages/mediation-page/components/caseMaterialLeft.vue @@ -0,0 +1,168 @@ + + + + + \ No newline at end of file diff --git a/src/services/caseMaterial.js b/src/services/caseMaterial.js index 0fe3ffa..57c898a 100644 --- a/src/services/caseMaterial.js +++ b/src/services/caseMaterial.js @@ -1,5 +1,5 @@ import service from "./index"; -const api = '/mediate/cases/caseFile/' +const api = '/mediate/api/cases/caseFile/' // caseMaterial const apiCaseMaterial = { // 列表 diff --git a/src/services/fetchApi.js b/src/services/fetchApi.js index 072e92b..2345d25 100644 --- a/src/services/fetchApi.js +++ b/src/services/fetchApi.js @@ -34,7 +34,14 @@ const fetchApi = { getMinioToken(data) { return service.service.post(`${apiAdmin}minio/getMinioToken`, data) }, - //========================end::上传相关====================================== - + //========================end::上传相关====================================== + // 文件下载 + downFile: data => { + return service.service.post(`${apiAdmin}upload/down`, data) + }, + // 文件预览 + viewFile: data => { + return service.postFile(`${apiAdmin}upload/view`, data) + }, } export default fetchApi; diff --git a/src/utils/util.js b/src/utils/util.js index 43f8980..b71883a 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -15,18 +15,18 @@ const util = { * @param filename {String} 文件名称 */ downloadFileByBlob: (data, filename) => { - console.log(111111) - // if (!data) { - // console.log(123) - // return false; - // } + // console.log(111111) + if (!data) { + // console.log(123) + return false; + } if (!!window.ActiveXObject || "ActiveXObject" in window) { window.navigator.msSaveOrOpenBlob(new Blob([data]), filename); console.log(22222) } else { console.log(33333) const url = window.URL.createObjectURL(new Blob([data])); - console.log('下载',url) + // console.log('下载',url) const link = document.createElement("a"); link.style.display = "none"; link.href = url; @@ -169,6 +169,7 @@ const util = { }, // 验证图片类型 reg_img(fileUrl) { + console.log(fileUrl,'---fileUrl') if(fileUrl==null||fileUrl=='') { return fileUrl }