This commit is contained in:
zt
2025-03-27 10:44:14 +08:00
parent 1972e3e4f4
commit 4027127dfd
64 changed files with 3303 additions and 135 deletions

View File

@ -32,7 +32,7 @@
.action-bar {
display: flex;
justify-content: space-between;
margin: 20px 0;
margin: 2px 0;
}
/* 拖拽上传区域样式 */
.upload-area {
@ -78,7 +78,6 @@
:value="item.value"
/>
</el-select>
<div class="action-bar">
<el-checkbox
v-model="checkAll"
@ -87,6 +86,16 @@
>
全选({{ userIds.length }}
</el-checkbox>
<el-checkbox
v-model="isFilter"
:disabled="isListEmpty"
@change="handleFilterChange"
>
筛选未上传的人员列表
</el-checkbox>
</div>
<div class="action-bar">
<div></div>
<el-button
type="primary"
@click="downloadTemplateFile"
@ -95,7 +104,6 @@
下载模板
</el-button>
</div>
<div v-loading="loading" class="checkbox-group">
<template v-if="currentList.length">
<el-checkbox
@ -170,8 +178,14 @@
checkAll: false,
isIndeterminate: false,
uploadFile: null,
isFilter: false,
};
},
computed: {
isListEmpty() {
return this.currentList.length === 0;
},
},
mounted() {
const protocol = window.location.protocol;
const host = window.location.host;
@ -213,7 +227,7 @@
this.loading = true;
try {
const response = await this.ajaxRequest({
url: `/ruoyi/app/bgt/apply/htmlList?recruitId=${val}`,
url: `/ruoyi/app/bgt/apply/htmlList?recruitId=${val}&isUpload=${this.isFilter}`,
method: "GET",
});
this.currentList = response.data;
@ -223,6 +237,25 @@
}
},
// 筛选未上传文件的人员列表
async handleFilterChange() {
if (this.isListEmpty) {
// 新增空列表判断
this.isFilter = false;
return;
}
this.loading = true;
try {
const response = await this.ajaxRequest({
url: `/ruoyi/app/bgt/apply/htmlList?recruitId=${this.selectedTheme}&isUpload=${this.isFilter}`,
method: "GET",
});
this.currentList = response.data;
this.userIds = [];
} finally {
this.loading = false;
}
},
// 文件超出限制处理
handleExceed(files) {
this.$refs.uploadRef.clearFiles();
@ -336,8 +369,14 @@
userIds(newVal) {
const total = this.currentList.length;
this.checkAll = newVal.length === total && total > 0;
this.isFilter = newVal.length === total && total > 0;
this.isIndeterminate = newVal.length > 0 && newVal.length < total;
},
currentList(newVal) {
if (newVal.length === 0) {
this.isFilter = false;
}
},
},
});
app.use(ElementPlus);