mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 14:26:45 +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"
|
||||
:headers="headers"
|
||||
: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="addimg">
|
||||
<div class="heng"></div>
|
||||
@@ -97,7 +97,7 @@
|
||||
</a-upload>
|
||||
<div class="i_bottom">
|
||||
<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>
|
||||
@@ -107,16 +107,13 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="讲师名称" name="userNo">
|
||||
<ProjectManager v-model:value="formParam.userNo"
|
||||
v-model:name="formParam.name"
|
||||
placeholder="请输入工号/讲师姓名进行检索"
|
||||
@onChange="managerChange" mode="multiple"></ProjectManager>
|
||||
<SearchTeacher v-model:value="formParam.name"></SearchTeacher>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="手机号码" name="mobile">
|
||||
<a-input v-model:value="formParam.mobile" class="draitem"
|
||||
placeholder="请输入手机号码" allowClear showSearch>
|
||||
placeholder="请输入手机号码" allowClear showSearch @blur="sendPhone">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -133,7 +130,7 @@
|
||||
<a-col :span="12">
|
||||
<a-form-item label="讲师邮箱" name="email">
|
||||
<a-input v-model:value="formParam.email" class="draitem"
|
||||
placeholder="请输入讲师邮箱" allowClear showSearch>
|
||||
placeholder="请输入讲师邮箱" allowClear showSearch @blur="sendEmail">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -226,8 +223,8 @@
|
||||
<span>提示</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span v-if="handleOperate1 == 2">您确定要启用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1 == 1">您确定要停用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1 == 2">确定要将该讲师启用吗<div></div>启用后讲师可以登录教师端</span>
|
||||
<span v-if="handleOperate1 == 1">确定要将该讲师停用吗<div></div>停用后讲师不可登录教师端</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
||||
@@ -259,11 +256,13 @@ import {
|
||||
} from '@ant-design/icons-vue';
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
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 {
|
||||
name: "ExternalLecturer",
|
||||
components: {
|
||||
// AddTeacher,
|
||||
SearchTeacher,
|
||||
ProjectManager,
|
||||
Editor,
|
||||
FolderAddOutlined,//图标--新增
|
||||
@@ -274,6 +273,7 @@ export default {
|
||||
const state = reactive({
|
||||
currentPage1: 1,
|
||||
pageSize1: 10,
|
||||
close:false,
|
||||
promotionrecordsLoading: false, //晋级记录遮罩层
|
||||
tableLoading: false,
|
||||
tagsshow: "1",
|
||||
@@ -294,6 +294,7 @@ export default {
|
||||
formParam: {
|
||||
description:"",
|
||||
teacherType:'1',
|
||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||
},
|
||||
vf:true,
|
||||
searchParam: {
|
||||
@@ -331,7 +332,7 @@ export default {
|
||||
fileUp(formDatas).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
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;
|
||||
// emit("src", { id: '', src: res.data.data });
|
||||
@@ -473,6 +474,7 @@ export default {
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '新增讲师'
|
||||
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.id = record.id
|
||||
state.vf = false
|
||||
TeacherSystem(record)
|
||||
TeacherSystem()
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = () => {
|
||||
@@ -578,17 +580,22 @@ export default {
|
||||
name: [{ 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) => {
|
||||
let id = record.id
|
||||
router.push({ path: '/LookExternalLecturer', query: { id } })
|
||||
}
|
||||
//外部讲师详情
|
||||
const TeacherSystem = (record) => {
|
||||
const TeacherSystem = () => {
|
||||
getOuterTeacherById(state.id).then((res) => {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam = res.data.data
|
||||
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) => {
|
||||
console.log("外部讲师详情", err);
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</a-upload>
|
||||
<div class="i_bottom">
|
||||
<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>
|
||||
@@ -461,7 +461,7 @@
|
||||
|
||||
<!-- 删除功能弹窗 -->
|
||||
<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="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -487,8 +487,15 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 修改状态功能弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="editTeacher" :footer="null" closable="close" centered="true">
|
||||
<div>
|
||||
<a-modal
|
||||
v-model:visible="editTeacher"
|
||||
:footer="null"
|
||||
:closable="closableQR"
|
||||
wrapClassName="DelModal"
|
||||
style="margin-top: 400px"
|
||||
:zIndex="9999"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -497,8 +504,8 @@
|
||||
<span>提示</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span v-if="handleOperate1 == 2">您确定要启用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1 == 1">您确定要停用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1 == 2">确定要将该讲师启用吗<div></div>启用后讲师可以登录教师端</span>
|
||||
<span v-if="handleOperate1 == 1">确定要将该讲师停用吗<div></div>停用后讲师不可登录教师端</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
||||
@@ -510,7 +517,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</a-modal>
|
||||
</div>
|
||||
<AddContent v-model:showContent="showContent" @AddContentList="AddContentList" :Addtitle="Addtitle" />
|
||||
<!-- <div> <Upload/> </div> -->
|
||||
@@ -552,6 +559,7 @@ export default {
|
||||
const state = reactive({
|
||||
Addtitle: '选择教师专长',
|
||||
showContent: false,
|
||||
closableQR:false,
|
||||
updialog: false,
|
||||
moreid: 1,
|
||||
byPid: null,
|
||||
@@ -578,7 +586,7 @@ export default {
|
||||
vf: false,
|
||||
formParam: {
|
||||
teachenType:'0',
|
||||
userNo: null,
|
||||
name: null,
|
||||
certStatus: 0,//认证状态
|
||||
defaultteachingTime: '0',
|
||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||
@@ -989,10 +997,6 @@ export default {
|
||||
};
|
||||
// 新增讲师
|
||||
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()
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '新增讲师'
|
||||
@@ -1104,6 +1108,7 @@ export default {
|
||||
//清空数据
|
||||
const cancel = () => {
|
||||
state.formParam = {
|
||||
name:null,
|
||||
status:null,
|
||||
teacherType:'0',
|
||||
photo: null,
|
||||
@@ -1159,12 +1164,12 @@ export default {
|
||||
console.log("内部讲师详情", err);
|
||||
});
|
||||
}
|
||||
function managerChange(e, l, d, t, orgName) {
|
||||
console.log(e, l);
|
||||
state.searchParam.userNo = d;
|
||||
state.searchParam.name = t;
|
||||
// state.searchParam.trainorgName=orgName
|
||||
}
|
||||
// function managerChange(e, l, d, t, orgName) {
|
||||
// console.log(e, l);
|
||||
// state.searchParam.userNo = d;
|
||||
// state.searchParam.name = t;
|
||||
// // state.searchParam.trainorgName=orgName
|
||||
// }
|
||||
//导出功能
|
||||
const handleExport = () => {
|
||||
window.open(
|
||||
@@ -1185,7 +1190,7 @@ export default {
|
||||
...toRefs(state),
|
||||
rules,
|
||||
clearNonNumber,
|
||||
managerChange,
|
||||
// managerChange,
|
||||
headers,
|
||||
beforeUpload,
|
||||
handlemoreid,
|
||||
@@ -1548,4 +1553,7 @@ export default {
|
||||
.item_inp .i_upload[data-v-6b882d01] {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
::v-deep .ant-modal-close{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@@ -93,7 +93,7 @@
|
||||
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="promotionrecordsColumns"
|
||||
|
||||
:data-source="promotionrecordstableData" :loading="promotionrecordsLoading" @expand="expandTable" :pagination="false">
|
||||
<template #bodyCell="{ record, column }" >
|
||||
<template #bodyCell="{ record, column,index }" >
|
||||
</template>
|
||||
</a-table>
|
||||
<div style="float: right;">
|
||||
@@ -178,9 +178,10 @@ export default{
|
||||
const teacherrecordsColumns = ref([
|
||||
{
|
||||
title: '课程编号',
|
||||
dataIndex: 'offcourseId',
|
||||
key: 'offcourseId',
|
||||
elipsis: true, align: "center",
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
align: "center",
|
||||
customRender: (text,record,index) => `${index+1}`,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user