人员管理
This commit is contained in:
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalpartychange',
|
||||
url: '/professional/professionalpartychange/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalpartychange/${id}`,
|
||||
url: `/professional/professionalpartychange/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalpartychange/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalpartychange/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalpartychange',
|
||||
method: 'put',
|
||||
url: '/professional/professionalpartychange/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalpoliticsstatus',
|
||||
url: '/professional/professionalpoliticsstatus/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const addPoliticssStatus = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalpoliticsstatus',
|
||||
url: '/professional/professionalpoliticsstatus/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -59,8 +59,11 @@ export const addPoliticssStatus = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalpoliticsstatus/${id}`,
|
||||
url: `/professional/professionalpoliticsstatus/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalpoliticsstatus/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalpoliticsstatus/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const dePoObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalpoliticsstatus/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalpoliticsstatus/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -92,8 +101,8 @@ export const dePoObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalpoliticsstatus',
|
||||
method: 'put',
|
||||
url: '/professional/professionalpoliticsstatus/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
@@ -35,7 +35,7 @@ export function fetchList(query?: any) {
|
||||
*/
|
||||
export function addObj(obj?: any) {
|
||||
return request({
|
||||
url: '/professional/professionalqualificationrelation',
|
||||
url: '/professional/professionalqualificationrelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export function addObj(obj?: any) {
|
||||
*/
|
||||
export function addQuaRelation(obj?: any) {
|
||||
return request({
|
||||
url: '/professional/professionalqualificationrelation',
|
||||
url: '/professional/professionalqualificationrelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -59,8 +59,11 @@ export function addQuaRelation(obj?: any) {
|
||||
*/
|
||||
export function getObj(id: string | number) {
|
||||
return request({
|
||||
url: '/professional/professionalqualificationrelation/' + id,
|
||||
url: '/professional/professionalqualificationrelation/getById',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -70,8 +73,11 @@ export function getObj(id: string | number) {
|
||||
*/
|
||||
export function delObj(id: string | number) {
|
||||
return request({
|
||||
url: '/professional/professionalqualificationrelation/' + id,
|
||||
method: 'delete',
|
||||
url: '/professional/professionalqualificationrelation/deleteById',
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -81,8 +87,11 @@ export function delObj(id: string | number) {
|
||||
*/
|
||||
export function delQuaObj(id: string | number) {
|
||||
return request({
|
||||
url: '/professional/professionalqualificationrelation/' + id,
|
||||
method: 'delete',
|
||||
url: '/professional/professionalqualificationrelation/deleteById',
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -92,8 +101,8 @@ export function delQuaObj(id: string | number) {
|
||||
*/
|
||||
export function putObj(obj?: any) {
|
||||
return request({
|
||||
url: '/professional/professionalqualificationrelation',
|
||||
method: 'put',
|
||||
url: '/professional/professionalqualificationrelation/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalsocial',
|
||||
url: '/professional/professionalsocial/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const addSocialObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalsocial',
|
||||
url: '/professional/professionalsocial/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -59,8 +59,11 @@ export const addSocialObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalsocial/${id}`,
|
||||
url: `/professional/professionalsocial/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalsocial/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalsocial/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const delSocialObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalsocial/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalsocial/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -92,8 +101,8 @@ export const delSocialObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalsocial',
|
||||
method: 'put',
|
||||
url: '/professional/professionalsocial/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacheracademicrelation',
|
||||
url: '/professional/professionalteacheracademicrelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const addAcadeRelation = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacheracademicrelation',
|
||||
url: '/professional/professionalteacheracademicrelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -59,8 +59,11 @@ export const addAcadeRelation = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacheracademicrelation/${id}`,
|
||||
url: `/professional/professionalteacheracademicrelation/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacheracademicrelation/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalteacheracademicrelation/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const delEduObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacheracademicrelation/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalteacheracademicrelation/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -92,8 +101,8 @@ export const delEduObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacheracademicrelation',
|
||||
method: 'put',
|
||||
url: '/professional/professionalteacheracademicrelation/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteachercertificaterelation',
|
||||
url: '/professional/professionalteachercertificaterelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteachercertificaterelation/${id}`,
|
||||
url: `/professional/professionalteachercertificaterelation/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteachercertificaterelation/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalteachercertificaterelation/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteachercertificaterelation',
|
||||
method: 'put',
|
||||
url: '/professional/professionalteachercertificaterelation/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacherhonor',
|
||||
url: '/professional/professionalteacherhonor/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacherhonor/${id}`,
|
||||
url: `/professional/professionalteacherhonor/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacherhonor/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalteacherhonor/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacherhonor',
|
||||
method: 'put',
|
||||
url: '/professional/professionalteacherhonor/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacherstationchange',
|
||||
url: '/professional/professionalteacherstationchange/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacherstationchange/${id}`,
|
||||
url: `/professional/professionalteacherstationchange/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionalteacherstationchange/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionalteacherstationchange/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionalteacherstationchange',
|
||||
method: 'put',
|
||||
url: '/professional/professionalteacherstationchange/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionaltitlerelation',
|
||||
url: '/professional/professionaltitlerelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const addTitleRelationObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionaltitlerelation',
|
||||
url: '/professional/professionaltitlerelation/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -59,8 +59,11 @@ export const addTitleRelationObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionaltitlerelation/${id}`,
|
||||
url: `/professional/professionaltitlerelation/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -70,8 +73,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionaltitlerelation/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionaltitlerelation/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -81,8 +87,11 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const delTitleObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/professionaltitlerelation/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/professionaltitlerelation/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -92,8 +101,8 @@ export const delTitleObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/professionaltitlerelation',
|
||||
method: 'put',
|
||||
url: '/professional/professionaltitlerelation/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const fetchList = (query?: any) => {
|
||||
*/
|
||||
export const addObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/teacherbase',
|
||||
url: '/professional/teacherbase/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -47,8 +47,11 @@ export const addObj = (obj: any) => {
|
||||
*/
|
||||
export const getObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/teacherbase/${id}`,
|
||||
url: `/professional/teacherbase/getById`,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -58,8 +61,11 @@ export const getObj = (id: string | number) => {
|
||||
*/
|
||||
export const delObj = (id: string | number) => {
|
||||
return request({
|
||||
url: `/professional/teacherbase/${id}`,
|
||||
method: 'delete',
|
||||
url: `/professional/teacherbase/deleteById`,
|
||||
method: 'post',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -69,8 +75,8 @@ export const delObj = (id: string | number) => {
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/professional/teacherbase',
|
||||
method: 'put',
|
||||
url: '/professional/teacherbase/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
@@ -336,3 +342,4 @@ export const search = (data: string | number) => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<el-tag
|
||||
:effect="currentOption.effect"
|
||||
v-if="currentOption"
|
||||
:type="currentOption.type"
|
||||
:class="{ 'audit-state-tag': showIcon && currentOption.icon }"
|
||||
@@ -18,6 +19,7 @@ export interface StateOption {
|
||||
label: string;
|
||||
type: 'success' | 'danger' | 'warning' | 'info' | '';
|
||||
icon?: string;
|
||||
effect?: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -30,9 +32,9 @@ interface Props {
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
state: '',
|
||||
options: () => [
|
||||
{ value: '1', label: '通过', type: 'success', icon: 'fa-solid fa-circle-check' },
|
||||
{ value: '-2', label: '驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark' },
|
||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock' }
|
||||
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check' , effect:"dark" },
|
||||
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect:"dark" },
|
||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock' ,effect:"light" }
|
||||
],
|
||||
showIcon: true,
|
||||
emptyText: '-'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="search-form-container">
|
||||
<el-form :model="formModel" ref="formRef" :inline="true" @keyup.enter="handleKeyupEnter" class="search-form-inline">
|
||||
<el-form :model="formModel" ref="formRef" :inline="true" @keyup.enter="handleKeyupEnter">
|
||||
<!-- 直接展示的表单项 -->
|
||||
<slot :visible="true" :expanded="isExpanded"></slot>
|
||||
|
||||
@@ -154,8 +154,9 @@ defineExpose({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-form-container {
|
||||
|
||||
:deep(.search-form-inline) {
|
||||
// 直接使用全局样式 el-form--inline,只需要覆盖特殊样式
|
||||
|
||||
:deep(.el-form--inline) {
|
||||
.collapse-trigger-item {
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
@@ -165,6 +166,18 @@ defineExpose({
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
// 如果需要自定义宽度,可以覆盖全局样式(默认使用全局的 240px)
|
||||
// 如果需要改为 200px,取消下面的注释
|
||||
// .el-form-item {
|
||||
// & > .el-input,
|
||||
// .el-cascader,
|
||||
// .el-select,
|
||||
// .el-date-editor,
|
||||
// .el-autocomplete {
|
||||
// width: 200px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// 可折叠内容区域 - 使用 contents 让包装器不影响布局
|
||||
|
||||
@@ -67,12 +67,22 @@
|
||||
// https://github.com/element-plus/element-plus/pull/15352
|
||||
.el-form--inline {
|
||||
.el-form-item {
|
||||
// 默认宽度 200px(输入框、单选、选择器等)
|
||||
& > .el-input,
|
||||
.el-cascader,
|
||||
.el-select,
|
||||
.el-date-editor,
|
||||
.el-autocomplete {
|
||||
width: 240px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
// 日期选择器:单日期为 200px,双日期(范围选择)为 240px
|
||||
.el-date-editor {
|
||||
width: 200px;
|
||||
|
||||
// 日期范围选择器(双日期)使用 240px
|
||||
&.el-range-editor {
|
||||
width: 240px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" title="驳回" width="600px" :close-on-click-modal="false" destroy-on-close>
|
||||
<el-form label-width="150px">
|
||||
<el-form label-width="100px">
|
||||
<el-form-item label="姓名:">
|
||||
<el-tag>{{ dataForm.name }}</el-tag>
|
||||
</el-form-item>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
v-show="showSearch"
|
||||
:model="search"
|
||||
ref="searchFormRef"
|
||||
@keyup-enter="handleFilter(search)"
|
||||
@keyup-enter="handleFilter"
|
||||
>
|
||||
<template #default="{ visible }">
|
||||
<template v-if="visible">
|
||||
@@ -14,7 +14,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -23,7 +22,6 @@
|
||||
<el-input
|
||||
v-model="search.realName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入用户名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -33,7 +31,7 @@
|
||||
<!-- 操作按钮 -->
|
||||
<template #actions>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleFilter(search)" icon="Search">查询</el-button>
|
||||
<el-button type="primary" @click="handleFilter" icon="Search">查询</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -50,9 +48,11 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
|
||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="realName" label="用户名" min-width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||
<template #default="scope">
|
||||
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="oldBranchName" label="原支部名称" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
@@ -83,9 +83,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { fetchList } from '/@/api/professional/professionaluser/professionalpartychange'
|
||||
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" title="编辑职业资格" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-dialog v-model="dialogVisible" title="编辑职业资格" width="600px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="showForm">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -55,15 +55,17 @@
|
||||
<el-form-item label="证书编号" prop="certificateNumber">
|
||||
<el-input
|
||||
v-model="dataForm.certificateNumber"
|
||||
placeholder="请输入证书编号"
|
||||
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||
clearable
|
||||
show-word-limit
|
||||
maxlength="32"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="材料1" prop="materialA">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
@@ -72,7 +74,9 @@
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -81,7 +85,7 @@
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -92,17 +96,14 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
visible?: boolean
|
||||
}>()
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig'
|
||||
import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype'
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void
|
||||
(e: 'refreshData'): void
|
||||
}>()
|
||||
|
||||
@@ -113,11 +114,8 @@ const message = useMessage()
|
||||
const formRef = ref()
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 对话框显示状态
|
||||
const visible = computed({
|
||||
get: () => props.visible || false,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
// 对话框显示状态(内部管理)
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
// 表单数据
|
||||
const dataForm = reactive({
|
||||
@@ -144,35 +142,18 @@ const formRules = {
|
||||
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
||||
],
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
// 基础信息
|
||||
const baseInfoAbout = reactive<{
|
||||
stationTypeList: any[]
|
||||
atStationList: any[]
|
||||
teacherTypeList: any[]
|
||||
employmentNatureList: any[]
|
||||
stationLevelList: any[]
|
||||
stationDutyLevelList: any[]
|
||||
workTypeList: any[]
|
||||
proTitleList: any[]
|
||||
majorStationList: any[]
|
||||
qualificationList: any[]
|
||||
partBranchList: any[]
|
||||
}>({
|
||||
stationTypeList: [],
|
||||
atStationList: [],
|
||||
teacherTypeList: [],
|
||||
employmentNatureList: [],
|
||||
stationLevelList: [],
|
||||
stationDutyLevelList: [],
|
||||
workTypeList: [],
|
||||
proTitleList: [],
|
||||
majorStationList: [],
|
||||
qualificationList: [],
|
||||
partBranchList: []
|
||||
qualificationList: []
|
||||
})
|
||||
|
||||
// 上传相关
|
||||
@@ -198,25 +179,31 @@ const qualificationList = computed(() => baseInfoAbout.qualificationList as any[
|
||||
// 初始化字典数据
|
||||
const initDicData = async () => {
|
||||
try {
|
||||
const response = await getAllInfoAboutList()
|
||||
const map = response.data.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||
visible.value = true
|
||||
// 使用专门的 API 获取数据(与 index.vue 保持一致)
|
||||
const [levelRes, workRes] = await Promise.all([
|
||||
getLevelList(),
|
||||
getWorkTypeList()
|
||||
])
|
||||
|
||||
// 处理资格等级列表(与 index.vue 保持一致)
|
||||
if (levelRes && levelRes.data) {
|
||||
baseInfoAbout.qualificationList = levelRes.data
|
||||
}
|
||||
|
||||
// 处理工种列表(与 index.vue 保持一致)
|
||||
if (workRes && workRes.data) {
|
||||
baseInfoAbout.workTypeList = workRes.data
|
||||
}
|
||||
} catch (error) {
|
||||
// 获取字典数据失败
|
||||
}
|
||||
}
|
||||
|
||||
// 证书编号输入处理(只允许英文和数字)
|
||||
const handleCertificateNumberInput = (value: string) => {
|
||||
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||
}
|
||||
|
||||
// 文件上传成功
|
||||
const materiaUploadSuccess = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
@@ -227,36 +214,101 @@ const materiaUploadSuccess = (response: any) => {
|
||||
}
|
||||
|
||||
// 打开对话框
|
||||
const openDialog = (row: any) => {
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=3`
|
||||
fileList.value = []
|
||||
Object.assign(dataForm, {
|
||||
worker: row.worker || '',
|
||||
qualificationConfigId: row.qualificationConfigId || '',
|
||||
certificateTime: row.certificateTime || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
evidenceA: row.evidenceA || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
initDicData()
|
||||
const openDialog = async (row?: any) => {
|
||||
if (row && row.id) {
|
||||
// 编辑模式
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=3`
|
||||
fileList.value = []
|
||||
Object.assign(dataForm, {
|
||||
worker: row.worker || '',
|
||||
qualificationConfigId: row.qualificationConfigId || '',
|
||||
certificateTime: row.certificateTime || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
evidenceA: row.evidenceA || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
await initDicData()
|
||||
dialogVisible.value = true
|
||||
} else {
|
||||
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||
try {
|
||||
const lockResponse = await checkLocked('job')
|
||||
if (lockResponse.data) {
|
||||
// 已锁定
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
// 未锁定,继续获取 teacherNo
|
||||
const response = await getMyTeacherNo()
|
||||
const teacherNo = response.data
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=3`
|
||||
Object.assign(dataForm, {
|
||||
worker: '',
|
||||
qualificationConfigId: '',
|
||||
certificateTime: '',
|
||||
certificateNumber: '',
|
||||
materialA: '',
|
||||
evidenceA: '',
|
||||
state: '',
|
||||
teacherNo: teacherNo,
|
||||
id: ''
|
||||
})
|
||||
fileList.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} catch (error) {
|
||||
message.error('获取教师编号失败')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const dialogSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||
if (!dataForm.evidenceA && !dataForm.materialA) {
|
||||
message.warning("请上传证明材料")
|
||||
return
|
||||
}
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("操作成功")
|
||||
visible.value = false
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("修改成功")
|
||||
} else {
|
||||
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||
const submitData: any = {
|
||||
type: 3, // 职业资格类型
|
||||
teacherNo: dataForm.teacherNo,
|
||||
worker: dataForm.worker,
|
||||
qualificationConfigId: dataForm.qualificationConfigId,
|
||||
certificateTime: dataForm.certificateTime,
|
||||
certificateNumber: dataForm.certificateNumber,
|
||||
mateA: dataForm.evidenceA || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||
}
|
||||
|
||||
const res = await updateOtherInfo(submitData)
|
||||
if (res.data == '-1') {
|
||||
message.warning("当前不允许提交")
|
||||
} else {
|
||||
message.success("提交成功")
|
||||
}
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
|
||||
@@ -1,28 +1,6 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 图表统计 -->
|
||||
<div style="text-align: right; margin-bottom: 20px;">
|
||||
<el-collapse accordion @change="initChartOption">
|
||||
<el-collapse-item title="资格等级统计">
|
||||
<div style="width: 100%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="chartData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="name" label="等级" width="180" align="center" />
|
||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
||||
<!-- 搜索表单 -->
|
||||
<search-form
|
||||
v-show="showSearch"
|
||||
@@ -36,7 +14,6 @@
|
||||
<el-select
|
||||
v-model="search.state"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请选择审核状态"
|
||||
>
|
||||
<el-option
|
||||
@@ -52,7 +29,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -61,7 +37,6 @@
|
||||
<el-input
|
||||
v-model="search.realName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -87,7 +62,8 @@
|
||||
v-if="permissions.professional_professionalqualificationrelation_add">新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
v-if="permissions.professional_teacherbase_export"
|
||||
@click="handleDownLoadWord"
|
||||
@@ -109,18 +85,15 @@
|
||||
|
||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
||||
<span v-else>-</span>
|
||||
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="realName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||
<template #default="scope">
|
||||
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="qualificationConfigId" label="资格等级" min-width="150" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
@@ -142,40 +115,44 @@
|
||||
v-if="scope.row.evidenceA && scope.row.evidenceA !== ''"
|
||||
type="primary"
|
||||
link
|
||||
icon="Document"
|
||||
@click="handlePreview(scope.row.srcList)">查看
|
||||
</el-button>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Edit"
|
||||
icon="edit-pen"
|
||||
v-if="permissions.professional_professionalqualificationrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||
@click="handleEdit(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
icon="Check"
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionalqualificationrelation_exam && scope.row.state === '0'"
|
||||
@click="changeState(scope.row, 1)">通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Close"
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionalqualificationrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||
@click="changeState(scope.row, -2)">驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
type="primary"
|
||||
link
|
||||
icon="Delete"
|
||||
icon="delete"
|
||||
v-if="permissions.professional_professionalqualificationrelation_del"
|
||||
style="margin-left: 12px"
|
||||
@click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -200,7 +177,6 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 子组件 -->
|
||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||
</div>
|
||||
@@ -215,28 +191,28 @@ import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useMessageBox } from '/@/hooks/message'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import {
|
||||
fetchList,
|
||||
putObj,
|
||||
delObj,
|
||||
getChartOption,
|
||||
exportExcel
|
||||
} from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||
import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig'
|
||||
import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
||||
import DataForm from './form.vue'
|
||||
import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.vue'
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue'))
|
||||
|
||||
// 注册 ECharts 组件
|
||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||
// 审核状态选项(独立定义,防止其他页面修改时被波及)
|
||||
import type { StateOption } from '/@/components/AuditState/index.vue'
|
||||
const auditStateOptions: StateOption[] = [
|
||||
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' },
|
||||
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' },
|
||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' }
|
||||
]
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -261,10 +237,8 @@ const { professional_state: professionalState } = useDict('professional_state')
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const multiDialogRef = ref()
|
||||
const dataFormRef = ref()
|
||||
const backReasonRef = ref()
|
||||
const chartRef = ref()
|
||||
const showSearch = ref(true)
|
||||
|
||||
// 搜索表单数据
|
||||
@@ -274,10 +248,6 @@ const search = reactive({
|
||||
realName: ''
|
||||
})
|
||||
|
||||
// 图表数据
|
||||
const chartOption = ref<any>({})
|
||||
const chartData = ref<any[]>([])
|
||||
|
||||
// 材料预览
|
||||
const dialogVisible = ref(false)
|
||||
const imgUrl = ref<Array<{ title: string; url: string }>>([])
|
||||
@@ -313,33 +283,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化图表
|
||||
const initChartOption = async () => {
|
||||
try {
|
||||
const response = await getChartOption()
|
||||
chartOption.value = response.data.data.option || {}
|
||||
|
||||
let total = 0
|
||||
if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) {
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
total += item.value || 0
|
||||
})
|
||||
|
||||
chartData.value = []
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = total > 0 ? Number((item.value / total * 100).toFixed(1)) : 0
|
||||
chartData.value.push({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
// Failed to load chart data
|
||||
}
|
||||
}
|
||||
|
||||
// 预览材料
|
||||
const handlePreview = (list: string[]) => {
|
||||
imgUrl.value = []
|
||||
@@ -397,7 +340,7 @@ const resetQuery = () => {
|
||||
|
||||
// 打开新增窗口
|
||||
const handleAdd = () => {
|
||||
multiDialogRef.value?.init(3)
|
||||
dataFormRef.value?.openDialog()
|
||||
}
|
||||
|
||||
// 打开编辑窗口
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 页面标题 -->
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h2 style="margin: 0; font-size: 20px; font-weight: 600; color: #303133;">资格等级统计</h2>
|
||||
</div>
|
||||
|
||||
<!-- 图表统计 -->
|
||||
<div style="width: 100%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="chartData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="name" label="等级" width="180" align="center" />
|
||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { getChartOption } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||
|
||||
// 注册 ECharts 组件
|
||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||
|
||||
// 图表引用
|
||||
const chartRef = ref()
|
||||
|
||||
// 图表数据
|
||||
const chartOption = ref<any>({})
|
||||
const chartData = ref<any[]>([])
|
||||
|
||||
// 初始化图表
|
||||
const initChartOption = async () => {
|
||||
try {
|
||||
const response = await getChartOption()
|
||||
chartOption.value = response.data.data.option || {}
|
||||
|
||||
let total = 0
|
||||
if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) {
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
total += item.value || 0
|
||||
})
|
||||
|
||||
chartData.value = []
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = total > 0 ? Number((item.value / total * 100).toFixed(1)) : 0
|
||||
chartData.value.push({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
// Failed to load chart data
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载时初始化图表
|
||||
onMounted(() => {
|
||||
initChartOption()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" title="编辑学历学位" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-dialog v-model="dialogVisible" title="编辑学历学位" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="showForm">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -88,53 +88,58 @@
|
||||
<el-form-item label="证书编码" prop="certificateNumber">
|
||||
<el-input
|
||||
v-model="dataForm.certificateNumber"
|
||||
placeholder="请输入证书编码"
|
||||
placeholder="请输入证书编码(仅支持英文和数字)"
|
||||
clearable
|
||||
show-word-limit
|
||||
maxlength="100"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="学历证书" prop="materialA">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
:on-success="materiaUploadSuccess"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
:on-success="materiaUploadSuccess"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="学位证书" prop="materialB">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileListB"
|
||||
:on-success="materiaUploadSuccessB"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
:on-success="materiaUploadSuccessB"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -142,20 +147,15 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||
import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig'
|
||||
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
||||
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
|
||||
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
visible?: boolean
|
||||
}>()
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void
|
||||
(e: 'refreshData'): void
|
||||
}>()
|
||||
|
||||
@@ -166,11 +166,8 @@ const message = useMessage()
|
||||
const formRef = ref()
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 对话框显示状态
|
||||
const visible = computed({
|
||||
get: () => props.visible || false,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
// 对话框显示状态(内部管理)
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
// 表单数据
|
||||
const dataForm = reactive({
|
||||
@@ -205,7 +202,8 @@ const formRules = {
|
||||
{ required: true, message: '请输入所学专业', trigger: 'blur' }
|
||||
],
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编码', trigger: 'blur' }
|
||||
{ required: true, message: '请输入证书编码', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -214,32 +212,7 @@ const educationTypeList = ref<any[]>([])
|
||||
const qualificationList = ref<any[]>([])
|
||||
const degreeList = ref<any[]>([])
|
||||
|
||||
// 基础信息
|
||||
const baseInfoAbout = reactive<{
|
||||
stationTypeList: any[]
|
||||
atStationList: any[]
|
||||
teacherTypeList: any[]
|
||||
employmentNatureList: any[]
|
||||
stationLevelList: any[]
|
||||
stationDutyLevelList: any[]
|
||||
workTypeList: any[]
|
||||
proTitleList: any[]
|
||||
majorStationList: any[]
|
||||
qualificationList: any[]
|
||||
partBranchList: any[]
|
||||
}>({
|
||||
stationTypeList: [],
|
||||
atStationList: [],
|
||||
teacherTypeList: [],
|
||||
employmentNatureList: [],
|
||||
stationLevelList: [],
|
||||
stationDutyLevelList: [],
|
||||
workTypeList: [],
|
||||
proTitleList: [],
|
||||
majorStationList: [],
|
||||
qualificationList: [],
|
||||
partBranchList: []
|
||||
})
|
||||
// 基础信息(简化,只保留需要的)
|
||||
|
||||
// 上传相关
|
||||
const url = ref('')
|
||||
@@ -248,7 +221,7 @@ const fileListB = ref<any[]>([])
|
||||
|
||||
// 请求头
|
||||
const headers = computed(() => {
|
||||
return {
|
||||
return {
|
||||
"Authorization": 'Bearer ' + Session.getToken()
|
||||
}
|
||||
})
|
||||
@@ -259,26 +232,13 @@ const showForm = ref(false)
|
||||
// 初始化字典数据
|
||||
const initDicData = async () => {
|
||||
try {
|
||||
const [response, eduRes, quaRes, degRes] = await Promise.all([
|
||||
getAllInfoAboutList(),
|
||||
// 使用专门的 API 获取数据(与 index.vue 保持一致)
|
||||
const [eduRes, quaRes, degRes] = await Promise.all([
|
||||
getAllTypeList(),
|
||||
getQualificationList(),
|
||||
getDegreeList()
|
||||
])
|
||||
|
||||
const map = response.data.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||
|
||||
// 获取教育类型列表
|
||||
if (eduRes && eduRes.data) {
|
||||
educationTypeList.value = Array.isArray(eduRes.data)
|
||||
@@ -299,13 +259,16 @@ const initDicData = async () => {
|
||||
? degRes.data
|
||||
: (degRes.data.records || degRes.data.list || [])
|
||||
}
|
||||
|
||||
visible.value = true
|
||||
} catch (error) {
|
||||
// 获取字典数据失败
|
||||
}
|
||||
}
|
||||
|
||||
// 证书编号输入处理(只允许英文和数字)
|
||||
const handleCertificateNumberInput = (value: string) => {
|
||||
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||
}
|
||||
|
||||
// 文件上传成功 - 学历证书
|
||||
const materiaUploadSuccess = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
@@ -319,48 +282,127 @@ const materiaUploadSuccess = (response: any) => {
|
||||
const materiaUploadSuccessB = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
message.error("当前不允许上传文件")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
dataForm.degreeImg = response.data.url
|
||||
}
|
||||
|
||||
// 打开对话框
|
||||
const openDialog = (row: any) => {
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=1`
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: row.graduateTime || '',
|
||||
type: row.type || '',
|
||||
qualificationConfigId: row.qualificationConfigId || '',
|
||||
degreeConfigId: row.degreeConfigId || '',
|
||||
graduateSchool: row.graduateSchool || '',
|
||||
major: row.major || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
materialB: row.materialB || '',
|
||||
qualificationImg: row.qualificationImg || '',
|
||||
degreeImg: row.degreeImg || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
initDicData()
|
||||
const openDialog = async (row?: any) => {
|
||||
if (row && row.id) {
|
||||
// 编辑模式
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=1`
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: row.graduateTime || '',
|
||||
type: row.type || '',
|
||||
qualificationConfigId: row.qualificationConfigId || '',
|
||||
degreeConfigId: row.degreeConfigId || '',
|
||||
graduateSchool: row.graduateSchool || '',
|
||||
major: row.major || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
materialB: row.materialB || '',
|
||||
qualificationImg: row.qualificationImg || '',
|
||||
degreeImg: row.degreeImg || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
await initDicData()
|
||||
dialogVisible.value = true
|
||||
} else {
|
||||
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||
try {
|
||||
const lockResponse = await checkLocked('acade')
|
||||
if (lockResponse.data) {
|
||||
// 已锁定
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
// 未锁定,继续获取 teacherNo
|
||||
const response = await getMyTeacherNo()
|
||||
const teacherNo = response.data
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=1`
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: '',
|
||||
type: '',
|
||||
qualificationConfigId: '',
|
||||
degreeConfigId: '',
|
||||
graduateSchool: '',
|
||||
major: '',
|
||||
certificateNumber: '',
|
||||
materialA: '',
|
||||
materialB: '',
|
||||
qualificationImg: '',
|
||||
degreeImg: '',
|
||||
state: '',
|
||||
teacherNo: teacherNo,
|
||||
id: ''
|
||||
})
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} catch (error) {
|
||||
message.error('获取教师编号失败')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const dialogSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
// 验证证明材料是否上传(与 MultiDialog 保持一致:mateA 或 mateB 至少有一个)
|
||||
if (!dataForm.qualificationImg && !dataForm.degreeImg && !dataForm.materialA && !dataForm.materialB) {
|
||||
message.warning("请上传学历或学位证书")
|
||||
return
|
||||
}
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("操作成功")
|
||||
visible.value = false
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("修改成功")
|
||||
} else {
|
||||
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||
// 注意:MultiDialog 中 type 字段在提交时会被设置为 val(1),但表单中也有 type 字段用于教育类型
|
||||
// 这里直接使用 dataForm 的所有字段,后端应该能够处理
|
||||
const submitData: any = {
|
||||
type: 1, // 学历更新类型(固定值,会覆盖表单中的 type)
|
||||
teacherNo: dataForm.teacherNo,
|
||||
graduateTime: dataForm.graduateTime,
|
||||
qualificationConfigId: dataForm.qualificationConfigId,
|
||||
degreeConfigId: dataForm.degreeConfigId,
|
||||
graduateSchool: dataForm.graduateSchool,
|
||||
major: dataForm.major,
|
||||
certificateNumber: dataForm.certificateNumber,
|
||||
mateA: dataForm.qualificationImg || dataForm.materialA, // 学历证书
|
||||
mateB: dataForm.degreeImg || dataForm.materialB // 学位证书
|
||||
}
|
||||
|
||||
// 注意:MultiDialog 中教育类型字段也是 type,但在提交时会被覆盖为 val(1)
|
||||
// 如果后端需要教育类型,可能需要单独传递,这里先不传,保持与 MultiDialog 一致
|
||||
|
||||
const res = await updateOtherInfo(submitData)
|
||||
if (res.data == '-1') {
|
||||
message.warning("当前不允许提交")
|
||||
} else {
|
||||
message.success("提交成功")
|
||||
}
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
|
||||
@@ -1,28 +1,6 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 图表统计 -->
|
||||
<div style="text-align: right; margin-bottom: 20px;">
|
||||
<el-collapse accordion @change="initChartOption">
|
||||
<el-collapse-item title="学历统计">
|
||||
<div style="width: 100%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="chartData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="xl" label="学历" width="180" align="center" />
|
||||
<el-table-column prop="total" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
||||
<!-- 搜索表单 -->
|
||||
<search-form
|
||||
v-show="showSearch"
|
||||
@@ -36,7 +14,6 @@
|
||||
<el-select
|
||||
v-model="search.state"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请选择审核状态"
|
||||
>
|
||||
<el-option
|
||||
@@ -52,7 +29,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -61,7 +37,6 @@
|
||||
<el-input
|
||||
v-model="search.realName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -87,7 +62,8 @@
|
||||
v-if="permissions.professional_professionalteacheracademicrelation_add">新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
v-if="permissions.professional_teacherbase_export"
|
||||
@click="handleDownLoadWord"
|
||||
@@ -109,18 +85,15 @@
|
||||
|
||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="realName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||
<template #default="scope">
|
||||
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="graduateTime" label="毕业时间" width="180" align="center" />
|
||||
|
||||
@@ -144,10 +117,11 @@
|
||||
v-if="scope.row.qualificationImg && scope.row.qualificationImg !== ''"
|
||||
type="primary"
|
||||
link
|
||||
icon="Document"
|
||||
@click="handlePreview(scope.row.qiList, 1)">查看
|
||||
</el-button>
|
||||
</el-button>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="学位证书附件" width="130" align="center">
|
||||
@@ -156,40 +130,44 @@
|
||||
v-if="scope.row.degreeImg && scope.row.degreeImg !== ''"
|
||||
type="primary"
|
||||
link
|
||||
icon="Document"
|
||||
@click="handlePreview(scope.row.deList, 2)">查看
|
||||
</el-button>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Edit"
|
||||
icon="edit-pen"
|
||||
v-if="permissions.professional_professionalteacheracademicrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||
@click="handleEdit(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
icon="Check"
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionalteacheracademicrelation_exam && scope.row.state === '0'"
|
||||
@click="changeState(scope.row, 1)">通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Close"
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionalteacheracademicrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||
@click="changeState(scope.row, -2)">驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
type="primary"
|
||||
link
|
||||
icon="Delete"
|
||||
icon="delete"
|
||||
v-if="permissions.professional_professionalteacheracademicrelation_del"
|
||||
style="margin-left: 12px"
|
||||
@click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -214,7 +192,6 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 子组件 -->
|
||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||
</div>
|
||||
@@ -229,28 +206,28 @@ import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useMessageBox } from '/@/hooks/message'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import {
|
||||
fetchList,
|
||||
putObj,
|
||||
delObj,
|
||||
getChartOption,
|
||||
exportExcel
|
||||
} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
|
||||
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
||||
import DataForm from './form.vue'
|
||||
import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.vue'
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue'))
|
||||
|
||||
// 注册 ECharts 组件
|
||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||
// 审核状态选项(独立定义,防止其他页面修改时被波及)
|
||||
import type { StateOption } from '/@/components/AuditState/index.vue'
|
||||
const auditStateOptions: StateOption[] = [
|
||||
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' },
|
||||
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' },
|
||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' }
|
||||
]
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -275,10 +252,8 @@ const { professional_state: professionalState } = useDict('professional_state')
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const multiDialogRef = ref()
|
||||
const dataFormRef = ref()
|
||||
const backReasonRef = ref()
|
||||
const chartRef = ref()
|
||||
const showSearch = ref(true)
|
||||
|
||||
// 搜索表单数据
|
||||
@@ -288,10 +263,6 @@ const search = reactive({
|
||||
realName: ''
|
||||
})
|
||||
|
||||
// 图表数据
|
||||
const chartOption = ref<any>({})
|
||||
const chartData = ref<any[]>([])
|
||||
|
||||
// 材料预览
|
||||
const dialogVisible = ref(false)
|
||||
const dialogTitle = ref('')
|
||||
@@ -334,34 +305,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化图表
|
||||
const initChartOption = async () => {
|
||||
try {
|
||||
const response = await getChartOption()
|
||||
chartOption.value = response.data.data || {}
|
||||
|
||||
// 处理图表数据(如果有的话)
|
||||
if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) {
|
||||
let total = 0
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
total += item.value || 0
|
||||
})
|
||||
|
||||
chartData.value = []
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = total > 0 ? Number((item.value / total * 100).toFixed(1)) : 0
|
||||
chartData.value.push({
|
||||
xl: item.name,
|
||||
total: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
// Failed to load chart data
|
||||
}
|
||||
}
|
||||
|
||||
// 预览材料
|
||||
const handlePreview = (list: string[], type: number) => {
|
||||
imgUrl.value = []
|
||||
@@ -425,7 +368,7 @@ const resetQuery = () => {
|
||||
|
||||
// 打开新增窗口
|
||||
const handleAdd = () => {
|
||||
multiDialogRef.value?.init(1)
|
||||
dataFormRef.value?.openDialog()
|
||||
}
|
||||
|
||||
// 打开编辑窗口
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 页面标题 -->
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h2 style="margin: 0; font-size: 20px; font-weight: 600; color: #303133;">学历统计</h2>
|
||||
</div>
|
||||
|
||||
<!-- 图表统计 -->
|
||||
<div style="width: 100%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="chartRef" style="width: 100%; height: 400px;" :option="chartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="chartData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="xl" label="学历" width="180" align="center" />
|
||||
<el-table-column prop="total" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="占比" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { getChartOption } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||
|
||||
// 注册 ECharts 组件
|
||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||
|
||||
// 图表引用
|
||||
const chartRef = ref()
|
||||
|
||||
// 图表数据
|
||||
const chartOption = ref<any>({})
|
||||
const chartData = ref<any[]>([])
|
||||
|
||||
// 初始化图表
|
||||
const initChartOption = async () => {
|
||||
try {
|
||||
const response = await getChartOption()
|
||||
chartOption.value = response.data.data || {}
|
||||
|
||||
// 处理图表数据
|
||||
if (chartOption.value.series && chartOption.value.series[0] && chartOption.value.series[0].data) {
|
||||
let total = 0
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
total += item.value || 0
|
||||
})
|
||||
|
||||
chartData.value = []
|
||||
chartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = total > 0 ? Number((item.value / total * 100).toFixed(1)) : 0
|
||||
chartData.value.push({
|
||||
xl: item.name,
|
||||
total: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
// Failed to load chart data
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载时初始化图表
|
||||
onMounted(() => {
|
||||
initChartOption()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" title="编辑教师资格证" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-dialog v-model="dialogVisible" title="编辑教师资格证" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="showForm">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -38,15 +38,17 @@
|
||||
<el-form-item label="证书编号" prop="certificateNumber">
|
||||
<el-input
|
||||
v-model="dataForm.certificateNumber"
|
||||
placeholder="请输入证书编号"
|
||||
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||
clearable
|
||||
show-word-limit
|
||||
maxlength="64"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="材料1" prop="materialA">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
@@ -55,7 +57,9 @@
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -63,7 +67,6 @@
|
||||
<el-form-item label="材料2" prop="materialB">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileListB"
|
||||
@@ -72,7 +75,9 @@
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -81,7 +86,7 @@
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -92,18 +97,13 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
||||
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
||||
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
visible?: boolean
|
||||
}>()
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void
|
||||
(e: 'refreshData'): void
|
||||
}>()
|
||||
|
||||
@@ -114,11 +114,8 @@ const message = useMessage()
|
||||
const formRef = ref()
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 对话框显示状态
|
||||
const visible = computed({
|
||||
get: () => props.visible || false,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
// 对话框显示状态(内部管理)
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
// 表单数据
|
||||
const dataForm = reactive({
|
||||
@@ -143,39 +140,15 @@ const formRules = {
|
||||
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
||||
],
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
// 教师资格证列表
|
||||
const teacherCertificateList = ref<any[]>([])
|
||||
|
||||
// 基础信息
|
||||
const baseInfoAbout = reactive<{
|
||||
stationTypeList: any[]
|
||||
atStationList: any[]
|
||||
teacherTypeList: any[]
|
||||
employmentNatureList: any[]
|
||||
stationLevelList: any[]
|
||||
stationDutyLevelList: any[]
|
||||
workTypeList: any[]
|
||||
proTitleList: any[]
|
||||
majorStationList: any[]
|
||||
qualificationList: any[]
|
||||
partBranchList: any[]
|
||||
}>({
|
||||
stationTypeList: [],
|
||||
atStationList: [],
|
||||
teacherTypeList: [],
|
||||
employmentNatureList: [],
|
||||
stationLevelList: [],
|
||||
stationDutyLevelList: [],
|
||||
workTypeList: [],
|
||||
proTitleList: [],
|
||||
majorStationList: [],
|
||||
qualificationList: [],
|
||||
partBranchList: []
|
||||
})
|
||||
// 基础信息(简化,只保留需要的)
|
||||
|
||||
// 上传相关
|
||||
const url = ref('')
|
||||
@@ -195,23 +168,8 @@ const showForm = ref(false)
|
||||
// 初始化字典数据
|
||||
const initDicData = async () => {
|
||||
try {
|
||||
const [response, certResponse] = await Promise.all([
|
||||
getAllInfoAboutList(),
|
||||
getTeacherCertificateList()
|
||||
])
|
||||
|
||||
const map = response.data.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||
// 使用专门的 API 获取数据(与 index.vue 保持一致)
|
||||
const certResponse = await getTeacherCertificateList()
|
||||
|
||||
// 获取教师资格证列表
|
||||
if (certResponse && certResponse.data) {
|
||||
@@ -219,13 +177,16 @@ const initDicData = async () => {
|
||||
? certResponse.data
|
||||
: (certResponse.data.records || certResponse.data.list || [])
|
||||
}
|
||||
|
||||
visible.value = true
|
||||
} catch (error) {
|
||||
// 获取字典数据失败
|
||||
}
|
||||
}
|
||||
|
||||
// 证书编号输入处理(只允许英文和数字)
|
||||
const handleCertificateNumberInput = (value: string) => {
|
||||
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||
}
|
||||
|
||||
// 文件上传成功 - 材料A
|
||||
const materiaUploadSuccess = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
@@ -245,38 +206,104 @@ const materiaUploadSuccessB = (response: any) => {
|
||||
}
|
||||
|
||||
// 打开对话框
|
||||
const openDialog = (row: any) => {
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=0`
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
Object.assign(dataForm, {
|
||||
certificateConfId: row.certificateConfId || '',
|
||||
certificateTime: row.certificateTime || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
materialB: row.materialB || '',
|
||||
evidenceA: row.evidenceA || '',
|
||||
evidenceB: row.evidenceB || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
initDicData()
|
||||
const openDialog = async (row?: any) => {
|
||||
if (row && row.id) {
|
||||
// 编辑模式
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=0`
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
Object.assign(dataForm, {
|
||||
certificateConfId: row.certificateConfId || '',
|
||||
certificateTime: row.certificateTime || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
materialB: row.materialB || '',
|
||||
evidenceA: row.evidenceA || '',
|
||||
evidenceB: row.evidenceB || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
await initDicData()
|
||||
dialogVisible.value = true
|
||||
} else {
|
||||
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||
try {
|
||||
const lockResponse = await checkLocked('teacherTitle')
|
||||
if (lockResponse.data) {
|
||||
// 已锁定
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
// 未锁定,继续获取 teacherNo
|
||||
const response = await getMyTeacherNo()
|
||||
const teacherNo = response.data
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=0`
|
||||
Object.assign(dataForm, {
|
||||
certificateConfId: '',
|
||||
certificateTime: '',
|
||||
certificateNumber: '',
|
||||
materialA: '',
|
||||
materialB: '',
|
||||
evidenceA: '',
|
||||
evidenceB: '',
|
||||
state: '',
|
||||
teacherNo: teacherNo,
|
||||
id: ''
|
||||
})
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} catch (error) {
|
||||
message.error('获取教师编号失败')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const dialogSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||
if (!dataForm.evidenceA && !dataForm.materialA) {
|
||||
message.warning("请上传证明材料")
|
||||
return
|
||||
}
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("操作成功")
|
||||
visible.value = false
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("修改成功")
|
||||
} else {
|
||||
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||
// 注意:MultiDialog 的 type=0 表单只有 certificateConfId 和 certificateNumber,没有 certificateTime
|
||||
const submitData: any = {
|
||||
type: 0, // 教师资格证类型
|
||||
teacherNo: dataForm.teacherNo,
|
||||
certificateConfId: dataForm.certificateConfId,
|
||||
certificateNumber: dataForm.certificateNumber,
|
||||
mateA: dataForm.evidenceA || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||
}
|
||||
|
||||
const res = await updateOtherInfo(submitData)
|
||||
if (res.data == '-1') {
|
||||
message.warning("当前不允许提交")
|
||||
} else {
|
||||
message.success("提交成功")
|
||||
}
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<el-select
|
||||
v-model="search.state"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请选择审核状态"
|
||||
>
|
||||
<el-option
|
||||
@@ -30,7 +29,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -39,7 +37,6 @@
|
||||
<el-input
|
||||
v-model="search.realName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -65,7 +62,8 @@
|
||||
v-if="permissions.professional_professionalteachercertificaterelation_add">新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
v-if="permissions.professional_teacherbase_export"
|
||||
@click="handleDownLoadWord"
|
||||
@@ -87,18 +85,15 @@
|
||||
|
||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="realName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||
<template #default="scope">
|
||||
<TeacherNameNo :name="scope.row.realName" :no="scope.row.teacherNo" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="certificateConfId" label="关联资格证书" min-width="150" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
@@ -116,40 +111,44 @@
|
||||
v-if="scope.row.evidenceA && scope.row.evidenceA !== ''"
|
||||
type="primary"
|
||||
link
|
||||
icon="Document"
|
||||
@click="handlePreview(scope.row.srcList)">查看
|
||||
</el-button>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Edit"
|
||||
icon="edit-pen"
|
||||
v-if="permissions.professional_professionalteachercertificaterelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||
@click="handleEdit(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
icon="Check"
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionalteachercertificaterelation_exam && scope.row.state === '0'"
|
||||
@click="changeState(scope.row, 1)">通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Close"
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionalteachercertificaterelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||
@click="changeState(scope.row, -2)">驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
type="primary"
|
||||
link
|
||||
icon="Delete"
|
||||
icon="delete"
|
||||
v-if="permissions.professional_professionalteachercertificaterelation_del"
|
||||
style="margin-left: 12px"
|
||||
@click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -174,7 +173,6 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 子组件 -->
|
||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||
</div>
|
||||
@@ -197,11 +195,20 @@ import {
|
||||
exportExcel
|
||||
} from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue'))
|
||||
|
||||
// 审核状态选项(独立定义,防止其他页面修改时被波及)
|
||||
import type { StateOption } from '/@/components/AuditState/index.vue'
|
||||
const auditStateOptions: StateOption[] = [
|
||||
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' },
|
||||
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' },
|
||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' }
|
||||
]
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
const { userInfos } = storeToRefs(userInfoStore)
|
||||
@@ -225,7 +232,6 @@ const { professional_state: professionalState } = useDict('professional_state')
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const multiDialogRef = ref()
|
||||
const dataFormRef = ref()
|
||||
const backReasonRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@@ -327,7 +333,7 @@ const resetQuery = () => {
|
||||
|
||||
// 打开新增窗口
|
||||
const handleAdd = () => {
|
||||
multiDialogRef.value?.init(0)
|
||||
dataFormRef.value?.openDialog()
|
||||
}
|
||||
|
||||
// 打开编辑窗口
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" :title="title" width="80%" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-dialog v-model="dialogVisible" :title="title" width="80%" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-row>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -33,7 +33,6 @@
|
||||
<el-form-item label="证明材料" prop="materialA">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:on-success="materiaUploadSuccess"
|
||||
@@ -42,7 +41,9 @@
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -52,7 +53,7 @@
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">关 闭</el-button>
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
<el-button @click="dialogSubmit" type="primary" :loading="submitLoading">保 存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -63,17 +64,12 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
visible?: boolean
|
||||
}>()
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void
|
||||
(e: 'refreshData'): void
|
||||
}>()
|
||||
|
||||
@@ -84,11 +80,8 @@ const message = useMessage()
|
||||
const formRef = ref()
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 对话框显示状态
|
||||
const visible = computed({
|
||||
get: () => props.visible || false,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
// 对话框显示状态(内部管理)
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
// 表单数据
|
||||
const dataForm = reactive({
|
||||
@@ -116,32 +109,7 @@ const dataRules = {
|
||||
]
|
||||
}
|
||||
|
||||
// 基础信息
|
||||
const baseInfoAbout = reactive<{
|
||||
stationTypeList: any[]
|
||||
atStationList: any[]
|
||||
teacherTypeList: any[]
|
||||
employmentNatureList: any[]
|
||||
stationLevelList: any[]
|
||||
stationDutyLevelList: any[]
|
||||
workTypeList: any[]
|
||||
proTitleList: any[]
|
||||
majorStationList: any[]
|
||||
qualificationList: any[]
|
||||
partBranchList: any[]
|
||||
}>({
|
||||
stationTypeList: [],
|
||||
atStationList: [],
|
||||
teacherTypeList: [],
|
||||
employmentNatureList: [],
|
||||
stationLevelList: [],
|
||||
stationDutyLevelList: [],
|
||||
workTypeList: [],
|
||||
proTitleList: [],
|
||||
majorStationList: [],
|
||||
qualificationList: [],
|
||||
partBranchList: []
|
||||
})
|
||||
// 基础信息(简化,只保留需要的)
|
||||
|
||||
// 上传相关
|
||||
const url = ref('')
|
||||
@@ -160,26 +128,9 @@ const showForm = ref(false)
|
||||
// 标题
|
||||
const title = ref('')
|
||||
|
||||
// 初始化字典数据
|
||||
// 初始化字典数据(简化,不需要加载字典数据)
|
||||
const initDicData = async () => {
|
||||
try {
|
||||
const response = await getAllInfoAboutList()
|
||||
const map = response.data.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||
visible.value = true
|
||||
} catch (error) {
|
||||
// 获取字典数据失败
|
||||
}
|
||||
// 综合表彰不需要额外的字典数据
|
||||
}
|
||||
|
||||
// 文件上传成功
|
||||
@@ -192,37 +143,102 @@ const materiaUploadSuccess = (response: any) => {
|
||||
}
|
||||
|
||||
// 打开对话框
|
||||
const openDialog = (row: any) => {
|
||||
title.value = row.teacherName || ''
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=4`
|
||||
fileList.value = []
|
||||
Object.assign(dataForm, {
|
||||
honor: row.honor || '',
|
||||
honorCompany: row.honorCompany || '',
|
||||
year: row.year || null,
|
||||
materialA: row.materialA || '',
|
||||
attachment: row.attachment || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
teacherName: row.teacherName || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
initDicData()
|
||||
const openDialog = async (row?: any) => {
|
||||
if (row && row.id) {
|
||||
// 编辑模式
|
||||
title.value = row.teacherName || ''
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=4`
|
||||
fileList.value = []
|
||||
Object.assign(dataForm, {
|
||||
honor: row.honor || '',
|
||||
honorCompany: row.honorCompany || '',
|
||||
year: row.year || null,
|
||||
materialA: row.materialA || '',
|
||||
attachment: row.attachment || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
teacherName: row.teacherName || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
await initDicData()
|
||||
dialogVisible.value = true
|
||||
} else {
|
||||
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||
try {
|
||||
const lockResponse = await checkLocked('remix')
|
||||
if (lockResponse.data) {
|
||||
// 已锁定
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
// 未锁定,继续获取 teacherNo
|
||||
const response = await getMyTeacherNo()
|
||||
const teacherNo = response.data
|
||||
title.value = '新增综合表彰'
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=4`
|
||||
Object.assign(dataForm, {
|
||||
honor: '',
|
||||
honorCompany: '',
|
||||
year: null,
|
||||
materialA: '',
|
||||
attachment: '',
|
||||
state: '',
|
||||
teacherNo: teacherNo,
|
||||
teacherName: '',
|
||||
id: ''
|
||||
})
|
||||
fileList.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} catch (error) {
|
||||
message.error('获取教师编号失败')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const dialogSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||
if (!dataForm.attachment && !dataForm.materialA) {
|
||||
message.warning("请上传证明材料")
|
||||
return
|
||||
}
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("操作成功")
|
||||
visible.value = false
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("修改成功")
|
||||
} else {
|
||||
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||
const submitData: any = {
|
||||
type: 4, // 综合表彰类型
|
||||
teacherNo: dataForm.teacherNo,
|
||||
honor: dataForm.honor,
|
||||
honorCompany: dataForm.honorCompany,
|
||||
year: dataForm.year,
|
||||
mateA: dataForm.attachment || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||
}
|
||||
|
||||
const res = await updateOtherInfo(submitData)
|
||||
if (res.data == '-1') {
|
||||
message.warning("当前不允许提交")
|
||||
} else {
|
||||
message.success("提交成功")
|
||||
}
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<el-select
|
||||
v-model="search.state"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请选择审核状态"
|
||||
>
|
||||
<el-option
|
||||
@@ -30,7 +29,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -39,7 +37,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -65,10 +62,11 @@
|
||||
v-if="permissions.professional_professionalteacherhonor_add">新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleDownLoadWord"
|
||||
:loading="exportLoading">导出
|
||||
:loading="exportLoading">导出信息
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
@@ -86,18 +84,15 @@
|
||||
|
||||
<el-table-column prop="state" label="审核状态" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state === '1'" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '-2'" type="danger">驳回</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === '0'" type="warning">待审核</el-tag>
|
||||
<span v-else>-</span>
|
||||
<AuditState :state="scope.row.state" :options="auditStateOptions" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="teacherName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||
<template #default="scope">
|
||||
<TeacherNameNo :name="scope.row.teacherName" :no="scope.row.teacherNo" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="honor" label="荣誉" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
@@ -111,40 +106,44 @@
|
||||
v-if="scope.row.attachment && scope.row.attachment !== ''"
|
||||
type="primary"
|
||||
link
|
||||
@click="showEdvince(scope.row)">查 看
|
||||
icon="Document"
|
||||
@click="showEdvince(scope.row)">查看
|
||||
</el-button>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
||||
<el-table-column prop="backReason" label="驳回理由" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Edit"
|
||||
icon="edit-pen"
|
||||
v-if="permissions.professional_professionalteacherhonor_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||
@click="handleEdit(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
icon="Check"
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionalteacherhonor_exam && scope.row.state === '0'"
|
||||
@click="changeState(scope.row, 1)">通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Close"
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionalteacherhonor_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||
@click="changeState(scope.row, -2)">驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
type="primary"
|
||||
link
|
||||
icon="Delete"
|
||||
icon="delete"
|
||||
v-if="permissions.professional_professionalteacherhonor_del"
|
||||
style="margin-left: 12px"
|
||||
@click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -159,10 +158,9 @@
|
||||
/>
|
||||
|
||||
<!-- 子组件 -->
|
||||
<MultiDialog ref="multiDialogRef" @getList="getDataList" :page="state.pagination" :nowRow="null" />
|
||||
<ShowHonorEdvince ref="showHonorEdvinceRef" />
|
||||
<ProfessionalBackResaon ref="backReasonRef" @refreshData="handleFilter" />
|
||||
<DataForm ref="dataFormRef" />
|
||||
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -181,10 +179,11 @@ import {
|
||||
delObj
|
||||
} from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
||||
import ShowHonorEdvince from './showHonorEdvince.vue'
|
||||
import ProfessionalBackResaon from '/@/views/professional/common/professional-back-resaon.vue'
|
||||
import DataForm from './form.vue'
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
const ShowHonorEdvince = defineAsyncComponent(() => import('./showHonorEdvince.vue'))
|
||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||
const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -206,10 +205,17 @@ const messageBox = useMessageBox()
|
||||
// 字典数据
|
||||
const { professional_state: professionalState } = useDict('professional_state')
|
||||
|
||||
// 审核状态选项(独立定义,防止其他页面修改时被波及)
|
||||
import type { StateOption } from '/@/components/AuditState/index.vue'
|
||||
const auditStateOptions: StateOption[] = [
|
||||
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' },
|
||||
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' },
|
||||
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' }
|
||||
]
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const multiDialogRef = ref()
|
||||
const showHonorEdvinceRef = ref()
|
||||
const backReasonRef = ref()
|
||||
const dataFormRef = ref()
|
||||
@@ -288,7 +294,7 @@ const resetQuery = () => {
|
||||
|
||||
// 打开新增窗口
|
||||
const handleAdd = () => {
|
||||
multiDialogRef.value?.init(4)
|
||||
dataFormRef.value?.openDialog()
|
||||
}
|
||||
|
||||
// 打开编辑窗口
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
v-show="showSearch"
|
||||
:model="search"
|
||||
ref="searchFormRef"
|
||||
@keyup-enter="handleFilter(search)"
|
||||
@keyup-enter="handleFilter"
|
||||
>
|
||||
<template #default="{ visible }">
|
||||
<template v-if="visible">
|
||||
@@ -14,7 +14,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -23,7 +22,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -33,7 +31,7 @@
|
||||
<!-- 操作按钮 -->
|
||||
<template #actions>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleFilter(search)" icon="Search">查询</el-button>
|
||||
<el-button type="primary" @click="handleFilter" icon="Search">查询</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -50,15 +48,17 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
|
||||
<el-table-column prop="teacherNo" label="工号" min-width="120" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="teacherName" label="姓名" min-width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="姓名/工号" min-width="150" align="center">
|
||||
<template #default="scope">
|
||||
<TeacherNameNo :name="scope.row.teacherName" :no="scope.row.teacherNo" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="oldDeptName" label="原部门名称" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="newDeptName" label="现部门名称" min-width="150" align="center" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="changeDate" label="调令日期" width="120" align="center" />
|
||||
<el-table-column prop="changeDate" label="调令日期" min-width="120" align="center" />
|
||||
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
@@ -84,9 +84,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { fetchList } from '/@/api/professional/professionaluser/professionalteacherstationchange'
|
||||
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" title="编辑职称" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-dialog v-model="dialogVisible" title="编辑职称" width="600px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="showForm">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -66,15 +66,17 @@
|
||||
<el-form-item label="证书编号" prop="certificateNumber">
|
||||
<el-input
|
||||
v-model="dataForm.certificateNumber"
|
||||
placeholder="请输入证书编号"
|
||||
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||
clearable
|
||||
show-word-limit
|
||||
maxlength="32"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证明材料" prop="materialA">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
@@ -83,7 +85,9 @@
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -92,7 +96,7 @@
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dialogSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -103,17 +107,14 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
||||
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
||||
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
visible?: boolean
|
||||
}>()
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void
|
||||
(e: 'refreshData'): void
|
||||
}>()
|
||||
|
||||
@@ -124,11 +125,8 @@ const message = useMessage()
|
||||
const formRef = ref()
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 对话框显示状态
|
||||
const visible = computed({
|
||||
get: () => props.visible || false,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
// 对话框显示状态(内部管理)
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
// 表单数据
|
||||
const dataForm = reactive({
|
||||
@@ -156,35 +154,18 @@ const formRules = {
|
||||
{ required: true, message: '请选择取证时间', trigger: 'change' }
|
||||
],
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
// 基础信息
|
||||
const baseInfoAbout = reactive<{
|
||||
stationTypeList: any[]
|
||||
atStationList: any[]
|
||||
teacherTypeList: any[]
|
||||
employmentNatureList: any[]
|
||||
stationLevelList: any[]
|
||||
stationDutyLevelList: any[]
|
||||
workTypeList: any[]
|
||||
proTitleList: any[]
|
||||
majorStationList: any[]
|
||||
qualificationList: any[]
|
||||
partBranchList: any[]
|
||||
}>({
|
||||
stationTypeList: [],
|
||||
atStationList: [],
|
||||
teacherTypeList: [],
|
||||
employmentNatureList: [],
|
||||
stationLevelList: [],
|
||||
stationDutyLevelList: [],
|
||||
workTypeList: [],
|
||||
proTitleList: [],
|
||||
majorStationList: [],
|
||||
qualificationList: [],
|
||||
partBranchList: []
|
||||
majorStationList: []
|
||||
})
|
||||
|
||||
// 上传相关
|
||||
@@ -210,66 +191,142 @@ const majorStationList = computed(() => baseInfoAbout.majorStationList as any[])
|
||||
// 初始化字典数据
|
||||
const initDicData = async () => {
|
||||
try {
|
||||
const response = await getAllInfoAboutList()
|
||||
const map = response.data.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||
visible.value = true
|
||||
const [titleResponse, stationResponse] = await Promise.all([
|
||||
getProfessionalTitleList(),
|
||||
getMajorStationList()
|
||||
])
|
||||
|
||||
// 处理职称列表(与 index.vue 保持一致)
|
||||
if (titleResponse && titleResponse.data) {
|
||||
baseInfoAbout.proTitleList = titleResponse.data
|
||||
}
|
||||
|
||||
// 处理专业技术职务列表(与 index.vue 保持一致)
|
||||
if (stationResponse && stationResponse.data) {
|
||||
baseInfoAbout.majorStationList = stationResponse.data
|
||||
}
|
||||
} catch (error) {
|
||||
// 获取字典数据失败
|
||||
message.error('获取字典数据失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 证书编号输入处理(只允许英文和数字)
|
||||
const handleCertificateNumberInput = (value: string) => {
|
||||
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||
}
|
||||
|
||||
// 文件上传成功
|
||||
const materiaUploadSuccess = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
message.error("当前不允许上传文件")
|
||||
return
|
||||
}
|
||||
// 统一使用 evidence 字段存储证明材料URL(与后端API一致)
|
||||
dataForm.evidence = response.data.url
|
||||
dataForm.materialA = response.data.url
|
||||
}
|
||||
|
||||
// 打开对话框
|
||||
const openDialog = (row: any) => {
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=2`
|
||||
fileList.value = []
|
||||
Object.assign(dataForm, {
|
||||
professionalTitleConfigId: row.professionalTitleConfigId || '',
|
||||
majorStation: row.majorStation || '',
|
||||
certificateTime: row.certificateTime || '',
|
||||
inOfficeDate: row.inOfficeDate || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
evidence: row.evidence || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
initDicData()
|
||||
const openDialog = async (row?: any) => {
|
||||
// 新增时 row 可能为 null 或 undefined
|
||||
if (row && row.teacherNo) {
|
||||
// 编辑模式:使用传入的 teacherNo(编辑不需要检查锁定)
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=2`
|
||||
Object.assign(dataForm, {
|
||||
professionalTitleConfigId: row.professionalTitleConfigId || '',
|
||||
majorStation: row.majorStation || '',
|
||||
certificateTime: row.certificateTime || '',
|
||||
inOfficeDate: row.inOfficeDate || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
evidence: row.evidence || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
fileList.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} else {
|
||||
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||
try {
|
||||
const lockResponse = await checkLocked('title')
|
||||
if (lockResponse.data) {
|
||||
// 已锁定
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
// 未锁定,继续获取 teacherNo
|
||||
const response = await getMyTeacherNo()
|
||||
const teacherNo = response.data
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=2`
|
||||
Object.assign(dataForm, {
|
||||
professionalTitleConfigId: '',
|
||||
majorStation: '',
|
||||
certificateTime: '',
|
||||
inOfficeDate: '',
|
||||
certificateNumber: '',
|
||||
materialA: '',
|
||||
evidence: '',
|
||||
state: '',
|
||||
teacherNo: teacherNo,
|
||||
id: ''
|
||||
})
|
||||
fileList.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} catch (error) {
|
||||
message.error('获取教师编号失败')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const dialogSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
// 验证证明材料是否上传(与 MultiDialog 保持一致)
|
||||
if (!dataForm.evidence && !dataForm.materialA) {
|
||||
message.warning("请上传证明材料")
|
||||
return
|
||||
}
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("操作成功")
|
||||
visible.value = false
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
message.success("修改成功")
|
||||
} else {
|
||||
// 新增:使用 updateOtherInfo 接口(与 MultiDialog 保持一致)
|
||||
const submitData: any = {
|
||||
type: 2, // 职称类型
|
||||
teacherNo: dataForm.teacherNo,
|
||||
professionalTitleConfigId: dataForm.professionalTitleConfigId,
|
||||
majorStation: dataForm.majorStation,
|
||||
certificateTime: dataForm.certificateTime,
|
||||
inOfficeDate: dataForm.inOfficeDate,
|
||||
certificateNumber: dataForm.certificateNumber,
|
||||
mateA: dataForm.evidence || dataForm.materialA // 使用 mateA 字段(与 MultiDialog 一致)
|
||||
}
|
||||
|
||||
const res = await updateOtherInfo(submitData)
|
||||
if (res.data == '-1') {
|
||||
message.warning("当前不允许提交")
|
||||
} else {
|
||||
message.success("提交成功")
|
||||
}
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
|
||||
@@ -1,41 +1,6 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 图表统计 -->
|
||||
<div style="text-align: right; margin-bottom: 20px;">
|
||||
<el-collapse accordion @change="initChartOption">
|
||||
<el-collapse-item title="职称统计">
|
||||
<div style="width: 100%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="titleChartRef" style="width: 100%; height: 400px;" :option="titleChartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="titleChartTableData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="name" label="职称" width="180" align="center" />
|
||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24" style="margin-top: 20px;">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="techChartRef" style="width: 100%; height: 400px;" :option="techChartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="techChartTableData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="name" label="技术职务" width="180" align="center" />
|
||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
||||
<!-- 搜索表单 -->
|
||||
<search-form
|
||||
v-show="showSearch"
|
||||
@@ -49,7 +14,6 @@
|
||||
<el-select
|
||||
v-model="search.state"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请选择审核状态"
|
||||
>
|
||||
<el-option
|
||||
@@ -65,7 +29,6 @@
|
||||
<el-input
|
||||
v-model="search.teacherNo"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入工号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -74,7 +37,6 @@
|
||||
<el-input
|
||||
v-model="search.realName"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -84,7 +46,6 @@
|
||||
v-model="search.professionalTitleConfigId"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 200px"
|
||||
placeholder="请选择职称"
|
||||
>
|
||||
<el-option
|
||||
@@ -101,7 +62,6 @@
|
||||
v-model="search.majorStation"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 200px"
|
||||
placeholder="请选择专业技术职务"
|
||||
>
|
||||
<el-option
|
||||
@@ -134,7 +94,9 @@
|
||||
v-if="permissions.professional_professionaltitlerelation_add">新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
class="ml10"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
v-if="permissions.professional_teacherbase_export"
|
||||
@click="handleDownLoadWord"
|
||||
@@ -188,7 +150,7 @@
|
||||
v-if="scope.row.evidence && scope.row.evidence !== ''"
|
||||
type="primary"
|
||||
link
|
||||
icon="View"
|
||||
icon="Document"
|
||||
@click="handlePreview(scope.row.srcList)">查看
|
||||
</el-button>
|
||||
<span v-else>-</span>
|
||||
@@ -209,14 +171,14 @@
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
icon="check"
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.state === '0'"
|
||||
@click="changeState(scope.row, 1)">通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="close"
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionaltitlerelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
|
||||
@click="changeState(scope.row, -2)">驳回
|
||||
</el-button>
|
||||
@@ -265,21 +227,17 @@ import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useMessageBox } from '/@/hooks/message'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
// 接口
|
||||
import {
|
||||
fetchList,
|
||||
putObj,
|
||||
delObj,
|
||||
getChartOption,
|
||||
exportRelation
|
||||
} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
||||
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
// 子组件
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
const MultiDialog = defineAsyncComponent(() => import('/@/views/professional/teacherbase/multiDialog.vue'))
|
||||
@@ -287,9 +245,6 @@ const DataForm = defineAsyncComponent(() => import('./form.vue'))
|
||||
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
|
||||
const authImg = defineAsyncComponent(() => import('/@/components/tools/auth-img.vue'))
|
||||
|
||||
// 注册 ECharts 组件
|
||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
const { userInfos } = storeToRefs(userInfoStore)
|
||||
@@ -316,8 +271,6 @@ const searchFormRef = ref()
|
||||
const multiDialogRef = ref()
|
||||
const dataFormRef = ref()
|
||||
const backReasonRef = ref()
|
||||
const titleChartRef = ref()
|
||||
const techChartRef = ref()
|
||||
const showSearch = ref(true)
|
||||
|
||||
// 搜索表单数据
|
||||
@@ -329,12 +282,6 @@ const search = reactive({
|
||||
majorStation: ''
|
||||
})
|
||||
|
||||
// 图表数据
|
||||
const titleChartOption = ref<any>({})
|
||||
const titleChartTableData = ref<any[]>([])
|
||||
const techChartOption = ref<any>({})
|
||||
const techChartTableData = ref<any[]>([])
|
||||
|
||||
// 材料预览
|
||||
const dialogVisible = ref(false)
|
||||
const imgUrl = ref<Array<{ title: string; url: string }>>([])
|
||||
@@ -371,54 +318,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化图表
|
||||
const initChartOption = async () => {
|
||||
try {
|
||||
const response = await getChartOption()
|
||||
const data = response.data.data || {}
|
||||
|
||||
// 职称图表
|
||||
titleChartOption.value = data.titleOption || {}
|
||||
let titleTotal = 0
|
||||
if (titleChartOption.value.series && titleChartOption.value.series[0] && titleChartOption.value.series[0].data) {
|
||||
titleChartOption.value.series[0].data.forEach((item: any) => {
|
||||
titleTotal += item.value || 0
|
||||
})
|
||||
|
||||
titleChartTableData.value = []
|
||||
titleChartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = titleTotal > 0 ? Number((item.value / titleTotal * 100).toFixed(1)) : 0
|
||||
titleChartTableData.value.push({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 技术职务图表
|
||||
techChartOption.value = data.techOption || {}
|
||||
let techTotal = 0
|
||||
if (techChartOption.value.series && techChartOption.value.series[0] && techChartOption.value.series[0].data) {
|
||||
techChartOption.value.series[0].data.forEach((item: any) => {
|
||||
techTotal += item.value || 0
|
||||
})
|
||||
|
||||
techChartTableData.value = []
|
||||
techChartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = techTotal > 0 ? Number((item.value / techTotal * 100).toFixed(1)) : 0
|
||||
techChartTableData.value.push({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
// Failed to load chart data
|
||||
}
|
||||
}
|
||||
|
||||
// 预览材料
|
||||
const handlePreview = (list: string[]) => {
|
||||
imgUrl.value = []
|
||||
@@ -477,7 +376,7 @@ const resetQuery = () => {
|
||||
|
||||
// 打开新增窗口
|
||||
const handleAdd = () => {
|
||||
multiDialogRef.value?.init(2)
|
||||
dataFormRef.value?.openDialog()
|
||||
}
|
||||
|
||||
// 打开编辑窗口
|
||||
|
||||
119
src/views/professional/professionaltitlerelation/statistics.vue
Normal file
119
src/views/professional/professionaltitlerelation/statistics.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 页面标题 -->
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h2 style="margin: 0; font-size: 20px; font-weight: 600; color: #303133;">职称统计</h2>
|
||||
</div>
|
||||
|
||||
<!-- 图表统计 -->
|
||||
<div style="width: 100%">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="titleChartRef" style="width: 100%; height: 400px;" :option="titleChartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="titleChartTableData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="name" label="职称" width="180" align="center" />
|
||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24" style="margin-top: 20px;">
|
||||
<el-col :span="12">
|
||||
<v-chart ref="techChartRef" style="width: 100%; height: 400px;" :option="techChartOption" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-table :data="techChartTableData" border show-summary style="width: 100%">
|
||||
<el-table-column prop="name" label="技术职务" width="180" align="center" />
|
||||
<el-table-column prop="value" label="人数" width="180" align="center" />
|
||||
<el-table-column prop="rate" label="比例" width="180" align="center" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { getChartOption } from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||
|
||||
// 注册 ECharts 组件
|
||||
use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer])
|
||||
|
||||
// 图表引用
|
||||
const titleChartRef = ref()
|
||||
const techChartRef = ref()
|
||||
|
||||
// 图表数据
|
||||
const titleChartOption = ref<any>({})
|
||||
const titleChartTableData = ref<any[]>([])
|
||||
const techChartOption = ref<any>({})
|
||||
const techChartTableData = ref<any[]>([])
|
||||
|
||||
// 初始化图表
|
||||
const initChartOption = async () => {
|
||||
try {
|
||||
const response = await getChartOption()
|
||||
const data = response.data.data || {}
|
||||
|
||||
// 职称图表
|
||||
titleChartOption.value = data.titleOption || {}
|
||||
let titleTotal = 0
|
||||
if (titleChartOption.value.series && titleChartOption.value.series[0] && titleChartOption.value.series[0].data) {
|
||||
titleChartOption.value.series[0].data.forEach((item: any) => {
|
||||
titleTotal += item.value || 0
|
||||
})
|
||||
|
||||
titleChartTableData.value = []
|
||||
titleChartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = titleTotal > 0 ? Number((item.value / titleTotal * 100).toFixed(1)) : 0
|
||||
titleChartTableData.value.push({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 技术职务图表
|
||||
techChartOption.value = data.techOption || {}
|
||||
let techTotal = 0
|
||||
if (techChartOption.value.series && techChartOption.value.series[0] && techChartOption.value.series[0].data) {
|
||||
techChartOption.value.series[0].data.forEach((item: any) => {
|
||||
techTotal += item.value || 0
|
||||
})
|
||||
|
||||
techChartTableData.value = []
|
||||
techChartOption.value.series[0].data.forEach((item: any) => {
|
||||
const rate = techTotal > 0 ? Number((item.value / techTotal * 100).toFixed(1)) : 0
|
||||
techChartTableData.value.push({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
rate: `${rate}%`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
// Failed to load chart data
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载时初始化图表
|
||||
onMounted(() => {
|
||||
initChartOption()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Upload"
|
||||
icon="UploadFilled"
|
||||
class="ml10"
|
||||
v-if="permissions.professional_teacherinfo_import"
|
||||
@click="handleImportDialog"
|
||||
@@ -1027,8 +1027,8 @@
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="form.professionalStationRelation.stationDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="请选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -1071,8 +1071,8 @@
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="form.professionalStationRelation.workDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="请选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -1084,8 +1084,8 @@
|
||||
type="date"
|
||||
readonly
|
||||
v-model="form.professionalStationRelation.retireDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="自动计算"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -1108,8 +1108,8 @@
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="form.professionalStationRelation.dutyDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="请选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -1122,8 +1122,8 @@
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="form.professionalStationRelation.entrySchoolDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="请选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -1134,8 +1134,8 @@
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="form.professionalStationRelation.entryDutyDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="请选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
@@ -1419,11 +1419,11 @@
|
||||
exportNoImgUser,
|
||||
updateInout,
|
||||
exportTeacherInfo as exportTeacherInfoApi
|
||||
} from '/@/api/professional/teacherbase'
|
||||
} from '/@/api/professional/professionaluser/teacherbase'
|
||||
import {getNationalList} from '/@/api/basic/basicnation'
|
||||
import {addPoliticssStatus, dePoObj} from '/@/api/professional/professionalpoliticsstatus'
|
||||
import {addPoliticssStatus, dePoObj} from '/@/api/professional/professionaluser/professionalpoliticsstatus'
|
||||
import {addAcadeRelation, delEduObj} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||
import {addSocialObj, delSocialObj as delSocialObjApi} from '/@/api/professional/professionalsocial'
|
||||
import {addSocialObj, delSocialObj as delSocialObjApi} from '/@/api/professional/professionaluser/professionalsocial'
|
||||
import {addTitleRelationObj, delTitleObj as delTitleObjApi} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||
import {addQuaRelation, delQuaObj as delQuaObjApi} from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||
import {getDicts} from '/@/api/admin/dict'
|
||||
@@ -1437,7 +1437,7 @@
|
||||
getDeptListByParent
|
||||
} from '/@/api/basic/basicdept'
|
||||
import {getAllList, updateStatus} from '/@/api/professional/professionalstatuslock'
|
||||
import {resetPassWord} from "/@/api/professional/teacherbase"
|
||||
import {resetPassWord} from "/@/api/professional/professionaluser/teacherbase"
|
||||
// 组件配置已不再需要(已从 avue-crud 迁移到 el-table)
|
||||
import global from '/@/components/tools/commondict.vue'
|
||||
import authImg from "/@/components/tools/auth-img.vue";
|
||||
|
||||
@@ -15,21 +15,28 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证书编号" prop="certificateNumber">
|
||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编号" />
|
||||
<el-input
|
||||
v-model="waitShenheForm.form.certificateNumber"
|
||||
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证明材料">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="materialUrlFrom.url"
|
||||
:file-list="materialUrlFrom.fileListA"
|
||||
:on-success="materiaUploadSuccessA"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@@ -93,36 +100,48 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证书编码" prop="certificateNumber">
|
||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编码" />
|
||||
<el-input
|
||||
v-model="waitShenheForm.form.certificateNumber"
|
||||
placeholder="请输入证书编码(仅支持英文和数字)"
|
||||
show-word-limit
|
||||
maxlength="100"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="学历证书">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="materialUrlFrom.url"
|
||||
:file-list="materialUrlFrom.fileListA"
|
||||
:on-success="materiaUploadSuccessA"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="学位证书">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="materialUrlFrom.url"
|
||||
:on-success="materiaUploadSuccessB"
|
||||
:file-list="materialUrlFrom.fileListB"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@@ -178,21 +197,28 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证书编号" prop="certificateNumber">
|
||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编号" />
|
||||
<el-input
|
||||
v-model="waitShenheForm.form.certificateNumber"
|
||||
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证明材料">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="materialUrlFrom.url"
|
||||
:file-list="materialUrlFrom.fileListA"
|
||||
:on-success="materiaUploadSuccessA"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@@ -237,21 +263,30 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="证书编号" prop="certificateNumber">
|
||||
<el-input v-model="waitShenheForm.form.certificateNumber" placeholder="请输入证书编号" />
|
||||
<el-input
|
||||
v-model="waitShenheForm.form.certificateNumber"
|
||||
placeholder="请输入证书编号(仅支持英文和数字)"
|
||||
show-word-limit
|
||||
maxlength="32"
|
||||
@input="handleCertificateNumberInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="材料1">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="materialUrlFrom.url"
|
||||
:file-list="materialUrlFrom.fileListA"
|
||||
:on-success="materiaUploadSuccessA"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@@ -284,15 +319,18 @@
|
||||
<el-form-item label="证明材料">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
style="width:3.5cm;height:5.3cm;"
|
||||
:limit="1"
|
||||
:action="materialUrlFrom.url"
|
||||
:on-success="materiaUploadSuccessA"
|
||||
:file-list="materialUrlFrom.fileListA"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<div>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@@ -428,7 +466,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { updateOtherInfo, getMyTeacherNo, getAllInfoAboutList } from '/@/api/professional/teacherbase'
|
||||
import { updateOtherInfo, getMyTeacherNo, getAllInfoAboutList } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
import { getDeptListByLevelTwo, getDeptListByParent as getDeptListByParentApi } from '/@/api/basic/basicdept'
|
||||
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
||||
@@ -456,7 +494,10 @@
|
||||
// 表单验证规则
|
||||
const teacherCertificateRules = {
|
||||
certificateConfId: [{ required: true, message: '请选择类型', trigger: 'change' }],
|
||||
certificateNumber: [{ required: true, message: '请输入证书编号', trigger: 'blur' }]
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
const educationRules = {
|
||||
@@ -464,21 +505,30 @@
|
||||
type: [{ required: true, message: '请选择教育类型', trigger: 'change' }],
|
||||
graduateSchool: [{ required: true, message: '请输入毕业学校', trigger: 'blur' }],
|
||||
major: [{ required: true, message: '请输入所学专业', trigger: 'blur' }],
|
||||
certificateNumber: [{ required: true, message: '请输入证书编码', trigger: 'blur' }]
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编码', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
const proRules = {
|
||||
professionalTitleConfigId: [{ required: true, message: '请选择职称等级', trigger: 'change' }],
|
||||
majorStation: [{ required: true, message: '请选择专业技术职务', trigger: 'change' }],
|
||||
certificateTime: [{ required: true, message: '请选择取证时间', trigger: 'change' }],
|
||||
certificateNumber: [{ required: true, message: '请输入证书编号', trigger: 'blur' }]
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
const workRules = {
|
||||
worker: [{ required: true, message: '请选择职业工种', trigger: 'change' }],
|
||||
qualificationConfigId: [{ required: true, message: '请选择等级', trigger: 'change' }],
|
||||
certificateTime: [{ required: true, message: '请选择取证时间', trigger: 'change' }],
|
||||
certificateNumber: [{ required: true, message: '请输入证书编号', trigger: 'blur' }]
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编号', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
const honorRules = {
|
||||
@@ -598,21 +648,25 @@
|
||||
}
|
||||
})
|
||||
// 方法定义
|
||||
const initDicData = () => {
|
||||
getAllInfoAboutList().then((response: any) => {
|
||||
const map = response.data.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList']
|
||||
baseInfoAbout.atStationList = map['atStationList']
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList']
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList']
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList']
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList']
|
||||
baseInfoAbout.workTypeList = map['workTypeList']
|
||||
baseInfoAbout.proTitleList = map['proTitleList']
|
||||
baseInfoAbout.majorStationList = map['majorStationList']
|
||||
baseInfoAbout.qualificationList = map['qualificationList']
|
||||
baseInfoAbout.partBranchList = map['partBranchList']
|
||||
})
|
||||
const initDicData = async () => {
|
||||
try {
|
||||
const response = await getAllInfoAboutList()
|
||||
const map = response.data
|
||||
baseInfoAbout.stationTypeList = map['stationTypeList'] || []
|
||||
baseInfoAbout.atStationList = map['atStationList'] || []
|
||||
baseInfoAbout.teacherTypeList = map['teacherTypeList'] || []
|
||||
baseInfoAbout.employmentNatureList = map['employmentNatureList'] || []
|
||||
baseInfoAbout.stationLevelList = map['stationLevelList'] || []
|
||||
baseInfoAbout.stationDutyLevelList = map['stationDutyLevelList'] || []
|
||||
baseInfoAbout.workTypeList = map['workTypeList'] || []
|
||||
baseInfoAbout.proTitleList = map['proTitleList'] || []
|
||||
baseInfoAbout.majorStationList = map['majorStationList'] || []
|
||||
baseInfoAbout.qualificationList = map['qualificationList'] || []
|
||||
baseInfoAbout.partBranchList = map['partBranchList'] || []
|
||||
} catch (error) {
|
||||
// 获取基础信息失败
|
||||
}
|
||||
|
||||
// 加载字典数据
|
||||
loadCertificateTypeList()
|
||||
loadEducationTypeList()
|
||||
@@ -620,17 +674,18 @@
|
||||
loadDegreeList()
|
||||
}
|
||||
|
||||
const init = (val: number) => {
|
||||
initDicData()
|
||||
if (val == 5 || val == 6) {
|
||||
const init = async (val: number) => {
|
||||
await initDicData()
|
||||
if (val === 5 || val === 6) {
|
||||
teacherNo.value = props.nowRow.teacherNo
|
||||
handleWaitExam(val)
|
||||
} else {
|
||||
for (let i in waitShenheForm.form) {
|
||||
if (i !== 'newDeptCodeList' && i !== 'deptCodeList') {
|
||||
(waitShenheForm.form as any)[i] = ''
|
||||
}
|
||||
}
|
||||
// 重置表单数据
|
||||
Object.keys(waitShenheForm.form).forEach(key => {
|
||||
if (key !== 'newDeptCodeList' && key !== 'deptCodeList') {
|
||||
(waitShenheForm.form as any)[key] = ''
|
||||
}
|
||||
})
|
||||
waitShenheForm.form.newDeptCodeList = []
|
||||
waitShenheForm.form.deptCodeList = []
|
||||
materialUrlFrom.fileListA = []
|
||||
@@ -638,32 +693,33 @@
|
||||
materialUrlFrom.fileListC = []
|
||||
materialUrlFrom.url = '/professional/file/teacherAboutInfoUpload'
|
||||
|
||||
let statusCode = ""
|
||||
if (val == 0) {
|
||||
statusCode = "teacherTitle"
|
||||
}
|
||||
if (val == 1) {
|
||||
statusCode = "acade"
|
||||
}
|
||||
if (val == 2) {
|
||||
statusCode = "title"
|
||||
}
|
||||
if (val == 3) {
|
||||
statusCode = "job"
|
||||
}
|
||||
if (val == 4) {
|
||||
statusCode = "remix"
|
||||
}
|
||||
checkLocked(statusCode).then((res: any) => {
|
||||
if (!res.data.data) {
|
||||
getMyTeacherNo().then((res: any) => {
|
||||
teacherNo.value = res.data.data
|
||||
handleWaitExam(val)
|
||||
})
|
||||
} else {
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
}
|
||||
})
|
||||
// 状态码映射
|
||||
const statusCodeMap: Record<number, string> = {
|
||||
0: "teacherTitle",
|
||||
1: "acade",
|
||||
2: "title",
|
||||
3: "job",
|
||||
4: "remix"
|
||||
}
|
||||
const statusCode = statusCodeMap[val]
|
||||
|
||||
if (statusCode) {
|
||||
try {
|
||||
const lockResponse = await checkLocked(statusCode)
|
||||
if (lockResponse.data) {
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
const response = await getMyTeacherNo()
|
||||
teacherNo.value = response.data
|
||||
handleWaitExam(val)
|
||||
} catch (error) {
|
||||
message.error('操作失败')
|
||||
}
|
||||
} else {
|
||||
handleWaitExam(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
const handleWaitExam = (val: number) => {
|
||||
@@ -676,127 +732,113 @@
|
||||
waitShenheForm.f = false
|
||||
waitShenheForm.g = false
|
||||
|
||||
switch (val) {
|
||||
case 0:
|
||||
waitShenheForm.title = "教师资格证"
|
||||
waitShenheForm.a = true
|
||||
break
|
||||
case 1:
|
||||
waitShenheForm.title = "学历更新"
|
||||
waitShenheForm.b = true
|
||||
break
|
||||
case 2:
|
||||
waitShenheForm.title = "职称更新"
|
||||
waitShenheForm.c = true
|
||||
break
|
||||
case 3:
|
||||
waitShenheForm.title = "职业更新"
|
||||
waitShenheForm.d = true
|
||||
break
|
||||
case 4:
|
||||
waitShenheForm.title = "综合表彰"
|
||||
// 表单类型配置
|
||||
const formConfig: Record<number, { title: string; field: 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' }> = {
|
||||
0: { title: "教师资格证", field: 'a' },
|
||||
1: { title: "学历更新", field: 'b' },
|
||||
2: { title: "职称更新", field: 'c' },
|
||||
3: { title: "职业更新", field: 'd' },
|
||||
4: { title: "综合表彰", field: 'e' },
|
||||
5: { title: "人员调动", field: 'f' },
|
||||
6: { title: "党员调动", field: 'g' }
|
||||
}
|
||||
|
||||
const config = formConfig[val]
|
||||
if (config) {
|
||||
waitShenheForm.title = config.title
|
||||
;(waitShenheForm as any)[config.field] = true
|
||||
|
||||
// 特殊处理
|
||||
if (val === 4) {
|
||||
// 综合表彰:重置相关字段
|
||||
materialUrlFrom.fileListA = []
|
||||
waitShenheForm.form.honor = ''
|
||||
waitShenheForm.form.honorCompany = ''
|
||||
waitShenheForm.form.year = ''
|
||||
waitShenheForm.form.attachment = ''
|
||||
waitShenheForm.e = true
|
||||
break
|
||||
case 5:
|
||||
waitShenheForm.title = "人员调动"
|
||||
waitShenheForm.f = true
|
||||
} else if (val === 5) {
|
||||
// 人员调动:加载部门数据
|
||||
waitShenheForm.form = { ...props.nowRow }
|
||||
waitShenheForm.form.newDeptCodeList = []
|
||||
waitShenheForm.form.deptCodeList = []
|
||||
newSecDeptCode.value = ''
|
||||
newSecChildDeptCode.value = ''
|
||||
getDeptListByLevelTwo().then((res: any) => {
|
||||
secDeptList.value = res.data.data
|
||||
secDeptList.value = res.data
|
||||
educationDialogFromVisible.value = true
|
||||
}).catch(() => {
|
||||
message.error('获取部门列表失败')
|
||||
})
|
||||
break
|
||||
case 6:
|
||||
waitShenheForm.title = "党员调动"
|
||||
} else if (val === 6) {
|
||||
// 党员调动:设置原支部
|
||||
waitShenheForm.form = { ...props.nowRow }
|
||||
waitShenheForm.form.oldBranchName = waitShenheForm.form.oldBranchId
|
||||
waitShenheForm.g = true
|
||||
break
|
||||
}
|
||||
materialUrlFrom.url = materialUrlFrom.url + "?teacherNo=" + teacherNo.value + "&type=" + val
|
||||
if (val != 5) {
|
||||
}
|
||||
}
|
||||
materialUrlFrom.url = `${materialUrlFrom.url}?teacherNo=${teacherNo.value}&type=${val}`
|
||||
if (val !== 5) {
|
||||
educationDialogFromVisible.value = true
|
||||
}
|
||||
}
|
||||
const materiaUploadSuccessA = (response: any, file: any, fileList: any) => {
|
||||
if (response.data.code == "-1") {
|
||||
// 证书编号输入处理(只允许英文和数字)
|
||||
const handleCertificateNumberInput = (value: string) => {
|
||||
waitShenheForm.form.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||
}
|
||||
|
||||
// 文件上传成功处理
|
||||
const materiaUploadSuccessA = (response: any) => {
|
||||
if (response.data?.code === "-1") {
|
||||
message.error("当前不允许上传文件")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
waitShenheForm.form.mateA = response.data.url
|
||||
}
|
||||
|
||||
const materiaUploadSuccessB = (response: any, file: any, fileList: any) => {
|
||||
if (response.data.code == "-1") {
|
||||
const materiaUploadSuccessB = (response: any) => {
|
||||
if (response.data?.code === "-1") {
|
||||
message.error("当前不允许上传文件")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
waitShenheForm.form.mateB = response.data.url
|
||||
}
|
||||
|
||||
const materiaUploadSuccessC = (response: any, file: any, fileList: any) => {
|
||||
if (response.data.code == "-1") {
|
||||
message.error("当前不允许上传文件")
|
||||
return
|
||||
}
|
||||
waitShenheForm.form.mateC = response.data.url
|
||||
}
|
||||
const dialogSubmit = async (val: number) => {
|
||||
waitShenheForm.form.type = val
|
||||
waitShenheForm.form.teacherNo = teacherNo.value
|
||||
|
||||
// 表单验证
|
||||
let formRef: any = null
|
||||
// 表单验证配置
|
||||
const formRefMap: Record<number, any> = {
|
||||
0: teacherCertificateFormRef.value,
|
||||
1: educationFormRef.value,
|
||||
2: proFormRef.value,
|
||||
3: workFormRef.value,
|
||||
4: honorFormRef.value,
|
||||
5: stationChangeFormRef.value,
|
||||
6: partChangeFormRef.value
|
||||
}
|
||||
|
||||
if (val == 0) {
|
||||
formRef = teacherCertificateFormRef.value
|
||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
||||
const formRef = formRefMap[val]
|
||||
|
||||
// 材料验证
|
||||
if (val === 0 || val === 2 || val === 3 || val === 4) {
|
||||
// 需要上传材料A的表单
|
||||
if (!waitShenheForm.form.mateA) {
|
||||
message.info("请上传资料")
|
||||
return
|
||||
}
|
||||
} else if (val == 1) {
|
||||
formRef = educationFormRef.value
|
||||
if ((undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") && (undefined == waitShenheForm.form.mateB || waitShenheForm.form.mateB == "")) {
|
||||
return
|
||||
}
|
||||
} else if (val === 1) {
|
||||
// 学历:需要上传材料A或材料B
|
||||
if (!waitShenheForm.form.mateA && !waitShenheForm.form.mateB) {
|
||||
message.info("请上传学历或学位证书")
|
||||
return
|
||||
}
|
||||
} else if (val == 2) {
|
||||
formRef = proFormRef.value
|
||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
||||
message.info("请上传证明材料")
|
||||
return
|
||||
}
|
||||
} else if (val == 3) {
|
||||
formRef = workFormRef.value
|
||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
||||
message.info("请上传资料")
|
||||
return
|
||||
}
|
||||
} else if (val == 4) {
|
||||
formRef = honorFormRef.value
|
||||
if (undefined == waitShenheForm.form.mateA || waitShenheForm.form.mateA == "") {
|
||||
message.info("请上传证明材料")
|
||||
return
|
||||
}
|
||||
} else if (val == 5) {
|
||||
formRef = stationChangeFormRef.value
|
||||
} else if (val === 5) {
|
||||
// 人员调动:需要选择部门
|
||||
if (!newSecDeptCode.value) {
|
||||
message.info("请选择要调入的部门")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
waitShenheForm.form.newDeptCode = newSecDeptCode.value
|
||||
waitShenheForm.form.newSecDeptCode = newSecChildDeptCode.value ? newSecChildDeptCode.value : newSecDeptCode.value
|
||||
} else if (val == 6) {
|
||||
formRef = partChangeFormRef.value
|
||||
waitShenheForm.form.newSecDeptCode = newSecChildDeptCode.value || newSecDeptCode.value
|
||||
}
|
||||
|
||||
// 验证表单
|
||||
@@ -811,11 +853,11 @@
|
||||
try {
|
||||
await messageBox.confirm('确认提交?')
|
||||
const res = await updateOtherInfo(waitShenheForm.form)
|
||||
if (res.data.data == '-1') {
|
||||
message.success("当前不允许提交")
|
||||
if (res.data === '-1') {
|
||||
message.warning("当前不允许提交")
|
||||
} else {
|
||||
message.success("提交成功")
|
||||
}
|
||||
}
|
||||
emit("getList", props.page)
|
||||
educationDialogFromVisible.value = false
|
||||
} catch (err) {
|
||||
@@ -823,12 +865,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
const getDeptListByParent = () => {
|
||||
const getDeptListByParent = async () => {
|
||||
newSecChildDeptCode.value = ''
|
||||
newSecChildDeptCodeList.value = []
|
||||
getDeptListByParentApi(newSecDeptCode.value).then((res: any) => {
|
||||
newSecChildDeptCodeList.value = res.data.data
|
||||
})
|
||||
try {
|
||||
const res = await getDeptListByParentApi(newSecDeptCode.value)
|
||||
newSecChildDeptCodeList.value = res.data
|
||||
} catch (error) {
|
||||
message.error('获取部门列表失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露方法
|
||||
|
||||
Reference in New Issue
Block a user