优化
This commit is contained in:
1
ruoyi/uploadPath/appResource/html/index.css
Normal file
1
ruoyi/uploadPath/appResource/html/index.css
Normal file
File diff suppressed because one or more lines are too long
61667
ruoyi/uploadPath/appResource/html/index.full.js
Normal file
61667
ruoyi/uploadPath/appResource/html/index.full.js
Normal file
File diff suppressed because one or more lines are too long
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
18096
ruoyi/uploadPath/appResource/html/vue.global.js
Normal file
18096
ruoyi/uploadPath/appResource/html/vue.global.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user