mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 08:46:46 +08:00
外部讲师调整
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<a-form-item class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入讲师姓名/手机号进行检索" allowClear showSearch
|
||||
placeholder="请输入讲师姓名/手机号进行检索" allowClear showSearch
|
||||
v-on:keydown.enter="enterPressHadlerSearch">
|
||||
</a-input>
|
||||
</a-form-item >
|
||||
@@ -100,7 +100,7 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="讲师名称" name="name">
|
||||
<a-input v-model:value="formParam.name" class="draitem"
|
||||
<a-input v-model:value="formParam.name" class="draitem" :maxlength="20"
|
||||
placeholder="请输入讲师姓名" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -117,7 +117,7 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="供应商" name="supplier">
|
||||
<a-input v-model:value="formParam.supplier" class="draitem"
|
||||
<a-input v-model:value="formParam.supplier" class="draitem" :maxlength="30"
|
||||
placeholder="请输入供应商" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -129,8 +129,17 @@
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="授课时长" name="defaultteachingtime">
|
||||
<a-input v-model:value="formParam.defaultteachingtime" style="width:80%; height: 40px; border-radius: 8px ; "
|
||||
placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber">
|
||||
</a-input>
|
||||
<span style="margin-left: 5px ;" v-if="formParam.defaultteachingtime != null">{{ (formParam.defaultteachingtime / 60
|
||||
).toFixed(2) }}小时</span>
|
||||
<span style="margin-left: 5px ;" v-if="formParam.defaultteachingtime == null">0.00小时</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<!-- 其他信息 -->
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
@@ -218,8 +227,8 @@
|
||||
<span>提示</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span v-if="handleOperate1 == 2">确定要将该讲师启用吗<div></div>启用后讲师可以登录教师端</span>
|
||||
<span v-if="handleOperate1 == 1">确定要将该讲师停用吗<div></div>停用后讲师不可登录教师端</span>
|
||||
<span v-if="handleOperate1 == 2">确定要将该讲师启用吗<div></div>启用后讲师可以登选为授课讲师</span>
|
||||
<span v-if="handleOperate1 == 1">确定要将该讲师停用吗<div></div>停用后不可选为授课讲师</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn2" @click="cancelTeacherDialog1" style="margin-right: 32px">
|
||||
@@ -241,7 +250,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref,watch } from "vue";
|
||||
import { reactive, toRefs, ref,watch ,computed} from "vue";
|
||||
import Editor from "@/components/project/Editor";
|
||||
import { useRouter } from "vue-router";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -268,6 +277,7 @@ export default {
|
||||
setup() {
|
||||
const formRef = ref();
|
||||
const router = useRouter();
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const state = reactive({
|
||||
currentPage1: 1,
|
||||
pageSize1: 10,
|
||||
@@ -297,8 +307,9 @@ export default {
|
||||
formParam: {
|
||||
description:"",
|
||||
teacherType:'2',
|
||||
photo:boe,
|
||||
status:1
|
||||
photo:'',
|
||||
status:1,
|
||||
defaultteachingtime:null,
|
||||
},
|
||||
vf:true,
|
||||
searchParam: {
|
||||
@@ -381,8 +392,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '授课时长 ',
|
||||
dataIndex: 'teaching',
|
||||
key: 'teaching',
|
||||
dataIndex: 'defaultteachingtime',
|
||||
key: 'defaultteachingtime',
|
||||
elipsis: true, align: "center",
|
||||
width: 200,
|
||||
},
|
||||
@@ -446,6 +457,10 @@ export default {
|
||||
state.tableLoading = false
|
||||
// console.log("获取讲师tableDatateacherName", tableData);
|
||||
})
|
||||
.catch(err => {
|
||||
state.tableLoading = false
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
};
|
||||
getTableDate()
|
||||
// // 翻页
|
||||
@@ -459,7 +474,9 @@ export default {
|
||||
cancel()
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '新增讲师'
|
||||
state.formParam.photo =userInfo.value?.avatar
|
||||
state.vf = true
|
||||
state.formParam.status = '1'
|
||||
state.formParam.photo = state.formParam.photo === null ?boe : state.formParam.photo
|
||||
}
|
||||
|
||||
@@ -586,7 +603,8 @@ export default {
|
||||
state.formParam = {
|
||||
status:1,
|
||||
teacherType:2,
|
||||
photo:boe,
|
||||
photo:null,
|
||||
defaultteachingtime:null,
|
||||
name: null,
|
||||
mobile: null,
|
||||
email: null,
|
||||
@@ -641,7 +659,7 @@ export default {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam = res.data.data
|
||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||
state.formParam.photo = state.formParam.photo === null ?boe : state.formParam.photo
|
||||
state.formParam.photo = state.formParam.photo === null ? userInfo.value?.avatar : state.formParam.photo
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("外部讲师详情", err);
|
||||
@@ -661,6 +679,10 @@ export default {
|
||||
// message.warning( '邮箱格式不正确')
|
||||
// }
|
||||
}
|
||||
const clearNonNumber = () => {
|
||||
state.formParam.defaultteachingtime = state.formParam.defaultteachingtime.replace(/\D/g, '');
|
||||
// state.formParam.teaching
|
||||
}
|
||||
// getpromotionrecordstableData()
|
||||
//导出功能
|
||||
const handleExport = () => {
|
||||
@@ -689,6 +711,7 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
lecturerAdmin,
|
||||
clearNonNumber,
|
||||
enterPressHadlerSearch,
|
||||
validateField,
|
||||
rules,
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<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 type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))" v-if="record.createFrom == 1 && record.courseStatus == 0 ">修改 </a-button>
|
||||
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
|
||||
</a-space>
|
||||
@@ -225,7 +225,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 授课日期 beginTime 开课状态 courseStatus -->
|
||||
<!-- 授课日期 teachingDate 开课状态 courseStatus -->
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="授课/课程日期 :" name="teachingDate">
|
||||
@@ -237,8 +237,8 @@
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开课状态">
|
||||
<a-radio-group v-model:value="formParam.courseStatus" class="draitem">
|
||||
<a-radio :value="1">未开课</a-radio>
|
||||
<a-radio :value="0">已开课</a-radio>
|
||||
<a-radio :value="0">未开课</a-radio>
|
||||
<a-radio :value="1">已开课</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -248,7 +248,9 @@
|
||||
<a-col :span="12">
|
||||
<a-form-item label="授课时长" name="teaching">
|
||||
<a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px ; "
|
||||
placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber">
|
||||
placeholder="0" allowClear showSearch suffix="分钟"
|
||||
:maxLength="8"
|
||||
@blur="clearNonNumber">
|
||||
</a-input>
|
||||
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
|
||||
).toFixed(2) }}小时</span>
|
||||
@@ -257,8 +259,10 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="评分" name="score">
|
||||
<a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
|
||||
</a-input>
|
||||
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
|
||||
</a-input> -->
|
||||
<a-input-number v-model:value="formParam.score" :min="0" :max="10"
|
||||
style="width:100%; height: 40px; border-radius: 8px ; " />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -266,7 +270,7 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="参训人数" name="studys">
|
||||
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 "
|
||||
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " :maxLength="8"
|
||||
@blur="clearstudysNumber" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -314,7 +318,7 @@
|
||||
{{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '在线课' : formParam.type == 0 ? '面授课' : '' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="课程名称">{{ formParam.courseName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="开课状态">{{ formParam.courseStatus == 1? '未开课' : formParam.courseStatus == 0
|
||||
<a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0? '未开课' : formParam.courseStatus == 1
|
||||
? '已开课' : '' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="授课时长 "><span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{
|
||||
(formParam.teaching / 60).toFixed(2) }}小时</span> </a-descriptions-item>
|
||||
@@ -490,7 +494,7 @@ export default {
|
||||
arr.map((value) => {
|
||||
let obj = {
|
||||
value: value.id,
|
||||
label: value.trainOrgName,
|
||||
label: value.affiliationName,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
@@ -538,10 +542,12 @@ export default {
|
||||
{ value: 3, label: "面授开课" },
|
||||
])
|
||||
const AuthenticationStatusList = ref([
|
||||
{ value: 1, label: "未开课" },
|
||||
{ value: 0, label: "已开课" },
|
||||
{ value: '', label: "全部" },
|
||||
{ value:0, label: "未开课" },
|
||||
{ value: 1, label: "已开课" },
|
||||
])
|
||||
const entryTypeList = ref([
|
||||
{ value: '', label: "全部" },
|
||||
{ value: 0, label: "系统生成" },
|
||||
{ value: 1, label: "手动录入" },
|
||||
])
|
||||
@@ -642,7 +648,7 @@ export default {
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.createFrom == "1" || value.record.createFrom == "2"
|
||||
{value.record.createFrom == "0" || value.record.createFrom == "1"
|
||||
? {
|
||||
"0": "系统生成",
|
||||
"1": "手动录入",
|
||||
@@ -696,8 +702,8 @@ export default {
|
||||
<div>
|
||||
{value.record.courseStatus == 0 || value.record.courseStatus == 1
|
||||
? {
|
||||
"0": "已开课",
|
||||
"1": "未开课",
|
||||
"0": "未开课",
|
||||
"1": "已开课",
|
||||
}[value.record.courseStatus + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
@@ -839,6 +845,10 @@ export default {
|
||||
state.tableLoading = false
|
||||
console.log("获取tableData", tableData);
|
||||
})
|
||||
.catch(err => {
|
||||
state.tableLoading = false
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
};
|
||||
getTableDate()
|
||||
|
||||
@@ -954,7 +964,7 @@ export default {
|
||||
teacher: null,
|
||||
orgName: null,
|
||||
tsystemName: null,
|
||||
levelId: null,
|
||||
tlevelId: null,
|
||||
courseName: null,
|
||||
teaching:null,
|
||||
studys: null,
|
||||
@@ -1010,7 +1020,7 @@ export default {
|
||||
// userNo: record.userNo,
|
||||
// orgName: record.orgName,
|
||||
// tsystemName: record.tsystemName,
|
||||
// levelId: record.levelId,
|
||||
// tlevelId: record.tlevelId,
|
||||
// type: record.type,
|
||||
// courseName: record.courseName,
|
||||
// courseStatus:record.courseStatus,
|
||||
@@ -1127,7 +1137,7 @@ export default {
|
||||
const rules = {
|
||||
name: [{ required: true, message:'',log: '讲师不能为空' }],
|
||||
orgName: [{ required: true, message: '',log:'讲师组织不能为空' }],
|
||||
levelId: [{ required: true, message: '',log:'讲师级别不能为空' }],
|
||||
tlevelId: [{ required: true, message: '',log:'讲师级别不能为空' }],
|
||||
tsystemName: [{ required: true, message: '',log:'讲师体系不能为空' }],
|
||||
courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }],
|
||||
courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
|
||||
|
||||
@@ -26,9 +26,9 @@ ExternalLecturer
|
||||
<a-descriptions-item label="讲师姓名">{{formParam.name}}</a-descriptions-item>
|
||||
<a-descriptions-item label="手机号码">{{formParam.mobile}}</a-descriptions-item>
|
||||
<a-descriptions-item label="讲师邮箱">{{formParam.email}}</a-descriptions-item>
|
||||
<a-descriptions-item label="授课时长" :span="2">{{formParam.teaching}}
|
||||
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">({{
|
||||
(formParam.teaching / 60).toFixed(2) }}小时)</span>
|
||||
<a-descriptions-item label="授课时长" :span="2">{{formParam.defaultteachingtime}}
|
||||
<span style="margin-left: 5px ;" v-if="formParam.defaultteachingtime != null">({{
|
||||
(formParam.defaultteachingtime / 60).toFixed(2) }}小时)</span>
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<div style="margin-top: 10px;"></div>
|
||||
|
||||
Reference in New Issue
Block a user