feat: resignation支持删除操作
This commit is contained in:
parent
84e447527a
commit
83fe31b76a
|
|
@ -187,5 +187,13 @@ export default {
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/hrm/resignation/${id}/`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
|
<el-button type="danger"
|
||||||
|
v-if="localMode=='edit'"
|
||||||
|
style="margin-right: 4px;"
|
||||||
|
@click="handleDel"
|
||||||
|
>删除</el-button>
|
||||||
<ticketd_b
|
<ticketd_b
|
||||||
:workflow_key="'wf_resignation'"
|
:workflow_key="'wf_resignation'"
|
||||||
:title="ticketTitle"
|
:title="ticketTitle"
|
||||||
|
|
@ -108,6 +113,17 @@ export default {
|
||||||
console.error('获取离职数据失败:', error);
|
console.error('获取离职数据失败:', error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDel() {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(()=>{
|
||||||
|
this.$API.hrm.resignation.delete.req(this.formData.id).then(res=>{
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.$emit('success');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
async submit_b_func() {
|
async submit_b_func() {
|
||||||
if (this.localMode == "add") {
|
if (this.localMode == "add") {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue