提交 98058285 authored 作者: 王鹏飞's avatar 王鹏飞

feat: 将“教工”相关术语更新为“教师”,并更新导入模板文件名

上级 02916e88
...@@ -106,7 +106,7 @@ export const menus: IMenuItem[] = [ ...@@ -106,7 +106,7 @@ export const menus: IMenuItem[] = [
{ {
tag: 'v1-learning-teacher-list', tag: 'v1-learning-teacher-list',
icon: School, icon: School,
name: '教工用户管理', name: '教师管理',
path: '/admin/staff', path: '/admin/staff',
}, },
{ {
......
...@@ -24,11 +24,11 @@ export function addStaff(data?: { ...@@ -24,11 +24,11 @@ export function addStaff(data?: {
}) { }) {
return httpRequest.post('/api/resource/v1/learning/teacher/create', data) return httpRequest.post('/api/resource/v1/learning/teacher/create', data)
} }
// 获取教工详情 // 获取教师详情
export function getStaffDetail(params?: { id: string }) { export function getStaffDetail(params?: { id: string }) {
return httpRequest.get('/api/resource/v1/learning/teacher/view', { params }) return httpRequest.get('/api/resource/v1/learning/teacher/view', { params })
} }
// 更新教工 // 更新教师
export function updateStaff(data?: { export function updateStaff(data?: {
id: string id: string
school: string school: string
......
...@@ -81,7 +81,7 @@ const handleConfirm = async (formEl: FormInstance | undefined) => { ...@@ -81,7 +81,7 @@ const handleConfirm = async (formEl: FormInstance | undefined) => {
params.organ_id = userStore.organization?.id params.organ_id = userStore.organization?.id
} }
addStaff(params).then(() => { addStaff(params).then(() => {
ElMessage.success('新增教工成功') ElMessage.success('新增教师成功')
emit('update:isShowStaffDialog', false) emit('update:isShowStaffDialog', false)
emit('create') emit('create')
}) })
...@@ -91,7 +91,7 @@ const handleConfirm = async (formEl: FormInstance | undefined) => { ...@@ -91,7 +91,7 @@ const handleConfirm = async (formEl: FormInstance | undefined) => {
account_expired_time: form.account_expired_time || '', account_expired_time: form.account_expired_time || '',
}) })
updateStaff(params).then(() => { updateStaff(params).then(() => {
ElMessage.success('更新教工成功') ElMessage.success('更新教师成功')
emit('update:isShowStaffDialog', false) emit('update:isShowStaffDialog', false)
emit('create') emit('create')
}) })
......
...@@ -256,7 +256,7 @@ const getStatusType = (status: string) => { ...@@ -256,7 +256,7 @@ const getStatusType = (status: string) => {
v-model="isShowImportDialog" v-model="isShowImportDialog"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="handleCancel" :before-close="handleCancel"
title="批量导入教工" title="批量导入教师"
width="1000px"> width="1000px">
<div> <div>
<el-upload <el-upload
...@@ -275,7 +275,7 @@ const getStatusType = (status: string) => { ...@@ -275,7 +275,7 @@ const getStatusType = (status: string) => {
<div class="el-upload__text">将文件拖至此处,点击上传</div> <div class="el-upload__text">将文件拖至此处,点击上传</div>
</el-upload> </el-upload>
<div style="margin-bottom: 10px; text-align: right"> <div style="margin-bottom: 10px; text-align: right">
<a href="/center_resource/教工导入模板.xlsx" download="教工导入模板"> <a href="/center_resource/教师导入模板.xlsx" download="教师导入模板">
<el-link type="primary">下载模板</el-link> <el-link type="primary">下载模板</el-link>
</a> </a>
</div> </div>
......
...@@ -73,17 +73,17 @@ const listOptions = computed(() => { ...@@ -73,17 +73,17 @@ const listOptions = computed(() => {
} }
}) })
// 新增学生 // 新增教师
const handleAddStudent = () => { const handleAddStudent = () => {
isShowStaffDialog.value = true isShowStaffDialog.value = true
title.value = '新增教工' title.value = '新增教师'
isEdit.value = '0' isEdit.value = '0'
} }
// 编辑教工 // 编辑教师
const handleEdit = (row: any) => { const handleEdit = (row: any) => {
id.value = row.id id.value = row.id
isShowStaffDialog.value = true isShowStaffDialog.value = true
title.value = '编辑教工' title.value = '编辑教师'
studentId.value = row.id studentId.value = row.id
isEdit.value = '1' isEdit.value = '1'
} }
...@@ -103,7 +103,7 @@ const handleChangeStatus = (row: any) => { ...@@ -103,7 +103,7 @@ const handleChangeStatus = (row: any) => {
const params: any = Object.assign({}, row) const params: any = Object.assign({}, row)
updateStaff(params) updateStaff(params)
.then(() => { .then(() => {
ElMessage.success('更新教工成功') ElMessage.success('更新教师成功')
handleFresh() handleFresh()
}) })
.catch((err: any) => { .catch((err: any) => {
...@@ -116,10 +116,10 @@ const handleChangeStatus = (row: any) => { ...@@ -116,10 +116,10 @@ const handleChangeStatus = (row: any) => {
</script> </script>
<template> <template>
<AppCard title="教工用户管理"> <AppCard title="教师管理">
<AppList v-bind="listOptions" ref="appList" border stripe style="margin-top: 30px"> <AppList v-bind="listOptions" ref="appList" border stripe style="margin-top: 30px">
<el-button type="primary" round @click="handleAddStudent" v-permission="'v1-learning-teacher-create'" <el-button type="primary" round @click="handleAddStudent" v-permission="'v1-learning-teacher-create'"
>新增教工</el-button >新增教师</el-button
> >
<ImportStaff @create="handleFresh" /> <ImportStaff @create="handleFresh" />
<template v-if="isAdmin" #filter-department="{ params }"> <template v-if="isAdmin" #filter-department="{ params }">
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论