讲师管理bug

This commit is contained in:
zhangsir
2024-12-09 16:28:16 +08:00
parent e84fc4b3af
commit 30ee0c4a06
11 changed files with 148 additions and 57 deletions

View File

@@ -12,7 +12,8 @@ export const updateInTeacherCourse = (obj) => http.post('/admin/teacherRecord/ed
export const getTeacherCourseList = (obj) => http.get('/admin/teacherRecord/queryById', {params: obj}) export const getTeacherCourseList = (obj) => http.get('/admin/teacherRecord/queryById', {params: obj})
//获取培训组织 //获取培训组织
export const getOrganization = (obj) => http.get ('/admin/affiliation/list', {params: obj}) export const getOrganization = (obj) => http.get ('/admin/affiliation/list', {params: obj})
//供应商数据
export const selectSupplier = (obj) => http.get('/admin/teacher/selectSupplier', {params: obj})
//授课记录导出 //授课记录导出
export const getexport = (obj) => http.post('/lesson_records/export', obj) export const getexport = (obj) => http.post('/lesson_records/export', obj)

View File

@@ -141,7 +141,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
}) })
} }
const orgLists = ref([]) const orgLists = ref([])
const onCheck = async (checkedKeys, {checked: bool, checkedNodes, node, event}) => { const onCheck = async (checkedKey, {checked: bool, checkedNodes, node, event}) => {
// "965356037047586816" // "965356037047586816"
let length = treeAddData.value.length let length = treeAddData.value.length
if(checkedNodes.length > length){ if(checkedNodes.length > length){
@@ -154,7 +154,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
message.error('获取被占用组织失败,请重新尝试') message.error('获取被占用组织失败,请重新尝试')
}) })
} }
treeAddData.value = checkedNodes.map(item => { const checkLists = checkedNodes.map(item => {
if (!item || !item.id) { if (!item || !item.id) {
return item; return item;
} }
@@ -176,6 +176,14 @@ import * as lecturerApi from "@/api/Lecturer.js";
return item; return item;
} }
}); });
const endLists = [...checkLists,...orgLists.value]
const seen = new Set();
const uniqueEndLists = endLists.filter(item => {
const isDuplicate = seen.has(item.orgId);
seen.add(item.orgId);
return !isDuplicate;
});
treeAddData.value = uniqueEndLists?.filter(item => checkedKeys.value?.checked?.includes(item.orgId));
// treeAddData.value = checkedNodes; // treeAddData.value = checkedNodes;
console.log(treeAddData.value,'checkedNodes',orgLists.value) console.log(treeAddData.value,'checkedNodes',orgLists.value)
} }
@@ -193,6 +201,13 @@ import * as lecturerApi from "@/api/Lecturer.js";
clearTree() clearTree()
}; };
const queryCreate = () => { const queryCreate = () => {
treeAddData.value?.map(item=>{
props?.AddContentList?.map(i=>{
if(item.orgId === i.orgId){
item.affiliationOrgId = i.affiliationOrgId
}
})
})
emit("update:AddContentList", treeAddData.value); emit("update:AddContentList", treeAddData.value);
closeCodeModal() closeCodeModal()
} }

View File

@@ -19,7 +19,7 @@
<!-- 讲师信息 --> <!-- 讲师信息 -->
<div style="width: 100%;margin-top: 10px;"> <div style="width: 100%;margin-top: 10px;">
<span class="line" style="margin-left:12px;"></span> <span class="line" style="margin-left:12px;"></span>
<a-descriptions title="讲师信息" style="padding:0 20px;" bordered :column="3" :contentStyle="rowCenters" :labelStyle="rowCenter"> <a-descriptions title="基本信息" style="padding:0 20px;" bordered :column="3" :contentStyle="rowCenters" :labelStyle="rowCenter">
<!-- 一层 --> <!-- 一层 -->
<a-descriptions-item label="讲师头像"> <a-image <a-descriptions-item label="讲师头像"> <a-image
:width="55" style="border-radius: 50%;" :width="55" style="border-radius: 50%;"

View File

@@ -3,7 +3,7 @@
width="80%" :title="false"> width="80%" :title="false">
<!-- 内部讲师查看详情 --> <!-- 内部讲师查看详情 -->
<div class="LookInsideLecturer"> <div class="LookInsideLecturer">
<div class="header" style="margin-top: -24px;"> <div class="header" style="margin-top: -24px;margin-left: -24px;">
<div class="headerTitle">查看讲师</div> <div class="headerTitle">查看讲师</div>
<!-- <router-link :to="{ path: '/lecturerList', query: { activeKey: '1', } }"> --> <!-- <router-link :to="{ path: '/lecturerList', query: { activeKey: '1', } }"> -->
<img <img
@@ -17,7 +17,7 @@
<!-- 讲师信息 --> <!-- 讲师信息 -->
<div style="width: 100%;margin-top: 10px;padding: 20px;"> <div style="width: 100%;margin-top: 10px;padding: 20px;">
<span class="line"></span> <span class="line"></span>
<a-descriptions title="讲师信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenters"> <a-descriptions title="基本信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenters">
<!-- 一层 --> <!-- 一层 -->
<a-descriptions-item label="讲师头像"> <a-descriptions-item label="讲师头像">
<a-image :width="55" style="border-radius: 50%;" :src=formParam.photo /> <a-image :width="55" style="border-radius: 50%;" :src=formParam.photo />
@@ -507,7 +507,13 @@ const handleup = ()=>{
} }
//小竖线 //小竖线
.line{ .line{
float:left; width: 3px; height: 25px; background: #4ea6ff;border-radius: 30%; margin-right: 5px; float:left;
width: 3px;
height: 16px;
background: #4ea6ff;
border-radius: 30%;
margin-left: -10px;
margin-top: 5px;
} }
::v-deep .ant-descriptions-header{ ::v-deep .ant-descriptions-header{
margin-bottom: 18px ; margin-bottom: 18px ;

View File

@@ -79,7 +79,7 @@ const getOutTeacher = () => {
const options = computed(() => userList.value.map(e => ({ const options = computed(() => userList.value.map(e => ({
// label: e.name + '(' + e.userNo + ')' + e.organizationName, // label: e.name + '(' + e.userNo + ')' + e.organizationName,
label:e.name, label:e.name+ '(' +e.supplier + ')',
value: e.name, value: e.name,
...e, ...e,
audienceList: null audienceList: null

View File

@@ -65,10 +65,10 @@
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" <a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false"
width="700px" :title="false"> width="700px" :title="false">
<div class="headers" style="margin-top:-24px;"> <div class="headers" style="margin-top:-24px;width: 110%;margin-left: -24px;">
<div class="headerTitle">{{ teacherdialogtitle }}</div> <div class="headerTitle">{{ teacherdialogtitle }}</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer;margin-right: 24px;"
src="@/assets/images/basicinfo/close.png" src="@/assets/images/basicinfo/close.png"
@click="cancelTeacherDialog" @click="cancelTeacherDialog"
/> />
@@ -139,18 +139,18 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="初始授课时长" name="teaching"> <a-form-item label="初始授课时长" name="teaching">
<a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px ; " <a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px ; "
placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber"> placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.teaching !== null">{{ (formParam.teaching / 60 <!-- <span style="margin-left: 5px ;" v-if="formParam.teaching !== null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span> ).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching === null">0.00小时</span> <span style="margin-left: 5px ;" v-if="formParam.teaching === null">0.00小时</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 其他信息 --> <!-- 其他信息 -->
<a-row> <a-row>
<a-col :span="24" style="margin-bottom: 15px;"> <a-col :span="24" style="margin-bottom: 24px;margin-top: 12px;">
<span class="line"></span><span style="font-weight: 600;">其他信息</span> <span class="line"></span><span style="font-weight: 600;">其他信息</span>
</a-col> </a-col>
</a-row> </a-row>
@@ -194,7 +194,7 @@
} " } "
> >
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button> <a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 <a-button style="margin-right: 20px;" class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button> </a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -521,7 +521,7 @@ export default {
//修改讲师信息弹窗 //修改讲师信息弹窗
const handleModify = (record) => { const handleModify = (record) => {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改信息' state.teacherdialogtitle = '编辑讲师'
state.id = record.id state.id = record.id
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()
@@ -826,6 +826,9 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ant-form-item {
margin-bottom: 12px;
}
::v-deep .ant-upload.ant-upload-select-picture-card { ::v-deep .ant-upload.ant-upload-select-picture-card {
border-radius: 50% !important; border-radius: 50% !important;
width: 90px; width: 90px;
@@ -846,7 +849,7 @@ export default {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 25px; line-height: 25px;
// margin-left: 24px; margin-left: 14px;
} }
} }
//导出按钮icon //导出按钮icon

View File

@@ -13,6 +13,11 @@
allowClear v-model:value="searchParam.name" allowClear v-model:value="searchParam.name"
v-on:keydown.enter="enterPressHadlerSearch"></a-input> v-on:keydown.enter="enterPressHadlerSearch"></a-input>
</a-form-item> </a-form-item>
<a-form-item class="select">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.supplier" placeholder="请输入供应商" :options="supperList" allowClear
v-on:keydown.enter="enterPressHadlerSearch" showSearch >
</a-select>
</a-form-item>
<a-form-item class="select"> <a-form-item class="select">
<a-input v-model:value="searchParam.courseName" style="width: 276px; height: 40px; border-radius: 8px" <a-input v-model:value="searchParam.courseName" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入课程名称进行搜索" allowClear showSearch placeholder="请输入课程名称进行搜索" allowClear showSearch
@@ -341,7 +346,7 @@ import { message } from "ant-design-vue";
import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManager from "@/components/project/ProjectManagerNew";
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher"; import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getTeacherCourseList, updateInTeacherCourse, getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse } from "../../api/Teaching"; import { getTeacherCourseList, updateInTeacherCourse, getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse,selectSupplier } from "../../api/Teaching";
// import {getProjSt} from "../../api/indexProjStu"; // import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher" // import AddTeacher from "../../components/drawers/project/AddTeacher"
export default { export default {
@@ -363,6 +368,7 @@ export default {
state.searchParam = JSON.parse(search) state.searchParam = JSON.parse(search)
} }
searchSubmit() searchSubmit()
getSupplier()
}) })
const route = useRoute() const route = useRoute()
const formRef = ref(); const formRef = ref();
@@ -441,6 +447,19 @@ export default {
{ value: 2, label: "路径开课" }, { value: 2, label: "路径开课" },
{ value: 3, label: "面授开课" }, { value: 3, label: "面授开课" },
]) ])
const supperList = ref([])
const getSupplier = ()=>{
selectSupplier().then(res=>{
if(res.data.code == 200){
supperList.value = res.data.data.map(item=>{
return {
value:item,
label:item
}
})
}
})
}
const AuthenticationStatusList = ref([ const AuthenticationStatusList = ref([
{ value: '', label: "全部" }, { value: '', label: "全部" },
{ value: 0, label: "未开课" }, { value: 0, label: "未开课" },
@@ -467,12 +486,21 @@ export default {
ellipsis: true, align: "center", ellipsis: true, align: "center",
width: 150, width: 150,
}, },
{
title: '供应商',
dataIndex: 'supplier',
key: 'supplier',
ellipsis: true, align: "center",
width: 150,
customRender: ({text})=> text||'-'
},
{ {
title: '手机号码 ', title: '手机号码 ',
dataIndex: 'mobile', dataIndex: 'mobile',
key: 'mobile', key: 'mobile',
ellipsis: true, align: "center", ellipsis: true, align: "center",
width: 150, width: 150,
customRender: ({text}) => text||'-'
}, },
{ {
title: '课程类型 ', title: '课程类型 ',
@@ -663,6 +691,7 @@ export default {
systemId: null, systemId: null,
endTime: null, endTime: null,
beginTime: null, beginTime: null,
supplier: null,
}; };
getTableDate(); getTableDate();
}; };
@@ -914,6 +943,8 @@ const sendName=()=>{
AddressList, AddressList,
OnTheJobStatusList, OnTheJobStatusList,
AuthenticationStatusList, AuthenticationStatusList,
supperList,
getSupplier,
searchSubmit, searchSubmit,
searchReset, searchReset,
columns, columns,

View File

@@ -949,7 +949,7 @@ export default {
//修改讲师信息弹窗 //修改讲师信息弹窗
const handleModify = (record) => { const handleModify = (record) => {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改信息' state.teacherdialogtitle = '编辑讲师'
state.id = record.id state.id = record.id
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()

View File

@@ -789,9 +789,9 @@ export default {
<div> <div>
{value.record.createdFee == 0 || value.record.createdFee == 1 {value.record.createdFee == 0 || value.record.createdFee == 1
? { ? {
"0": "", "0": "未提交",
"1": "", "1": "已提交",
}[value.record.feeCreated + ""] || "" }[value.record.createdFee + ""] || ""
: "-"} : "-"}
</div> </div>
) )

View File

@@ -1,6 +1,8 @@
<template> <template>
<a-drawer :visible="visible" placement="right" :closable="false" :maskClosable="false"
width="60%" :title="false">
<div class="appedit"> <div class="appedit">
<div class="header"> <div class="header" style="margin-top: -24px;">
<div class="headerTitle">编辑讲师费审批</div> <div class="headerTitle">编辑讲师费审批</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
@@ -303,6 +305,7 @@
</div> </div>
</div> </div>
</a-modal> </a-modal>
</a-drawer>
</template> </template>
<script lang="jsx"> <script lang="jsx">
@@ -318,7 +321,17 @@ export default {
components: { components: {
SearchTeacher, SearchTeacher,
}, },
setup () { props: {
visible: {
type: Boolean,
default: false,
},
id: {
type: String,
default: "",
},
},
setup (props,emits) {
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const state = reactive({ const state = reactive({
@@ -331,7 +344,7 @@ export default {
startTime: null, startTime: null,
endTime: null, endTime: null,
}, },
paramsId: route.query.id, paramsId: props.id,
copyName: null, copyName: null,
modalVisible: false, modalVisible: false,
tSystemNames:{ tSystemNames:{
@@ -368,12 +381,17 @@ export default {
dataList: [], dataList: [],
loading: false, loading: false,
}) })
onMounted(()=>{ watch(()=>props.visible, (val) => {
if(val){
queryById({id: state.paramsId}).then(res=>{ queryById({id: state.paramsId}).then(res=>{
state.formData = res.data.data state.formData = res.data.data
}) })
getTableList() getTableList()
orgLists() orgLists()
}
})
onMounted(()=>{
}) })
const getTableList = () => { const getTableList = () => {
state.loading = true state.loading = true
@@ -431,7 +449,7 @@ export default {
dialog({ dialog({
content: '确定要重新汇总数据吗?', content: '确定要重新汇总数据吗?',
ok: () => { ok: () => {
CreateSummaryAgain(route.query.id).then(res=>{ CreateSummaryAgain(props.id).then(res=>{
queryById({id: state.paramsId}).then(res=>{ queryById({id: state.paramsId}).then(res=>{
state.formData = res.data.data state.formData = res.data.data
}) })
@@ -617,18 +635,22 @@ export default {
payableExpense: [{ required: true, message: '',log:'应发费用不能为空' }], payableExpense: [{ required: true, message: '',log:'应发费用不能为空' }],
} }
const closeDrawer = () => { const closeDrawer = () => {
reset() state.params.userNoName = null
router.push({ state.params.startTime = null
path: '/lecturerfeemanagement', state.params.endTime = null
query:{activeKey:true} state.dateValue = []
}) emits.emit('update:visible',false)
// router.push({
// path: '/lecturerfeemanagement',
// query:{activeKey:true}
// })
} }
const paramsDrawer = () => { const paramsDrawer = () => {
dialog({ dialog({
content: '请仔细核对讲师费信息,确认无误后,将自动进入(BPM系统)审批流程', content: '请仔细核对讲师费信息,确认无误后,将自动进入(BPM系统)审批流程',
ok: ()=>{ ok: ()=>{
isConfirm({ isConfirm({
id: route.query.id, id: props.id,
status: 2 status: 2
}).then(res=>{ }).then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
@@ -689,7 +711,7 @@ export default {
content: '确定要移除此条数据吗?', content: '确定要移除此条数据吗?',
ok: () => { ok: () => {
withdrawRecord({ withdrawRecord({
billId: route.query.id, billId: props.id,
ids: [record.id] ids: [record.id]
}).then(res=>{ }).then(res=>{
message.success('移除成功') message.success('移除成功')
@@ -1055,8 +1077,8 @@ export default {
flex-direction: column; flex-direction: column;
.header { .header {
padding: 0px 32px; padding: 0px 15px;
height: 73px; height: 68px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -1100,12 +1122,18 @@ export default {
} }
} }
.table{ .table{
// padding-bottom: 70px; padding-bottom: 70px;
} }
} }
} }
.btnn { .btnn {
position: absolute;
bottom: 0;
width: 100%;
left: -6px;
z-index: 9;
background: #fff;
padding: 0px 32px; padding: 0px 32px;
min-height: 70px; min-height: 70px;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;

View File

@@ -225,6 +225,7 @@
</a-modal> </a-modal>
</div> </div>
<!-- <div> <Upload/> </div> --> <!-- <div> <Upload/> </div> -->
<LecturerAppEdit v-model:visible="editTeacherDialog" :id="editId" ></LecturerAppEdit>
</div> </div>
</template> </template>
<script lang="jsx"> <script lang="jsx">
@@ -247,6 +248,7 @@
// lecturerFeeManagement // lecturerFeeManagement
// import {getProjSt} from "../../api/indexProjStu"; // import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher" // import AddTeacher from "../../components/drawers/project/AddTeacher"
import LecturerAppEdit from "./LecturerAPPEdit"
export default { export default {
name: "LecturerApproval", name: "LecturerApproval",
components: { components: {
@@ -256,22 +258,25 @@
DownloadOutlined,//图标-导入 DownloadOutlined,//图标-导入
FolderAddOutlined,//图标--新增 FolderAddOutlined,//图标--新增
ProjectManager, ProjectManager,
LecturerAppEdit,
}, },
setup(props,emit) { setup(props,emit) {
watch(()=>props.key,(val)=>{ watch(()=>props.key,(val)=>{
console.log(val,'valllllll') console.log(val,'valllllll')
}) })
onMounted(()=>{ onMounted(()=>{
const search = sessionStorage.getItem('searchApprlval') // const search = sessionStorage.getItem('searchApprlval')
console.log(search,'search') // console.log(search,'search')
if(search){ // if(search){
state.searchParam = JSON.parse(search) // state.searchParam = JSON.parse(search)
state.searchdate = state.searchParam.searchdate // state.searchdate = state.searchParam.searchdate
} // }
getTableDate() getTableDate()
}) })
const router = useRouter() const router = useRouter()
const state = reactive({ const state = reactive({
editId: null,
editTeacherDialog: false,
tableDataExamineLoading: false, tableDataExamineLoading: false,
tableDataExamineTwo: [], tableDataExamineTwo: [],
tableDataParams:{ tableDataParams:{
@@ -514,7 +519,7 @@
const searchSubmit = () => { const searchSubmit = () => {
state.searchParam.pageNo = 1; state.searchParam.pageNo = 1;
getTableDate(); getTableDate();
sessionStorage.removeItem('searchApprlval') // sessionStorage.removeItem('searchApprlval')
}; };
//重置 //重置
const searchReset = () => { const searchReset = () => {
@@ -534,7 +539,7 @@
pageSize: 10 , pageSize: 10 ,
}; };
getTableDate(); getTableDate();
sessionStorage.removeItem('searchApprlval') // sessionStorage.removeItem('searchApprlval')
}; };
// //修改时间 // //修改时间
// function searchTimeChange(time, timeStr) { // function searchTimeChange(time, timeStr) {
@@ -627,14 +632,16 @@
} }
} }
const goDdit = (record) => { const goDdit = (record) => {
state.searchParam.searchdate = state.searchdate state.editTeacherDialog = true
sessionStorage.setItem('searchApprlval', JSON.stringify(state.searchParam)) state.editId = record.id
router.push({ // state.searchParam.searchdate = state.searchdate
path:'/LecturerAppEdit', // sessionStorage.setItem('searchApprlval', JSON.stringify(state.searchParam))
query:{ // router.push({
id: record.id // path:'/LecturerAppEdit',
} // query:{
}) // id: record.id
// }
// })
} }
//表格内查看数据操作 //表格内查看数据操作
const handleLook = (record) => { const handleLook = (record) => {