mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 07:46:46 +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);
|
||||
|
||||
Reference in New Issue
Block a user