授课记录调整

This commit is contained in:
wangxuemei
2024-10-15 10:41:24 +08:00
parent a944283500
commit 2c739fe666
3 changed files with 76 additions and 75 deletions

View File

@@ -1059,31 +1059,31 @@ export default {
{ {
href: "/lecturerlist", href: "/lecturerlist",
openKeys: "sub24", openKeys: "sub24",
selectedKeys: "sub24", selectedKeys: "sub24-1",
pagename: "讲师列表", pagename: "讲师列表",
}, },
{ {
href: "/teachingrecord", href: "/teachingrecord",
openKeys: "sub25", openKeys: "sub24",
selectedKeys: "sub25", selectedKeys: "sub24-2",
pagename: "授课记录", pagename: "授课记录",
}, },
{ {
href: "/lecturerfeemanagement", href: "/lecturerfeemanagement",
openKeys: "sub26", openKeys: "sub24",
selectedKeys: "sub26", selectedKeys: "sub24-3",
pagename: "讲师费管理", pagename: "讲师费管理",
}, },
{ {
href: "/lecturerfeestatistics", href: "/lecturerfeestatistics",
openKeys: "sub27", openKeys: "sub24",
selectedKeys: "sub27", selectedKeys: "sub24-4",
pagename: "讲师费统计", pagename: "讲师费统计",
}, },
{ {
href: "/organization", href: "/organization",
openKeys: "sub28", openKeys: "sub24",
selectedKeys: "sub28", selectedKeys: "sub24-5",
pagename: "归属组织管理", pagename: "归属组织管理",
}, },
{ {

View File

@@ -341,7 +341,7 @@ export default {
searchdate: null, //选择时间 searchdate: null, //选择时间
searchParam: { searchParam: {
teacherNameOrUserNo:null, teacherNameOrUserNo:null,
teacherType:2, recordType:2,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
teacher: null, teacher: null,
@@ -583,7 +583,7 @@ export default {
const searchReset = () => { const searchReset = () => {
state.searchdate= null, state.searchdate= null,
state.searchParam = { state.searchParam = {
teacherType:2, recordType:2,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
managerId: null, managerId: null,
@@ -631,7 +631,7 @@ export default {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改授课记录' state.teacherdialogtitle = '修改授课记录'
state.lookTeacherId = record.teacherId state.lookTeacherId = record.teacherId
state.formParam.teacherType='1' state.formParam.recordType='1'
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()
} }
@@ -675,7 +675,7 @@ export default {
//调用删除接口 //调用删除接口
let obj ={ let obj ={
offcourseId :state.delTeacherId, offcourseId :state.delTeacherId,
teacherType:2 recordType:2
} }
deleteInTeacherCourse(obj).then((res) => { deleteInTeacherCourse(obj).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {

View File

@@ -24,12 +24,12 @@
<a-range-picker <a-range-picker
v-model:value="searchdate" v-model:value="searchdate"
style="width: 420px" style="width: 420px"
@change="searchTimeChange"
format="YYYY-MM-DD" format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
separator="至" separator="至"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
<!-- @change="searchTimeChange" -->
</div> </div>
</a-form-item> </a-form-item>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
@@ -419,18 +419,17 @@ export default {
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条 pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
pageSize: 10, pageSize: 10,
tableDataTotal: -1,//table列表总条数 tableDataTotal: -1,//table列表总条数
searchdate: null, //选择时间 searchdate: undefined, //选择时间
startDate: null, //开始时间 beginTime: null, //开始时间
endDate: null, //结束时间 endTime: null, //结束时间
formParam: { formParam: {
status: 1, status: 1,
createFrom: 1, createFrom: 1,
duration: null, duration: null,
}, },
startTime:null, startTime:null,
startDate:null,
searchParam: searchParam:
{ "teacherType": 1, "pageNo": 1, "pageSize": 10, "managerId": null, "name": null, "createFrom": null, "status": null, "orgId": null, "tSystemId": null, "endDate": null, "startDate":null, "studysranges": [], "score": null } { "recordType": 1, "pageNo": 1, "pageSize": 10, "managerId": null, "name": null, "createFrom": null, "status": null, "orgId": null, "tSystemId": null, "endTime": null, "beginTime":null, "studysranges": [], "score": null }
}) })
//获取所属组织 //获取所属组织
@@ -763,36 +762,36 @@ export default {
}; };
//修改时间 //修改时间
function searchTimeChange(time, timeStr) { function searchTimeChange(time, timeStr) {
let startTime = timeStr[0] // let startTime = timeStr[0]
let endTime = timeStr[1] ; // let endTime = timeStr[1] ;
state.startTime = new Date(startTime).getTime(); // state.startTime = new Date(startTime).getTime();
state.endTime = new Date(endTime).getTime(); // state.endTime = new Date(endTime).getTime();
// state.searchParam.startDate = new Date(startDate).getTime() ; // // state.searchParam.beginTime = new Date(beginTime).getTime() ;
// state.searchParam.endDate = new Date(endDate).getTime() ; // // state.searchParam.endTime = new Date(endTime).getTime() ;
state.searchParam.startDate = state.startTime ? state.startTime : null, // state.searchParam.beginTime = state.startTime ? state.startTime : null,
state.searchParam.endDate = state.endTime ? state.endTime : null // state.searchParam.endTime = state.endTime ? state.endTime : null
} }
const editTimeChange = (e, date) => { const editTimeChange = (e, date) => {
console.log(date); console.log(date);
state.beginTime = date; state.beginTime = date;
// console.log(date, state.searchParam.startDate, state.searchParam.endDate); // console.log(date, state.searchParam.beginTime, state.searchParam.endTime);
}; };
//重置 //重置
const searchReset = () => { const searchReset = () => {
state.searchdate= null, state.searchdate= undefined,
state.searchParam = { state.searchParam = {
teacherType: 1, recordType: 1,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
managerId: null, managerId: null,
name: null, name: null,
createFrom: null, createFrom: null,
status: '0', status:null,
orgId: null, orgId: null,
tSystemId: null, tSystemId: null,
endDate: null, endTime: null,
startDate: null, beginTime: null,
studysranges: [], studysranges: [],
score: null score: null
}; };
@@ -802,8 +801,10 @@ export default {
const getTableDate = (obj) => { const getTableDate = (obj) => {
state.tableLoading = true state.tableLoading = true
let objA = { ...state.searchParam }; let objA = { ...state.searchParam };
objA.startDate = state.searchParam.startDate !== null ? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD") : "", objA.beginTime = state.searchdate ? dayjs(state.searchdate[0]).format("YYYY-MM-DD") : "",
objA.endDate = state.searchParam.endDate !== null ? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD") : "", objA.endTime = state.searchdate ? dayjs(state.searchdate[1]).format("YYYY-MM-DD") : "",
// objA.beginTime = state.searchParam.beginTime !== null ? dayjs(new Date(state.searchParam.beginTime).getTime()).format("YYYY-MM-DD") : "",
// objA.endTime = state.searchParam.endTime !== null ? dayjs(new Date(state.searchParam.endTime).getTime()).format("YYYY-MM-DD") : "",
getNewInTeacherCourseList(objA) getNewInTeacherCourseList(objA)
.then((res) => { .then((res) => {
tableData.value = res.data.data.records tableData.value = res.data.data.records
@@ -877,7 +878,7 @@ export default {
//调用删除接口 //调用删除接口
let obj = { let obj = {
offcourseId: state.delTeacherId, offcourseId: state.delTeacherId,
teacherType: 1 recordType: 1
} }
deleteInTeacherCourse(obj).then((res) => { deleteInTeacherCourse(obj).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
@@ -903,15 +904,15 @@ export default {
//清空数据 //清空数据
const cancel = () => { const cancel = () => {
state.formParam = { state.formParam = {
teacherType: 1, recordType: 1,
teacher: null, teacher: null,
orgName: null, orgName: null,
tSystemName: null, tSystemName: null,
levelId: null, levelId: null,
courseName: null, courseName: null,
duration:null, duration:null,
endDate: null, endTime: null,
startDate: null, beginTime: null,
studys: null, studys: null,
score: null, score: null,
type: null, type: null,
@@ -955,7 +956,7 @@ export default {
//内部授课详情 //内部授课详情
const TeacherSystem = (record) => { const TeacherSystem = (record) => {
state.formParam = { state.formParam = {
teacherType: 1, recordType: 1,
name: record.name, name: record.name,
userNo: record.userNo, userNo: record.userNo,
orgName: record.orgName, orgName: record.orgName,
@@ -984,7 +985,7 @@ export default {
.catch((err) => { .catch((err) => {
}); });
// state.formParam = { // state.formParam = {
// teacherType: 1, // recordType: 1,
// name: record.name, // name: record.name,
// userNo: record.userNo, // userNo: record.userNo,
// organizationName: record.organizationName, // organizationName: record.organizationName,
@@ -1076,38 +1077,38 @@ export default {
status: [{ required: true, message: '开课状态不能为空' }], status: [{ required: true, message: '开课状态不能为空' }],
} }
const rule = () => { const rule = () => {
if (state.formParam.teacher == null) { // if (state.formParam.teacher == null) {
state.log = true // state.log = true
message.warning('讲师不能为空') // message.warning('讲师不能为空')
} // }
if (state.formParam.orgName == null) { // if (state.formParam.orgName == null) {
state.log = true // state.log = true
message.warning('组织不能为空') // message.warning('组织不能为空')
} // }
if (state.formParam.levelId == null) { // if (state.formParam.levelId == null) {
state.log = true // state.log = true
message.warning('讲师级别不能为空') // message.warning('讲师级别不能为空')
} // }
if (state.formParam.tSystemName == null) { // if (state.formParam.tSystemName == null) {
state.log = true // state.log = true
message.warning('讲师体系不能为空') // message.warning('讲师体系不能为空')
} // }
if (state.formParam.name == null) { // if (state.formParam.name == null) {
state.log = true // state.log = true
message.warning('课程名称不能为空') // message.warning('课程名称不能为空')
} // }
if (state.formParam.beginTime == null) { // if (state.formParam.beginTime == null) {
state.log = true // state.log = true
message.warning('授课/课程日期不能为空') // message.warning('授课/课程日期不能为空')
} // }
if (state.formParam.defaultteachingTime == null) { // if (state.formParam.defaultteachingTime == null) {
state.log = true // state.log = true
message.warning('授课时长不能为空') // message.warning('授课时长不能为空')
} // }
if (state.formParam.status == null) { // if (state.formParam.status == null) {
state.log = true // state.log = true
message.warning('开课状态不能为空') // message.warning('开课状态不能为空')
} // }
} }
// function managerChange(e, l, d, t, orgName) { // function managerChange(e, l, d, t, orgName) {
// console.log(e, l); // console.log(e, l);
@@ -1124,8 +1125,8 @@ export default {
&courseName=${state.searchParam.courseName ? state.searchParam.courseName : ""} &courseName=${state.searchParam.courseName ? state.searchParam.courseName : ""}
&departId=${state.searchParam.departId ? state.searchParam.departId : ""} &departId=${state.searchParam.departId ? state.searchParam.departId : ""}
&tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ""} &tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ""}
&startDate=${state.searchParam.startDate ? state.searchParam.startDate : ""} &beginTime=${state.searchParam.beginTime ? state.searchParam.beginTime : ""}
&endDate=${state.searchParam.endDate ? state.searchParam.endDate : ""} &endTime=${state.searchParam.endTime ? state.searchParam.endTime : ""}
&createFrom=${state.searchParam.createFrom ? state.searchParam.createFrom : ""} &createFrom=${state.searchParam.createFrom ? state.searchParam.createFrom : ""}
&id=${state.searchParam.id ? state.searchParam.id : ""} &id=${state.searchParam.id ? state.searchParam.id : ""}
&type=${state.searchParam.type ? state.searchParam.type : ""} &type=${state.searchParam.type ? state.searchParam.type : ""}