mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 17:36:45 +08:00
feat:修改面授课开课去上课样式
This commit is contained in:
@@ -142,17 +142,38 @@
|
||||
:style="{ background: el.statusName !== '已结束' && (el.statusName || data.unlockMode === 1) ? '#2478ff' : '#999' }" @click="toFinish(el)">
|
||||
{{el.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[el.type] : "未解锁")}}
|
||||
</div>
|
||||
<template #dropdown v-if="el.type===2 && el.targetId?.split(',')?.length > 1">
|
||||
<!-- <template #dropdown v-if="el.type===2 && el.targetId?.split(',')?.length > 1">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-for="(name,key) in el.targetName?.split(',')" :key="key" @click="toOffcoursePlanPage(el.targetId?.split(',')[key])">{{ name }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 开课列表弹框 -->
|
||||
<el-dialog title="" top="120px" v-model="openCourseVisible" :show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;min-height: 320px;padding:0;border-radius: 4px;"
|
||||
width="80%">
|
||||
<div style="display: flex;justify-content:space-between;align-items:center;margin-bottom: 22px;width: 100%;">
|
||||
<div style="width:88px;color:#333333;font-size: 16px;font-weight: 600;">开课列表</div>
|
||||
<div
|
||||
@click="openCourseVisible = false"
|
||||
style="font-size: 12px;cursor:pointer;">X</div>
|
||||
</div>
|
||||
<div style="width: 100%;min-height:210px;margin-top: 12px;">
|
||||
<div
|
||||
v-for="item,key in openCourseList"
|
||||
style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 12px;background: rgb(247, 251, 253);height: 40px;padding: 5px;border-radius: 5px;">
|
||||
<div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width: 200px;">{{ item }}</div>
|
||||
<div
|
||||
@click="toOffcoursePlanPage(openCourseIdList[key])"
|
||||
style="width:60px;height:30px;text-align:center;line-height:30px;background:#0078fc;border-radius:5px;color:#fff;cursor: pointer;">去上课</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -307,6 +328,9 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
||||
}
|
||||
return isEnd;
|
||||
}
|
||||
const openCourseVisible = ref(false);
|
||||
const openCourseList = ref([]);
|
||||
const openCourseIdList = ref([]);
|
||||
function toFinish(d) {
|
||||
if (data.value.unlockMode !== 1 && !d.statusName) {
|
||||
ElMessage.warning("当前未解锁");
|
||||
@@ -317,6 +341,9 @@ function toFinish(d) {
|
||||
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||
}
|
||||
if(d.targetId.split(',').length>1){
|
||||
openCourseList.value = d.targetName?.split(',');
|
||||
openCourseIdList.value = d.targetId?.split(',');
|
||||
openCourseVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -512,6 +539,12 @@ function whiteTypes(type) {
|
||||
|
||||
<style lang="scss">
|
||||
.pathmap {
|
||||
.el-dialog__body{
|
||||
width: 80%;
|
||||
}
|
||||
.el-dialog__header{
|
||||
display: none;
|
||||
}
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -164,11 +164,11 @@
|
||||
<div class="goclass" @click="toFinish(el, item.stageName, item.id)" :style="{ background: el.statusName !== '已结束' &&(el.statusName || data.unlockMode === 1) ? '#2478ff' : '#999' }">
|
||||
{{el.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[el.type] : "未解锁")}}
|
||||
</div>
|
||||
<template #dropdown v-if="el.type===2 && el.targetId?.split(',')?.length > 1">
|
||||
<!-- <template #dropdown v-if="el.type===2 && el.targetId?.split(',')?.length > 1">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-for="(name,key) in el.targetName?.split(',')" :key="key" @click="toOffcoursePlanPage(el.targetId?.split(',')[key])">{{ name }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-dropdown>
|
||||
|
||||
|
||||
@@ -195,6 +195,27 @@
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 开课列表弹框 -->
|
||||
<el-dialog title="" top="120px" v-model="openCourseVisible" :show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;min-height: 320px;padding:0;border-radius: 4px;"
|
||||
width="80%">
|
||||
<div style="display: flex;justify-content:space-between;align-items:center;margin-bottom: 22px;width: 100%;">
|
||||
<div style="width:88px;color:#333333;font-size: 16px;font-weight: 600;">开课列表</div>
|
||||
<div
|
||||
@click="openCourseVisible = false"
|
||||
style="font-size: 12px;cursor:pointer;">X</div>
|
||||
</div>
|
||||
<div style="width: 100%;min-height:210px;margin-top: 12px;">
|
||||
<div
|
||||
v-for="item,key in openCourseList"
|
||||
style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 12px;background: rgb(247, 251, 253);height: 40px;padding: 5px;border-radius: 5px;">
|
||||
<div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width: 200px;">{{ item }}</div>
|
||||
<div
|
||||
@click="toOffcoursePlanPage(openCourseIdList[key])"
|
||||
style="width:60px;height:30px;text-align:center;line-height:30px;background:#0078fc;border-radius:5px;color:#fff;cursor: pointer;">去上课</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -305,6 +326,9 @@ function getTaskStatus(d) {
|
||||
return "进行中";
|
||||
}
|
||||
console.log("datadata", data);
|
||||
const openCourseVisible = ref(false);
|
||||
const openCourseList = ref([]);
|
||||
const openCourseIdList = ref([]);
|
||||
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const activeName = ref("first");
|
||||
@@ -431,6 +455,9 @@ function toFinish(d, sName, chapterOrStageId) {
|
||||
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||
}
|
||||
if(d.targetId.split(',').length>1){
|
||||
openCourseList.value = d.targetName?.split(',');
|
||||
openCourseIdList.value = d.targetId?.split(',');
|
||||
openCourseVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -624,6 +651,12 @@ const queryAllStatus = (data) => {
|
||||
|
||||
<style lang="scss">
|
||||
.projectdetails {
|
||||
.el-dialog__body{
|
||||
width: 80%;
|
||||
}
|
||||
.el-dialog__header{
|
||||
display: none;
|
||||
}
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user