修改授课回显调整

This commit is contained in:
wangxuemei
2024-10-31 17:20:08 +08:00
parent 3778c721cc
commit b83bd6904e
6 changed files with 268 additions and 261 deletions

View File

@@ -60,7 +60,7 @@ function debounce(func, wait) {
timeout = setTimeout(() => func.apply(this, args), wait); timeout = setTimeout(() => func.apply(this, args), wait);
}; };
} }
const memberParam = ref({teacherNameOrUserNo: '', pageNo:1, pageSize: 20}) const memberParam = ref({name: '', pageNo:1, pageSize: 999,teacherType:2})
const userList = ref([]) const userList = ref([])
const loading = ref(false) const loading = ref(false)
@@ -73,7 +73,8 @@ const getOutTeacher = () => {
}) })
} }
const options = computed(() => userList.value.map(e => ({ const options = computed(() => userList.value.map(e => ({
label: e.name + '(' + e.userNo + ')' + e.organizationName, // label: e.name + '(' + e.userNo + ')' + e.organizationName,
label:e.name,
value: e.name, value: e.name,
...e, ...e,
audienceList: null audienceList: null
@@ -106,19 +107,22 @@ const searchMember = (keyword) => {
isOpen.value = true isOpen.value = true
userList.value = [] userList.value = []
memberParam.value.pageNo = 1 memberParam.value.pageNo = 1
memberParam.value.teacherNameOrUserNo = keyword memberParam.value.teacherType=2
memberParam.value.name = keyword
console.log('searchMember', memberParam.value) console.log('searchMember', memberParam.value)
debounceObject() debounceObject()
}; };
function blur() { function blur() {
isOpen.value = false isOpen.value = false
memberParam.value.teacherNameOrUserNo = '' memberParam.value.name = ''
memberParam.value.pageNo = 1 memberParam.value.pageNo = 1
memberParam.value.teacherType=2
} }
function change(e, l) { function change(e, l) {
memberParam.value.teacherNameOrUserNo = '' memberParam.value.name = ''
memberParam.value.teacherType=2
memberParam.value.pageNo = 1 memberParam.value.pageNo = 1
isOpen.value = false isOpen.value = false
Array.isArray(l) && (selectOptions.value = l) Array.isArray(l) && (selectOptions.value = l)

View File

@@ -77,7 +77,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="item_inp" style="background-color: #fff;"> <div class="item_inp" style="background-color: #fff;">
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false" <a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
:headers="headers" :before-upload="beforeUpload" > :headers="headers" :before-upload="beforeUpload">
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" /> <img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
<div class="i_upload" v-else> <div class="i_upload" v-else>
<div class="addimg"> <div class="addimg">
@@ -88,7 +88,7 @@
</a-upload> </a-upload>
<div class="i_bottom"> <div class="i_bottom">
<div class="tip" style="margin-bottom: 10px;"> <div class="tip" style="margin-bottom: 10px;">
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为500KB</span> <span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png </span>
</div> </div>
</div> </div>
</div> </div>
@@ -316,14 +316,12 @@ export default {
file.type === "image/jpg" || file.type === "image/jpg" ||
file.type === "image/jpeg" || file.type === "image/jpeg" ||
file.type === "image/png" || file.type === "image/png" ||
file.type === "image/svg" ||
file.type === "image/bmp" || file.type === "image/bmp" ||
file.type === "image/gif"; file.type === "image/gif";
if (!isJpgOrPng) { if (!isJpgOrPng) {
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!"); message.error("仅支持jpg、gif、png、jpeg、bmp格式!");
return false; return false;
} }
let isLt1M = file.size < 500000; let isLt1M = file.size < 500000;
console.log(file.size, isLt1M) console.log(file.size, isLt1M)
if (!isLt1M) { if (!isLt1M) {
@@ -333,17 +331,18 @@ export default {
const formDatas = new FormData(); const formDatas = new FormData();
formDatas.append("file", file); formDatas.append("file", file);
console.log("file", file)
fileUp(formDatas).then((res) => { fileUp(formDatas).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
console.log(res.data.data, 45); console.log(res.data.data, 45);
state.formParam.photo= process.env.VUE_APP_FILE_PATH + res.data.data; state.formParam.photo = process.env.VUE_APP_FILE_PATH + res.data.data;
// state.hasImgName = file.name; // state.hasImgName = file.name;
// emit("src", { id: '', src: res.data.data }); // emit("src", { id: '', src: res.data.data });
} }
}); });
return false; return false;
}; };
const AccountStatusList = ref([ const AccountStatusList = ref([
{ value: '', label: "全部" }, { value: '', label: "全部" },
{ value: 1, label: "启用" }, { value: 1, label: "启用" },
@@ -649,16 +648,16 @@ export default {
const sendPhone=()=>{ const sendPhone=()=>{
console.log(state.formParam.mobile) console.log(state.formParam.mobile)
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
if (!state.formParam.mobile) { // if (!state.formParam.mobile) {
} else if (!reg.test(state.formParam.mobile)) { // } else if (!reg.test(state.formParam.mobile)) {
message.warning( '手机号格式不正确') // message.warning( '手机号格式不正确')
} // }
} }
const sendEmail=()=>{ const sendEmail=()=>{
const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/; const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/;
if (!reg.test(state.formParam.email)) { // if (!reg.test(state.formParam.email)) {
message.warning( '邮箱格式不正确') // message.warning( '邮箱格式不正确')
} // }
} }
// getpromotionrecordstableData() // getpromotionrecordstableData()
//导出功能 //导出功能
@@ -1088,4 +1087,7 @@ display: flex;
justify-content: right; justify-content: right;
} }
} }
.item_inp .i_upload_img[data-v-e369ffe0] {
border-radius:50%
}
</style> </style>

View File

@@ -2,7 +2,7 @@
<template> <template>
<div> <div>
<!-- 搜索框及按钮 --> <!-- 搜索框及按钮 -->
<div class="filter" > <div class="filter">
<a-form layout="inline" style="min-width: 1380px;"> <a-form layout="inline" style="min-width: 1380px;">
<a-form-item class="select"> <a-form-item class="select">
<!-- v-model:value="searchParam.name" --> <!-- v-model:value="searchParam.name" -->
@@ -10,24 +10,18 @@
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch> placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch>
</a-input> --> </a-input> -->
<a-input style="width: 276px; height: 40px; border-radius: 8px" placeholder="请输入工号/讲师姓名进行检索" showSearch <a-input style="width: 276px; height: 40px; border-radius: 8px" placeholder="请输入工号/讲师姓名进行检索" showSearch
allowClear v-model:courseName="searchParam.courseName"></a-input> allowClear v-model:value="searchParam.name"></a-input>
</a-form-item> </a-form-item>
<a-form-item class="select"> <a-form-item class="select">
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px" <a-input v-model:value="searchParam.courseName" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入课程名称进行搜索" allowClear showSearch> placeholder="请输入课程名称进行搜索" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item class="select "> <a-form-item class="select ">
<div class="select addTimeBox"> <div class="select addTimeBox">
<div class="addTime" >创建时间</div> <div class="addTime">创建时间</div>
<a-range-picker <a-range-picker v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
v-model:value="searchdate" separator="至" :placeholder="[' 开始时间', ' 结束时间']" />
style="width: 420px"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div> </div>
</a-form-item> </a-form-item>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
@@ -51,24 +45,17 @@
<div style="width:100%"></div> <div style="width:100%"></div>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.entryType" placeholder="录入类型" <a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.entryType" placeholder="录入类型"
:options="entryTypeList" allowClear > :options="entryTypeList" allowClear>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-tree-select <a-tree-select style="width: 230px" :fieldNames="{
style="width: 230px"
:fieldNames="{
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'code', value: 'code',
}" }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
allow-clear v-model:value="searchParam.courseTypeId" show-search
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
v-model:value="searchParam.courseTypeId"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类"
tree-default-expand-all
:tree-data="sysTypeOptions"> :tree-data="sysTypeOptions">
</a-tree-select> </a-tree-select>
</a-form-item> </a-form-item>
@@ -88,7 +75,7 @@
<UploadOutlined /> 一键生成讲师费 <UploadOutlined /> 一键生成讲师费
</a-button> </a-button>
</div> --> </div> -->
<a-button class="resetbtn" @click="handleImport()" > <a-button class="resetbtn" @click="handleImport()">
<DownloadOutlined /> 导入 <DownloadOutlined /> 导入
</a-button> </a-button>
<a-button @click="handleExport()" class="resetbtn"> <a-button @click="handleExport()" class="resetbtn">
@@ -98,10 +85,11 @@
<!-- 表格 --> <!-- 表格 -->
<div style="padding: 10px 0"> <div style="padding: 10px 0">
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columns" <a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columns"
:scroll="{ x: 1500 }" :data-source="tableData" :loading="tableLoading" @expand="expandTable" :pagination="false"> :scroll="{ x: 1500 }" :data-source="tableData" :loading="tableLoading" @expand="expandTable"
:pagination="false">
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <a-space>
<a-button type="link" @click="() => handleLook(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))">修改</a-button> <a-button type="link" @click="() => handleModify(record, String(record.courseform))">修改</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>
@@ -114,41 +102,38 @@
</div> </div>
<div class="tableBox "> <div class="tableBox ">
<div class="pa"> <div class="pa">
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false" <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false" :hideOnSinglePage="true"
:hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" class="pagination"
class="pagination" @change="changePagination" /> @change="changePagination" />
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" width="60%" :title="teacherdialogtitle"> <a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
width="60%" :title="teacherdialogtitle">
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef"> <a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<!--讲师名称 teacherName 内容分类 coursetypeid --> <!--讲师名称 teacherName 内容分类 coursetypeid -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<!-- <ProjectManagerOutTeacher v-model:value="formParam.name"
<a-form-item label="讲师名称" name="teacherName">
<ProjectManagerOutTeacher v-model:value="formParam.name"
v-model:name="formParam.teacherName" v-model:name="formParam.teacherName"
placeholder="请输入工号/讲师姓名进行检索" placeholder="请输入工号/讲师姓名进行检索"
@onChange="managerChange"></ProjectManagerOutTeacher> --> @onChange="managerChange"></ProjectManagerOutTeacher>
<a-form-item label="讲师名称" name="teacherName">
<a-input v-model:value="formParam.teacherName" allowClear <!-- <a-input v-model:value="formParam.teacherName" allowClear showSearch class="draitem"
showSearch class="draitem" placeholder="请输入讲师姓名"></a-input> placeholder="请输入讲师姓名"></a-input> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="内容分类" name="courseTypeId"> <a-form-item label="内容分类" name="courseTypeId">
<a-tree-select <a-tree-select :fieldNames="{
:fieldNames="{
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'code', value: 'code',
}" }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
allow-clear v-model:value="formParam.courseTypeId" show-search
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
v-model:value="formParam.courseTypeId"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类"
tree-default-expand-all
:tree-data="sysTypeOptions"> :tree-data="sysTypeOptions">
</a-tree-select> </a-tree-select>
</a-form-item> </a-form-item>
@@ -158,8 +143,7 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课程名称" name="coursename"> <a-form-item label="课程名称" name="coursename">
<a-input class="draitem" v-model:value="formParam.coursename" placeholder="请输入后搜索面授课" allowClear <a-input class="draitem" v-model:value="formParam.coursename" placeholder="请输入后搜索面授课" allowClear showSearch>
showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -182,8 +166,8 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课时长" name="teaching"> <a-form-item label="授课时长" name="teaching">
<a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px; " placeholder="0" <a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px; "
allowClear showSearch suffix="分钟" @blur="clearNonNumber"> placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60 <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span> ).toFixed(2) }}小时</span>
@@ -195,13 +179,15 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="参训人数" name="studys"> <a-form-item label="参训人数" name="studys">
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch @blur="clearstudysNumber"> <a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch
@blur="clearstudysNumber">
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="评分" name="score"> <a-form-item label="评分" name="score">
<a-input v-model:value="formParam.score" class="draitem" placeholder="0 " allowClear showSearch @blur="clearscoreNumber"> <a-input v-model:value="formParam.score" class="draitem" placeholder="0 " allowClear showSearch
@blur="clearscoreNumber">
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -238,7 +224,8 @@
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter"> <a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="讲师名称">{{ formParam.teacherName }}</a-descriptions-item> <a-descriptions-item label="讲师名称">{{ formParam.teacherName }}</a-descriptions-item>
<a-descriptions-item label="手机号码">{{ formParam.mobile }}</a-descriptions-item> <a-descriptions-item label="手机号码">{{ formParam.mobile }}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '在线课' : formParam.type == 0 ? '面授课' : '' }}</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.coursename }}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{ formParam.status == 0 ? '未开课' : formParam.status == 1 <a-descriptions-item label="开课状态">{{ formParam.status == 0 ? '未开课' : formParam.status == 1
? '已开课' : '' }}</a-descriptions-item> ? '已开课' : '' }}</a-descriptions-item>
@@ -276,7 +263,7 @@
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
<div class="header"> <div class="header">
<img src="@/assets/images/coursewareManage/QR.png" alt="" style="margin-right:10px"/> <img src="@/assets/images/coursewareManage/QR.png" alt="" style="margin-right:10px" />
<span>提示</span> <span>提示</span>
</div> </div>
<div class="body"> <div class="body">
@@ -295,11 +282,11 @@
</a-modal> </a-modal>
</div> </div>
<!-- <div> <ImageUpload/> </div> --> <!-- <div> <ImageUpload/> </div> -->
<ImportWork v-model:showWork="showWork" :url="'/admin/export/importOutTeacherRecord'" :title="title "></ImportWork> <ImportWork v-model:showWork="showWork" :url="'/admin/export/importOutTeacherRecord'" :title="title"></ImportWork>
</div> </div>
</template> </template>
<script lang="jsx"> <script lang="jsx">
import { reactive, toRefs, ref ,computed} from "vue"; import { reactive, toRefs, ref, computed } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { import {
@@ -314,7 +301,7 @@ import { message } from "ant-design-vue";
import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManager from "@/components/project/ProjectManagerNew";
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher"; import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getTeacherCourseList, updateInTeacherCourse,getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse } from "../../api/Teaching"; import { getTeacherCourseList, updateInTeacherCourse, getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse } from "../../api/Teaching";
// import {getProjSt} from "../../api/indexProjStu"; // import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher" // import AddTeacher from "../../components/drawers/project/AddTeacher"
export default { export default {
@@ -337,7 +324,7 @@ export default {
vf: false, vf: false,
showWork: false, showWork: false,
moreid: 1, moreid: 1,
title:"导入外部授课记录", title: "导入外部授课记录",
tableLoading: false, tableLoading: false,
delTeacherId: null, //删除id确认 delTeacherId: null, //删除id确认
userNoid: null, //详情工号确认 userNoid: null, //详情工号确认
@@ -354,14 +341,14 @@ export default {
tableDataTotal: -1,//table列表总条数 tableDataTotal: -1,//table列表总条数
formParam: { formParam: {
status: 1, status: 1,
entryType:1, entryType: 1,
teaching:null, teaching: null,
teachingDate:null, teachingDate: null,
}, },
searchdate: undefined, //选择时间 searchdate: undefined, //选择时间
searchParam: { searchParam: {
name:null, name: null,
recordType:2, recordType: 2,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
teacherName: null, teacherName: null,
@@ -370,28 +357,28 @@ export default {
status: null, status: null,
beginTime: null, beginTime: null,
endTime: null, endTime: null,
entryType:null, entryType: null,
}, },
}) })
// function searchTimeChange(time, timeStr) { // function searchTimeChange(time, timeStr) {
// let startTime = timeStr[0] // let startTime = timeStr[0]
// let endTime = timeStr[1] ; // let endTime = timeStr[1] ;
// state.startTime = new Date(startTime).getTime(); // state.startTime = new Date(startTime).getTime();
// state.endTime = new Date(endTime).getTime(); // state.endTime = new Date(endTime).getTime();
// // state.searchParam.beginTime = new Date(beginTime).getTime() ; // // state.searchParam.beginTime = new Date(beginTime).getTime() ;
// // state.searchParam.endTime = new Date(endTime).getTime() ; // // state.searchParam.endTime = new Date(endTime).getTime() ;
// state.searchParam.beginTime = state.startTime ? state.startTime : null, // state.searchParam.beginTime = state.startTime ? state.startTime : null,
// state.searchParam.endTime = state.endTime ? state.endTime : null // state.searchParam.endTime = state.endTime ? state.endTime : null
// } // }
const AddressList = ref([ const AddressList = ref([
]); ]);
const rules = { const rules = {
name: [{ required: true, message: '',log:'讲师不能为空' }], name: [{ required: true, message: '', log: '讲师不能为空' }],
courseTypeId: [{ required: true, message:'',log: '内容分类不能为空' }], courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }], courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
status: [{ required: true, message:'',log: '讲开课状态不能为空' }], status: [{ required: true, message: '', log: '讲开课状态不能为空' }],
teaching: [{ required: true, message: '',log:'授课时长不能为空' }], teaching: [{ required: true, message: '', log: '授课时长不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }], teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }],
} }
//获取开课场地 //获取开课场地
@@ -407,9 +394,9 @@ export default {
{ value: 0, label: "未开课" }, { value: 0, label: "未开课" },
{ value: 1, label: "已开课" }, { value: 1, label: "已开课" },
]) ])
const entryTypeList= ref([ const entryTypeList = ref([
{ value:0 ,label:"系统生成"}, { value: 0, label: "系统生成" },
{ value:1 ,label:"手动录入"}, { value: 1, label: "手动录入" },
]) ])
const columns = ref([ const columns = ref([
@@ -582,7 +569,7 @@ export default {
]) ])
const getSysTypeMap = (code) => { const getSysTypeMap = (code) => {
if(code=="")return if (code == "") return
// console.log(store.state.sysTypeMap,'map集合'); // console.log(store.state.sysTypeMap,'map集合');
return store.state.sysTypeMap.get(code) return store.state.sysTypeMap.get(code)
} }
@@ -593,21 +580,21 @@ export default {
}; };
//重置 //重置
const searchReset = () => { const searchReset = () => {
state.searchdate= null, state.searchdate = null,
state.searchParam = { state.searchParam = {
recordType:2, recordType: 2,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
managerId: null, managerId: null,
name: null, name: null,
manager:null, manager: null,
entryType: null, entryType: null,
status: 1, status: 1,
entryType:null, entryType: null,
systemId:null, systemId: null,
endTime:null, endTime: null,
beginTime:null, beginTime: null,
entryType:null entryType: null
}; };
getTableDate(); getTableDate();
}; };
@@ -647,7 +634,7 @@ export default {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改授课记录' state.teacherdialogtitle = '修改授课记录'
state.lookTeacherId = record.id state.lookTeacherId = record.id
state.formParam.recordType='1' state.formParam.recordType = '1'
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()
} }
@@ -664,16 +651,16 @@ export default {
} }
//保存 //保存
const createTeacherDialog = async () => { const createTeacherDialog = async () => {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : "" state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
console.log( state.formParam) console.log(state.formParam)
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for (let i = 0; i < formItemNames.length; i++) {
const result = await validateField(formItemNames[i]); const result = await validateField(formItemNames[i]);
if (result) { if (result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
state.formParam = {...state.formParam} state.formParam = { ...state.formParam }
if (state.vf == false) { if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => { updateInTeacherCourse(state.formParam).then(response => {
message.success("修改成功"); message.success("修改成功");
@@ -734,7 +721,7 @@ export default {
const cancel = () => { const cancel = () => {
state.formParam = { state.formParam = {
status: 1, status: 1,
recordType:2, recordType: 2,
teacherName: null, teacherName: null,
mobile: null, mobile: null,
name: null, name: null,
@@ -742,9 +729,9 @@ export default {
teaching: null, teaching: null,
score: null, score: null,
remark: null, remark: null,
teachingDate:null teachingDate: null
} }
state.teachingDate=null state.teachingDate = null
} }
//展开切换 //展开切换
const handlemoreid = () => { const handlemoreid = () => {
@@ -756,7 +743,7 @@ export default {
state.searchParam.type = null state.searchParam.type = null
state.searchParam.status = null state.searchParam.status = null
state.searchParam.id = null state.searchParam.id = null
state.searchParam.entryType=null state.searchParam.entryType = null
} }
} }
//表格内查看数据操作 //表格内查看数据操作
@@ -774,10 +761,11 @@ export default {
} }
//外部授课详情 //外部授课详情
const TeacherSystem = () => { const TeacherSystem = () => {
getTeacherCourseList({id:state.lookTeacherId}).then((res) => { getTeacherCourseList({ id: state.lookTeacherId }).then((res) => {
state.formParam = res.data.data state.formParam = res.data.data
state.teachingDate=dayjs(res.data.data.teachingDate, 'YYYY-MM-DD'), state.teachingDate = dayjs(res.data.data.teachingDate, 'YYYY-MM-DD'),
console.log( state.formParam); state.formParam.name=state.formParam.teacherName
console.log(state.formParam);
}) })
.catch((err) => { .catch((err) => {
}); });
@@ -788,13 +776,13 @@ export default {
state.searchParam.name = t; state.searchParam.name = t;
// state.searchParam.trainorgName=orgName // state.searchParam.trainorgName=orgName
} }
const clearNonNumber=()=>{ const clearNonNumber = () => {
state.formParam.teaching = state.formParam.teaching.replace(/\D/g, ''); state.formParam.teaching = state.formParam.teaching.replace(/\D/g, '');
} }
//导入功能 //导入功能
const handleImport = () => { const handleImport = () => {
state.showWork = true state.showWork = true
} }
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
window.open( window.open(
@@ -880,7 +868,8 @@ const handleImport = () => {
::v-deep .ant-picker-range .ant-picker-active-bar { ::v-deep .ant-picker-range .ant-picker-active-bar {
margin-left: 85px !important; margin-left: 85px !important;
} }
} }
//导出按钮icon //导出按钮icon
.daochu { .daochu {
width: 16px; width: 16px;
@@ -1192,29 +1181,36 @@ const handleImport = () => {
border-radius: 8px; border-radius: 8px;
margin-right: 20px margin-right: 20px
} }
::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{
border-radius:8px; ::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector {
height:40px; border-radius: 8px;
height: 40px;
} }
.ant-col-12{
height:80px; .ant-col-12 {
height: 80px;
} }
.tableBox { .tableBox {
padding-bottom: 20px; padding-bottom: 20px;
margin: 20px 38px 30px; margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
::v-deep .ant-select-dropdown {
display: inline-block; display: inline-block;
} }
::v-deep .ant-select-selection-item{
margin-left: 3px; ::v-deep .ant-select-selection-item {
} margin-left: 3px;
::v-deep .ant-pagination-options-size-changer.ant-select{ }
width: 84px;
} ::v-deep .ant-pagination-options-size-changer.ant-select {
.pa { width: 84px;
width: 100%; }
display: flex;
justify-content: right; .pa {
} width: 100%;
display: flex;
justify-content: right;
}
} }
</style> </style>

View File

@@ -1566,4 +1566,7 @@ display: flex;
justify-content: right; justify-content: right;
} }
} }
.item_inp .i_upload_img[data-v-e369ffe0] {
border-radius:50%
}
</style > </style >

View File

@@ -683,8 +683,8 @@ export default {
<div> <div>
{value.record.courseStatus == 0 || value.record.courseStatus == 1 {value.record.courseStatus == 0 || value.record.courseStatus == 1
? { ? {
"0": "开课", "0": "开课",
"1": "开课", "1": "开课",
}[value.record.courseStatus + ""] || "" }[value.record.courseStatus + ""] || ""
: "-"} : "-"}
</div> </div>

View File

@@ -253,9 +253,11 @@ export default{
// getteacherrecordstableData() // getteacherrecordstableData()
//授课翻页 //授课翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.searchParam.pageNo = page;
// state.pageNo = page; // state.pageNo = page;
state.teacherrecords.pageSize = pageSize; state.searchParam.pageSize = pageSize;
getTableDate();
state.teacherrecords.pageNo = page;
getteacherrecordstableData(); getteacherrecordstableData();
}; };
return{ return{