人员库

This commit is contained in:
cwchen 2025-10-27 09:28:20 +08:00
parent 98ec9b79e7
commit 5c306720db
1 changed files with 19 additions and 11 deletions

View File

@ -16,7 +16,8 @@
</el-input>
</el-form-item>
<el-form-item prop="personnelPosition">
<el-select v-model="queryParams.personnelPosition" placeholder="请选择职位" clearable class="search-select">
<el-select v-model="queryParams.personnelPosition" placeholder="请选择职位" clearable
class="search-select">
<el-option v-for="item in dict.type.personnel_position" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
@ -92,8 +93,8 @@
import EnterpriseDetail from '@/assets/enterpriseLibrary/enterprise/enterprise-detail.png';
import EnterpriseEdit from '@/assets/enterpriseLibrary/enterprise/enterprise-edit.png';
import EnterpriseDelete from '@/assets/enterpriseLibrary/enterprise/enterprise-delete.png';
import { encryptWithSM4,decryptWithSM4 } from '@/utils/sm'
import { listAPI } from '@/api/enterpriseLibrary/personnel/personnel'
import { encryptWithSM4, decryptWithSM4 } from '@/utils/sm'
import { listAPI, delDataAPI } from '@/api/enterpriseLibrary/personnel/personnel'
export default {
name: 'Personnel',
dicts: ['personnel_position'],
@ -131,12 +132,12 @@ export default {
//
handleBack() {
const obj = {
const obj = {
path: "/enterpriseKnowledge/index",
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
}
}
}
this.$tab.closeOpenPage(obj)
},
@ -198,9 +199,16 @@ export default {
dangerouslyUseHTMLString: true,
customClass: 'delete-confirm-dialog'
}).then(() => {
console.log('删除人员', personnel)
this.$message.success('删除成功')
this.getList()
delDataAPI({ enterpriseId: this.enterpriseId, personnelId: personnel.personnelId }).then(res => {
if (res.code === 200) {
this.$message.success('删除成功');
this.getList();
} else {
this.$message.error(res.msg || '删除失败');
}
}).catch(error => {
console.error('删除失败:', error);
});
}).catch(() => {
})
},
@ -549,16 +557,16 @@ export default {
color: #ff4d4f;
font-weight: 600;
}
.el-message-box__content {
color: #666;
font-size: 14px;
}
.el-button--primary {
background-color: #ff4d4f;
border-color: #ff4d4f;
&:hover {
background-color: #ff7875;
border-color: #ff7875;