ren
This commit is contained in:
@@ -153,7 +153,7 @@ import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useMessageBox } from '/@/hooks/message'
|
||||
import { fetchList, addObj, putObj, delObj, getObj } from '/@/api/professional/outercompany'
|
||||
import { fetchList, addObj, putObj, delObj, getObj } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -153,7 +153,7 @@ import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useMessageBox } from '/@/hooks/message'
|
||||
import { fetchList, addObj, putObj, delObj, getObj } from '/@/api/professional/outercompany'
|
||||
import { fetchList, addObj, putObj, delObj, getObj } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -100,7 +100,7 @@ import { ref, reactive, computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { fetchList } from '/@/api/professional/outercompany'
|
||||
import { fetchList } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -405,8 +405,8 @@ import {
|
||||
delObj,
|
||||
batchDel,
|
||||
resetPassWord
|
||||
} from '/@/api/professional/outercompanyemployee'
|
||||
import { getList as getCompanyList } from '/@/api/professional/outercompany'
|
||||
} from '/@/api/professional/stayschool/outercompanyemployee'
|
||||
import { getList as getCompanyList } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -406,8 +406,8 @@ import {
|
||||
delObj,
|
||||
batchDel,
|
||||
resetPassWord
|
||||
} from '/@/api/professional/outercompanyemployee'
|
||||
import { getList as getCompanyList } from '/@/api/professional/outercompany'
|
||||
} from '/@/api/professional/stayschool/outercompanyemployee'
|
||||
import { getList as getCompanyList } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -385,8 +385,8 @@ import {
|
||||
delObj,
|
||||
batchDel,
|
||||
resetPassWord
|
||||
} from '/@/api/professional/outercompanyemployee'
|
||||
import { getList as getCompanyList } from '/@/api/professional/outercompany'
|
||||
} from '/@/api/professional/stayschool/outercompanyemployee'
|
||||
import { getList as getCompanyList } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -96,8 +96,8 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||
import { getMyTeacherNo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { addObj } from '/@/api/professional/professionaluser/professionalqualificationrelation'
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig'
|
||||
import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype'
|
||||
@@ -284,34 +284,26 @@ const dialogSubmit = async () => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
// 统一使用 addObj 接口(新增和编辑都使用同一个接口)
|
||||
// 确保 evidenceA 或 materialA 有值
|
||||
if (!dataForm.evidenceA && dataForm.materialA) {
|
||||
dataForm.evidenceA = dataForm.materialA
|
||||
}
|
||||
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
// 编辑模式
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
await addObj(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("提交成功")
|
||||
}
|
||||
// 新增模式
|
||||
await addObj(dataForm)
|
||||
message.success("提交成功")
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
@@ -147,8 +147,8 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||
import { getMyTeacherNo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { addObj } 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'
|
||||
@@ -370,42 +370,30 @@ const dialogSubmit = async () => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
// 统一使用 addObj 接口(新增和编辑都使用同一个接口)
|
||||
// 确保 qualificationImg 或 materialA 有值
|
||||
if (!dataForm.qualificationImg && dataForm.materialA) {
|
||||
dataForm.qualificationImg = dataForm.materialA
|
||||
}
|
||||
// 确保 degreeImg 或 materialB 有值
|
||||
if (!dataForm.degreeImg && dataForm.materialB) {
|
||||
dataForm.degreeImg = dataForm.materialB
|
||||
}
|
||||
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
// 编辑模式
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
await addObj(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("提交成功")
|
||||
}
|
||||
// 新增模式
|
||||
await addObj(dataForm)
|
||||
message.success("提交成功")
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
||||
import { getMyTeacherNo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { addObj } from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
|
||||
import { getTeacherCertificateList } from '/@/api/professional/rsbase/professionalteachercertificateconf'
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
|
||||
@@ -280,33 +280,30 @@ const dialogSubmit = async () => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
// 统一使用 addObj 接口(新增和编辑都使用同一个接口)
|
||||
// 确保 evidenceA 或 materialA 有值
|
||||
if (!dataForm.evidenceA && dataForm.materialA) {
|
||||
dataForm.evidenceA = dataForm.materialA
|
||||
}
|
||||
// 确保 evidenceB 或 materialB 有值
|
||||
if (!dataForm.evidenceB && dataForm.materialB) {
|
||||
dataForm.evidenceB = dataForm.materialB
|
||||
}
|
||||
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
// 编辑模式
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
await addObj(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("提交成功")
|
||||
}
|
||||
// 新增模式
|
||||
await addObj(dataForm)
|
||||
message.success("提交成功")
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getMyTeacherNo, updateOtherInfo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { putObj } from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||
import { getMyTeacherNo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { addObj } from '/@/api/professional/professionaluser/professionalteacherhonor'
|
||||
import { checkLocked } from '/@/api/professional/professionalstatuslock'
|
||||
|
||||
// Emits
|
||||
@@ -215,33 +215,26 @@ const dialogSubmit = async () => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
// 统一使用 addObj 接口(新增和编辑都使用同一个接口)
|
||||
// 确保 attachment 或 materialA 有值
|
||||
if (!dataForm.attachment && dataForm.materialA) {
|
||||
dataForm.attachment = dataForm.materialA
|
||||
}
|
||||
|
||||
if (dataForm.id) {
|
||||
// 编辑:使用 putObj 接口(管理员编辑)
|
||||
// 编辑模式
|
||||
dataForm.state = '0'
|
||||
await putObj(dataForm)
|
||||
await addObj(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("提交成功")
|
||||
}
|
||||
// 新增模式
|
||||
await addObj(dataForm)
|
||||
message.success("提交成功")
|
||||
}
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ const openDialog = async (row?: any) => {
|
||||
return
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('操作失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@ const dialogSubmit = async () => {
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || '操作失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
@@ -369,24 +369,26 @@
|
||||
<el-tab-pane label="基本信息" name="first">
|
||||
<div class="base-info-form">
|
||||
<el-form ref="baseForm" :model="form" label-width="120px" :rules="mergedRules">
|
||||
<!-- 照片区域 -->
|
||||
<div v-if="isAdd==false && imageUrl" class="photo-section">
|
||||
<div class="photo-wrapper">
|
||||
<img :src="imageUrl" class="avatar-photo" alt="照片">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 子标签页 -->
|
||||
<el-tabs v-model="subActiveName" type="card" class="sub-tabs">
|
||||
<!-- 基本信息子标签 -->
|
||||
<el-tab-pane label="基本信息" name="subBaseInfo">
|
||||
<!-- 基本信息分组 -->
|
||||
<div class="form-section">
|
||||
<div class="section-title">
|
||||
<el-icon><User /></el-icon>
|
||||
<span>基本信息</span>
|
||||
<!-- 照片区域和基本信息分组 -->
|
||||
<div class="base-info-layout">
|
||||
<!-- 左侧:照片区域 -->
|
||||
<div v-if="isAdd==false && imageUrl" class="photo-section">
|
||||
<div class="photo-wrapper">
|
||||
<img :src="imageUrl" class="avatar-photo" alt="照片">
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="16">
|
||||
|
||||
<!-- 右侧:基本信息分组 -->
|
||||
<div class="form-section">
|
||||
<div class="section-title">
|
||||
<el-icon><User /></el-icon>
|
||||
<span>基本信息</span>
|
||||
</div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名" prop="baseInfo.realName">
|
||||
<el-input
|
||||
@@ -442,6 +444,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 联系方式分组 -->
|
||||
@@ -886,19 +889,23 @@
|
||||
|
||||
<el-tab-pane label="政治面貌" name="politicsPane">
|
||||
<div class="table-section">
|
||||
<div class="table-header" v-if="permissions.professional_teacherbase_edit">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Flag /></el-icon>
|
||||
<span>政治面貌信息</span>
|
||||
</div>
|
||||
<el-button type="primary" size="default" @click="handleAddPolitics">
|
||||
<el-button v-if="permissions.professional_teacherbase_edit" type="primary" size="default" @click="handleAddPolitics">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span>新增</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="dataPolitics" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="politicsStatus" label="政治面貌" min-width="120" align="center" />
|
||||
<el-table-column prop="politicsStatus" label="政治面貌" min-width="120" align="center">
|
||||
<template #default="scope">
|
||||
{{ getPoliticsStatusName(scope.row.politicsStatusId || scope.row.politicsStatus) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="joinTime" label="加入时间" min-width="120" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.joinTime ? new Date(scope.row.joinTime).toLocaleDateString() : '-' }}
|
||||
@@ -932,12 +939,12 @@
|
||||
|
||||
<el-tab-pane label="社会关系" name="third">
|
||||
<div class="table-section">
|
||||
<div class="table-header" v-if="permissions.professional_teacherbase_edit">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Connection /></el-icon>
|
||||
<span>社会关系信息</span>
|
||||
</div>
|
||||
<el-button type="primary" size="default" @click="handleAddRelation">
|
||||
<el-button v-if="permissions.professional_teacherbase_edit" type="primary" size="default" @click="handleAddRelation">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span>新增</span>
|
||||
</el-button>
|
||||
@@ -951,7 +958,11 @@
|
||||
{{ scope.row.birthday ? new Date(scope.row.birthday).toLocaleDateString() : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="politicsStatus" label="政治面貌" min-width="120" align="center" />
|
||||
<el-table-column prop="politicsStatus" label="政治面貌" min-width="120" align="center">
|
||||
<template #default="scope">
|
||||
{{ getPoliticsStatusName(scope.row.politicsStatusId || scope.row.politicsStatus) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workStation" label="工作单位及职务" min-width="200" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" v-if="permissions.professional_teacherbase_edit">
|
||||
<template #default="scope">
|
||||
@@ -971,15 +982,11 @@
|
||||
|
||||
<el-tab-pane label="学历" name="second">
|
||||
<div class="table-section">
|
||||
<div class="table-header" v-if="permissions.professional_teacherbase_edit">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><School /></el-icon>
|
||||
<span>学历信息</span>
|
||||
</div>
|
||||
<el-button type="primary" size="default" @click="handleAddEducation">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span>新增</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="dataEducation" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
@@ -1024,18 +1031,6 @@
|
||||
{{ scope.row.createTime ? new Date(scope.row.createTime).toLocaleDateString() : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center" v-if="permissions.professional_teacherbase_edit">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link size="small" @click="handleEditEducation(scope.row, scope.$index)">
|
||||
<el-icon><Edit /></el-icon>
|
||||
<span>编辑</span>
|
||||
</el-button>
|
||||
<el-button type="danger" link size="small" @click="handleDeleteEducation(scope.row, scope.$index)">
|
||||
<el-icon><Delete /></el-icon>
|
||||
<span>删除</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -1043,15 +1038,11 @@
|
||||
<!--职称表单-->
|
||||
<el-tab-pane label="职称" name="fourth">
|
||||
<div class="table-section">
|
||||
<div class="table-header" v-if="permissions.professional_teacherbase_edit">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Medal /></el-icon>
|
||||
<span>职称信息</span>
|
||||
</div>
|
||||
<el-button type="primary" size="default" @click="handleAddPro">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span>新增</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="proData" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
@@ -1086,18 +1077,6 @@
|
||||
{{ scope.row.createTime ? new Date(scope.row.createTime).toLocaleDateString() : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center" v-if="permissions.professional_teacherbase_edit">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link size="small" @click="handleEditPro(scope.row, scope.$index)">
|
||||
<el-icon><Edit /></el-icon>
|
||||
<span>编辑</span>
|
||||
</el-button>
|
||||
<el-button type="danger" link size="small" @click="handleDeletePro(scope.row, scope.$index)">
|
||||
<el-icon><Delete /></el-icon>
|
||||
<span>删除</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -1105,15 +1084,11 @@
|
||||
<!--职业资格表单-->
|
||||
<el-tab-pane label="职业资格" name="five">
|
||||
<div class="table-section">
|
||||
<div class="table-header" v-if="permissions.professional_teacherbase_edit">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Medal /></el-icon>
|
||||
<span>职业资格信息</span>
|
||||
</div>
|
||||
<el-button type="primary" size="default" @click="handleAddWork">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span>新增</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="workData" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
@@ -1143,18 +1118,6 @@
|
||||
{{ scope.row.createTime ? new Date(scope.row.createTime).toLocaleDateString() : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center" v-if="permissions.professional_teacherbase_edit">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link size="small" @click="handleEditWork(scope.row, scope.$index)">
|
||||
<el-icon><Edit /></el-icon>
|
||||
<span>编辑</span>
|
||||
</el-button>
|
||||
<el-button type="danger" link size="small" @click="handleDeleteWork(scope.row, scope.$index)">
|
||||
<el-icon><Delete /></el-icon>
|
||||
<span>删除</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -1198,6 +1161,12 @@
|
||||
|
||||
<el-tab-pane label="岗位变更" name="stationChange">
|
||||
<div class="table-section">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Switch /></el-icon>
|
||||
<span>岗位变更信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="stationChange" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="oldDeptName" label="原部门名称" min-width="180" align="center" show-overflow-tooltip />
|
||||
@@ -1213,6 +1182,12 @@
|
||||
|
||||
<el-tab-pane label="党员调动" name="partyChange">
|
||||
<div class="table-section">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Flag /></el-icon>
|
||||
<span>党员调动信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="partyChange" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="oldBranchName" label="原支部名称" min-width="180" align="center" show-overflow-tooltip />
|
||||
@@ -1236,6 +1211,12 @@
|
||||
<!--综合表彰-->
|
||||
<el-tab-pane label="综合表彰" name="teacherHonor">
|
||||
<div class="table-section">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Medal /></el-icon>
|
||||
<span>综合表彰信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="honorVOList" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="honor" label="荣誉" min-width="180" align="center" show-overflow-tooltip />
|
||||
@@ -1251,6 +1232,12 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="教师论文" name="nine">
|
||||
<div class="table-section">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span>教师论文信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="paperVOList" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="author" label="作者" min-width="100" align="center" />
|
||||
@@ -1285,6 +1272,12 @@
|
||||
|
||||
<el-tab-pane label="教材列表" name="ten">
|
||||
<div class="table-section">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span>教材列表信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="materialVOList" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="materialName" label="教材名称" min-width="180" align="center" show-overflow-tooltip />
|
||||
@@ -1312,6 +1305,12 @@
|
||||
|
||||
<el-tab-pane label="课题列表" name="eleven">
|
||||
<div class="table-section">
|
||||
<div class="table-header">
|
||||
<div class="table-title">
|
||||
<el-icon><Document /></el-icon>
|
||||
<span>课题列表信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="topicListVOList" border stripe class="data-table">
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="deptName" label="课题所属部门" min-width="180" align="center" show-overflow-tooltip />
|
||||
@@ -1342,6 +1341,7 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
v-if="activeName === 'first'"
|
||||
type="primary"
|
||||
@click="saveSubmit"
|
||||
:disabled="!canSave"
|
||||
@@ -1908,12 +1908,6 @@
|
||||
if (politicsRes && politicsRes.data) {
|
||||
searchPoliticsStatusList.value = politicsRes.data
|
||||
}
|
||||
|
||||
// 加载授课类型字典
|
||||
const teacherCateRes: any = await getDicts(global.TEACHER_CATE)
|
||||
if (teacherCateRes && teacherCateRes.data) {
|
||||
searchTeacherCateList.value = teacherCateRes.data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载搜索字典数据失败:', error)
|
||||
}
|
||||
@@ -2022,21 +2016,20 @@
|
||||
|
||||
const exportExcelA = (head: string[], val: string[], fileName: string) => {
|
||||
exportNoImgUser().then((response: any) => {
|
||||
if (response.data.msg == "fail") {
|
||||
alert(JSON.stringify(response.data.data));
|
||||
} else {
|
||||
if (response.data.msg == "fail") {
|
||||
alert(JSON.stringify(response.data));
|
||||
} else {
|
||||
import('/@/excel/Export2Excel.js').then(({ export_json_to_excel }) => {
|
||||
const tHeader = head;
|
||||
const filterVal = val;
|
||||
const list = response.data.data;
|
||||
const tHeader = head;
|
||||
const filterVal = val;
|
||||
const list = response.data;
|
||||
const data = formatJson(filterVal, list);
|
||||
export_json_to_excel(tHeader, data, fileName);
|
||||
})
|
||||
}
|
||||
export_json_to_excel(tHeader, data, fileName);
|
||||
})
|
||||
.catch((error: any) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}).catch((error: any) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
const exportUserInfo = () => {
|
||||
@@ -2253,6 +2246,13 @@
|
||||
const politicsForm = ref<any>({})
|
||||
const politicsEditIndex = ref(-1)
|
||||
|
||||
// 根据政治面貌ID获取名称
|
||||
const getPoliticsStatusName = (id: string | number | undefined) => {
|
||||
if (!id) return '-'
|
||||
const item = searchPoliticsStatusList.value.find((item: any) => item.id === id || item.id === String(id))
|
||||
return item ? item.politicsStatus : '-'
|
||||
}
|
||||
|
||||
const handleAddPolitics = () => {
|
||||
politicsForm.value = {}
|
||||
politicsEditIndex.value = -1
|
||||
@@ -2285,7 +2285,8 @@
|
||||
politicsDialogVisible.value = false
|
||||
// 刷新数据
|
||||
getObj(form.baseInfo.id).then((res: any) => {
|
||||
const baseInfo = res.data.data;
|
||||
const baseInfo = res.data;
|
||||
if (!baseInfo) return;
|
||||
dataPolitics.value = baseInfo.poList;
|
||||
})
|
||||
});
|
||||
@@ -2367,7 +2368,8 @@
|
||||
educationDialogVisible.value = false
|
||||
// 刷新数据
|
||||
getObj(form.baseInfo.id).then((res: any) => {
|
||||
const baseInfo = res.data.data;
|
||||
const baseInfo = res.data;
|
||||
if (!baseInfo) return;
|
||||
dataEducation.value = baseInfo.acadeList
|
||||
dataEducation.value.forEach((v: any) => {
|
||||
v.qiList = []
|
||||
@@ -2460,7 +2462,8 @@
|
||||
relationDialogVisible.value = false
|
||||
// 刷新数据
|
||||
getObj(form.baseInfo.id).then((res: any) => {
|
||||
const baseInfo = res.data.data;
|
||||
const baseInfo = res.data;
|
||||
if (!baseInfo) return;
|
||||
relationData.value = baseInfo.socialList;
|
||||
})
|
||||
});
|
||||
@@ -2541,7 +2544,8 @@
|
||||
proDialogVisible.value = false
|
||||
// 刷新数据
|
||||
getObj(form.baseInfo.id).then((res: any) => {
|
||||
const baseInfo = res.data.data;
|
||||
const baseInfo = res.data;
|
||||
if (!baseInfo) return;
|
||||
proData.value = baseInfo.titleList
|
||||
proData.value.forEach((v: any) => {
|
||||
v.srcList = []
|
||||
@@ -2626,7 +2630,8 @@
|
||||
workDialogVisible.value = false
|
||||
// 刷新数据
|
||||
getObj(form.baseInfo.id).then((res: any) => {
|
||||
const baseInfo = res.data.data;
|
||||
const baseInfo = res.data;
|
||||
if (!baseInfo) return;
|
||||
workData.value = baseInfo.quaList
|
||||
workData.value.forEach((v: any) => {
|
||||
v.srcList = []
|
||||
@@ -2698,32 +2703,19 @@
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
// 获取一级部门
|
||||
fetchSecondTree()
|
||||
await Promise.all([
|
||||
// 健康状况
|
||||
getDicts(global.HEATH).then((response: any) => {
|
||||
healthList.value = response.data;
|
||||
}),
|
||||
// 授课类型
|
||||
getDicts(global.TEACHER_CATE).then((response: any) => {
|
||||
teacherCateList.value = response.data;
|
||||
}),
|
||||
// 宗教信仰
|
||||
getDicts(religiousBelief).then((response: any) => {
|
||||
religiousBeliefDic.value = response.data;
|
||||
}),
|
||||
// 批量获取字典数据
|
||||
// 批量获取字典数据 religious_belief宗教信仰 health健康状况 teacher_cate授课类型
|
||||
getDictsByTypes(['religious_belief', 'heath', 'teacher_cate']).then((response: any) => {
|
||||
religiousBeliefDic.value = response.data.religious_belief;
|
||||
healthList.value = response.data.heath;
|
||||
teacherCateList.value = response.data.teacher_cate;
|
||||
|
||||
teacherCateList.value = response.data.teacher_cate;
|
||||
}),
|
||||
// 民族
|
||||
getNationalList().then((response: any) => {
|
||||
nationalList.value = response.data;
|
||||
}),
|
||||
|
||||
// 岗位类型部门树
|
||||
treeForCascader().then((response: any) => {
|
||||
deptTreeList.value = response.data;
|
||||
@@ -2809,6 +2801,7 @@
|
||||
workData.value = [];
|
||||
dialogFromVisible.value = true;
|
||||
}
|
||||
|
||||
const handleEdit = (row: any, index: any) => {
|
||||
isAdd.value = false
|
||||
nowUserInfo.uploadUrl = '/professional/file/upload?teacherNo=' + row.teacherNo;
|
||||
@@ -2819,7 +2812,12 @@
|
||||
imageUrl.value = ''
|
||||
//查询基础信息
|
||||
getObj(row.id).then((response: any) => {
|
||||
const baseInfo = response.data.data;
|
||||
const baseInfo = response.data;
|
||||
if (!baseInfo || !baseInfo.teacherBase) {
|
||||
console.error('[teacherbase] 获取教师详情失败,返回数据异常:', response);
|
||||
message.error('获取教师详情失败,请稍后重试');
|
||||
return;
|
||||
}
|
||||
form.baseInfo.teacherPhoto = "";
|
||||
nowImage.value = baseInfo.teacherBase.teacherPhoto;
|
||||
imgList.value = [];
|
||||
@@ -2827,7 +2825,7 @@
|
||||
dialogForListImageUrl.value = "/professional/minio/show?fileName=base-teach_photo/" + baseInfo.teacherBase.teacherNo + "/" + baseInfo.teacherBase.teacherNo + ".jpg"
|
||||
imageUrl.value = dialogForListImageUrl.value
|
||||
dataPolitics.value = baseInfo.poList;
|
||||
//资格证
|
||||
//资格证
|
||||
zgzData.value = baseInfo.certList;
|
||||
zgzData.value.forEach((v: any) => {
|
||||
v.srcList = []
|
||||
@@ -2919,7 +2917,7 @@
|
||||
}
|
||||
if (row.deptCode != null && row.deptCode != '') {
|
||||
getDeptByCode(row.deptCode).then((response: any) => {
|
||||
const dept = response.data.data
|
||||
const dept = response.data
|
||||
if (dept) {
|
||||
form.professionalStationRelation.deptCodeList = [];
|
||||
form.professionalStationRelation.deptCodeList[0] = dept.parentCode
|
||||
@@ -3173,28 +3171,59 @@
|
||||
.base-info-form {
|
||||
background: #ffffff;
|
||||
|
||||
// 照片区域
|
||||
// 基本信息布局(照片+表单)
|
||||
.base-info-layout {
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
|
||||
// 照片区域
|
||||
.photo-section {
|
||||
flex-shrink: 0;
|
||||
|
||||
.photo-wrapper {
|
||||
width: 120px;
|
||||
height: 160px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e4e7ed;
|
||||
background: #fafafa;
|
||||
|
||||
.avatar-photo {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 表单区域
|
||||
.form-section {
|
||||
flex: 1;
|
||||
min-width: 0; // 防止 flex 子元素溢出
|
||||
}
|
||||
}
|
||||
|
||||
// 照片区域(独立显示,当没有表单时)
|
||||
.photo-section {
|
||||
margin-bottom: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.photo-wrapper {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
height: 160px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 2px solid #e4e7ed;
|
||||
border: 1px solid #e4e7ed;
|
||||
background: #fafafa;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
|
||||
.avatar-photo {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3214,9 +3243,10 @@
|
||||
// 表单分组样式优化 - 保持当前间距,添加背景
|
||||
.form-section {
|
||||
margin-bottom: 16px;
|
||||
padding: 16px;
|
||||
padding: 20px;
|
||||
background: #fafbfc;
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ebeef5;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
@@ -3248,11 +3278,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 表格模块样式优化
|
||||
.table-section {
|
||||
padding: 24px;
|
||||
// padding: 24px;
|
||||
background: #ffffff;
|
||||
|
||||
.table-header {
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
v-model="form.joinTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -26,8 +26,8 @@
|
||||
v-model="form.correctionTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" title="社会关系" width="600px" @close="handleClose">
|
||||
<el-form :model="form" label-width="120px" ref="formRef">
|
||||
<el-form-item label="称谓" required>
|
||||
<el-form :model="form" :rules="rules" label-width="130px" ref="formRef">
|
||||
<el-form-item label="称谓" prop="title" required>
|
||||
<el-select v-model="form.title" placeholder="请选择称谓" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in titleOptions"
|
||||
@@ -11,20 +11,20 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" required>
|
||||
<el-form-item label="姓名" prop="realName" required>
|
||||
<el-input v-model="form.realName" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出生年月" required>
|
||||
<el-form-item label="出生年月" prop="birthday" required>
|
||||
<el-date-picker
|
||||
v-model="form.birthday"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌">
|
||||
<el-form-item label="政治面貌" prop="politicsStatusId" required>
|
||||
<el-select v-model="form.politicsStatusId" placeholder="请选择政治面貌" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in politicsStatusList"
|
||||
@@ -34,7 +34,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作单位及职务">
|
||||
<el-form-item label="工作单位及职务" prop="workStation" required>
|
||||
<el-input
|
||||
v-model="form.workStation"
|
||||
type="textarea"
|
||||
@@ -104,7 +104,30 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
const handleSubmit = () => {
|
||||
emit('submit', { ...form.value })
|
||||
formRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
emit('submit', { ...form.value })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
title: [
|
||||
{ required: true, message: '请选择称谓', trigger: 'change' }
|
||||
],
|
||||
realName: [
|
||||
{ required: true, message: '请输入姓名', trigger: 'blur' }
|
||||
],
|
||||
birthday: [
|
||||
{ required: true, message: '请选择出生年月', trigger: 'change' }
|
||||
],
|
||||
politicsStatusId: [
|
||||
{ required: true, message: '请选择政治面貌', trigger: 'change' }
|
||||
],
|
||||
workStation: [
|
||||
{ required: true, message: '请输入工作单位及职务', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user