mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
讲师管理,授课记录 调整
This commit is contained in:
@@ -6,18 +6,18 @@
|
||||
<a-form layout="inline">
|
||||
<a-form-item class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<a-input v-model:value="searchParam.teacherNameOrUserNo" style="width: 276px; height: 40px; border-radius: 8px"
|
||||
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item class="select">
|
||||
<a-select style="width: 276px" placeholder="请选择讲师体系" v-model:value="searchParam.systemId" allowClear
|
||||
<a-select style="width: 276px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId" allowClear
|
||||
:options="LecturerSystemList" @change="changetlevel">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<!-- <div @click="handlesearchlevel"> -->
|
||||
<a-form-item class="select" >
|
||||
<a-select style="width: 276px" v-model:value="searchParam.sLevelName" placeholder="请选择讲师级别" allowClear
|
||||
<a-select style="width: 276px" v-model:value="searchParam.tLevelId" placeholder="请选择讲师级别" allowClear
|
||||
:options="getLevelList" >
|
||||
<!-- :disabled="getLevelList.length !== 0 ? false : true" 禁用状态 -->
|
||||
</a-select>
|
||||
@@ -75,7 +75,7 @@
|
||||
@expand="expandTable" :pagination="false">
|
||||
<template #bodyCell="{ record, column }">
|
||||
|
||||
<template v-if="column.key === 'organizationName'">
|
||||
<!-- <template v-if="column.key === 'organizationName'">
|
||||
<a-space style="display:flex ;justify-content: space-around; ">
|
||||
<a-popover>
|
||||
<template #content>
|
||||
@@ -84,7 +84,7 @@
|
||||
<span>{{ record.neworganizationName }}</span>
|
||||
</a-popover>
|
||||
</a-space>
|
||||
</template>
|
||||
</template> -->
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
@@ -94,11 +94,12 @@
|
||||
@click="() => handleOperate(record, String(record.courseform))">停用</a-button>
|
||||
<a-button v-if="record.status == '2'" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">启用</a-button>
|
||||
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))"
|
||||
v-if="lecturerAdmin('Lecturer-admin')">删除</a-button>
|
||||
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))"
|
||||
v-if="lecturerAdmin('Lecturer-admin')">删除</a-button> -->
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
@@ -145,7 +146,7 @@
|
||||
<a-col :span="24">
|
||||
<a-form-item label="讲师名称" name="name">
|
||||
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName"
|
||||
v-model:system="formParam.tSystemName" v-model:level="formParam.sLevelName"></SearchTeacher>
|
||||
v-model:system="formParam.tSystemName" v-model:level="formParam.tLevelId"></SearchTeacher>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
@@ -174,8 +175,8 @@
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<!-- <div @click="handleformlevel"> -->
|
||||
<a-form-item label="讲师级别" name="sLevelName">
|
||||
<a-select class="draitem" v-model:value="formParam.sLevelName" placeholder="请选择讲师级别" allowClear
|
||||
<a-form-item label="讲师级别" name="tLevelId">
|
||||
<a-select class="draitem" v-model:value="formParam.tLevelId" placeholder="请选择讲师级别" allowClear
|
||||
:disabled="getLevelList.length !== 0 ? false : true" :options="getLevelList">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
@@ -412,18 +413,19 @@ export default {
|
||||
tableDataTotal: -1,//table列表总条数
|
||||
vf: false,
|
||||
formParam: {
|
||||
teachenType: '0',
|
||||
name: null,
|
||||
certStatus: 0,//认证状态
|
||||
defaultteachingTime: null,
|
||||
teacherType:1,
|
||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||
},
|
||||
searchParam: {
|
||||
teacherType:1,
|
||||
pageNo: 1,
|
||||
// pageSize1: "10",
|
||||
teacherNameOrUserNo: null,
|
||||
name: null,
|
||||
tSystemName: null,
|
||||
sLevelName: null,
|
||||
tLevelId: null,
|
||||
waitStatus: null,
|
||||
certStatus: null,
|
||||
courses: null,
|
||||
@@ -433,7 +435,8 @@ export default {
|
||||
teacherrepromo: {
|
||||
pageNo: "1",
|
||||
pageSize: "10",
|
||||
userNo: null
|
||||
userNo: null,
|
||||
teacherType:1
|
||||
},
|
||||
activeName: 'first'
|
||||
})
|
||||
@@ -528,14 +531,17 @@ export default {
|
||||
]);
|
||||
//获取讲师体系列表
|
||||
const LecturerSystemLista = () => {
|
||||
// console.log('点击了LecturerSystemLista')
|
||||
getTeacherSystemList().then((res) => {
|
||||
let obj ={
|
||||
pageNo:1,
|
||||
pageSize:1000,
|
||||
}
|
||||
getTeacherSystemList(obj).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data;
|
||||
let arr = res.data.data.records;
|
||||
let array = [];
|
||||
arr.map((value) => {
|
||||
let obj = {
|
||||
value: value.kid,
|
||||
value: value.id,
|
||||
label: value.systemName,
|
||||
};
|
||||
array.push(obj);
|
||||
@@ -554,31 +560,6 @@ export default {
|
||||
}
|
||||
const AddContentList = (data) => {
|
||||
console.log(data, 'treedatalist')
|
||||
|
||||
//组件获取返回的所有值,调用以前接口,现环境不可用,示例:
|
||||
// [{
|
||||
// "id": "966459050400600064",
|
||||
// "sysCreateAid": "952948872212635648",
|
||||
// "sysCreateBy": "董瑞华",
|
||||
// "sysCreateTime": "2022-04-20 22:03:13",
|
||||
// "sysUpdateTime": "2022-04-20 22:03:13",
|
||||
// "sysUpdateBy": "董瑞华",
|
||||
// "sysVersion": 0,
|
||||
// "deleted": false,
|
||||
// "name": "研发",
|
||||
// "parentId": "966458733088919552",
|
||||
// "filter": true,
|
||||
// "orderIndex": 2,
|
||||
// "origin": 2,
|
||||
// "status": 1,
|
||||
// "total": 0,
|
||||
// "sysResType": 1,
|
||||
// "children": "",
|
||||
// "parentName": "专业力",
|
||||
// "resDataManager": "",
|
||||
// "code": "966459050400600064",
|
||||
// "value": "966459050400600064"
|
||||
// }]
|
||||
}
|
||||
LecturerSystemLista()
|
||||
//获取内部讲师级别
|
||||
@@ -586,7 +567,7 @@ export default {
|
||||
])
|
||||
const changetlevel = (val) => {
|
||||
console.log("讲师体系id" + val);
|
||||
getLevel({ kid: val }).then((res) => {
|
||||
getLevel({ id: val }).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data;
|
||||
let array = [];
|
||||
@@ -612,27 +593,27 @@ export default {
|
||||
{ value: 0, label: "未认证" },
|
||||
{ value: 1, label: "已认证" },
|
||||
])
|
||||
const PlaceOfPayList = ref([
|
||||
// { value: 0, label: "发薪地B1" },
|
||||
])
|
||||
// const PlaceOfPayList = ref([
|
||||
// // { value: 0, label: "发薪地B1" },
|
||||
// ])
|
||||
//获取讲师发薪地列表
|
||||
const PlaceOfPayLista = () => {
|
||||
getPayRollPlace().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);
|
||||
});
|
||||
PlaceOfPayList.value = array;
|
||||
}
|
||||
})
|
||||
}
|
||||
PlaceOfPayLista()
|
||||
// const PlaceOfPayLista = () => {
|
||||
// getPayRollPlace().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);
|
||||
// });
|
||||
// PlaceOfPayList.value = array;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// PlaceOfPayLista()
|
||||
const AccountStatusList = ref([
|
||||
{ value: 1, label: "启用" },
|
||||
{ value: 2, label: "停用" },
|
||||
@@ -806,13 +787,14 @@ export default {
|
||||
};
|
||||
//重置
|
||||
const searchReset = () => {
|
||||
LecturerSystemLista()
|
||||
state.searchParam = {
|
||||
|
||||
teacherType:1,
|
||||
name: null,
|
||||
userNo: null,
|
||||
newdepartId: null,
|
||||
tsystemname: null,
|
||||
sLevelName: null,
|
||||
tLevelId: null,
|
||||
waitStatus: null,
|
||||
certStatus: null,
|
||||
salaryName: null,
|
||||
@@ -825,20 +807,21 @@ export default {
|
||||
getTableDate();
|
||||
};
|
||||
// List接口数据
|
||||
const getTableDate = (obj) => {
|
||||
state.tableLoading = true
|
||||
const getTableDate = () => {
|
||||
// state.tableLoading = true
|
||||
let objA = { ...state.searchParam };
|
||||
getTeacherList(objA)
|
||||
.then((res) => {
|
||||
// tableData.value = res.data.data.records
|
||||
let objA = res.data.data.records
|
||||
objA.map((item) => {
|
||||
if (item.organizationName !== null) {
|
||||
item.neworganizationName = item.organizationName.split('/')
|
||||
item.neworganizationName = item.neworganizationName[item.neworganizationName.length - 1]
|
||||
}
|
||||
})
|
||||
tableData.value = objA
|
||||
tableData.value = res.data.data.records
|
||||
console.log(tableData.value,'tableData.value')
|
||||
// let objA = res.data.data.records
|
||||
// objA.map((item) => {
|
||||
// if (item.organizationName !== null) {
|
||||
// item.neworganizationName = item.organizationName.split('/')
|
||||
// item.neworganizationName = item.neworganizationName[item.neworganizationName.length - 1]
|
||||
// }
|
||||
// })
|
||||
// tableData.value = objA
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
state.tableLoading = false
|
||||
})
|
||||
@@ -959,7 +942,7 @@ export default {
|
||||
//确认删除
|
||||
const closeDeleteTeacher = () => {
|
||||
//调用删除接口
|
||||
deleteInTeacher(state.delTeacherId).then((res) => {
|
||||
deleteInTeacher({id:state.delTeacherId}).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("删除成功");
|
||||
state.deleteInTeacherdialog = false
|
||||
@@ -1004,9 +987,9 @@ export default {
|
||||
status: null,
|
||||
teacherType: '0',
|
||||
photo: null,
|
||||
teacherNameOrUserNo: null,
|
||||
name: null,
|
||||
newdepartId: null,
|
||||
sLevelName: null,
|
||||
tLevelId: null,
|
||||
defaultteachingTime:null,
|
||||
tSystemName: null,
|
||||
certStatus: 0,
|
||||
@@ -1021,7 +1004,7 @@ export default {
|
||||
const rules = {
|
||||
name: [{ required: true, message: '讲师不能为空' }],
|
||||
newdepartId: [{ required: true, message: '组织不能为空' }],
|
||||
sLevelName: [{ required: true, message: '讲师级别不能为空' }],
|
||||
tLevelId: [{ required: true, message: '讲师级别不能为空' }],
|
||||
tSystemName: [{ required: true, message: '讲师体系不能为空' }],
|
||||
defaultteachingTime: [{ required: true, message: '' }],
|
||||
certStatus: [{ required: true, message: '认证状态不能为空' }],
|
||||
@@ -1038,7 +1021,7 @@ export default {
|
||||
message.warning('组织不能为空')
|
||||
return
|
||||
}
|
||||
if (state.formParam.sLevelName == null) {
|
||||
if (state.formParam.tLevelId == null) {
|
||||
state.log = true
|
||||
message.warning('讲师级别不能为空')
|
||||
return
|
||||
@@ -1067,7 +1050,8 @@ export default {
|
||||
}
|
||||
//内部讲师详情
|
||||
const TeacherSystem = () => {
|
||||
getTeacherById(state.id).then((res) => {
|
||||
console.log(state.id)
|
||||
getTeacherById({id:state.id}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
// let objA= res.data.data[0]
|
||||
// if( objA.orgName !==null ){
|
||||
@@ -1075,7 +1059,7 @@ export default {
|
||||
|
||||
// objA.neworgName= objA.neworgName[objA.neworgName.length-1]
|
||||
// }
|
||||
state.formParam = res.data.data[0]
|
||||
state.formParam = res.data.data
|
||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||
state.formParam.workExp0erience = state.formParam.workExperience === null ? '' : state.formParam.workExperience
|
||||
state.formParam.courses = state.formParam.courses === null ? '' : state.formParam.courses
|
||||
@@ -1106,14 +1090,14 @@ export default {
|
||||
// }
|
||||
const handleformlevel = () => {
|
||||
console.log('请先选择讲师体系')
|
||||
if (state.formParam.systemId == undefined) {
|
||||
if (state.formParam.tSystemId == undefined) {
|
||||
message.warning('请先选择讲师体系')
|
||||
}
|
||||
}
|
||||
//导出功能
|
||||
const handleExport = () => {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&teacherNameOrUserNo=${state.searchParam.teacherNameOrUserNo ? state.searchParam.teacherNameOrUserNo : ""}&systemId=${state.searchParam.systemId ? state.searchParam.systemId : ""}&sLevelName=${state.searchParam.sLevelName ? state.searchParam.sLevelName : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}`
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""}&tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ""}&tLevelId=${state.searchParam.tLevelId ? state.searchParam.tLevelId : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}`
|
||||
);
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
@@ -1144,9 +1128,9 @@ export default {
|
||||
getLevelList,
|
||||
OnTheJobStatusList,
|
||||
changetlevel,
|
||||
PlaceOfPayLista,
|
||||
// PlaceOfPayLista,
|
||||
AuthenticationStatusList,
|
||||
PlaceOfPayList,
|
||||
// PlaceOfPayList,
|
||||
AccountStatusList,
|
||||
searchSubmit,
|
||||
searchReset,
|
||||
|
||||
Reference in New Issue
Block a user