feat:修改证书增加删除功能
This commit is contained in:
parent
393bbadca9
commit
b9caf8bac2
|
@ -32,3 +32,10 @@ export function updateCandidate(id, data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteCandidate(id) {
|
||||
return request({
|
||||
url: `/crm/candidate/${id}/`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -8,6 +8,19 @@
|
|||
class="filter-item"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-select
|
||||
v-model = "listQuery.opllevel"
|
||||
placeholder="请选择等级"
|
||||
style="width: 200px; margin-left: 10px"
|
||||
class="filter-item"
|
||||
@change="handleFilter">
|
||||
<el-option
|
||||
v-for="item in typeOption"
|
||||
:key = "item.name"
|
||||
:label = "item.name"
|
||||
:value = "item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
|
@ -114,6 +127,14 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="checkPermission(['certificate_update'])"
|
||||
type="primary"
|
||||
size="small"
|
||||
plain="true"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue