![]()
+
+
+
+
+
+
已选择 {{ selectNum }}
+
+ 条案例
+
已导入
+ {{ state.caseTitleList.length }} 条案例
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title.length > 6 ? item.title.slice(0, 6) + '...' : item.title }}
+
+
+
+
+
+
+ {{ item.title.length > 6 ? item.title.slice(0, 6) + '...' : item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传文件
+
+
+
支持文件格式:.xls/.xlsx
+
+
+
+ {{ state.fileName }}
+ {{
+ {
+ done: "上传完成",
+ uploading: "正在上传",
+ error: "上传失败",
+ removed: "正在上传",
+ }[state.status] }}
+
+
+
+
+
导入 {{ state.totalNum }} 条,成功 {{ state.successNum }} 条,失败 {{ state.failNum
+ }}
+ 条。
+
+
+ 下载失败数据
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/hooks/useDownload.js b/src/hooks/useDownload.js
new file mode 100644
index 00000000..7bd04a3c
--- /dev/null
+++ b/src/hooks/useDownload.js
@@ -0,0 +1,33 @@
+import http from "@/api/configSys";
+/**
+ * @param {String} url [请求的url地址]
+ * @param {Object} params [参数]
+ * @param {String} fileName [导出文件名称] 默认值 导出文件
+ * @param {String} fileType [导出文件类型] 默认值 xls
+ * @param {string} mimeType [导出文件类型]
+ */
+const useDownload = (url, params = {}, fileName = '导出文件', fileType = 'xls', mimeType = 'application/vnd.ms-excel;charset=UTF-8') => {
+ return new Promise((resolve, reject) => {
+ http.post(url, params, { responseType: 'blob' })
+ .then(res => {
+ resolve(res.data);
+ if (!res.data) {
+ return
+ }
+ const link = document.createElement('a');// 创建a标签
+ let blob = new Blob([res.data], { type: mimeType }); // 设置文件类型
+ link.style.display = "none";
+ link.href = URL.createObjectURL(blob); // 创建URL
+ link.setAttribute("download", `${fileName}.${fileType}`);
+ document.body.appendChild(link);
+ link.click();
+ URL.revokeObjectURL(link.href);
+ document.body.removeChild(link);
+ })
+ .catch(err => {
+ reject(err.data);
+ })
+ });
+}
+
+export default useDownload
\ No newline at end of file
diff --git a/src/views/case/CaseManage.vue b/src/views/case/CaseManage.vue
index 58b58328..5521049a 100644
--- a/src/views/case/CaseManage.vue
+++ b/src/views/case/CaseManage.vue
@@ -17,7 +17,7 @@
frameborder="0"
name="myframe"
security="restricted"
- sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
+ sandbox="allow-forms allow-scripts allow-same-origin allow-popups allow-downloads"
>
diff --git a/src/views/case/CaseRecommended.vue b/src/views/case/CaseRecommended.vue
new file mode 100644
index 00000000..470b834c
--- /dev/null
+++ b/src/views/case/CaseRecommended.vue
@@ -0,0 +1,779 @@
+
+