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:
@@ -2,13 +2,13 @@
|
||||
<template>
|
||||
<div class="ExternalLecturer">
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<div class="filter">
|
||||
<div class="filterItems">
|
||||
<div class="filterItems">
|
||||
<div class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<a-input v-model:value="searchParam.name " style="width: 230px; height: 40px; border-radius: 8px"
|
||||
<a-input v-model:value="searchParam.name" style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入讲师姓名检索" allowClear showSearch>
|
||||
</a-input>
|
||||
</div>
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<div style="width: 100%; height: ;"></div>
|
||||
<div class="btns">
|
||||
<div class="btn btn3" @click="addTeacher">
|
||||
<div class="btn btn3" @click="addTeacher">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">新增讲师</div>
|
||||
</div>
|
||||
@@ -50,8 +50,10 @@
|
||||
<a-space style="display:flex ;justify-content: space-around; ">
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status== '1'" type="link" @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 v-if="record.status == '1'" type="link"
|
||||
@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))">删除</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -62,127 +64,102 @@
|
||||
</div>
|
||||
<div class="tableBox ">
|
||||
<div style="float: right;">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :hideOnSinglePage="true" :pageSize="pageSize"
|
||||
v-model:current="searchParam.pageNo" :total="tableDataTotal" class="pagination" @change="changePagination" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 弹窗组件 -->
|
||||
<a-modal :visible="teacherdialog" :title="teacherdialogtitle" @ok="closeModal2" :footer="null" :closable="false"
|
||||
wrapClassName="doublepro" width="774px" height="476px">
|
||||
<div style="cursor: pointer; margin-right: 32px;float: right; margin-top: -40px;" @click="cancelTeacherDialog">
|
||||
<img
|
||||
style="width: 22px; height: 22px"
|
||||
src="../../assets/images/basicinfo/close22.png"
|
||||
/>
|
||||
</div>
|
||||
<div style="padding-bottom: 15px;" >
|
||||
<div class="headerLeft" style="margin-left: 33px" >
|
||||
<a-button @click ="particulars">个人详情</a-button>
|
||||
<a-button @click ="teacherrecords" v-if="teacherdialog1 == 1" >授课记录</a-button>
|
||||
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png" />
|
||||
</div>
|
||||
<div style="padding-bottom: 15px;">
|
||||
<div class="headerLeft" style="margin-left: 33px">
|
||||
<a-button @click="particulars">个人详情</a-button>
|
||||
<a-button @click="teacherrecords" v-if="teacherdialog1 == 1">授课记录</a-button>
|
||||
</div>
|
||||
<!-- 个人详情 -->
|
||||
<div style="border: 1px rgb(177, 177, 177) solid; margin-left: 33px; margin-right: 33px; margin-bottom: 33px;" v-show="tagsshow==1">
|
||||
<div class="ExternalLecturer">
|
||||
<div class="filter">
|
||||
<div class="filterItems">
|
||||
<!-- <div class="select">
|
||||
<!-- 个人详情 -->
|
||||
<div style="border: 1px rgb(177, 177, 177) solid; margin-left: 33px; margin-right: 33px; margin-bottom: 33px;"
|
||||
v-show="tagsshow == 1">
|
||||
<div class="ExternalLecturer">
|
||||
<div class="filter">
|
||||
<div class="filterItems">
|
||||
<!-- <div class="select">
|
||||
<span style="display:inline-block ;width:100px ;text-align:center ">头像 :</span>
|
||||
|
||||
</div> -->
|
||||
<div class="select">
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
<img
|
||||
style="width: 5px; height: 5px"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
</div>
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">讲师姓名 :</span>
|
||||
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.name" style="width:200px; height: 40px; "
|
||||
placeholder="请输入讲师姓名" allowClear showSearch>
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
<img
|
||||
style="width: 5px; height: 5px"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
</div>
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">手机号码 :</span>
|
||||
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.mobile"
|
||||
style="width:200px; height: 40px; " placeholder="请输入11位手机号码" allowClear showSearch>
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.mobile }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
<img
|
||||
style="width: 5px; height: 5px"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
</div>
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">邮箱:</span>
|
||||
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.email"
|
||||
style="width:200px; height: 40px;" placeholder="" allowClear showSearch>
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.email }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<!-- <Editor/> -->
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:80px ; text-align:center ">讲师介绍 :</span>
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
<img style="width: 5px; height: 5px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">讲师姓名 :</span>
|
||||
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.name" style="width:200px; height: 40px; "
|
||||
placeholder="请输入讲师姓名" allowClear showSearch>
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
<img style="width: 5px; height: 5px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">手机号码 :</span>
|
||||
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.mobile" style="width:200px; height: 40px; "
|
||||
placeholder="请输入11位手机号码" allowClear showSearch>
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.mobile }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
<img style="width: 5px; height: 5px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">邮箱:</span>
|
||||
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.email" style="width:200px; height: 40px;"
|
||||
placeholder="" allowClear showSearch>
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.email }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<!-- <Editor/> -->
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:80px ; text-align:center ">讲师介绍 :</span>
|
||||
</div>
|
||||
<Editor v-if="teacherdialog1 == 0" v-model="formParam.description"
|
||||
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
|
||||
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.description
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">备注 :</span>
|
||||
<a-input type="textarea" v-if="teacherdialog1 == 0" v-model:value="formParam.remark"
|
||||
style="width:500px; height: 80px; ">
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.remark }}</span>
|
||||
</div>
|
||||
<div class="del_btnbox" v-if="teacherdialog1 == 0">
|
||||
<a-button class="del_btn btn1" @click="cancelTeacherDialog" style="margin-right: 32px;">取消</a-button>
|
||||
<a-button class="del_btn btn2" @click="createTeacherDialog" :loading="buttonLoading">保存
|
||||
</a-button>
|
||||
</div>
|
||||
<Editor v-if="teacherdialog1 == 0" v-model="formParam.description"
|
||||
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
|
||||
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.description }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">备注 :</span>
|
||||
<a-input type="textarea" v-if="teacherdialog1 == 0" v-model:value="formParam.remark"
|
||||
style="width:500px; height: 80px; ">
|
||||
</a-input>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.remark }}</span>
|
||||
</div>
|
||||
<div class="del_btnbox" v-if="teacherdialog1 == 0">
|
||||
<a-button class="del_btn btn1" @click="cancelTeacherDialog" style="margin-right: 32px;">取消</a-button>
|
||||
<a-button class="del_btn btn2" @click="createTeacherDialog" :loading="buttonLoading">保存
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 授课记录 -->
|
||||
<div class="ExternalLecturer" v-show="tagsshow==2" style="margin">
|
||||
<!-- 授课记录 -->
|
||||
<div class="ExternalLecturer" v-show="tagsshow == 2" style="margin">
|
||||
<div style="padding: 33px">
|
||||
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="teacherrecordsColumns"
|
||||
|
||||
:data-source="teacherrecordstableData" :loading="teacherrecordsLoading" @expand="expandTable" :pagination="false">
|
||||
<template #bodyCell="{ record, column }" >
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<a-pagination
|
||||
v-if="teacherrecordstableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="searchParam.pageNo"
|
||||
:total="teacherrecordstableDataTotal"
|
||||
class="pagination"
|
||||
@change="teacherchangePagination"
|
||||
/>
|
||||
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe"
|
||||
:columns="teacherrecordsColumns" :data-source="teacherrecordstableData" :loading="teacherrecordsLoading"
|
||||
@expand="expandTable" :pagination="false">
|
||||
<template #bodyCell="{ record, column }">
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<a-pagination v-if="teacherrecordstableDataTotal > 10" :showSizeChanger="true" :hideOnSinglePage="true"
|
||||
:pageSize="pageSize" v-model:current="searchParam.pageNo" :total="teacherrecordstableDataTotal"
|
||||
class="pagination" @change="teacherchangePagination" />
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 删除功能弹窗 -->
|
||||
@@ -203,8 +180,7 @@
|
||||
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2"
|
||||
@click="closeDeleteTeacher">
|
||||
<div class="del_btn btn2" @click="closeDeleteTeacher">
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -212,10 +188,9 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 修改状态功能弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="editTeacher" :footer="null" :closable="close" wrapClassName="canclestu1"
|
||||
centered="true">
|
||||
<!-- 修改状态功能弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="editTeacher" :footer="null" :closable="close" wrapClassName="canclestu1" centered="true">
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -224,8 +199,8 @@
|
||||
<span>提示</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span v-if="handleOperate1== 2">您确定要启用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1== 1" >您确定要停用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1 == 2">您确定要启用此讲师状态吗</span>
|
||||
<span v-if="handleOperate1 == 1">您确定要停用此讲师状态吗</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
|
||||
@@ -246,10 +221,10 @@
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import Editor from "@/components/project/Editor";
|
||||
import { message } from "ant-design-vue";
|
||||
import {getOutTeacherList ,getOuterTeacherById ,getOuterTeacherCourseList,deleteInTeacher,updateInTeacher, updateTeacherState,insertTeacherOutSide,updateOutTeacher} from "../../api/Lecturer";
|
||||
import { getOutTeacherList, getOuterTeacherById, getOuterTeacherCourseList, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||
export default {
|
||||
export default {
|
||||
name: "ExternalLecturer",
|
||||
components: {
|
||||
// AddTeacher,
|
||||
@@ -259,40 +234,40 @@ export default {
|
||||
const state = reactive({
|
||||
currentPage1: 1,
|
||||
pageSize1: 10,
|
||||
promotionrecordsLoading:false , //晋级记录遮罩层
|
||||
tableLoading:false,
|
||||
tagsshow:"1",
|
||||
delTeacherId:null, //删除id确认
|
||||
editTeacherid:null,//修改状态id确认
|
||||
userNoid:null, //讲师详情工号确认
|
||||
lookTeacherId:null, //讲师详情id确认
|
||||
newStatus:null , //修改状态码确认
|
||||
promotionrecordsLoading: false, //晋级记录遮罩层
|
||||
tableLoading: false,
|
||||
tagsshow: "1",
|
||||
delTeacherId: null, //删除id确认
|
||||
editTeacherid: null,//修改状态id确认
|
||||
userNoid: null, //讲师详情工号确认
|
||||
lookTeacherId: null, //讲师详情id确认
|
||||
newStatus: null, //修改状态码确认
|
||||
deleteTeacherdialog: false, //删除弹窗
|
||||
editTeacher:false , //修改状态弹窗
|
||||
handleOperate1:null, //修改状态弹窗内容
|
||||
editTeacher: false, //修改状态弹窗
|
||||
handleOperate1: null, //修改状态弹窗内容
|
||||
teacherdialog1: null,
|
||||
teacherdialog: false, //控制讲师弹窗
|
||||
teacherdialogtitle: '',//讲师弹框title内容
|
||||
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
|
||||
pageSize: 10,
|
||||
tableDataTotal: -1,//table列表总条数
|
||||
teacherrecordstableDataTotal:-1,//授课记录列表总条数
|
||||
teacherrecordstableDataTotal: -1,//授课记录列表总条数
|
||||
formParam: {
|
||||
},
|
||||
searchParam: {
|
||||
name:null,//姓名
|
||||
status:null,//状态
|
||||
name: null,//姓名
|
||||
status: null,//状态
|
||||
pageNo: "1",
|
||||
pageSize: "10"
|
||||
},
|
||||
activeName:'first'
|
||||
activeName: 'first'
|
||||
})
|
||||
const AccountStatusList = ref([
|
||||
{ value: 0, label: "启用" },
|
||||
{ value: 1, label: "停用" },
|
||||
])
|
||||
const columns = ref([
|
||||
{
|
||||
{
|
||||
title: '讲师编号 ',
|
||||
dataIndex: 'userNo',
|
||||
key: 'userNo',
|
||||
@@ -307,7 +282,7 @@ export default {
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '手机号 ',
|
||||
title: '手机号 ',
|
||||
dataIndex: 'mobile',
|
||||
key: 'mobile',
|
||||
elipsis: true,
|
||||
@@ -343,15 +318,15 @@ export default {
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.status == 0 || value.record.status == 1|| value.record.status == 2
|
||||
{value.record.status == 0 || value.record.status == 1 || value.record.status == 2
|
||||
? {
|
||||
'0': "临时",
|
||||
'1': "启用",
|
||||
'2': "停用"
|
||||
}[value.record.status + ""] || ""
|
||||
}[value.record.status + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -374,24 +349,25 @@ export default {
|
||||
//重置
|
||||
const searchReset = () => {
|
||||
state.searchParam = {
|
||||
pageNo: 1,
|
||||
pageSize: 10 ,
|
||||
name:null,
|
||||
status:null};
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
status: null
|
||||
};
|
||||
getTableDate();
|
||||
};
|
||||
// List接口数据
|
||||
const getTableDate = (obj) => {
|
||||
state.tableLoading=true
|
||||
const getTableDate = (obj) => {
|
||||
state.tableLoading = true
|
||||
state.loading = true;
|
||||
let objA = {...state.searchParam};
|
||||
let objA = { ...state.searchParam };
|
||||
getOutTeacherList(objA)
|
||||
.then((res) => {
|
||||
tableData.value = res.data.data.records
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
state.tableLoading=false
|
||||
state.tableLoading = false
|
||||
// console.log("获取讲师tableDatateacherName", tableData);
|
||||
})
|
||||
})
|
||||
};
|
||||
getTableDate()
|
||||
// // List接口数据
|
||||
@@ -437,105 +413,91 @@ export default {
|
||||
state.teacherdialog1 = 0
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '修改信息'
|
||||
state.lookTeacherId= record.id
|
||||
state.lookTeacherId = record.id
|
||||
TeacherSystem()
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = () => {
|
||||
console.log(state.formParam);
|
||||
// if (state.formParam.id != undefined) {
|
||||
updateOutTeacher (state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
});
|
||||
// }
|
||||
// let objA = {...state.formParam};
|
||||
// state.formParam ={
|
||||
// name:'新增测试',
|
||||
// userNo:'12315',
|
||||
// departId:'8465784657',
|
||||
// defaultTeachingTime:50,
|
||||
// leveId:1,
|
||||
// tsystemName:249,
|
||||
// certStatus:1,
|
||||
// description:'测试13.00',
|
||||
// workExperience:'测试13.00',
|
||||
// courses:'测试13.00',
|
||||
// }
|
||||
// else {
|
||||
// insertTeacherOutSide(state.formParam)
|
||||
// .then((res) => {
|
||||
// message.success("保存成功");
|
||||
// }).catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
// }
|
||||
state.teacherdialog = false;
|
||||
if (state.formParam.id != undefined) {
|
||||
updateOutTeacher(state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
});
|
||||
}
|
||||
else {
|
||||
insertTeacher(state.formParam)
|
||||
.then((res) => {
|
||||
message.success("保存成功");
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
state.teacherdialog = false;
|
||||
getTableDate();
|
||||
};
|
||||
//删除弹窗
|
||||
const deleteModal = (record) => {
|
||||
state.deleteTeacherdialog = true
|
||||
state.delTeacherId = record.id
|
||||
state.delTeacherId = record.id
|
||||
};
|
||||
//修改状态窗口
|
||||
const handleOperate = (record) => {
|
||||
if( record.status == 1){
|
||||
if (record.status == 1) {
|
||||
state.handleOperate1 = record.status
|
||||
state.newStatus= 2
|
||||
}
|
||||
if( record.status == 2){
|
||||
state.handleOperate1 =record.status
|
||||
state.newStatus= 1
|
||||
}
|
||||
state.editTeacherid =record.id
|
||||
state.newStatus = 2
|
||||
}
|
||||
if (record.status == 2) {
|
||||
state.handleOperate1 = record.status
|
||||
state.newStatus = 1
|
||||
}
|
||||
state.editTeacherid = record.id
|
||||
state.editTeacher = true
|
||||
};
|
||||
|
||||
//确认删除
|
||||
const closeDeleteTeacher=()=>{
|
||||
//确认删除
|
||||
const closeDeleteTeacher = () => {
|
||||
//调用删除接口
|
||||
deleteInTeacher(state.delTeacherId).then((res)=>{
|
||||
if(res.data.code == 200 ){
|
||||
deleteInTeacher(state.delTeacherId).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
// message.success("删除成功");
|
||||
state.deleteTeacherdialog = false
|
||||
getTableDate();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
//确认启用停用
|
||||
const closehandleOperate= ()=>{
|
||||
//调用接口
|
||||
let ids ={
|
||||
id : state.editTeacherid,
|
||||
newStatus: state.newStatus
|
||||
const closehandleOperate = () => {
|
||||
//调用接口
|
||||
let ids = {
|
||||
id: state.editTeacherid,
|
||||
newStatus: state.newStatus
|
||||
}
|
||||
console.log(ids)
|
||||
updateTeacherState(ids).then((res) => {
|
||||
// message.success("操作成功");
|
||||
state.editTeacher = false
|
||||
getTableDate();
|
||||
})
|
||||
// message.success("操作成功");
|
||||
state.editTeacher = false
|
||||
getTableDate();
|
||||
})
|
||||
}
|
||||
//取消按钮 清空输入的数据
|
||||
const cancelTeacherDialog = () => {
|
||||
if(state.teacherdialog = true )
|
||||
{
|
||||
state.teacherdialog = false
|
||||
cancel()
|
||||
}
|
||||
state.deleteTeacherdialog = false
|
||||
state.editTeacher = false
|
||||
state.tagsshow= 1
|
||||
if (state.teacherdialog = true) {
|
||||
state.teacherdialog = false
|
||||
cancel()
|
||||
}
|
||||
state.deleteTeacherdialog = false
|
||||
state.editTeacher = false
|
||||
state.tagsshow = 1
|
||||
};
|
||||
|
||||
//清空数据
|
||||
const cancel = () => {
|
||||
state.formParam= {
|
||||
name :null ,
|
||||
mobile:null ,
|
||||
email:null,
|
||||
teacherIntrofuce:null ,
|
||||
remark:null
|
||||
state.formParam = {
|
||||
name: null,
|
||||
mobile: null,
|
||||
email: null,
|
||||
teacherIntrofuce: null,
|
||||
remark: null
|
||||
}
|
||||
console.log(state.formParam);
|
||||
}
|
||||
@@ -544,34 +506,34 @@ export default {
|
||||
state.teacherdialog1 = 1
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '查看详情'
|
||||
state.userNoid= record.userNo
|
||||
state.lookTeacherId= record.id
|
||||
state.userNoid = record.userNo
|
||||
state.lookTeacherId = record.id
|
||||
// alert(record.grade)
|
||||
TeacherSystem()
|
||||
}
|
||||
//外部讲师详情
|
||||
const TeacherSystem=()=>{
|
||||
const TeacherSystem = () => {
|
||||
getOuterTeacherById(state.lookTeacherId).then((res) => {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam= res.data.data
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam = res.data.data
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("外部讲师详情", err);
|
||||
});
|
||||
}
|
||||
// tab 标签切换
|
||||
const particulars=()=>{
|
||||
state.tagsshow= 1
|
||||
const particulars = () => {
|
||||
state.tagsshow = 1
|
||||
}
|
||||
const teacherrecords=()=>{
|
||||
state.tagsshow= 2
|
||||
getteacherrecordstableData ()
|
||||
const teacherrecords = () => {
|
||||
state.tagsshow = 2
|
||||
getteacherrecordstableData()
|
||||
}
|
||||
const promotionrecords=()=>{
|
||||
state.tagsshow= 3
|
||||
const promotionrecords = () => {
|
||||
state.tagsshow = 3
|
||||
}
|
||||
//授课记录列表
|
||||
const teacherrecordsColumns = ref ([
|
||||
const teacherrecordsColumns = ref([
|
||||
{
|
||||
title: '课程编号',
|
||||
dataIndex: 'id',
|
||||
@@ -609,7 +571,7 @@ export default {
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.type == 1 || value.record.type == 2||value.record.type == 3
|
||||
{value.record.type == 1 || value.record.type == 2 || value.record.type == 3
|
||||
? {
|
||||
"1": "项目开课",
|
||||
"2": "路径开课",
|
||||
@@ -661,37 +623,38 @@ export default {
|
||||
}
|
||||
}
|
||||
])
|
||||
//授课记录列表数据
|
||||
const teacherrecordstableData = ref([
|
||||
//授课记录列表数据
|
||||
const teacherrecordstableData = ref([
|
||||
])
|
||||
const getteacherrecordstableData = () => {
|
||||
state.teacherrecordsLoading=true
|
||||
state.teacherrecordsLoading = true
|
||||
state.loading = true;
|
||||
// let ids={id: state.lookTeacherId ,pageNo: "1", pageSize: "10" }
|
||||
let ids=
|
||||
{id: "965341999643234304",
|
||||
pageNo: "1",
|
||||
pageSize: "10"}
|
||||
// let ids={id: state.lookTeacherId ,pageNo: "1", pageSize: "10" }
|
||||
let ids =
|
||||
{
|
||||
id: "965341999643234304",
|
||||
pageNo: "1",
|
||||
pageSize: "10"
|
||||
}
|
||||
// api接口
|
||||
getOuterTeacherCourseList(ids).then((res) => {
|
||||
getOuterTeacherCourseList(ids).then((res) => {
|
||||
teacherrecordstableData.value = res.data.data
|
||||
state.teacherrecordstableDataTotal = Number(res.data.data.total);
|
||||
state.teacherrecordsLoading=false
|
||||
})
|
||||
state.teacherrecordsLoading = false
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
// getpromotionrecordstableData()
|
||||
//导出功能
|
||||
const handleExport = ()=>{
|
||||
const handleExport = () => {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${
|
||||
state.currentPage1
|
||||
}&pageSize=${state.pageSize1}&name=${state.searchParam.name ? state.searchParam.name : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}`
|
||||
);
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
// }, `project_${new Date().getTime()}.xlsx` )
|
||||
}
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.currentPage1
|
||||
}&pageSize=${state.pageSize1}&name=${state.searchParam.name ? state.searchParam.name : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}`
|
||||
);
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
// }, `project_${new Date().getTime()}.xlsx` )
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
handleExport,
|
||||
@@ -711,14 +674,14 @@ export default {
|
||||
createTeacherDialog,
|
||||
handleOperate,
|
||||
closehandleOperate,
|
||||
getTableDate, //list接口数据调用
|
||||
getTableDate, //list接口数据调用
|
||||
TeacherSystem,
|
||||
particulars,
|
||||
teacherrecords,
|
||||
promotionrecords,
|
||||
teacherrecordstableData,
|
||||
teacherrecordsColumns,
|
||||
getteacherrecordstableData ,
|
||||
getteacherrecordstableData,
|
||||
teacherchangePagination,
|
||||
|
||||
// getpromotionrecordstableData
|
||||
@@ -729,11 +692,11 @@ export default {
|
||||
<style lang="scss">
|
||||
//导出按钮icon
|
||||
.daochu {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/coursewareManage/export1.png");
|
||||
}
|
||||
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/coursewareManage/export1.png");
|
||||
}
|
||||
|
||||
//弹窗内详情样式
|
||||
.display1 {
|
||||
display: inline-block;
|
||||
|
||||
Reference in New Issue
Block a user