内容分类传参调整

This commit is contained in:
wangxuemei
2024-11-07 08:56:52 +08:00
parent 8c846fb111
commit 78e67448ea
3 changed files with 26 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ import {getCookieForName} from "@/api/method";
//列表查询授课记录 //列表查询授课记录
export const getNewInTeacherCourseList = (obj) => http.get('/admin/teacherRecord/list', {params: obj}) export const getNewInTeacherCourseList = (obj) => http.get('/admin/teacherRecord/list', {params: obj})
//新增授课记录 //新增授课记录
export const insertInTeacherCourse = (obj) => http.post('/admin/teacher/addTeacherRecord', obj) export const insertInTeacherCourse = (obj) => http.post('/admin/teacherRecord/addTeacherRecord', obj)
//删除讲师授课记录 //删除讲师授课记录
export const deleteInTeacherCourse= (obj) => http.post(`/admin/teacherRecord/delById?id=${obj}`) export const deleteInTeacherCourse= (obj) => http.post(`/admin/teacherRecord/delById?id=${obj}`)
//修改讲师授课记录 //修改讲师授课记录

View File

@@ -134,7 +134,8 @@
}" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body" }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="formParam.courseTypeId" show-search v-model:value="formParam.courseTypeId" show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
:tree-data="sysTypeOptions"> :tree-data="sysTypeOptions"
@change="treetype">
</a-tree-select> </a-tree-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -385,6 +386,9 @@ export default {
//获取内容分类 //获取内容分类
const sysTypeOptions = computed(() => store.state.content_type); const sysTypeOptions = computed(() => store.state.content_type);
const treetype =(val,lab)=>{
state.formParam.courseTypeName =lab
}
const OnTheJobStatusList = ref([ const OnTheJobStatusList = ref([
{ value: 1, label: "项目开课" }, { value: 1, label: "项目开课" },
{ value: 2, label: "路径开课" }, { value: 2, label: "路径开课" },
@@ -806,6 +810,7 @@ export default {
return { return {
...toRefs(state), ...toRefs(state),
rules, rules,
treetype,
clearscoreNumber, clearscoreNumber,
clearstudysNumber, clearstudysNumber,
validateField, validateField,

View File

@@ -204,7 +204,9 @@
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类" placeholder="请选择内容分类"
tree-default-expand-all tree-default-expand-all
:tree-data="sysTypeOptions"> :tree-data="sysTypeOptions"
@change="treetype"
>
</a-tree-select> </a-tree-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -498,7 +500,7 @@ export default {
pageNo:1, pageNo:1,
pageSize:1000, pageSize:1000,
} }
getTeacherSystemList().then((res) => { getTeacherSystemList(obj).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
let arr = res.data.data.records; let arr = res.data.data.records;
let array = []; let array = [];
@@ -518,6 +520,10 @@ export default {
//获取内容分类 //获取内容分类
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.content_type); const sysTypeOptions = computed(() => store.state.content_type);
const treetype =(val,lab)=>{
console.log(lab)
state.formParam.courseTypeName =lab
}
const OnTheJobStatusList = ref([ const OnTheJobStatusList = ref([
{ value: 1, label: "项目开课" }, { value: 1, label: "项目开课" },
{ value: 2, label: "路径开课" }, { value: 2, label: "路径开课" },
@@ -600,17 +606,17 @@ export default {
}, },
{ {
title: '讲师体系 ', title: '讲师体系 ',
dataIndex: 'systemName', dataIndex: 'tsystemName',
key: 'systemName', key: 'tsystemName',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 120, width: 120,
}, },
{ {
title: '所属组织 ', title: '所属组织 ',
dataIndex: 'organizationName', dataIndex: 'orgName',
key: 'organizationName', key: 'orgName',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 120, width: 400,
// customRender: (value, record) => { // customRender: (value, record) => {
// return ( // return (
// <div> // <div>
@@ -666,8 +672,8 @@ export default {
}, },
{ {
title: '授课时间', title: '授课时间',
dataIndex: 'beginTime', dataIndex: 'teachingDate',
key: 'beginTime', key: 'teachingDate',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 120, width: 120,
}, },
@@ -720,14 +726,14 @@ export default {
}, },
{ {
title: '是否生成课时费 ', title: '是否生成课时费 ',
dataIndex: 'feeCreated', dataIndex: 'createdFee',
key: 'feeCreated', key: 'createdFee',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 150, width: 150,
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{value.record.feeCreated == 0 || value.record.feeCreated == 1 {value.record.createdFee == 0 || value.record.createdFee == 1
? { ? {
"0": "否", "0": "否",
"1": "是", "1": "是",
@@ -1198,6 +1204,7 @@ export default {
return { return {
...toRefs(state), ...toRefs(state),
sysTypeOptions, sysTypeOptions,
treetype,
validateField, validateField,
handleformlevel, handleformlevel,
// managerChange, // managerChange,