始终选中一个关卡

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", href: "/leveladd",
}, },
{ {
name: "关卡", name: "管理",
}, },
]; ];
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -61,3 +61,21 @@ function validateProName() {
} }
</script> </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" v-model:value="id"
style="width: 100%" style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="自动带出 可修改" placeholder="请选择归属组织"
allow-clear allow-clear
:tree-data="options" :tree-data="options"
:fieldNames="{ :fieldNames="{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1740,6 +1740,7 @@ export default {
state.searchdate = null; state.searchdate = null;
state.startTime = null; state.startTime = null;
state.endTime = null; state.endTime = null;
state.createUser=null;
getLearnPath(); getLearnPath();
}; };

View File

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