@@ -188,7 +188,8 @@ export default {
form: [],
setVisible: false,
curStep: 0,
- pass: 0
+ pass: 0,
+ curOriginForm: {},
};
},
components: {
@@ -268,6 +269,7 @@ export default {
},
// 显示设置页面
toSet (i) {
+ this.curOriginForm = JSON.parse(JSON.stringify(this.form[i]))
this.curStep = i
this.$parent.showBtns = false
this.setVisible = true
diff --git a/src/pages/match/manage/matchArchList.vue b/src/pages/match/manage/matchArchList.vue
index 2ed5446..2bc3d66 100644
--- a/src/pages/match/manage/matchArchList.vue
+++ b/src/pages/match/manage/matchArchList.vue
@@ -103,7 +103,11 @@
+ align="center">
+
+ {{ scope.row.submitTime ? scope.row.score : '--' }}
+
+
- {{ scope.row.reportId ? '查看成绩报告' : '未参加' }}
+
+ {{ scope.row.school }}
+ (已删除)
+
+
+ {{ scope.row.realSchool }}
+ (已删除)
+
-
上传文件
+ 建议文件数据在5000条以内,导入5000名学生大致需要10分钟
@@ -317,6 +330,11 @@
@click="showFaild">部分数据导入失败,查看失败原因
+
@@ -416,6 +434,7 @@ export default {
token: util.local.get(Setting.tokenKey)
},
diffSchool: false,
+ uploading: false,
};
},
watch: {
@@ -527,16 +546,18 @@ export default {
}).catch(res => { })
},
uploadSuccess ({ data, status }) {
+ this.uploading = false
this.uploadFaild = false
this.uploadTips = ''
if (status === 200) {
this.init()
+ const { tip } = data
if (data.exportCode) {
this.exportCode = data.exportCode
this.uploadFaild = true
- this.uploadTips = data.tip
+ this.uploadTips = tip
} else {
- util.successMsg(data.tip, 3000)
+ util[tip.includes('5000') ? 'errorMsg' : 'successMsg'](tip, 3000)
this.importVisible = false
this.keyWord = ''
}
@@ -545,12 +566,16 @@ export default {
}
},
uploadError (err, file, fileList) {
+ this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
+ beforeUpload (file) {
+ this.uploading = true
+ },
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`)
},
@@ -559,15 +584,12 @@ export default {
this.uploadFaild = false
},
cancelUpload () {
+ this.uploading = false
this.$refs.upload.abort()
this.init()
this.importVisible = false
this.keyWord = ''
},
- uploadSure () {
- this.importVisible = false
- this.keyWord = ''
- },
// 新增
add () {
this.diffSchool = false
@@ -601,6 +623,10 @@ export default {
.catch(() => {
});
},
+ // 学校选择回调
+ schoolChange () {
+ if (!this.form.studentAffiliatedInstitutionId) this.form.studentAffiliatedInstitutionId = this.form.schoolId
+ },
// 学号输入完回调。学校和学号都输入完后,调这个接口查询是否有存在的学生,如果有,才能继续输入,如果不能,不让添加
workNumberChange () {
const { form } = this
@@ -638,6 +664,7 @@ export default {
hrUserAccount: {
...form,
id: form.id,
+ lastTimeInstitutionId: this.originForm.studentAffiliatedInstitutionId
},
hrUserInfo: {
userId: form.userId,
diff --git a/src/pages/student/list/index.vue b/src/pages/student/list/index.vue
index e42a0ae..0c00889 100644
--- a/src/pages/student/list/index.vue
+++ b/src/pages/student/list/index.vue
@@ -664,31 +664,27 @@ export default {
});
},
getOrgStudentData () { // 根据组织架构筛选学生列表
- let params = {
+ this.$post(this.api.organizationalStudentList, {
architectureId: this.architectureId,
level: this.orgLevel,
keyWord: this.keyWord,
pageNum: this.page,
pageSize: this.pageSize
- };
- this.$post(this.api.organizationalStudentList, params).then(res => {
+ }).then(res => {
this.listData = res.page;
this.total = res.total;
- }).catch(err => {
- });
+ }).catch(err => { });
},
getData () { // 学生列表
- let data = {
+ this.$post(this.api.studentList, {
type: this.studentType,
keyWord: this.keyWord,
pageNum: this.page,
pageSize: this.pageSize
- };
- this.$post(this.api.studentList, data).then(res => {
+ }).then(res => {
this.listData = res.page;
this.total = res.total;
- }).catch(err => {
- });
+ }).catch(err => { });
},
currentChange (val) { // 切换页码
this.page = val;
@@ -715,21 +711,40 @@ export default {
this.getData();
},
delAllSelection () { // 批量删除
- const len = this.multipleSelection.length
- const list = len ? this.multipleSelection : this.listData
+ let list = this.multipleSelection
+ const len = list.length
this.$confirm(len ? '确定要删除选中学生吗?' : '是否要删除当前列表所有学生?', '提示', {
type: "warning"
- }).then(() => {
- this.$post(`${this.api.delStudent}?accountIds=${list.map(e => e.accountId).toString()}`).then(res => {
- this.multipleSelection = [];
- this.$refs.table.clearSelection();
- util.successMsg("删除成功");
+ }).then(async () => {
+ // 没有选,则查询所有数据再删
+ if (!len) {
if (this.studentType) {
- this.getData();
+ const { page } = await this.$post(this.api.studentList, {
+ type: this.studentType,
+ pageNum: 1,
+ pageSize: 1000
+ })
+ list = page;
} else {
- this.getOrgStudentData();
+ const { page } = await this.$post(this.api.organizationalStudentList, {
+ architectureId: this.architectureId,
+ level: this.orgLevel,
+ pageNum: 1,
+ pageSize: 1000
+ })
+ list = page;
}
- }).catch(res => { });
+ }
+
+ await this.$post(`${this.api.delStudent}?accountIds=${list.map(e => e.accountId).toString()}`)
+ this.multipleSelection = [];
+ this.$refs.table.clearSelection();
+ util.successMsg("删除成功");
+ if (this.studentType) {
+ this.getData();
+ } else {
+ this.getOrgStudentData();
+ }
if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.currentChange(this.page - 1)
}