始终选中一个关卡

This commit is contained in:
zhangyc
2022-12-12 18:16:12 +08:00
parent 8b14710d9d
commit adb22f6d0e
26 changed files with 252 additions and 52 deletions

View File

@@ -70,7 +70,7 @@ export default {
href: "/leveladd",
},
{
name: "关卡",
name: "管理",
},
];
}

View File

@@ -203,6 +203,7 @@
</div> -->
</div>
</div>
<!--
<div class="main_item">
<div class="signbox">
<span style="margin-right: 3px">完成标准设置</span>
@@ -211,14 +212,15 @@
<a-radio-group v-model:value="radioV1">
<a-radio v-model:checked="checked" :value="1" @click="cloradio1"
>仅签到
</a-radio>
</a-radio>-->
<!-- <a-radio v-model:checked="checked" :value="2" @click="cloradio1"
>签到签退全部完成
</a-radio
> -->
>
</a-radio-group>
</div>
</div>
</div>-->
<div class="main_item" style="height:40px;">
<div class="signbox">
<span style="margin-right: 3px"></span>
@@ -383,6 +385,10 @@ export default {
};
const updateTask = async (res) => {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
await RouterEditTask({
chapterId: props.isactive,
courseId: res.data.data.activityId,

View File

@@ -275,6 +275,10 @@ export default {
};
const updateTask = () => {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
for (let i = 0; i < state.apiTaskList.length; i++) {
RouterEditTask({
chapterId: props.isactive,

View File

@@ -191,6 +191,10 @@ export default {
}
};
const updateTask = async (res) => {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
if (props.isLevel == 1) {
await RouterEditTask({
chapterId: props.isactive,

View File

@@ -177,6 +177,10 @@ export default {
};
//向关卡或阶段渲染
const updateTask = async (value) => {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
if (props.isLevel == 1) {
await RouterEditTask({
chapterId: props.isactive,

View File

@@ -27,7 +27,7 @@
alt=""
/>
</div>
<span style="margin-right: 3px">课程任务名称</span>
<span style="margin-right: 3px">任务名称</span>
</div>
<div class="btnbox">
<a-input
@@ -702,6 +702,10 @@ export default {
// 新增编辑或新增项目任务
const updateTask = async (res) => {
console.log("props.isLevel=====", props.isLevel);
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
if (props.isLevel == 1) {
let editObj1 = {
chapterId: props.isactive,

View File

@@ -394,6 +394,10 @@ export default {
state.EditWorkId = res.data.data.workId;
} else {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
let editObj1 = {
chapterId: props.isactive,
courseId: res.data.data.workId,

View File

@@ -163,6 +163,10 @@ export default {
l_data_id.push(Number(state.assessmentId))
console.log("state.assessment",state.assessment,state.assessmentId);
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
IsExistence({
chapterId: Number(props.isactive),
courseTaskId:l_data_id,

View File

@@ -38,21 +38,26 @@
/>
</div>
</div>
<div class="main_item2">
<div class="main_item" style="margin-top: -10px">
<div class="signbox">
<span style="margin-right: 3px">直播说明</span>
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<div class="textarea">
<a-textarea
v-model:value="textV1"
placeholder="请输入直播说明"
allow-clear
show-count
:maxlength="200"
:rows="6"
<span style="margin-right: 3px">直播链接</span>
</div>
<div class="btnbox">
<a-input
v-model:value="inputV4"
style="width: 400px; height: 40px; border-radius: 8px;"
placeholder="请输入直播链接"
:maxlength="100"
/>
</div>
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
@@ -148,19 +153,28 @@
</div>
</div>
</div>
<div class="main_item" style="margin-top: -10px">
<div class="main_item2">
<div class="signbox">
<span style="margin-right: 3px">直播链接</span>
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<div class="btnbox">
<a-input
v-model:value="inputV4"
style="width: 400px; height: 40px; border-radius: 8px;"
placeholder="请输入直播链接"
:maxlength="100"
<span style="margin-right: 3px">直播公告</span>
</div>
<div class="textarea">
<a-textarea
v-model:value="liveNotice"
placeholder="请输入直播公告"
allow-clear
show-count
:maxlength="200"
:rows="6"
/>
</div>
</div>
<div class="main_item">
<div class="signbox">
<span style="margin-right: 3px">回放设置</span>
@@ -184,6 +198,8 @@
</div>
</div>
</div>
<div class="main_item2">
<div class="signbox">
<span style="margin-right: 3px">直播说明</span>
@@ -191,7 +207,7 @@
<div class="textarea">
<a-textarea
v-model:value="textV1"
placeholder="请输入考试说明"
placeholder="请输入直播说明"
allow-clear
show-count
:maxlength="200"
@@ -270,17 +286,18 @@
</div> -->
</div>
</div>
<!--
<div class="main_item">
<div class="signbox">
<span style="margin-right: 3px">完成标准设置</span>
</div>
<div class="btnbox">
<a-radio-group v-model:value="radioV1">
<a-radio :value="1" @click="cloradio1">仅签到</a-radio>
<a-radio :value="1" @click="cloradio1">仅签到</a-radio>-->
<!-- <a-radio :value="2" @click="cloradio1"
>签到签退全部完成</a-radio
> -->
<!--
</a-radio-group>
</div>
</div>
@@ -297,6 +314,8 @@
</a-checkbox>
</div>
</div>
-->
<div class="main_item2">
<div class="signbox">
<span style="margin-right: 3px">评估</span>
@@ -454,6 +473,7 @@ export default {
switchC1: "",
checkedC1: false,
checkedC2: false,
liveNotice :null,
assessmentId: null,
obj: {}, //要传的obj数据
assessment: [], //评估信息
@@ -483,6 +503,7 @@ export default {
state.needEval = false;
state.switchC2 = false;
state.assessmentId = null;
state.liveNotice =null;
ctx.emit("changeData", false);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
@@ -532,7 +553,7 @@ export default {
state.inputV8 = res.data.data.signOutTime;
state.textV1 = res.data.data.liveExplain;
state.radioV1 = Number(res.data.data.standardSettings);
//state.= res.data.data
state.liveNotice = res.data.data.liveNotice;
state.assessmentId = res.data.data.assessmentId;
state.imageUrl = res.data.data.liveCover;
state.switchC1 = res.data.data.livePlayback === "1" ? true : false;
@@ -577,6 +598,10 @@ export default {
};
const updateTask = (res) => {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
RouterEditTask({
chapterId: props.isactive,
courseId: res.data.data.liveId,
@@ -641,6 +666,11 @@ export default {
message.destroy();
return message.warning("请输入直播名称");
}
if (!state.inputV4) {
message.destroy();
return message.warning("请输入直播链接");
}
if (!state.time) {
message.destroy();
return message.warning("请输入直播时间");
@@ -657,6 +687,10 @@ export default {
message.destroy();
return message.warning("请上传封面");
}
if (!state.liveNotice) {
message.destroy();
return message.warning("请输入直播公告");
}
const regular = /^[+]{0,1}(\d+)$/;
if (!regular.test(state.inputV2)) {
message.destroy();
@@ -682,6 +716,7 @@ export default {
liveEndTime: endTime,
liveStartTime: startTime,
liveExplain: state.textV1,
liveNotice:state.liveNotice,
liveFlag: "",
liveId: props.edit ? Number(props.EditLiveId) : 0,
liveLink: state.inputV4,

View File

@@ -36,7 +36,7 @@
/>
<div class="inp_num" style="position: absolute; right: 7px">
<span style="color: #c7cbd2">
{{ inputV1 ? inputV1.length : 0 }}/20
</span>
</div>
</div>
@@ -464,6 +464,10 @@ export default {
const updateTask = () => {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
console.log("我是要便利的数据2", state.addOnlineList);
let l_data = state.addOnlineList;
let l_data_id = [];

View File

@@ -551,6 +551,10 @@ export default {
const updateTask = async (res) => {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
await RouterEditTask({
chapterId: props.isactive,
courseId: res.key,

View File

@@ -182,6 +182,10 @@ export default {
};
const updateTask = async (res) => {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
RouterEditTask({
chapterId: props.isactive,
courseId: res.data.data.linkId,

View File

@@ -570,6 +570,10 @@ export default {
closeDrawer();
} else {
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
let editObj1 = {
chapterId: props.isactive,
duration: res.data.data.examinationDuration,

View File

@@ -105,7 +105,7 @@
<iframe
id="iframe"
style="width: 100%; height: 100%"
:src="iframeUrl + '/exam/tests'"
:src="iframeUrl + '/exam/papers'"
name="myframe"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>

View File

@@ -61,3 +61,21 @@ function validateProName() {
}
</script>
<style lang="scss">
.ant-input-affix-wrapper {
position: relative;
display: inline-block;
width: 100%;
min-width: 0;
padding: 0px 17px;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
line-height: 1.5715;
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 8px;
transition: all 0.3s;
display: inline-flex;
}
</style>

View File

@@ -8,7 +8,7 @@
v-model:value="id"
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="自动带出 可修改"
placeholder="请选择归属组织"
allow-clear
:tree-data="options"
:fieldNames="{

View File

@@ -306,6 +306,10 @@ export default {
const updateToTask = (res) => {
console.log("props.isLevel=====", props.isLevel);
if (props.isLevel == 1) {
if(!props.isactive){
message.destroy();
return message.warning("请先选中关卡");
}
RouterEditTask({
chapterId: props.isactive,
courseId: res.data.data.voteId,

View File

@@ -2010,18 +2010,20 @@
/>
</div>
</div>
<!--
<div class="cstm_items">
<div class="signbox">
<span style="margin-right: 3px">完成规则</span>
</div>
<div class="b_input">
<!--
<a-checkbox
v-model:checked="regisCom"
@click="regisCom = !regisCom"
>
<span style="color: #6d7584">报名即完成</span>
</a-checkbox> -->
<!--
<a-checkbox v-model:checked="signCom" @click="signCom = !signCom">
<span style="color: #6d7584">签到即完成</span>
</a-checkbox>
@@ -2032,7 +2034,7 @@
<span style="color: #6d7584">请假算完成</span>
</a-checkbox>
</div>
</div>
</div> -->
<div class="cstm_items items_fj">
<div class="signbox">
<span style="margin-right: 3px">附件</span>
@@ -2144,6 +2146,9 @@
</div>
</div>
</div>
</div>
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
<a-spin :spinning="addLoading" tip="" />
</div>
</a-modal>
<!--新建开课页面 -->
@@ -3591,7 +3596,7 @@ export default defineComponent({
imageUrl: "",
imgList: [],
validate: true,
validate:false,
pageSize2: 10,
currentPage2: 0,
@@ -4540,9 +4545,10 @@ export default defineComponent({
message.destroy();
return message.warning("请输入必填项");
}
console.log("state.validate",state.validate);
if (!state.validate) {
message.destroy();
return message.warning("路径图名称重复");
return message.warning("面授课名称已存在");
}
console.log(
"state.bs_hs && state.valueE1 == 2",
@@ -4659,7 +4665,7 @@ export default defineComponent({
}
if (!state.validate) {
message.destroy();
return message.warning("路径图名称重复");
return message.warning("面授课名称重复");
}
edit(postData).then((res) => {
if (res.data.code === 200) {
@@ -4713,6 +4719,7 @@ export default defineComponent({
};
//保存开课
const handleSureStu = () => {
state.addLoading = true;
let startTime,
endTime = 0;
if (state.xjkkinputV3) {
@@ -5772,7 +5779,7 @@ export default defineComponent({
}
.aeLoading {
z-index: 10000;
z-index: 100000;
}
.courseManage {

View File

@@ -81,7 +81,7 @@
</div>
</div>
</div>
<div v-if="detail.meaning" class="mbl_items">
<div v-if="detail.meaning" class="mbl_items2">
<div class="item_nam">
<span style="margin-right: 14px">课程价值</span>
</div>

View File

@@ -378,6 +378,9 @@
</div>
</div>
</div>
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
<a-spin :spinning="addLoading" tip="" />
</div>
</a-modal>
</template>
<script>
@@ -794,6 +797,7 @@ export default defineComponent({
postData.targetUser,
postData.categoryId,
postData.teacherId,
postData.picUrl,
];
if (!checkVal(checkList)) {
message.destroy();
@@ -803,9 +807,8 @@ export default defineComponent({
}
edit(postData).then((res) => {
if (res.data.code === 200) {
state.addLoading = false;
if (res.data.code === 200) {
state.statusTingQi = 1;
if (param === "review") {
//新建时点击审核按钮
@@ -815,6 +818,13 @@ export default defineComponent({
message.success("保存成功");
visibleClose();
}
}else if(res.data.code === -1){
message.destroy();
message.success("无此操作权限");
visibleClose();
}
});
};
@@ -903,6 +913,9 @@ export default defineComponent({
message.success("已提交审核");
state.addLoading = false;
visibleClose();
}else if(res.data.code === -1){
message.destroy();
message.success("无此操作权限");
}
});
};
@@ -1338,5 +1351,8 @@ export default defineComponent({
margin-right: 10px;
border-radius: 8px;
}
.aeLoading {
z-index: 10000;
}
}
</style>

View File

@@ -153,6 +153,8 @@ export default {
dataIndex: "createName",
key: "createName",
align: "center",
width:"20%",
ellipsis: true,
},
{
@@ -160,6 +162,7 @@ export default {
dataIndex: "status",
key: "status",
align: "center",
width:"10%",
customRender: ({ record: { status } }) => (
<div>{{ 2: "审核通过", "-2": "审核拒绝" }[status + ""]}</div>
),
@@ -170,7 +173,8 @@ export default {
dataIndex: "createTime",
key: "createTime",
align: "center",
width: 220,
width:"20%",
ellipsis: true,
},
{
@@ -178,6 +182,8 @@ export default {
dataIndex: "description",
key: "description",
align: "center",
width:"30%",
ellipsis: true,
},
],
columns1: [
@@ -192,36 +198,47 @@ export default {
dataIndex: "name",
key: "name",
align: "center",
width:"20%",
ellipsis: true,
},
{
title: "类型",
dataIndex: "type",
key: "type",
align: "center",
width:"10%",
ellipsis: true,
},
{
title: "内容分类",
dataIndex: "content",
key: "content",
align: "center"
align: "center",
width:"10%",
ellipsis: true,
},
{
title: "审核状态",
dataIndex: "status",
key: "status",
align: "center",
width:"10%",
},
{
title: "创建人",
dataIndex: "creater",
key: "creater",
align: "center",
width:"10%",
ellipsis: true,
},
{
title: "审核时间",
dataIndex: "time",
key: "time",
align: "center",
width:"10%",
ellipsis: true,
customRender: (time) => {
return <div style="color:#387DF7">{time.record.time}</div>;
},
@@ -231,11 +248,14 @@ export default {
dataIndex: "msg",
key: "msg",
align: "center",
ellipsis: true,
width:"20%",
},
{
title: "操作",
dataIndex: "opt",
key: "opt",
width:"10%",
align: "center",
customRender: (value) => {
return (

View File

@@ -221,24 +221,30 @@ export default {
dataIndex: "name",
key: "name",
align: "center",
ellipsis: true,
width:"20%",
},
{
title: "类型",
dataIndex: "type",
key: "type",
align: "center",
width:"10%",
},
{
title: "内容分类",
dataIndex: "content",
key: "content",
align: "center"
align: "center",
ellipsis: true,
width:"10%",
},
{
title: "状态",
dataIndex: "status",
key: "status",
align: "center",
width:"10%",
},
// {
// title: "转审",
@@ -251,12 +257,16 @@ export default {
dataIndex: "creater",
key: "creater",
align: "center",
ellipsis: true,
width:"15%",
},
{
title: "创建时间",
dataIndex: "time",
key: "time",
align: "center",
ellipsis: true,
width:"15%",
},
{
@@ -264,6 +274,7 @@ export default {
dataIndex: "opt",
key: "opt",
align: "center",
width:"20%",
customRender: (value) => {
return (
<div>

View File

@@ -188,6 +188,8 @@ export default {
dataIndex: "name",
key: "name",
align: "center",
ellipsis: true,
width:"20%",
},
{
@@ -195,7 +197,8 @@ export default {
dataIndex: "topName",
key: "topName",
align: "center",
width: "10%",
ellipsis: true,
width:"20%",
customRender: ({ record: { gaName, faName, name } }) => (
<div>
{faName
@@ -211,12 +214,16 @@ export default {
dataIndex: "manager",
key: "manager",
align: "center",
ellipsis: true,
width:"10%",
},
{
title: "审核状态",
dataIndex: "status",
key: "status",
align: "center",
ellipsis: true,
width:"10%",
customRender: ({ record: { status } }) => (
<div>{{ '2': "审核通过", "-5": "未通过" }[status + ""] || '审核通过'}</div>
),
@@ -226,18 +233,25 @@ export default {
dataIndex: "createName",
key: "createName",
align: "center",
ellipsis: true,
width:"10%",
},
{
title: "审核时间",
dataIndex: "updateTime",
key: "updateTime",
align: "center",
ellipsis: true,
width:"10%",
},
{
title: "审核说明",
dataIndex: "description",
key: "description",
align: "center",
ellipsis: true,
width:"20%",
customRender: ({ record: { auditList, description } }) => (
<div>
{auditList.length !== 0
@@ -256,6 +270,8 @@ export default {
dataIndex: "opt",
key: "opt",
align: "center",
width:"10%",
customRender: (value) => {
return (
<div>

View File

@@ -148,6 +148,8 @@ export default {
dataIndex: "name",
key: "name",
align: "center",
ellipsis: true,
width:"20%",
},
// todo 根项目保存
// {
@@ -162,12 +164,16 @@ export default {
dataIndex: "manager",
key: "manager",
align: "center",
ellipsis: true,
width:"10%",
},
{
title: "审核状态",
dataIndex: "status",
key: "status",
align: "center",
ellipsis: true,
width:"10%",
customRender: () => <div>待审核</div>,
},
{
@@ -175,12 +181,16 @@ export default {
dataIndex: "createName",
key: "createName",
align: "center",
ellipsis: true,
width:"10%",
},
{
title: "创建时间",
dataIndex: "processTime",
key: "processTime",
align: "center",
ellipsis: true,
width:"10%",
},
{
@@ -188,6 +198,8 @@ export default {
dataIndex: "opt",
key: "opt",
align: "center",
ellipsis: true,
width:"20%",
customRender: (value) => {
return (
<div>

View File

@@ -277,7 +277,7 @@
/>
</div>
<div class="inname">路径图名称</div>
<div class="in">
<div class="in" >
<!-- <a-input-->
<!-- v-model:value="pathName"-->
<!-- maxlength="20"-->
@@ -1740,6 +1740,7 @@ export default {
state.searchdate = null;
state.startTime = null;
state.endTime = null;
state.createUser=null;
getLearnPath();
};

View File

@@ -4,9 +4,9 @@
<div class="left clearfix">
<div class="leftmain">
<div class="tit" style="margin-left: 18px">关卡</div>
<div class="btn btn3" style="margin-left: 19px">
<div class="btn btn3" @click="showModal()" style="margin-left: 19px">
<div class="search"></div>
<div class="btnText" @click="showModal()">添加关卡</div>
<div class="btnText">添加关卡</div>
</div>
<div class="maincon" style="background-color: #fff">
<!-- <div
@@ -1248,6 +1248,7 @@ export default {
console.log("修改成功", res);
message.success("修改成功");
state.addLoading = false;
localStorage.setItem("chapterId", res.data.data.chapterId);
getDetail();
closeModal();
})
@@ -1276,6 +1277,7 @@ export default {
//state.currentPage = 1;
// getLearnPath();
state.addLoading = false;
localStorage.setItem("chapterId", res.data.data.chapterId);
getDetail();
closeModal();
})
@@ -1303,10 +1305,22 @@ export default {
api
.deleteChapter(obj)
.then((res) => {
if(res.data.code==200){
console.log("删除关卡成功", res);
message.destroy();
message.success("删除关卡成功");
let chapter = localStorage.getItem("chapterId")
if(state.deleteChapterId == chapter){
localStorage.removeItem("chapterId")
}
closeDeleteChapter();
getDetail();
}else if(res.data.code==-1){
message.destroy();
message.success("至少保留一个关卡");
closeDeleteChapter();
}
})
.catch((err) => {
console.log("删除关卡失败", err);
@@ -1448,7 +1462,7 @@ export default {
? JSON.parse(localStorage.getItem("chapterId"))
: null;
console.log("chapter", chapter);
if (chapter) {
if (chapter >0) {
dataAssignment(chapter); //用哪个的任务表
state.isactive = chapter; //哪个亮
} else {