mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 23:06:47 +08:00
讲师管理
This commit is contained in:
@@ -87,7 +87,7 @@
|
|||||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:before-upload="beforeUpload">
|
:before-upload="beforeUpload">
|
||||||
<img class="i_upload_img" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" />
|
||||||
<div class="i_upload" v-else>
|
<div class="i_upload" v-else>
|
||||||
<div class="addimg">
|
<div class="addimg">
|
||||||
<div class="heng"></div>
|
<div class="heng"></div>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</a-upload>
|
</a-upload>
|
||||||
<div class="i_bottom">
|
<div class="i_bottom">
|
||||||
<div class="tip" style="margin-bottom: 10px;">
|
<div class="tip" style="margin-bottom: 10px;">
|
||||||
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为2MB</span>
|
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为500KB</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -107,16 +107,13 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="讲师名称" name="userNo">
|
<a-form-item label="讲师名称" name="userNo">
|
||||||
<ProjectManager v-model:value="formParam.userNo"
|
<SearchTeacher v-model:value="formParam.name"></SearchTeacher>
|
||||||
v-model:name="formParam.name"
|
|
||||||
placeholder="请输入工号/讲师姓名进行检索"
|
|
||||||
@onChange="managerChange" mode="multiple"></ProjectManager>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="手机号码" name="mobile">
|
<a-form-item label="手机号码" name="mobile">
|
||||||
<a-input v-model:value="formParam.mobile" class="draitem"
|
<a-input v-model:value="formParam.mobile" class="draitem"
|
||||||
placeholder="请输入手机号码" allowClear showSearch>
|
placeholder="请输入手机号码" allowClear showSearch @blur="sendPhone">
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -133,7 +130,7 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="讲师邮箱" name="email">
|
<a-form-item label="讲师邮箱" name="email">
|
||||||
<a-input v-model:value="formParam.email" class="draitem"
|
<a-input v-model:value="formParam.email" class="draitem"
|
||||||
placeholder="请输入讲师邮箱" allowClear showSearch>
|
placeholder="请输入讲师邮箱" allowClear showSearch @blur="sendEmail">
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -226,8 +223,8 @@
|
|||||||
<span>提示</span>
|
<span>提示</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<span v-if="handleOperate1 == 2">您确定要启用此讲师状态吗</span>
|
<span v-if="handleOperate1 == 2">确定要将该讲师启用吗<div></div>启用后讲师可以登录教师端</span>
|
||||||
<span v-if="handleOperate1 == 1">您确定要停用此讲师状态吗</span>
|
<span v-if="handleOperate1 == 1">确定要将该讲师停用吗<div></div>停用后讲师不可登录教师端</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<div class="del_btnbox">
|
||||||
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
||||||
@@ -259,11 +256,13 @@ import {
|
|||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
import { getOutTeacherList, getOuterTeacherById, fileUp, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
|
import { getOutTeacherList, getOuterTeacherById, fileUp, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
|
||||||
import {getCookieForName} from "@/api/method";
|
import {getCookieForName} from "@/api/method"
|
||||||
|
import SearchTeacher from "@/components/project/SearchTeacher";;
|
||||||
export default {
|
export default {
|
||||||
name: "ExternalLecturer",
|
name: "ExternalLecturer",
|
||||||
components: {
|
components: {
|
||||||
// AddTeacher,
|
// AddTeacher,
|
||||||
|
SearchTeacher,
|
||||||
ProjectManager,
|
ProjectManager,
|
||||||
Editor,
|
Editor,
|
||||||
FolderAddOutlined,//图标--新增
|
FolderAddOutlined,//图标--新增
|
||||||
@@ -274,6 +273,7 @@ export default {
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
currentPage1: 1,
|
currentPage1: 1,
|
||||||
pageSize1: 10,
|
pageSize1: 10,
|
||||||
|
close:false,
|
||||||
promotionrecordsLoading: false, //晋级记录遮罩层
|
promotionrecordsLoading: false, //晋级记录遮罩层
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tagsshow: "1",
|
tagsshow: "1",
|
||||||
@@ -294,6 +294,7 @@ export default {
|
|||||||
formParam: {
|
formParam: {
|
||||||
description:"",
|
description:"",
|
||||||
teacherType:'1',
|
teacherType:'1',
|
||||||
|
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||||
},
|
},
|
||||||
vf:true,
|
vf:true,
|
||||||
searchParam: {
|
searchParam: {
|
||||||
@@ -331,7 +332,7 @@ export default {
|
|||||||
fileUp(formDatas).then((res) => {
|
fileUp(formDatas).then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log(res.data.data, 45);
|
console.log(res.data.data, 45);
|
||||||
imageUrl.value = process.env.VUE_APP_FILE_PATH + res.data.data;
|
state.formParam.photo= process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
|
|
||||||
// state.hasImgName = file.name;
|
// state.hasImgName = file.name;
|
||||||
// emit("src", { id: '', src: res.data.data });
|
// emit("src", { id: '', src: res.data.data });
|
||||||
@@ -473,6 +474,7 @@ export default {
|
|||||||
state.teacherdialog = true;
|
state.teacherdialog = true;
|
||||||
state.teacherdialogtitle = '新增讲师'
|
state.teacherdialogtitle = '新增讲师'
|
||||||
state.vf = true
|
state.vf = true
|
||||||
|
state.formParam.photo = state.formParam.photo === null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改讲师信息弹窗
|
//修改讲师信息弹窗
|
||||||
@@ -481,7 +483,7 @@ export default {
|
|||||||
state.teacherdialogtitle = '修改信息'
|
state.teacherdialogtitle = '修改信息'
|
||||||
state.id = record.id
|
state.id = record.id
|
||||||
state.vf = false
|
state.vf = false
|
||||||
TeacherSystem(record)
|
TeacherSystem()
|
||||||
}
|
}
|
||||||
//保存
|
//保存
|
||||||
const createTeacherDialog = () => {
|
const createTeacherDialog = () => {
|
||||||
@@ -578,17 +580,22 @@ export default {
|
|||||||
name: [{ required: true, message: '讲师不能为空' }],
|
name: [{ required: true, message: '讲师不能为空' }],
|
||||||
supplier:[{ required: true, message: '供应商不能为空' }],
|
supplier:[{ required: true, message: '供应商不能为空' }],
|
||||||
}
|
}
|
||||||
|
// const sendEmail= ()=>{
|
||||||
|
// let regEmail=
|
||||||
|
// /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-A-Za-z0-9_-]+(\.[a-a-A-Za-z0-9_-]+)+$/
|
||||||
|
// }
|
||||||
//表格内查看数据操作
|
//表格内查看数据操作
|
||||||
const handleLook = (record) => {
|
const handleLook = (record) => {
|
||||||
let id = record.id
|
let id = record.id
|
||||||
router.push({ path: '/LookExternalLecturer', query: { id } })
|
router.push({ path: '/LookExternalLecturer', query: { id } })
|
||||||
}
|
}
|
||||||
//外部讲师详情
|
//外部讲师详情
|
||||||
const TeacherSystem = (record) => {
|
const TeacherSystem = () => {
|
||||||
getOuterTeacherById(state.id).then((res) => {
|
getOuterTeacherById(state.id).then((res) => {
|
||||||
console.log("外部讲师详情", res.data);
|
console.log("外部讲师详情", res.data);
|
||||||
state.formParam = res.data.data
|
state.formParam = res.data.data
|
||||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||||
|
state.formParam.photo = state.formParam.photo === null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("外部讲师详情", err);
|
console.log("外部讲师详情", err);
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
</a-upload>
|
</a-upload>
|
||||||
<div class="i_bottom">
|
<div class="i_bottom">
|
||||||
<div class="tip" style="margin-bottom: 10px;">
|
<div class="tip" style="margin-bottom: 10px;">
|
||||||
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为2MB</span>
|
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为500KB</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -461,7 +461,7 @@
|
|||||||
|
|
||||||
<!-- 删除功能弹窗 -->
|
<!-- 删除功能弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<a-modal v-model:visible="deleteInTeacherdialog" :footer="null" closable="CopyModal" centered="true">
|
<a-modal v-model:visible="deleteInTeacherdialog" :footer="null" :closable="closableQR" centered="true">
|
||||||
<div class="delete">
|
<div class="delete">
|
||||||
<div class="del_header"></div>
|
<div class="del_header"></div>
|
||||||
<div class="del_main">
|
<div class="del_main">
|
||||||
@@ -487,8 +487,15 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
<!-- 修改状态功能弹窗 -->
|
<!-- 修改状态功能弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<a-modal v-model:visible="editTeacher" :footer="null" closable="close" centered="true">
|
<a-modal
|
||||||
|
v-model:visible="editTeacher"
|
||||||
|
:footer="null"
|
||||||
|
:closable="closableQR"
|
||||||
|
wrapClassName="DelModal"
|
||||||
|
style="margin-top: 400px"
|
||||||
|
:zIndex="9999"
|
||||||
|
>
|
||||||
<div class="delete">
|
<div class="delete">
|
||||||
<div class="del_header"></div>
|
<div class="del_header"></div>
|
||||||
<div class="del_main">
|
<div class="del_main">
|
||||||
@@ -497,8 +504,8 @@
|
|||||||
<span>提示</span>
|
<span>提示</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<span v-if="handleOperate1 == 2">您确定要启用此讲师状态吗</span>
|
<span v-if="handleOperate1 == 2">确定要将该讲师启用吗<div></div>启用后讲师可以登录教师端</span>
|
||||||
<span v-if="handleOperate1 == 1">您确定要停用此讲师状态吗</span>
|
<span v-if="handleOperate1 == 1">确定要将该讲师停用吗<div></div>停用后讲师不可登录教师端</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<div class="del_btnbox">
|
||||||
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
||||||
@@ -552,6 +559,7 @@ export default {
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
Addtitle: '选择教师专长',
|
Addtitle: '选择教师专长',
|
||||||
showContent: false,
|
showContent: false,
|
||||||
|
closableQR:false,
|
||||||
updialog: false,
|
updialog: false,
|
||||||
moreid: 1,
|
moreid: 1,
|
||||||
byPid: null,
|
byPid: null,
|
||||||
@@ -578,7 +586,7 @@ export default {
|
|||||||
vf: false,
|
vf: false,
|
||||||
formParam: {
|
formParam: {
|
||||||
teachenType:'0',
|
teachenType:'0',
|
||||||
userNo: null,
|
name: null,
|
||||||
certStatus: 0,//认证状态
|
certStatus: 0,//认证状态
|
||||||
defaultteachingTime: '0',
|
defaultteachingTime: '0',
|
||||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||||
@@ -989,10 +997,6 @@ export default {
|
|||||||
};
|
};
|
||||||
// 新增讲师
|
// 新增讲师
|
||||||
const addTeacher = () => {
|
const addTeacher = () => {
|
||||||
// let a = ['1-1-1-1','1-2-3-4','1-2-3-5']
|
|
||||||
// let a = '1/2/3/4/5'
|
|
||||||
// let b = a.split('/')
|
|
||||||
// console.log(b[b.length-1])
|
|
||||||
cancel()
|
cancel()
|
||||||
state.teacherdialog = true;
|
state.teacherdialog = true;
|
||||||
state.teacherdialogtitle = '新增讲师'
|
state.teacherdialogtitle = '新增讲师'
|
||||||
@@ -1104,6 +1108,7 @@ export default {
|
|||||||
//清空数据
|
//清空数据
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
state.formParam = {
|
state.formParam = {
|
||||||
|
name:null,
|
||||||
status:null,
|
status:null,
|
||||||
teacherType:'0',
|
teacherType:'0',
|
||||||
photo: null,
|
photo: null,
|
||||||
@@ -1159,12 +1164,12 @@ export default {
|
|||||||
console.log("内部讲师详情", err);
|
console.log("内部讲师详情", err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function managerChange(e, l, d, t, orgName) {
|
// function managerChange(e, l, d, t, orgName) {
|
||||||
console.log(e, l);
|
// console.log(e, l);
|
||||||
state.searchParam.userNo = d;
|
// state.searchParam.userNo = d;
|
||||||
state.searchParam.name = t;
|
// state.searchParam.name = t;
|
||||||
// state.searchParam.trainorgName=orgName
|
// // state.searchParam.trainorgName=orgName
|
||||||
}
|
// }
|
||||||
//导出功能
|
//导出功能
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
window.open(
|
window.open(
|
||||||
@@ -1185,7 +1190,7 @@ export default {
|
|||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
rules,
|
rules,
|
||||||
clearNonNumber,
|
clearNonNumber,
|
||||||
managerChange,
|
// managerChange,
|
||||||
headers,
|
headers,
|
||||||
beforeUpload,
|
beforeUpload,
|
||||||
handlemoreid,
|
handlemoreid,
|
||||||
@@ -1548,4 +1553,7 @@ export default {
|
|||||||
.item_inp .i_upload[data-v-6b882d01] {
|
.item_inp .i_upload[data-v-6b882d01] {
|
||||||
border-radius: 50% !important;
|
border-radius: 50% !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .ant-modal-close{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="promotionrecordsColumns"
|
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="promotionrecordsColumns"
|
||||||
|
|
||||||
:data-source="promotionrecordstableData" :loading="promotionrecordsLoading" @expand="expandTable" :pagination="false">
|
:data-source="promotionrecordstableData" :loading="promotionrecordsLoading" @expand="expandTable" :pagination="false">
|
||||||
<template #bodyCell="{ record, column }" >
|
<template #bodyCell="{ record, column,index }" >
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
@@ -178,9 +178,10 @@ export default{
|
|||||||
const teacherrecordsColumns = ref([
|
const teacherrecordsColumns = ref([
|
||||||
{
|
{
|
||||||
title: '课程编号',
|
title: '课程编号',
|
||||||
dataIndex: 'offcourseId',
|
dataIndex: 'index',
|
||||||
key: 'offcourseId',
|
key: 'index',
|
||||||
elipsis: true, align: "center",
|
align: "center",
|
||||||
|
customRender: (text,record,index) => `${index+1}`,
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user