Merge remote-tracking branch 'zcwy/zcwy-teacher-manage' into zcwy-teacher-manage

This commit is contained in:
zhangsir
2024-10-26 18:36:09 +08:00
7 changed files with 109 additions and 109 deletions

View File

@@ -274,17 +274,17 @@ import {getCookieForName} from "@/api/method";
}
};
function downTemplate() {
if (props.url=='/admin/export/importInTeacherRecord'){
if (props.url==='/admin/export/importInTeacherRecord'){
window.open(
`${process.env.VUE_APP_BASE_API}/admin/export/importInTeacherRecord?
`${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacherRecord?
&name=${props.name||''}`
);}
else if(props.url=='/admin/export/importOutTeacherRecord'){
else if(props.url==='/admin/export/importOutTeacherRecord'){
window.open(
`${process.env.VUE_APP_BASE_API}/admin/export/exportOutTeacherRecord?
&name=${props.name||''}`
);
}else {
}else if(props.url==='/admin/export/exportTeacherExpense') {
window.open(
`${process.env.VUE_APP_BASE_API}/admin/export/importTeacherExpense?
&name=${props.name||''}`

View File

@@ -313,8 +313,7 @@ import { message } from "ant-design-vue";
import ProjectManager from "@/components/project/ProjectManagerNew";
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher";
import dayjs from "dayjs";
import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer";
import { getTeacherCourseList, getAddress, updateInTeacherCourse,getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse } from "../../api/Teaching";
import { getTeacherCourseList, updateInTeacherCourse,getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse } from "../../api/Teaching";
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
@@ -394,23 +393,7 @@ export default {
}
//获取开课场地
const AddressLista = () => {
getAddress().then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
arr.map((value) => {
let obj = {
value: value.id,
label: value.name,
};
array.push(obj);
});
AddressList.value = array;
}
})
}
AddressLista()
//获取内容分类
const sysTypeOptions = computed(() => store.state.content_type);
const OnTheJobStatusList = ref([
@@ -618,7 +601,7 @@ export default {
name: null,
manager:null,
entryType: null,
status: null,
status: 1,
entryType:null,
systemId:null,
endTime:null,
@@ -650,6 +633,7 @@ export default {
};
// 新增讲师
const addTeacher = () => {
cancel()
state.teacherdialog = true;
state.teacherdialogtitle = '添加授课记录'
state.vf = true
@@ -677,6 +661,7 @@ export default {
}
//保存
const createTeacherDialog = async () => {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]);
@@ -685,7 +670,6 @@ export default {
}
}
state.formParam = {...state.formParam}
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => {
message.success("修改成功");
@@ -729,27 +713,7 @@ export default {
state.deleteTeacherdialog = false
});
}
//获取内容分类
const getTeacherExpertiseList = ref([
// { value: 0, label: "未定级" },
])
const getTeacherExpertiseLista = () => {
getTeacherExpertise().then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
arr.map((value) => {
let obj = {
value: value.id,
label: value.name,
};
array.push(obj);
});
getTeacherExpertiseList.value = array;
}
})
}
getTeacherExpertiseLista()
//取消按钮 清空输入的数据
const cancelTeacherDialog = () => {
if (state.teacherdialog = true) {
@@ -765,6 +729,8 @@ export default {
//清空数据
const cancel = () => {
state.formParam = {
status: 1,
recordType:2,
teacher: null,
mobile: null,
name: null,
@@ -772,6 +738,7 @@ export default {
duration: null,
score: null,
remark: null,
teachingDate:null
}
state.teachingDate=null
}
@@ -817,7 +784,7 @@ export default {
// state.searchParam.trainorgName=orgName
}
const clearNonNumber=()=>{
state.formParam.defaultteachingTime = state.formParam.defaultteachingTime.replace(/\D/g, '');
state.formParam.duration = state.formParam.duration.replace(/\D/g, '');
}
//导入功能
const handleImport = () => {
@@ -849,8 +816,6 @@ const handleImport = () => {
entryTypeList,
// searchTimeChange,
cancelTeachingDialog,
getTeacherExpertiseList,
getTeacherExpertiseLista,
handlemoreid,
handleExport,
AddressList,
@@ -872,7 +837,6 @@ const handleImport = () => {
createTeacherDialog,
getTableDate, //list接口数据调用
// getStu
AddressLista,
TeacherSystem,
// getSysTypeMap
}

View File

@@ -213,7 +213,7 @@
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师介绍">
<Editor v-model:value="formParam.description" />
<Editor v-model:value="formParam.description" :isupload="isupload" />
</a-form-item>
</a-col>
</a-row>
@@ -227,7 +227,7 @@
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="擅长课程">
<Editor v-model:value="formParam.courses" />
<Editor v-model:value="formParam.courses" :isupload="isupload"/>
</a-form-item>
</a-col>
</a-row>
@@ -455,7 +455,7 @@ export default {
console.log(val, 'description')
})
watch(() => state.formParam.workExperience, (val) => {
console.log(val, '11111')
console.log(val, '')
})
watch(() => state.formParam.courses, (val) => {
console.log(val, 'courses')

View File

@@ -830,6 +830,7 @@ export default {
};
// 新增授课
const addTeacher = () => {
cancel()
state.teacherdialog1 = 0
state.teacherdialog = true;
state.teacherdialogtitle = '添加授课记录'
@@ -856,8 +857,9 @@ export default {
}
//保存
const createTeacherDialog = async () => {
console.log( state.formParam)
state.formParam.tSystemName = state.tSystemNames.systemName
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]);
@@ -866,7 +868,7 @@ export default {
}
}
state.formParam = {...state.formParam,...state.tSystemNames}
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
console.log( state.formParam)
if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => {
message.success("修改成功");
@@ -926,6 +928,7 @@ export default {
const cancel = () => {
state.formParam = {
recordType: 1,
courseStatus:1,
teacher: null,
orgName: null,
tSystemName: null,
@@ -938,6 +941,7 @@ export default {
remark: null,
offcourseId: null,
createFrom: null,
teachingDate:null,
}
state.teachingDate=null
state.tSystemNames = {

View File

@@ -154,13 +154,13 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="name">
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName"
v-model:system="tSystemNames" v-model:level="formParam.tLevelId"></SearchTeacher>
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName" v-model:user="formParam.userNo"
v-model:system="tSystemNames" v-model:level="formParam.tLevelId" ></SearchTeacher>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="讲师工号" name="teacherId">
<a-input class="draitem" v-model:value="searchParam.teacherId" disabled
<a-form-item label="讲师工号" name="userNo">
<a-input class="draitem" v-model:value="formParam.userNo" disabled
placeholder="请输入讲师工号" allowClear showSearch>
</a-input>
</a-form-item>
@@ -255,14 +255,15 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="参训人数" name="studys">
<a-input v-model:value="formParam.studys" class="draitem"
<a-input v-model:value="formParam.studys" class="draitem" @blur="clearstudysNumber"
placeholder="0 " allowClear showSearch >
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="评分" name="score">
<a-input class="draitem" v-model:value="formParam.score" placeholder="0" allowClear
<a-input class="draitem" v-model:value="formParam.score" placeholder="0"
@blur="clearscoreNumber" allowClear
showSearch >
</a-input>
</a-form-item>
@@ -273,15 +274,15 @@
<a-col :span="12">
<a-form-item label="课酬基准" name="levelPay">
<a-input v-model:value="formParam.levelPay" placeholder="可手动更改"
@blur="clearlevelPayNumber"
allowClear showSearch class="draitem">
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="计划费用" name="expense">
<a-input class="draitem" v-model:value="formParam.expense" placeholder="" allowClear
<a-input class="draitem" v-model:value="formParam.expense" placeholder="" allowClear disabled
showSearch>
{{ defaultTeachingTime * expense}}
</a-input>
</a-form-item>
</a-col>
@@ -391,9 +392,9 @@
</a-button>
</div>
</a-drawer>
<!--批量确认 -->
<a-drawer v-model:visible="allFeedialog" placement="right"
@closa="cancelallFeedialog" :maskClosable="true" width="60%" title="批量审核">
<!--一键确认 -->
<a-drawer v-model:visible="allFeedialog" placement="right" style="min-width:1666px"
@closa="cancelallFeedialog" :maskClosable="true" width="60%" title="确认讲师费">
<a-form layout="inline">
<a-form-item class="select">
<a-input v-model:value="searchall.name" style="width: 276px; height: 40px; border-radius: 8px"
@@ -401,9 +402,17 @@
</a-input>
</a-form-item>
<a-form-item class="select ">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchall.status" placeholder="请选择所属组织" allowClear
:options="AuthenticationStatusList">
</a-select>
<div class="select addTimeBox">
<div class="addTime" >创建时间</div>
<a-range-picker
v-model:value="allsearchdate"
style="width: 420px"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div>
</a-form-item>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="searchSubmitdrawer()" type="primary" class="resetbtn">查询 </a-button>
@@ -412,6 +421,7 @@
</a-form>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="column" :data-source="tableDatas" :scroll="{ x: 1500 }" :loading="tableLoadings" :pagination="false">
<template #bodyCell="{ record, column }">
</template>
</a-table>
<div :style="{
@@ -447,7 +457,7 @@
} from '@ant-design/icons-vue';
import ImportWork from "../../components/project/ImportWork.vue";
import SearchTeacher from "@/components/project/SearchTeacher";
import {getTeacherFeeList,getTeacherFeeDetail,addTeacherFee ,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement";
import {getTeacherFeeList,getTeacherFeeDetail,addTeacherFee ,getListByIds,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement";
import {getTeacherSystemList, getLevel,getPayRollPlace,fileUp } from "../../api/Lecturer";
// lecturerFeeManagement
// import {getProjSt} from "../../api/indexProjStu";
@@ -500,8 +510,11 @@
formParam: {
teachingDate:null ,
defaultTeachingTime:null,
name: null,
userNo: null
},
searchdate: null, //选择时间
allsearchdate: null, //选择时间
searchParam: {
userNo:null,
name:null,
@@ -518,9 +531,11 @@
beginTime: null,
endTime: null,
},
//一键确认
searchall:{
name:null,
status:null,
beginTime: null,
endTime: null,
pageNo: "1",
pageSize: "10",
},
@@ -621,8 +636,11 @@ console.log( "讲师体系id" +val);
{ value:"2", label: "审核中", },
{ value:"3", label: "审核通过", },
])
watch(
watch(()=>state.formParam.name,(val)=>{
state.formParam.userNo = val?.split('/')[1]
}
)
//切换筛选
const handlemoreid=()=>{
if(state.moreid==1){
@@ -866,6 +884,7 @@ console.log( "讲师体系id" +val);
};
// 添加讲师费
const addTeacher = () => {
cancel()
state.teacherdialog = true;
state.vf = true
state.teacherdialogtitle = '添加讲师费'
@@ -896,6 +915,7 @@ console.log( "讲师体系id" +val);
}
//保存
const createTeacherDialog = async () => {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
state.formParam.tSystemName = state.tSystemNames.systemName
const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){
@@ -905,7 +925,6 @@ console.log( "讲师体系id" +val);
}
}
state.formParam = {...state.formParam,...state.tSystemNames}
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
if (state.vf == false) {
updateTeacherFee(state.formParam).then(response => {
message.success("修改成功");
@@ -990,7 +1009,7 @@ console.log( "讲师体系id" +val);
const cancel = () => {
state.formParam ={
name:null,
teacherId:null,
userNo:null,
orgName:null,
tSystemName:null,
tLevelId:null,
@@ -1083,10 +1102,21 @@ console.log( "讲师体系id" +val);
};
const clearNonNumber = () => {
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
}
const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
}
const clearscoreNumber= () => {
state.formParam.score = state.formParam.score.replace(/\D/g, '');
}
const clearlevelPayNumber = () => {
state.formParam.levelPay = state.formParam.levelPay.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
}
const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }],
teacherId: [{ required: true, message: '',log:'讲师工号不能为空' }],
userNo: [{ required: true, message: '',log:'讲师工号不能为空' }],
orgName: [{ required: true, message: '',log:'讲师组织不能为空' }],
tSystemName: [{ required: true, message:'',log: '讲师体系不能为空' }],
tLevelId: [{ required: true, message:'',log: ' 讲师级别 不能为空' }],
@@ -1101,12 +1131,7 @@ console.log( "讲师体系id" +val);
expense: [{ required: true, message: '',log:'计划费用不能为空' }],
}
function managerChange(e, l, d, t, orgName) {
console.log(e, l);
state.searchParam.userNo = d;
state.searchParam.userNo = t;
// state.searchParam.trainorgName=orgName
}
const handleImport = () => {
state.showWork = true
}
@@ -1119,7 +1144,8 @@ const cancelallFeedialog= ()=>{
const searchResetdrawer=()=>{
state.searchall={
name:null,
status:null,
beginTime: null,
endTime: null,
pageNo: "1",
pageSize: "10",
}
@@ -1130,7 +1156,9 @@ const searchSubmitdrawer=()=>{
}
const allFeeList=()=>{
state.tableLoadings=true
let objA = {...state.searchall};
let objA = { ...state.searchall };
objA.beginTime = state.allsearchdate ? dayjs(state.allsearchdate[0]).format("YYYY-MM-DD") : "",
objA.endTime = state.allsearchdate ? dayjs(state.allsearchdate[1]).format("YYYY-MM-DD") : "",
getTeacherFeeList(objA)
.then((res) => {
tableDatas.value = res.data.data.records
@@ -1365,7 +1393,6 @@ const column = ref([
beforeUpload2,
closeDeleteTeacher,
cancelTeachingDialog,
managerChange,
courseTypeList,
// searchTimeChange,
handlemoreid,
@@ -1407,6 +1434,9 @@ const column = ref([
tableDatas,
handleformlevel,
validateField,
clearstudysNumber,
clearscoreNumber,
clearlevelPayNumber,
}
},
};

View File

@@ -36,7 +36,7 @@ ExternalLecturer
<a-descriptions title="其他信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenter" >
<!-- 一层 -->
<a-descriptions-item label="讲师介绍" :span="4">
<div v-html="formParam.description" style="min-width: 500px;"></div>
<div v-if="formParam.description !=null" style="min-width: 500px;" v-html="formParam.description" ></div>
</a-descriptions-item>
<a-descriptions-item label="备注" :span="4">
{{formParam.remark===null?'--':formParam.remark}}</a-descriptions-item>
@@ -242,7 +242,7 @@ export default{
state.teacherrecordsLoading = true
state.teacherrecords.name = state.formParam.name
let obj = { ...state.teacherrecords }
console.log(111111111111111111112222222222222222)
// api接口
getNewInTeacherCourseList(obj).then((res) => {
teacherrecordstableData.value = res.data.data.records

View File

@@ -57,11 +57,16 @@
<span class="line" ></span>
<a-descriptions title="其他信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenter" >
<!-- 一层 -->
<a-descriptions-item label="讲师介绍" :span="4"><div style="min-width: 500px;">
{{formParam.description ===null ? ' --' :formParam.description}} </div> </a-descriptions-item>
<a-descriptions-item label="工作职责" :span="4">{{formParam.workExperience ===null?'--':formParam.workExperience}}</a-descriptions-item>
<a-descriptions-item label="擅长课程" :span="4">{{formParam.courses===null?'--':formParam.courses}}</a-descriptions-item>
<a-descriptions-item label="教师专长" :span="4">{{formParam.expertise===null?'--':formParam.expertise}}</a-descriptions-item>
<a-descriptions-item label="讲师介绍" :span="4" >
<div v-if="formParam.description !=null" style="min-width: 500px;" v-html="formParam.description" ></div>
</a-descriptions-item>
<a-descriptions-item label="工作职责" :span="4">
<div v-if="formParam.workExperience !=null" style="min-width: 500px;" v-html="formParam.workExperience" ></div>
</a-descriptions-item>
<a-descriptions-item label="擅长课程" :span="4">
<div v-if="formParam.courses !=null" style="min-width: 500px;" v-html="formParam.courses" ></div>
</a-descriptions-item>
<a-descriptions-item label="教师专长" :span="4">{{formParam.expertiseNames===null?'':formParam.expertiseNames}}</a-descriptions-item>
</a-descriptions>
<!-- 记录 -->
<div style="margin-top: 1px;"></div>
@@ -166,17 +171,13 @@ export default{
getTeacherById({id:state.id}).then((res) => {
let objA= res.data.data
console.log(objA ,'11111111111')
// if( objA.orgName !==null ){
// objA.neworgName=objA.orgName.split('/')
// objA.neworgName= objA.neworgName[objA.neworgName.length-1]
// }
state.formParam = objA
state.formParam.photo = state.formParam.photo ===null ?boe : state.formParam.photo
state.teacherrepromo.userId=res.data.data.id
console.log(state.teacherrepromo.id);
getteacherrecordstableData()
getpromotionrecordstableData()
promotionrecordstableData.value = res.data.data.records.levelLogList
// getpromotionrecordstableData()
})
.catch((err) => {
console.log("内部讲师详情", err);
@@ -302,6 +303,7 @@ export default{
teacherrecordstableData.value = res.data.data.records
state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading = false
})
};
//授课翻页
@@ -312,7 +314,7 @@ export default{
//晋级记录翻页
const teacherrepromoPagination = (page) => {
state.teacherrepromo.pageNo = page;
getpromotionrecordstableData();
// getpromotionrecordstableData();
};
//晋级记录列表
const promotionrecordsColumns = ref([
@@ -348,15 +350,15 @@ export default{
//晋级记录列表数据
const promotionrecordstableData = ref([
])
const getpromotionrecordstableData = () => {
state.promotionrecordsLoading = true
// state.teacherrepromo.kid = state.kid
getTeacherLogList(state.teacherrepromo).then((res) => {
promotionrecordstableData.value = res.data.data.records
state.teacherrepromotableDataTotal = Number(res.data.data.total);
})
state.promotionrecordsLoading = false
};
// const getpromotionrecordstableData = () => {
// state.promotionrecordsLoading = true
// // state.teacherrepromo.kid = state.kid
// getTeacherLogList(state.teacherrepromo).then((res) => {
// promotionrecordstableData.value = res.data.data.records
// state.teacherrepromotableDataTotal = Number(res.data.data.total);
// })
// state.promotionrecordsLoading = false
// };
const goback = ()=>{
router.back()
}
@@ -392,7 +394,7 @@ const handleup = ()=>{
teacherrepromoPagination,
promotionrecordsColumns,
promotionrecordstableData,
getpromotionrecordstableData,
// getpromotionrecordstableData,
}
}
}