外部讲师接口联调

This commit is contained in:
wangxuemei
2024-05-31 20:19:47 +08:00
parent 9cd56a63fe
commit 34c4a796a8
5 changed files with 204 additions and 95 deletions

View File

@@ -0,0 +1,7 @@
import http from "./config";
//外部讲师列表
export const getOutTeacherList = (obj) => http.post('/admin/teacher/getOutTeacherList', obj)
//外部讲师详情
export const getOuterTeacherById = (obj) => http.post('/admin/teacher/getOuterTeacherById', obj)
//外部讲师授课记录
export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj)

View File

@@ -42,3 +42,9 @@ export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeache
//导出内部讲师列表
// http://pretest.zcwytd.com/manageApi/lesson_records/export
export const exportteacher = (obj) => http.post('/admin/lesson_records/export' ,obj)
// 所有教师专长
export const getTeacherExpertise = (obj) => http.post('/admin/teacher/getTeacherExpertise' ,obj)
//根据父级教师专长(pid)查找子级教师专长
export const getTeacherExpertiseByPid = (obj) => http.post('/admin/teacher/getTeacherExpertiseByPid' ,obj)
// 新增页面内部姓名
export const infoteacher = (obj) => http.get('/admin/thirdApi/org/info' ,obj)

View File

@@ -0,0 +1,36 @@
<template>
<div>
<input type="file" @change="handleFileUpload" />
<img :src="avatarUrl" alt="Avatar" v-if="avatarUrl" />
</div>
</template>
<script>
export default {
data() {
return {
avatarUrl: '' // 存储头像的 URLBase64 编码或服务器 URL
};
},
methods: {
handleFileUpload(event) {
const file = event.target.files[0]; // 获取用户选择的文件
if (!file) return;
// 创建一个 FileReader 实例
const reader = new FileReader();
// 读取文件内容,并在读取完成后设置 img 的 src
reader.onload = (e) => {
this.avatarUrl = e.target.result; // e.target.result 是 Base64 编码的字符串
};
// 读取文件内容(作为 DataURL
reader.readAsDataURL(file);
// 如果你需要上传文件到服务器,可以在这里添加代码
// 例如,使用 Axios 发送 POST 请求到服务器
}
}
};
</script>

View File

@@ -5,7 +5,7 @@
</div>
<!-- 搜索框及按钮 -->
<div class="filter">
<div class="filterItems">
<div class="filterItems">
<div class="select">
<!-- v-model:value="searchParam.name" -->
<a-input v-model:value="searchParam.name " style="width: 230px; height: 40px; border-radius: 8px"
@@ -28,7 +28,7 @@
</div>
</div>
</div>
<br/>
<div style="width: 100%; height: ;"></div>
<div class="btns">
<div class="btn btn3" @click="addTeacher">
<div class="search"></div>
@@ -119,7 +119,7 @@
/>
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">手机号码 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.userNo"
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.mobile"
style="width:200px; height: 40px; " placeholder="请输入11位手机号码" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.userNo }}</span>
@@ -132,7 +132,7 @@
/>
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">邮箱:</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.departId"
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.email"
style="width:200px; height: 40px;" placeholder="" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.departId }}</span>
@@ -148,7 +148,7 @@
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">备注 :</span>
<a-input type="textarea" v-if="teacherdialog1 == 0" v-model:value="formParam.userNo"
<a-input type="textarea" v-if="teacherdialog1 == 0" v-model:value="formParam.remark"
style="width:200px; height: 40px; ">
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.userNo }}</span>
@@ -245,7 +245,8 @@
<script lang="jsx">
import { reactive, toRefs, ref } from "vue";
import Editor from "@/components/project/Editor";
import {getTeacherSystemList , getTeacherList,getTeacherPayRollPriceList, getLevel,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, updateTeacherState,getTeacherCourseList} from "../../api/indexPeojiectManage";
import {getTeacherSystemList ,getTeacherPayRollPriceList, getLevel,insertTeacher,deleteTeacher,updateInTeacher, updateTeacherState} from "../../api/indexPeojiectManage";
import {getOutTeacherList ,getOuterTeacherById ,getOuterTeacherCourseList} from "../../api/ExternalLecturer";
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
@@ -263,8 +264,8 @@ export default {
LecturerSystemList:[],
delTeacherId:null, //删除id确认
editTeacherid:null,//修改状态id确认
userNoid:null, //内部讲师详情工号确认
lookTeacherId:null, //内部讲师详情id确认
userNoid:null, //讲师详情工号确认
lookTeacherId:null, //讲师详情id确认
deleteTeacherdialog: false, //删除弹窗
editTeacher:false , //修改状态弹窗
handleOperate1:null, //修改状态弹窗内容
@@ -375,19 +376,19 @@ export default {
dataIndex: 'userNo',
key: 'userNo',
elipsis: true,
width: 120,
width: 200,
},
{
title: '讲师姓名 ',
dataIndex: 'name',
key: 'name',
elipsis: true,
width: 120,
width: 200,
},
{
title: '手机号 ',
dataIndex: 'departId',
key: 'departId',
dataIndex: 'mobile',
key: 'mobile',
elipsis: true,
width: 400,
// customRender: (value, record) => {
@@ -400,24 +401,24 @@ export default {
},
{
title: '邮箱 ',
dataIndex: 'tsystemName',
key: 'tsystemName',
dataIndex: 'email',
key: 'email',
elipsis: true,
width: 120,
width: 200,
},
{
title: '授课时长 ',
dataIndex: 'teaching',
key: 'teaching',
elipsis: true,
width: 120,
width: 200,
},
{
title: '账号状态 ',
dataIndex: 'status',
key: 'status',
elipsis: true,
width: 120,
width: 200,
customRender: (value) => {
return (
<div>
@@ -463,9 +464,9 @@ export default {
state.tableLoading=true
state.loading = true;
let objA = {...state.searchParam};
getTeacherList(objA)
getOutTeacherList(objA)
.then((res) => {
tableData.value = res.data.data.records
tableData.value = res.data.data
state.tableDataTotal = Number(res.data.data.total);
state.tableLoading=false
// console.log("获取讲师tableDatateacherName", tableData);
@@ -608,24 +609,14 @@ export default {
// state.formParam=({
// //讲师姓名
state.formParam.name = null;
// // 讲师工
state.formParam.userNo = null;
// //将讲师组织
state.formParam.organizationDTO = null;
// //初始授课时长
state.formParam.teachingDuration = null,
//讲师等级
state.formParam.grade = null;
//讲师体;
state.formParam.lecturerSystem = null;
// //认证状;
state.formParam.authenticationStatus = 0;
// 手机
state.formParam.mobile = null;
// 邮箱
state.formParam.email = null;
//讲师介绍
state.formParam.teacherIntrofuce =null;
//工作经历
state.formParam.workHistory =null;
//擅长课程
state.formParam.proficientInCourse =null;
//备注
state.formParam.remark =null;
console.log(state.formParam);
}
//表格内查看数据操作
@@ -641,7 +632,7 @@ export default {
//内部讲师详情
const TeacherSystem=()=>{
let ids={userNo : state.userNoid }
getTeacherById(ids).then((res) => {
getOuterTeacherById(ids).then((res) => {
console.log("内部讲师详情", res.data);
state.formParam= res.data.data
})
@@ -699,7 +690,7 @@ export default {
customRender: (value) => {
return (
<div>
{value.record.type == 1 || value.record.type == 2||record.type == 3
{value.record.type == 1 || value.record.type == 2||value.record.type == 3
? {
"1": "项目开课",
"2": "路径开课",
@@ -763,8 +754,8 @@ export default {
pageNo: "1",
pageSize: "10"}
// api接口
getTeacherCourseList(ids).then((res) => {
teacherrecordstableData.value = res.data.data.records
getOuterTeacherCourseList(ids).then((res) => {
teacherrecordstableData.value = res.data.data
state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading=false
})

View File

@@ -8,7 +8,7 @@
<div class="filterItems">
<div class="select">
<!-- v-model:value="searchParam.name" -->
<a-input v-model:value="searchParam.name " style="width: 230px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.userNo " style="width: 230px; height: 40px; border-radius: 8px"
placeholder="请输入工号/姓名检索" allowClear showSearch>
</a-input>
</div>
@@ -113,7 +113,7 @@
<a-button @click ="promotionrecords" v-if="teacherdialog1 == 1" >晋级记录</a-button>
</div>
<!-- 个人详情 -->
<div style="border: 1px rgb(177, 177, 177) solid; margin-left: 33px; margin-right: 33px; margin-bottom: 33px;" v-if="tagsshow==='1'">
<div style="border: 1px rgb(177, 177, 177) solid; margin-left: 33px; margin-right: 33px; margin-bottom: 33px;" v-show="tagsshow==1">
<div class="projectManage" >
<div class="filter">
<div class="filterItems">
@@ -142,7 +142,7 @@
src="../../assets/images/basicinfo/asterisk.png"
/>
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">讲师工号 :</span>
<span style="display:inline-block ;width:95px ;text-align:center ">讲师工号 :</span>
<a-input v-if="teacherdialog1 == 0" disabled v-model:value="formParam.userNo"
style="width:200px; height: 40px; " placeholder="自动带出讲师工号" allowClear showSearch>
</a-input>
@@ -162,7 +162,7 @@
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.departId }}</span>
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">初始授课时长 :</span>
<span style="display:inline-block ;width:100px ;text-align:center ">初始授课时长 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.defaultTeachingTime"
style="width:200px; height: 40px;" placeholder="0分钟" allowClear showSearch>
</a-input>
@@ -182,7 +182,7 @@
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.tlevelName }}</span>
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">认证状态</span>
<span style="display:inline-block ;width:100px ;text-align:center ">认证状态</span>
<a-radio-group v-if="teacherdialog1 == 0" v-model:value="formParam.certStatus"
style="width:200px">
@@ -223,7 +223,7 @@
</div>
<Editor v-if="teacherdialog1 == 0" v-model="formParam.teacherIntrofuce"
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.description }}</span>
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.teacherIntrofuce }}</span>
</div>
<div class="select">
<!-- <Editor/> -->
@@ -245,11 +245,11 @@
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">教师专长 :</span>
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="讲师体系" v-model:value="searchParam.searOnTheJobStatus"
:options="LecturerSystemList">
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="" v-model:value="formParam.TeacherExpertise"
:options="TeacherExpertiseList">
</a-select>
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="讲师体系" v-model:value="searchParam.searOnTheJobStatus"
:options="LecturerSystemList">
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="" v-model:value="formParam.getTeacherExpertiseByPid"
:options="getTeacherExpertiseByPidList">
</a-select>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.expertise }}</span>
</div>
@@ -263,7 +263,7 @@
</div>
</div>
<!-- 授课记录 -->
<div class="projectManage" v-if="tagsshow==='2'" style="margin">
<div class="projectManage" v-show="tagsshow==2" style="margin">
<div style="padding: 33px">
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="teacherrecordsColumns"
@@ -277,14 +277,14 @@
:showSizeChanger="true"
:hideOnSinglePage="true"
:pageSize="pageSize"
v-model:current="searchParam.pageNo"
v-model:current="teacherrecords.pageNo"
:total="teacherrecordstableDataTotal"
class="pagination"
@change="teacherchangePagination"
/>
</div>
<!-- 晋级记录 -->
<div class="projectManage" v-if="tagsshow==='3'" style="margin">
<div class="projectManage" v-show="tagsshow==3" style="margin">
<div style="padding: 33px">
<div style="font-size:24px;font-weight:500">晋升过程</div>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="promotionrecordsColumns"
@@ -351,24 +351,27 @@
</div>
</a-modal>
</div>
<!-- <div> <Upload/> </div> -->
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref } from "vue";
import Editor from "@/components/project/Editor";
import {getTeacherSystemList , getTeacherList,getTeacherPayRollPriceList, getLevel,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, updateTeacherState,getTeacherCourseList} from "../../api/indexPeojiectManage";
import Upload from "@/components/project/Upload";
import {getTeacherSystemList , getTeacherList,getTeacherPayRollPriceList, getLevel,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, updateTeacherState,getTeacherCourseList , getTeacherExpertise,getTeacherExpertiseByPid ,infoteacher } from "../../api/indexPeojiectManage";
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
name: "projectManage",
components: {
// AddTeacher,
Editor
Editor,
Upload
},
setup() {
const state = reactive({
promotionrecordsLoading:false , //晋级记录遮罩层
teacherrecordsLoading:false,// 授课记录遮罩层
tableLoading:false,
tagsshow:"1",
PlaceOfPayList:[],
@@ -388,16 +391,20 @@ export default {
tableDataTotal: -1,//table列表总条数
teacherrecordstableDataTotal:-1,//授课记录列表总条数
formParam: {
authenticationStatus: 1 //认证状态
certStatus : 1 ,//认证状态
},
searchParam: {
teacherName:null,//工号姓名
systemName:null,//讲师体系
userNo:null,//工号姓名
tsystemName:null,//讲师体系
payrollPlaceName:null,//发薪地
teacherType: null,
pageNo: "1",
pageSize: "10"
},
teacherrecords:{
pageNo: "1",
pageSize: "10",
id:null
},
activeName:'first'
})
const LecturerSystemList = ref([
@@ -422,8 +429,8 @@ export default {
console.log("获取讲师",LecturerSystemList);
})
}
//获取内部讲师级别
LecturerSystemLista()
//获取内部讲师级别
const getLevelList = ref([
// { value: 0, label: "未定级" },
])
@@ -483,6 +490,62 @@ export default {
{ value: 1, label: "专业力" , children: [{value: 0, label: "管理团队" ,value: 1, label: "专业力" ,value: 2, label: "专业力" }]},
{ value: 2, label: "通用力" , children: [{value: 0, label: "管理团队" ,value: 1, label: "通用力" ,value: 2, label: "通用力" }]},
])
//获取讲师父 专长
const TeacherExpertiseList = ref([
// { value: 0, systemName: "讲师体系" },
]);
const getTeacherExpertisea =() => {
// console.log('点击了LecturerSystemLista')
getTeacherExpertise().then((res)=>{
if (res.data.code === 200) {
let arr = res.data.data;
let array = TeacherExpertiseList.value;
arr.map((value) => {
let obj = {
value: value.id,
label: value.name,
};
array.push(obj);
});
TeacherExpertiseList.value = array;
}
})
getTeacherExpertiseByPida()
}
//获取讲师子 专长
const getTeacherExpertiseByPidList = ref([
// { value: 0, systemName: "讲师体系" },
]);
const getTeacherExpertiseByPida =() => {
let pid = {id :29}
// console.log('点击了LecturerSystemLista')
getTeacherExpertiseByPid(pid).then((res)=>{
if (res.data.code === 200) {
let arr = res.data.data;
let array = getTeacherExpertiseByPidList.value;
arr.map((value) => {
let obj = {
value: value.id,
label: value.name,
};
array.push(obj);
});
getTeacherExpertiseByPidList.value = array;
}
})
}
//新增页面内部姓名
const infoteacherList = ref([
// { value: 0, systemName: "讲师体系" },
]);
const getinfoteacher = (obj) => {
state.tableLoading=true
infoteacher()
.then((res) => {
infoteacherList.value = res.data.data.records
})
};
const columns = ref([
{
title: '姓名 ',
@@ -652,14 +715,13 @@ export default {
// List接口数据
const getTableDate = (obj) => {
state.tableLoading=true
state.loading = true;
let objA = {...state.searchParam};
getTeacherList(objA)
.then((res) => {
tableData.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total);
state.tableLoading=false
// console.log("获取讲师tableDatateacherName", tableData);
console.log("获取讲师tableData", tableData);
})
};
getTableDate()
@@ -690,7 +752,7 @@ export default {
getTableDate();
};
const teacherchangePagination = (page) => {
state.searchParam.pageNo = page;
state.teacherrecords.pageNo = page;
getteacherrecordstableData();
};
// 新增讲师
@@ -698,6 +760,12 @@ export default {
state.teacherdialog1 = 0
state.teacherdialog = true;
state.teacherdialogtitle = '新增讲师'
//获取内部讲师级别
LecturerSystemLista()
getLevelLista()
getTeacherExpertisea()
// getinfoteacher()
}
//修改讲师信息弹窗
const handleModify = (record) => {
@@ -705,13 +773,6 @@ export default {
state.teacherdialog = true;
state.teacherdialogtitle = '修改信息'
TeacherSystem()
// state.formParam.name = record.name;
// state.formParam.userNo = record.userNo;
// state.formParam.organizationDTO = record.organizationDTO;
// state.formParam.teachingDuration = record.teachingDuration;
// state.formParam.grade = record.grade;
// state.formParam.lecturerSystem = record.lecturerSystem;
// state.formParam.authenticationStatus = record.authenticationStatus;
}
//保存
const createTeacherDialog =()=>{
@@ -802,15 +863,15 @@ export default {
// // 讲师工号
state.formParam.userNo = null;
// //将讲师组织
state.formParam.organizationDTO = null;
state.formParam.departId = null;
// //初始授课时长
state.formParam.teachingDuration = null,
state.formParam.defaultTeachingTime = null,
//讲师等级
state.formParam.grade = null;
state.formParam.tlevelName = null;
//讲师体;
state.formParam.lecturerSystem = null;
state.formParam.tsystemName = null;
// //认证状;
state.formParam.authenticationStatus = 0;
state.formParam.certStatus = 1;
//讲师介绍
state.formParam.teacherIntrofuce =null;
//工作经历
@@ -827,7 +888,8 @@ export default {
state.userNoid= record.userNo
state.lookTeacherId= record.id
// alert(record.grade)
TeacherSystem()
// TeacherSystem()
getteacherrecordstableData ()
}
//内部讲师详情
const TeacherSystem=()=>{
@@ -842,24 +904,24 @@ export default {
}
// tab 标签切换
const particulars=()=>{
state.tagsshow= '1'
state.tagsshow= 1
console.log(state.tagsshow)
}
const teacherrecords=()=>{
state.tagsshow= '2'
getteacherrecordstableData ()
state.tagsshow= 2
// getteacherrecordstableData ()
console.log(state.tagsshow)
}
const promotionrecords=()=>{
console.log(state.tagsshow)
state.tagsshow= '3'
state.tagsshow= 3
console.log(state.tagsshow)
}
//授课记录列表
const teacherrecordsColumns = ref ([
{
title: '课程编号',
dataIndex: 'id',
key: 'id',
dataIndex: 'offcourseId',
key: 'offcourseId',
elipsis: true,
width: 120,
},
@@ -893,7 +955,7 @@ export default {
customRender: (value) => {
return (
<div>
{value.record.type == 1 || value.record.type == 2||record.type == 3
{value.record.type == 1 || value.record.type == 2||value.record.type == 3
? {
"1": "项目开课",
"2": "路径开课",
@@ -906,8 +968,8 @@ export default {
},
{
title: '学习总人数',
dataIndex: 'xxzrs',
key: 'xxzrs',
dataIndex: 'projectMember',
key: 'projectMember',
elipsis: true,
width: 120,
},
@@ -949,18 +1011,19 @@ export default {
const teacherrecordstableData = ref([
])
const getteacherrecordstableData = () => {
state.teacherrecordsLoading=true
state.loading = true;
// let ids={id: state.lookTeacherId ,pageNo: "1", pageSize: "10" }
let ids=
{id: "965341999643234304",
pageNo: "1",
pageSize: "10"}
state.teacherrecordsLoading=true
state.teacherrecords.id= state.lookTeacherId
let objB={...state.teacherrecords}
// let ids= {id: "965341999643234304",
// pageNo: "1",
// pageSize: "10"}
// api接口
getTeacherCourseList(ids).then((res) => {
getTeacherCourseList(objB).then((res) => {
teacherrecordstableData.value = res.data.data.records
state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading=false
state.teacherrecordsLoading=false
console.log("获取teacherrecordstableData",res.data.data.records);
console.log("获取teacherrecordstableData",teacherrecordstableData);
})
};
//晋级记录列表
@@ -1062,6 +1125,12 @@ export default {
promotionrecordstableData,
// getpromotionrecordstableData
TeacherExpertiseList,
getTeacherExpertisea,
getTeacherExpertiseByPidList,
getTeacherExpertiseByPida,
infoteacherList,
getinfoteacher,
}
},
};