授课记录调整

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",
openKeys: "sub24",
selectedKeys: "sub24",
selectedKeys: "sub24-1",
pagename: "讲师列表",
},
{
href: "/teachingrecord",
openKeys: "sub25",
selectedKeys: "sub25",
openKeys: "sub24",
selectedKeys: "sub24-2",
pagename: "授课记录",
},
{
href: "/lecturerfeemanagement",
openKeys: "sub26",
selectedKeys: "sub26",
openKeys: "sub24",
selectedKeys: "sub24-3",
pagename: "讲师费管理",
},
{
href: "/lecturerfeestatistics",
openKeys: "sub27",
selectedKeys: "sub27",
openKeys: "sub24",
selectedKeys: "sub24-4",
pagename: "讲师费统计",
},
{
href: "/organization",
openKeys: "sub28",
selectedKeys: "sub28",
openKeys: "sub24",
selectedKeys: "sub24-5",
pagename: "归属组织管理",
},
{

View File

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

View File

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