mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-11 03:46:47 +08:00
修改状态
This commit is contained in:
@@ -161,8 +161,14 @@
|
||||
</div>
|
||||
|
||||
<el-dropdown trigger="click">
|
||||
<div class="goclass" @click="toFinish(el, item.stageName, item.id)" :style="{ background: el.statusName !== '已结束' &&(el.statusName || data.unlockMode === 1) ? '#2478ff' : '#999' }">
|
||||
<!-- <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> -->
|
||||
<div v-if="data.unlockMode === 1" class="goclass" @click="toFinish(el, item.stageName, item.id, item.studyModel)" :style="{ background: (el.statusName !== '已结束' && (el.statusName || item.studyModel==0)) ? '#2478ff' : '#999' }">
|
||||
{{ el.statusName || (item.studyModel==0 ? TASK_TYPES.toName[el.type] : '未解锁')}}
|
||||
</div>
|
||||
<div v-else class="goclass" @click="toFinish(el, item.stageName, item.id, item.studyModel)" :style="{ background: (el.statusName !== '已结束' && el.statusName) ? '#2478ff' : '#999' }">
|
||||
{{ el.statusName || '未解锁' }}
|
||||
</div>
|
||||
<!-- <template #dropdown v-if="el.type===2 && el.targetId?.split(',')?.length > 1">
|
||||
<el-dropdown-menu>
|
||||
@@ -245,7 +251,7 @@ const {
|
||||
const router = useRouter();
|
||||
const { commit, dispatch, state } = useStore();
|
||||
const data = computed(() => state.projectInfo);
|
||||
useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
|
||||
useRequest(PROJECT_PROCESS, { projectId: projectId, type:1 }, (e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
@@ -445,10 +451,14 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
||||
return isEnd;
|
||||
}
|
||||
|
||||
function toFinish(d, sName, chapterOrStageId) {
|
||||
if (data.value.unlockMode !== 1 && !d.statusName) {
|
||||
ElMessage.warning("当前未解锁");
|
||||
return;
|
||||
function toFinish(d, sName, chapterOrStageId,studyModel) {
|
||||
if (studyModel != 0 && !d.statusName) {
|
||||
ElMessage.warning("当前未解锁")
|
||||
return
|
||||
}
|
||||
if(d.statusName == '未解锁'|| d.statusName == ''||!d.hasOwnProperty('statusName')){
|
||||
ElMessage.warning("当前未解锁")
|
||||
return
|
||||
}
|
||||
if (d.type === 2) {
|
||||
if(!d.targetId){
|
||||
|
||||
Reference in New Issue
Block a user