mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 17:55:39 +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,
|
||||
|
||||
Reference in New Issue
Block a user