This commit is contained in:
zt
2025-03-25 18:27:39 +08:00
parent 1531913a43
commit 489300abe3
9 changed files with 79902 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,10 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>文件上传管理系统</title>
<link
rel="stylesheet"
href="https://unpkg.com/element-plus/dist/index.css"
/>
<link rel="stylesheet" href="./index.css" />
<style>
.container {
display: flex;
@ -116,7 +113,7 @@
</div>
<!-- 右侧上传面板 -->
<div class="right-panel">
<div v-loading="uploadLoading" class="right-panel">
<h3 style="margin-bottom: 15px">文件上传区域</h3>
<el-upload
ref="uploadRef"
@ -145,6 +142,7 @@
class="submit-btn"
@click="submitUpload"
:disabled="!uploadFile"
:loading="uploadLoading"
>
确认上传
</el-button>
@ -152,8 +150,8 @@
</div>
</div>
</body>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://unpkg.com/element-plus/dist/index.full.js"></script>
<script src="./vue.global.js"></script>
<script src="./index.full.js"></script>
<script>
const { createApp } = Vue;
@ -166,6 +164,7 @@
currentList: [],
userIds: [],
loading: false,
uploadLoading: false,
listStatusText: "请先选择主题",
userId: "",
checkAll: false,
@ -180,7 +179,7 @@
// 获取 URL 中的 userId 参数
const urlParams = new URLSearchParams(window.location.search);
this.userId = urlParams.get("userId");
console.log("userId", this.userId);
// console.log("userId", this.userId);
this.getRecruitList();
},
@ -257,12 +256,15 @@
// 提交上传
async submitUpload() {
if (!this.uploadFile) return;
if (this.themeOptions && this.themeOptions.length == 0) {
ElementPlus.ElMessage.error(`请先选择招工主题`);
return;
}
const formData = new FormData();
formData.append("file", this.uploadFile);
formData.append("recruitId", this.selectedTheme);
formData.append("userId", this.userId);
this.uploadLoading = true;
try {
const res = await this.ajaxRequest({
url: "/ruoyi/upload-zip",
@ -278,6 +280,8 @@
}
} catch (error) {
ElementPlus.ElMessage.error(`${error}`);
} finally {
this.uploadLoading = false;
}
},

File diff suppressed because it is too large Load Diff