From b9caf8bac284ffe57e548e4caef535f6512fcfc0 Mon Sep 17 00:00:00 2001 From: zty Date: Wed, 26 Mar 2025 13:28:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_client/src/api/candidate.js | 7 +++++ test_client/src/views/exam/issue.vue | 44 ++++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/test_client/src/api/candidate.js b/test_client/src/api/candidate.js index d5fb260..1831559 100644 --- a/test_client/src/api/candidate.js +++ b/test_client/src/api/candidate.js @@ -31,4 +31,11 @@ export function updateCandidate(id, data) { method: 'put', data }) +} + +export function deleteCandidate(id) { + return request({ + url: `/crm/candidate/${id}/`, + method: 'delete' + }) } \ No newline at end of file diff --git a/test_client/src/views/exam/issue.vue b/test_client/src/views/exam/issue.vue index 014dff5..1bee402 100644 --- a/test_client/src/views/exam/issue.vue +++ b/test_client/src/views/exam/issue.vue @@ -8,6 +8,19 @@ class="filter-item" @keyup.enter.native="handleFilter" /> + + + - + @@ -114,6 +127,14 @@ icon="el-icon-edit" @click="handleEdit(scope)" /> + @@ -285,7 +306,8 @@ import { getCandidateList, createCandidate, importCertificate, - updateCandidate + updateCandidate, + deleteCandidate, } from '@/api/candidate' import { getWorkScopeAll @@ -371,10 +393,8 @@ export default { } }, getOpllevelName(value) { - console.log(value, 'value') const numValue = Number(value) const item = this.typeOption.find((item) => item.value === numValue) - console.log(item, 'item-name') return item ? item.name : '' }, beforeAvatarUpload(file) { @@ -401,7 +421,8 @@ export default { this.listQuery = { page: 1, limit: 20, - search: '' + search: '', + opllevel: null, } this.getList() }, @@ -445,6 +466,19 @@ export default { this.$refs['candidateForm'].clearValidate() }) }, + handleDelete(scope) { + this.$confirm('确认删除该记录吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(() => { + deleteCandidate(scope.row.id).then((response) => { + this.$message.success('成功') + this.getList() + }) + }) + }, confirmCandidate(form) { this.$refs[form].validate((valid) => { if (valid) {