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"
/>
+
+
+
{{ scope.row.workscope_name }}
-
+
{{ getOpllevelName(scope.row.opllevel) }}
@@ -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) {