mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 10:12:54 +08:00
Merge remote-tracking branch 'zcwy/zcwy-teacher-manage' into zcwy-teacher-manage
# Conflicts: # src/views/lecturer/InsideTeaching.vue
This commit is contained in:
@@ -192,10 +192,19 @@ import {getCookieForName} from "@/api/method";
|
|||||||
state.fileList = [];
|
state.fileList = [];
|
||||||
state.uploadpercent = -1;
|
state.uploadpercent = -1;
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("请上传正确的文件格式");
|
message.error("请按模板格式上传文件");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let isLt1M = info.file.size < 512000000;
|
||||||
|
console.log(info.file.size, isLt1M)
|
||||||
|
if (!isLt1M) {
|
||||||
|
state.fileList = [];
|
||||||
|
state.uploadpercent = -1;
|
||||||
|
message.destroy();
|
||||||
|
message.error("图片不能超过500KB! 请重新上传");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
state.addLoading = true;
|
state.addLoading = true;
|
||||||
state.uploadpercent = parseInt(info.file.percent);
|
state.uploadpercent = parseInt(info.file.percent);
|
||||||
|
|||||||
@@ -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({name: '', pageNo:1, pageSize: 999,teacherType:2})
|
const memberParam = ref({name: '', pageNo:1, pageSize: 999,teacherType:2 ,status:1})
|
||||||
|
|
||||||
const userList = ref([])
|
const userList = ref([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</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 v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
|
<a-range-picker v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
|
||||||
separator="至" :placeholder="[' 开始时间', ' 结束时间']
|
separator="至" :placeholder="[' 开始时间', ' 结束时间']
|
||||||
"
|
"
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<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))" 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>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@@ -168,14 +168,15 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="授课/课程日期 :" name="teachingDate">
|
<a-form-item label="授课/课程日期 :" name="teachingDate">
|
||||||
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD"
|
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm" :show-time="{ format: 'HH:mm' }"
|
||||||
placeholder="请选择课程日期" />
|
placeholder="请选择课程日期" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</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; "
|
<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>
|
</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>
|
||||||
@@ -187,16 +188,17 @@
|
|||||||
<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
|
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch :maxLength="8"
|
||||||
@blur="clearstudysNumber">
|
@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
|
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
|
||||||
@blur="clearscoreNumber">
|
</a-input> -->
|
||||||
</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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -239,8 +241,8 @@
|
|||||||
? '已开课' : '' }}</a-descriptions-item>
|
? '已开课' : '' }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName }}</a-descriptions-item>
|
<a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
|
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="授课时长 ">{{ formParam.teaching }}
|
<a-descriptions-item label="授课时长 ">{{ formParam.teaching }} 分钟
|
||||||
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">({{ (formParam.teaching / 60
|
<span style="margin-left: 10px ;" v-if="formParam.teaching != null">({{ (formParam.teaching / 60
|
||||||
).toFixed(2) }}小时)</span>
|
).toFixed(2) }}小时)</span>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item>
|
<a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item>
|
||||||
@@ -381,7 +383,7 @@ export default {
|
|||||||
const AddressList = ref([
|
const AddressList = ref([
|
||||||
]);
|
]);
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, message: '', log: '讲师不能为空' }],
|
teacherName: [{ required: true, message: '', log: '讲师不能为空' }],
|
||||||
courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
|
courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
|
||||||
courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
|
courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
|
||||||
courseStatus: [{ required: true, message: '', log: '讲开课状态不能为空' }],
|
courseStatus: [{ required: true, message: '', log: '讲开课状态不能为空' }],
|
||||||
@@ -402,10 +404,12 @@ export default {
|
|||||||
{ value: 3, label: "面授开课" },
|
{ value: 3, label: "面授开课" },
|
||||||
])
|
])
|
||||||
const AuthenticationStatusList = ref([
|
const AuthenticationStatusList = ref([
|
||||||
|
{ value: '', label: "全部" },
|
||||||
{ value: 0, label: "未开课" },
|
{ value: 0, label: "未开课" },
|
||||||
{ value: 1, label: "已开课" },
|
{ value: 1, label: "已开课" },
|
||||||
])
|
])
|
||||||
const entryTypeList = ref([
|
const entryTypeList = ref([
|
||||||
|
{ value: '', label: "全部" },
|
||||||
{ value: 0, label: "系统生成" },
|
{ value: 0, label: "系统生成" },
|
||||||
{ value: 1, label: "手动录入" },
|
{ value: 1, label: "手动录入" },
|
||||||
])
|
])
|
||||||
@@ -643,7 +647,7 @@ export default {
|
|||||||
//修改讲师信息弹窗
|
//修改讲师信息弹窗
|
||||||
const handleModify = (record) => {
|
const handleModify = (record) => {
|
||||||
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
|
||||||
@@ -662,7 +666,7 @@ 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 HH:mm").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++) {
|
||||||
@@ -774,7 +778,7 @@ 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 HH:mm'),
|
||||||
state.formParam.name=state.formParam.teacherName
|
state.formParam.name=state.formParam.teacherName
|
||||||
console.log(state.formParam);
|
console.log(state.formParam);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<!-- <div @click="handleformlevel"> -->
|
<!-- <div @click="handleformlevel"> -->
|
||||||
<a-form-item label="讲师级别" name="tlevelId">
|
<a-form-item label="讲师级别" name="tlevelId">
|
||||||
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear
|
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear disableda
|
||||||
:options="tSystemNames.levelVoList" @change="handleformlevel">
|
:options="tSystemNames.levelVoList" @change="handleformlevel">
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@@ -229,8 +229,10 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="授课/课程日期 :" name="teachingDate">
|
<a-form-item label="授课/课程日期 :" name="teachingDate">
|
||||||
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD"
|
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm" :show-time="{ format: 'HH:mm' }"
|
||||||
|
type="datetime"
|
||||||
placeholder="请选择课程日期" />
|
placeholder="请选择课程日期" />
|
||||||
|
<!-- <a-time-picker v-model:value="value" format="HH:mm" /> -->
|
||||||
<!-- @change="editTimeChange" -->
|
<!-- @change="editTimeChange" -->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -312,7 +314,7 @@
|
|||||||
<a-descriptions-item label="讲师工号">{{ formParam.userNo }}</a-descriptions-item>
|
<a-descriptions-item label="讲师工号">{{ formParam.userNo }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="讲师组织" :span="2">{{ formParam.orgName }}</a-descriptions-item>
|
<a-descriptions-item label="讲师组织" :span="2">{{ formParam.orgName }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="讲师体系">{{ formParam.tsystemName }}</a-descriptions-item>
|
<a-descriptions-item label="讲师体系">{{ formParam.tsystemName }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="讲师级别">{{ formParam.tlevelName
|
<a-descriptions-item label="讲师级别">{{ formParam.levelName
|
||||||
}}</a-descriptions-item>
|
}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="录入方式">
|
<a-descriptions-item label="录入方式">
|
||||||
{{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '' }}</a-descriptions-item>
|
{{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '' }}</a-descriptions-item>
|
||||||
@@ -325,7 +327,7 @@
|
|||||||
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
|
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="参训人数 ">{{ formParam.studys }}</a-descriptions-item>
|
<a-descriptions-item label="参训人数 ">{{ formParam.studys }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item>
|
<a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName }}</a-descriptions-item>
|
<a-descriptions-item label="内容分类">{{ formParam.courseTypeName }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item>
|
<a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
<div style="margin-top:20px ;line-height: 24px;" >
|
<div style="margin-top:20px ;line-height: 24px;" >
|
||||||
@@ -870,7 +872,7 @@ export default {
|
|||||||
//修改信息弹窗
|
//修改信息弹窗
|
||||||
const handleModify = (record) => {
|
const handleModify = (record) => {
|
||||||
state.teacherdialog = true;
|
state.teacherdialog = true;
|
||||||
state.teacherdialogtitle = '修改授课记录'
|
state.teacherdialogtitle = '编辑授课记录'
|
||||||
state.lookTeacherId = record.teacherId
|
state.lookTeacherId = record.teacherId
|
||||||
state.vf = false
|
state.vf = false
|
||||||
TeacherSystem1(record)
|
TeacherSystem1(record)
|
||||||
@@ -895,7 +897,8 @@ export default {
|
|||||||
state.formParam.teacherName = state.formParam.name?.split('/')[0]
|
state.formParam.teacherName = state.formParam.name?.split('/')[0]
|
||||||
state.formParam.userNo =state.formParam.name?.split('/')[1]
|
state.formParam.userNo =state.formParam.name?.split('/')[1]
|
||||||
state.formParam.tsystemName = state.tSystemNames.systemName
|
state.formParam.tsystemName = state.tSystemNames.systemName
|
||||||
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : " "
|
state.formParam.tsystemId = state.tSystemNames?.systemId
|
||||||
|
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : " "
|
||||||
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]);
|
||||||
@@ -1052,7 +1055,7 @@ export default {
|
|||||||
state.formParam.tlevelId = res.data.data.tlevelId
|
state.formParam.tlevelId = res.data.data.tlevelId
|
||||||
state.formParam.name = res.data.data.teacherName+'/'+res.data.data.userNo
|
state.formParam.name = res.data.data.teacherName+'/'+res.data.data.userNo
|
||||||
state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item=>({ name: item }))
|
state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item=>({ name: item }))
|
||||||
state.teachingDate=dayjs(res.data.data.teachingDate, 'YYYY-MM-DD'),
|
state.teachingDate=dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm' ),
|
||||||
console.log( state.formParam);
|
console.log( state.formParam);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user