mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 07:46:46 +08:00
讲师管理,授课记录 调整
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</a-input>
|
||||
</a-form-item >
|
||||
<a-form-item class="select">
|
||||
<a-select style="width: 230px" v-model:value="searchParam.status" placeholder="账号状态"
|
||||
<a-select style="width: 276px" v-model:value="searchParam.status" placeholder="账号状态"
|
||||
:options="AccountStatusList">
|
||||
</a-select>
|
||||
</a-form-item >
|
||||
@@ -44,8 +44,10 @@
|
||||
@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>
|
||||
@@ -57,7 +59,7 @@
|
||||
<div style="float: right;">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="false"
|
||||
:showSizeChanger="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="searchParam.pageSize"
|
||||
@@ -84,13 +86,13 @@
|
||||
<div class="item_inp" style="background-color: #fff;">
|
||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||
:headers="headers" :before-upload="beforeUpload" >
|
||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
|
||||
<div class="i_upload" v-else>
|
||||
<div class="addimg">
|
||||
<div class="heng"></div>
|
||||
<div class="shu"></div>
|
||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
|
||||
<div class="i_upload" v-else>
|
||||
<div class="addimg">
|
||||
<div class="heng"></div>
|
||||
<div class="shu"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<div class="i_bottom">
|
||||
<div class="tip" style="margin-bottom: 10px;">
|
||||
@@ -254,7 +256,7 @@ import {
|
||||
FolderAddOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import { getOutTeacherList, getOuterTeacherById, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
|
||||
import { getTeacherList, getTeacherById, deleteInTeacher, updateTeacherState, insertTeacher, updateInTeacher } from "../../api/Lecturer";
|
||||
import { fileUp } from "../../api/indexEval";
|
||||
import {getCookieForName} from "@/api/method"
|
||||
import SearchTeacher from "@/components/project/SearchTeacher";;
|
||||
@@ -295,11 +297,12 @@ export default {
|
||||
teacherrecordstableDataTotal: -1,//授课记录列表总条数
|
||||
formParam: {
|
||||
description:"",
|
||||
teacherType:'1',
|
||||
teacherType:'2',
|
||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||
},
|
||||
vf:true,
|
||||
searchParam: {
|
||||
teacherType:2,
|
||||
teacherNameOrMobel: null,//姓名
|
||||
status: null,//状态
|
||||
pageNo: "1",
|
||||
@@ -322,12 +325,12 @@ export default {
|
||||
return false;
|
||||
}
|
||||
|
||||
let isLt1M = file.size < 2000000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
message.error("图片大小超过2MB!");
|
||||
return false;
|
||||
}
|
||||
let isLt1M = file.size < 500000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
message.error("图片不能超过500KB! 请重新上传");
|
||||
return false;
|
||||
}
|
||||
|
||||
const formDatas = new FormData();
|
||||
formDatas.append("file", file);
|
||||
@@ -425,17 +428,18 @@ export default {
|
||||
state.searchParam = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
teacherType:2,
|
||||
teacherNameOrMobel: null,
|
||||
status: null
|
||||
};
|
||||
getTableDate();
|
||||
};
|
||||
// List接口数据
|
||||
const getTableDate = (obj) => {
|
||||
const getTableDate = () => {
|
||||
state.tableLoading = true
|
||||
state.loading = true;
|
||||
let objA = { ...state.searchParam };
|
||||
getOutTeacherList(objA)
|
||||
getTeacherList(objA)
|
||||
.then((res) => {
|
||||
tableData.value = res.data.data.records
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
@@ -445,7 +449,7 @@ export default {
|
||||
};
|
||||
getTableDate()
|
||||
// // 翻页
|
||||
const changePagination = (page) => {
|
||||
const changePagination = (page,pageSize) => {
|
||||
state.searchParam.pageNo = page;
|
||||
state.searchParam.pageSize = pageSize;
|
||||
getTableDate();
|
||||
@@ -473,7 +477,7 @@ export default {
|
||||
.validate()
|
||||
.then(() => {
|
||||
if (state.vf == false) {
|
||||
updateOutTeacher(state.formParam).then(response => {
|
||||
updateInTeacher(state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
state.teacherdialog = false;
|
||||
cancel()
|
||||
@@ -481,7 +485,7 @@ export default {
|
||||
});
|
||||
}
|
||||
else {
|
||||
insertTeacherOutSide(state.formParam)
|
||||
insertTeacher(state.formParam)
|
||||
.then((res) => {
|
||||
message.success("保存成功");
|
||||
state.teacherdialog = false;
|
||||
@@ -518,7 +522,7 @@ export default {
|
||||
//确认删除
|
||||
const closeDeleteTeacher = () => {
|
||||
//调用删除接口
|
||||
deleteInTeacher(state.delTeacherId).then((res) => {
|
||||
deleteInTeacher({id:state.delTeacherId}).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
// message.success("删除成功");
|
||||
state.deleteTeacherdialog = false
|
||||
@@ -562,7 +566,7 @@ export default {
|
||||
//清空数据
|
||||
const cancel = () => {
|
||||
state.formParam = {
|
||||
teacherType:'1',
|
||||
teacherType:2,
|
||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png',
|
||||
name: null,
|
||||
mobile: null,
|
||||
@@ -600,7 +604,7 @@ export default {
|
||||
}
|
||||
//外部讲师详情
|
||||
const TeacherSystem = () => {
|
||||
getOuterTeacherById(state.id).then((res) => {
|
||||
getTeacherById({id:state.id}).then((res) => {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam = res.data.data
|
||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||
|
||||
Reference in New Issue
Block a user