feat:修改面授课回显问题

This commit is contained in:
lixg
2023-02-24 20:32:18 +08:00
parent 035b348d5d
commit 7bcae5724f
2 changed files with 975 additions and 755 deletions

View File

@@ -317,34 +317,94 @@
>
<template #operation="{ record }">
<a-space>
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)"
@click="() => handlePush(record, String(record.courseform))" type="link">发布
<a-button
v-if="record.auditStatus === 2 && checkPer(record.permissions)"
@click="() => handlePush(record, String(record.courseform))"
type="link"
>发布
</a-button>
<a-button v-if="record.auditStatus===0 && checkPer(record.permissions)"
@click="() => handleSubmit(record, String(record.courseform))" type="link">提交审核
<a-button
v-if="record.auditStatus === 0 && checkPer(record.permissions)"
@click="() => handleSubmit(record, String(record.courseform))"
type="link"
>提交审核
</a-button>
<a-button v-if="(record.auditStatus===0 || record.auditStatus===-1) && checkPer(record.permissions)"
@click="() => handleEdit(record, String(record.courseform))" type="link">编辑
<a-button
v-if="
(record.auditStatus === 0 || record.auditStatus === -1) &&
checkPer(record.permissions)
"
@click="() => handleEdit(record, String(record.courseform))"
type="link"
>编辑
</a-button>
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
@click="() => handleStart(record, String(record.courseform))" type="link">开课
<a-button
v-if="
(record.auditStatus === 2 || record.auditStatus === 3) &&
checkPer(record.permissions)
"
@click="() => handleStart(record, String(record.courseform))"
type="link"
>开课
</a-button>
<a-button @click="() => handleLook(record, String(record.courseform))" type="link">查看
<a-button
@click="() => handleLook(record, String(record.courseform))"
type="link"
>查看
</a-button>
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理
<a-button
v-if="
(record.auditStatus === 2 || record.auditStatus === 3) &&
checkPer(record.permissions)
"
@click="() => handleGuan22(record, String(record.courseform))"
type="link"
>管理
</a-button>
<DropDown v-if="checkPer(record.permissions)" value="授权">
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent>
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent>
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent>
<OwnerTableModelStudent
:types="[10, 11, 12]"
:id="record.offcourseId"
>权限名单</OwnerTableModelStudent
>
<CommonStudent :type="10" :id="record.offcourseId" title="查看权"
>查看权</CommonStudent
>
<CommonStudent :type="11" :id="record.offcourseId" title="管理权"
>管理权</CommonStudent
>
</DropDown>
<DropDown v-if="checkPer(record.permissions)" value="更多">
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
<a-button v-if="record.status" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button>
<a-button v-else @click="() => handleOpen(record, String(record.courseform))" type="link">启用</a-button>
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除
<a-button
@click="() => handleCopy(record, String(record.courseform))"
type="link"
>复制</a-button
>
<a-button
@click="
() => handleRejectExit(record, String(record.courseform))
"
type="link"
>撤回</a-button
>
<a-button
v-if="record.status"
@click="() => handleStop(record, String(record.courseform))"
type="link"
>停用</a-button
>
<a-button
v-else
@click="() => handleOpen(record, String(record.courseform))"
type="link"
>启用</a-button
>
<a-button
@click="() => handleDelete(record, String(record.courseform))"
type="link"
danger
>删除
</a-button>
</DropDown>
</a-space>
@@ -840,7 +900,11 @@
<div class="b_input">
<NameInput
maxlength="30"
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
v-model:value="xjkkinputV1"
v-model:validate="validate"
show-count
:id="offcourseId"
:type="2"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入开课名称"
></NameInput>
@@ -908,7 +972,48 @@
></ProjectManager>
</div>
</div>
<div class="cstm_items">
<div class="signbox">
<span style="margin-right: 3px">考勤设置:</span>
</div>
<div style="display: flex; align-items: center">
<div style="margin-right: 10px">签到</div>
<div
style="display: flex; align-items: center; margin-right: 20px"
>
<span>开始前:</span>
<a-input-number
:min="0"
:max="300"
:precision="0"
style="
width: 100px;
height: 32px;
border-radius: 8px;
overflow: hidden;
"
v-model:value="beforeValue"
></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span>
</div>
<div style="display: flex; align-items: center">
<span>开始后:</span>
<a-input-number
:min="0"
:max="300"
:precision="0"
style="
width: 100px;
height: 32px;
border-radius: 8px;
overflow: hidden;
"
v-model:value="afterStartValue"
></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span>
</div>
</div>
</div>
<div class="cstm_items">
<div class="signbox">
<span style="margin-right: 3px">报名设置</span>
@@ -952,8 +1057,17 @@
<div v-if="checked4" class="cstm_items main_item">
<div class="signbox"></div>
<div class="btnbox">
<AssessmentList v-model:assessmentName="assessmentName" v-model:assessmentId="assessmentId">
<button class="xkbtn" @click="showAssessment" style="margin-bottom: 0;margin-top: 0">选择评估</button>
<AssessmentList
v-model:assessmentName="assessmentName"
v-model:assessmentId="assessmentId"
>
<button
class="xkbtn"
@click="showAssessment"
style="margin-bottom: 0; margin-top: 0"
>
选择评估
</button>
</AssessmentList>
<div v-if="assessmentId > 0">
<a-tag closable @close="removePG" color="processing">
@@ -986,7 +1100,9 @@
<div class="signbox"></div>
<div class="btnbox">
<add-test v-model:info="examInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
<button class="xkbtn" style="margin-bottom: 0; margin-top: 0">
配置考试
</button>
</add-test>
<div v-if="examInfo.examinationName">
<a-tag closable @close="logT" color="processing">
@@ -995,7 +1111,6 @@
</span>
</a-tag>
</div>
</div>
</div>
<!--
@@ -1106,14 +1221,41 @@
:isgetStudent="isgetStudent"
>
<template #extension="{ data: { record } }">
<a-button v-if="record.source === 4 && record.status === 1"
@click="() => {record.status = 0;auditStudent(record);}" type="link">审核通过
<a-button
v-if="record.source === 4 && record.status === 1"
@click="
() => {
record.status = 0;
auditStudent(record);
}
"
type="link"
>审核通过
</a-button>
<a-button v-if="record.source === 4 && record.status === 1"
@click="() => {record.status = 2;auditStudent(record);}" type="link">拒绝
<a-button
v-if="record.source === 4 && record.status === 1"
@click="
() => {
record.status = 2;
auditStudent(record);
}
"
type="link"
>拒绝
</a-button>
<a-button v-if="record.source === 4 && (record.status === 0 || record.status === 2)"
@click="() => {record.status = 1;auditStudent(record);}" type="link">撤回
<a-button
v-if="
record.source === 4 &&
(record.status === 0 || record.status === 2)
"
@click="
() => {
record.status = 1;
auditStudent(record);
}
"
type="link"
>撤回
</a-button>
</template>
</TableStudent>
@@ -1357,7 +1499,16 @@
<div
class="delete"
:style="{
display: del_hs || copy_hs || nouse_hs || back_hs || submit_hs || useCourse || push_hs ? 'block' : 'none',
display:
del_hs ||
copy_hs ||
nouse_hs ||
back_hs ||
submit_hs ||
useCourse ||
push_hs
? 'block'
: 'none',
}"
>
<div class="del_header"></div>
@@ -1526,7 +1677,8 @@ import {
studentExport,
handleStudent,
getMemberInfoApi,
copyCoursePlan, copyCourse,
copyCoursePlan,
copyCourse,
} from "@/api/indexCourse";
import {
traverseArr,
@@ -1721,8 +1873,8 @@ const columns6 = [
align: "center",
ellipsis: true,
customRender: ({ text }) => {
return text ? text : "-"
}
return text ? text : "-";
},
},
{
@@ -1996,7 +2148,8 @@ export default defineComponent({
ellipsis: true,
key: "contentTxt",
align: "center",
customRender: ({record}) => (findClassFullName(sysTypeOptions.value, record.sysTypeId) || "-")
customRender: ({ record }) =>
findClassFullName(sysTypeOptions.value, record.sysTypeId) || "-",
},
{
title: "课程形式",
@@ -2097,7 +2250,7 @@ export default defineComponent({
case "-1":
return "审核未通过";
}
}
},
},
{
title: "是否发布",
@@ -2105,7 +2258,8 @@ export default defineComponent({
dataIndex: "auditStatus",
key: "7",
align: "center",
customRender: ({record}) => record.auditStatus === 3 ? '已发布' : '未发布',
customRender: ({ record }) =>
record.auditStatus === 3 ? "已发布" : "未发布",
},
{
title: "创建人",
@@ -2137,7 +2291,7 @@ export default defineComponent({
key: "10",
align: "center",
customRender: ({ text, auditStatus }) => {
return auditStatus == 3 ? (text || '-') : "-";
return auditStatus == 3 ? text || "-" : "-";
},
},
{
@@ -2162,7 +2316,7 @@ export default defineComponent({
key: "id",
fixed: "right",
align: "right",
slots: { customRender: 'operation' }
slots: { customRender: "operation" },
},
],
//新加
@@ -2538,6 +2692,8 @@ export default defineComponent({
xjkkinputV2: "",
xjkkinputV3: "",
xjkkinputV4: null,
beforeValue: null, //考勤 开始前
afterStartValue: null, //考勤 开始后
//开课学员管理
xygl_inputV1: "",
//录入成绩
@@ -2748,7 +2904,8 @@ export default defineComponent({
return (
(list &&
list.length > 0 &&
list.map((e) =>
list
.map((e) =>
classify == e.code
? name
? name + "-" + e.name
@@ -2772,7 +2929,6 @@ export default defineComponent({
state.viewpowervisible = true;
};
// console.log('12344', sysTypeOptions)
// 处理数据字典
@@ -3161,10 +3317,10 @@ export default defineComponent({
state.addtestvisible = true;
};
const logW = () => {
state.workInfo = {}
state.workInfo = {};
};
const logT = () => {
state.examInfo = {}
state.examInfo = {};
};
const removePG = () => {
console.log("11111");
@@ -3342,12 +3498,12 @@ export default defineComponent({
if (state.selectTime) {
// beginTime = parseInt(new Date(state.selectTime[0].$d).getTime() / 1000);
// endTime = parseInt(new Date(state.selectTime[1].$d).getTime() / 1000);
beginTime = dayjs(state.selectTime[0]).format('YYYY-MM-DD HH:mm:ss')
beginTime = dayjs(state.selectTime[0]).format("YYYY-MM-DD HH:mm:ss");
// toDate(
// new Date(state.selectTime[0].$d).getTime() / 1000,
// "Y-M-D h:m:s"
// );
endTime = dayjs(state.selectTime[1]).format('YYYY-MM-DD HH:mm:ss')
endTime = dayjs(state.selectTime[1]).format("YYYY-MM-DD HH:mm:ss");
// toDate(
// new Date(state.selectTime[1].$d).getTime() / 1000,
// "Y-M-D h:m:s"
@@ -3625,6 +3781,8 @@ export default defineComponent({
state.assessmentId = null;
state.assessmentName = "";
state.EditWorkId = null;
state.beforeValue = null; //考勤 开始前
state.afterStartValue = null; //考勤 开始后
removePG();
};
@@ -3634,14 +3792,18 @@ export default defineComponent({
let startTime,
endTime = 0;
if (state.xjkkinputV3) {
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
startTime = dayjs(state.xjkkinputV3[0]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
endTime = dayjs(state.xjkkinputV3[1]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
}
const offName = await validateName({name: state.xjkkinputV1, type: 5, id: state.offcoursePlanId}).then(res => {
const offName = await validateName({
name: state.xjkkinputV1,
type: 5,
id: state.offcoursePlanId,
}).then((res) => {
console.log(res, res.data.data);
return res.data.data === 1;
});
console.log('校验重复', offName)
console.log("校验重复", offName);
if (offName) {
message.destroy();
return message.warning("开课名称重复,请重新填写");
@@ -3668,7 +3830,9 @@ export default defineComponent({
teacherId: state.member.value,
teacher: state.member.name,
workInfo: state.workInfo, //提交的作业信息
examInfo: state.examInfo//提交的考试信息
examInfo: state.examInfo, //提交的考试信息
beforeStart: state.beforeValue, //考勤 开始前
afterStart: state.afterStartValue, //考勤 开始后
};
console.log(postData);
const checkList = [
@@ -3685,15 +3849,17 @@ export default defineComponent({
console.log("state.addLoading ", state.addLoading);
}
state.addLoading = true;
editPlan(postData).then(() => {
editPlan(postData)
.then(() => {
getTableDate3();
handleCancelStu();
rest();
state.addLoading = false;
}).catch(err => {
state.loading = false
console.log(err)
})
.catch((err) => {
state.loading = false;
console.log(err);
});
state.cstm_hs = false;
};
@@ -3703,10 +3869,14 @@ export default defineComponent({
state.offcoursePlanId = item.id;
if (item.homeWorkId) {
queryWorkDetailById({workId: item.homeWorkId}).then((res) => state.workInfo = res.data.data);
queryWorkDetailById({ workId: item.homeWorkId }).then(
(res) => (state.workInfo = res.data.data)
);
}
if (item.testId) {
queryExaminationDetailById({examinationId: item.testId}).then((res) => state.examInfo = res.data.data);
queryExaminationDetailById({ examinationId: item.testId }).then(
(res) => (state.examInfo = res.data.data)
);
}
console.log("获取面授课开课详情", item);
@@ -3737,6 +3907,8 @@ export default defineComponent({
state.EditTestId = Number(item.testId);
state.EditWorkId = String(item.homeWorkId);
state.xjkkinputV1 = item.name;
state.beforeValue = item.beforeStart; //考勤 开始前
state.afterStartValue = item.afterStart; //考勤 开始后
if (item.signFlag === 1) {
//是否允许未报名的签到:1是0否
state.xjkkradioV1 = 0;
@@ -3952,8 +4124,7 @@ export default defineComponent({
}
});
} else if (state.offcourseId) {
handle({offcourseId: state.offcourseId, type: -1,
}).then((res) => {
handle({ offcourseId: state.offcourseId, type: -1 }).then((res) => {
if (res.data.code === 200) {
message.destroy();
message.success("删除成功");
@@ -3966,39 +4137,47 @@ export default defineComponent({
if (state.copy_hs) {
state.tableLoading = true;
if (state.offcourseId && state.offcoursePlanId) {
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId})
await copyCoursePlan({ offcoursePlanId: state.offcoursePlanId });
getTableDate3();
} else if (state.offcourseId) {
await copyCourse({courseId: state.offcourseId})
await copyCourse({ courseId: state.offcourseId });
getTableDate();
}
message.success("复制成功");
rest();
}
if (state.nouse_hs) {
state.temp.auditStatus = 0
state.temp.auditStatus = 0;
message.success("停用成功");
handle({offcourseId: state.offcourseId, type: -2,})
handle({ offcourseId: state.offcourseId, type: -2 });
}
if (state.submit_hs) {
state.tableLoading = true;
message.success("提交审核成功");
handle({offcourseId: state.offcourseId, type: 1}).then(() => getTableDate());
handle({ offcourseId: state.offcourseId, type: 1 }).then(() =>
getTableDate()
);
}
if (state.back_hs) {
state.tableLoading = true;
message.success("撤回成功");
handle({offcourseId: state.offcourseId, type: 0}).then(() => getTableDate());
handle({ offcourseId: state.offcourseId, type: 0 }).then(() =>
getTableDate()
);
}
if (state.useCourse) {
state.tableLoading = true;
message.success("启用成功");
handle({offcourseId: state.offcourseId, type: 2}).then(() => getTableDate());
handle({ offcourseId: state.offcourseId, type: 2 }).then(() =>
getTableDate()
);
}
if (state.push_hs) {
state.tableLoading = true;
message.success("发布成功");
handle({offcourseId: state.offcourseId, type: 3}).then(() => getTableDate());
handle({ offcourseId: state.offcourseId, type: 3 }).then(() =>
getTableDate()
);
}
delete_exit1();
};
@@ -4018,7 +4197,7 @@ export default defineComponent({
};
const openMessage = () => {
console.log(122222)
console.log(122222);
let startTime = "";
let endTime = "";
if (state.projectTime) {
@@ -4027,7 +4206,7 @@ export default defineComponent({
);
endTime = parseInt(new Date(state.projectTime[1].$d).getTime() / 1000);
}
console.log(startTime, endTime)
console.log(startTime, endTime);
// list({
// pageNo: 1,
@@ -4647,7 +4826,9 @@ export default defineComponent({
name: record.name ? record.name : "",
url:
type == 1
? window.location.protocol + process.env.VUE_APP_COURSE_STUDY + record.offcourseId
? window.location.protocol +
process.env.VUE_APP_COURSE_STUDY +
record.offcourseId
: process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${
record.id
@@ -6537,7 +6718,9 @@ export default defineComponent({
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> tr:hover:not(.ant-table-expanded-row):not(
.ant-table-row-selected
)
> td {
background: #f6f9fd;
}
@@ -6838,7 +7021,9 @@ export default defineComponent({
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> tr:hover:not(.ant-table-expanded-row):not(
.ant-table-row-selected
)
> td {
background: #f6f9fd;
}
@@ -6963,7 +7148,9 @@ export default defineComponent({
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> tr:hover:not(.ant-table-expanded-row):not(
.ant-table-row-selected
)
> td {
background: #f6f9fd;
}

View File

@@ -214,7 +214,7 @@
</div>
<div style="margin-top: 10px">
<a-select
v-model:value="selectBandName"
v-model:value="selectBandId"
mode="multiple"
style="width: 440px; min-height: 40px"
placeholder="请选择Band"
@@ -824,15 +824,19 @@ export default defineComponent({
}
files = files.slice(0, files.length - 1);
let orgSelect = [];
let orgSelectIds = [];
let orgSelectNames = [];
if (state.orgSelect && state.orgSelect.length) {
state.orgSelect.forEach((item) => {
orgSelect.push({
label: item.label,
value: item.value,
orgSelectIds += item.value + ",";
});
state.orgSelect.forEach((item) => {
orgSelectNames += item.label + ",";
});
}
orgSelectIds = orgSelectIds.slice(0, orgSelectIds.length - 1);
orgSelectNames = orgSelectNames.slice(0, orgSelectNames.length - 1);
console.log("orgSelectIds&orgSelectNames2", orgSelectIds, orgSelectNames);
let selectJobId = "";
if (state.selectJobId.length) {
@@ -880,10 +884,12 @@ export default defineComponent({
attach: state.attach,
outline: valueHtml.value,
// organizationIds: orgSelect, //todo 传的不对
organizationIds: orgSelectIds,
organizationNames: orgSelectNames,
jobTypeIds: selectJobId,
bandIds: selectBandId,
sourceBelongId: state.sourceBelongId,
sourceBelongFullName: state.sourceBelongName
sourceBelongFullName: state.sourceBelongName,
};
console.log("postData", postData);
const checkList = [
@@ -991,6 +997,33 @@ export default defineComponent({
}
console.log(str);
state.attach = str;
if (item.jobTypeIds) {
state.selectJobId = item.jobTypeIds.split(",");
}
if (item.bandIds) {
state.selectBandId = item.bandIds.split(",");
}
console.log("state.selectBandId", state.selectBandId);
state.sourceBelongId = item.sourceBelongId;
state.sourceBelongName = item.sourceBelongFullName;
if (item.organizationIds && item.organizationNames) {
let orgSelectIds = item.organizationIds;
let orgSelectNames = item.organizationNames;
orgSelectIds = orgSelectIds.split(",");
orgSelectNames = orgSelectNames.split(",");
console.log(
"orgSelectIds&orgSelectNames",
orgSelectIds,
orgSelectNames
);
let arrObj = [];
arrObj = orgSelectIds.map((item, index) => {
return { value: item, lebel: orgSelectNames[index] };
});
console.log("arrObj-------------", arrObj);
state.orgSelect = arrObj;
}
};
const handleTagChange = () => {