mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
--demand 面授课
This commit is contained in:
@@ -35,7 +35,7 @@ export const TASK_TYPES = {
|
|||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
1: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + courseId), //在线
|
1: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + courseId), //在线
|
||||||
2: ({courseId}) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
|
2: ({targetId}) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${targetId}`, '_top'),
|
||||||
3: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL + courseId), //案例
|
3: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL + courseId), //案例
|
||||||
4: "/homeworkpage",
|
4: "/homeworkpage",
|
||||||
5: ({examType}) => examType === 2 ? '/externalexamination' : (window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL), //考试
|
5: ({examType}) => examType === 2 ? '/externalexamination' : (window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL), //考试
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
class="img2"
|
class="img2"
|
||||||
style="margin-right: 11px; cursor: pointer"
|
style="margin-right: 11px; cursor: pointer"
|
||||||
src="../../assets/image/return.png"
|
src="../../assets/image/return.png"
|
||||||
/>返回</el-button
|
/>返回
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,19 +61,10 @@
|
|||||||
<botton
|
<botton
|
||||||
class="btn"
|
class="btn"
|
||||||
style="margin-right: 20px"
|
style="margin-right: 20px"
|
||||||
:style="{
|
:style="{ background: isAllowSign && !data.signFlag ?'rgb(57, 146, 249)' : '#999' }"
|
||||||
background: isAllowSign
|
|
||||||
? data.signFlag
|
|
||||||
? '#999'
|
|
||||||
: 'rgb(57, 146, 249)'
|
|
||||||
: '#999',
|
|
||||||
}"
|
|
||||||
@click="signClick"
|
@click="signClick"
|
||||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||||
</botton>
|
</botton>
|
||||||
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
|
|
||||||
评估
|
|
||||||
</botton> -->
|
|
||||||
<botton
|
<botton
|
||||||
v-if="data.planDto?.evalFlag !== 0"
|
v-if="data.planDto?.evalFlag !== 0"
|
||||||
:style="{
|
:style="{
|
||||||
@@ -298,34 +290,32 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
|
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="follow">+ 关注</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 详细信息 -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, toRefs, watch, onUnmounted, ref } from "vue";
|
import {computed, onBeforeMount, onUnmounted, ref} from "vue";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import {request, useRequest} from "@/api/request";
|
import {request, useRequest} from "@/api/request";
|
||||||
import {
|
import {STU_OFFCOURSE_DETAIL, TASK_OFFCOURSE_NOTASK_SIGN,} from "@/api/api";
|
||||||
STU_OFFCOURSE_DETAIL,
|
|
||||||
TASK_OFFCOURSE_NOTASK_SIGN,
|
|
||||||
TASK_OFFCOURSE_SIGN,
|
|
||||||
TASK_BROADCAST_SIGN,
|
|
||||||
} from "@/api/api";
|
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {useUserInfo} from "@/api/utils";
|
import {useUserInfo} from "@/api/utils";
|
||||||
import { ElMessage, messageConfig } from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import isBetween from "dayjs/plugin/isBetween";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
onBeforeMount(() => dayjs.extend(isBetween));
|
||||||
|
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const {
|
const {
|
||||||
query: { courseId, type, id: taskId },
|
query: { courseId },
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
|
|
||||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
|
const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
|
||||||
@@ -333,19 +323,15 @@ const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
|
|||||||
usePermission: true,
|
usePermission: true,
|
||||||
});
|
});
|
||||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||||
|
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
|
||||||
|
|
||||||
const state = reactive({
|
|
||||||
activeName: "first",
|
|
||||||
enclosure: "",
|
|
||||||
isAllowSign: false,
|
|
||||||
});
|
|
||||||
const { activeName, enclosure, isAllowSign } = toRefs(state);
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log("附件", tab, event);
|
console.log("附件", tab, event);
|
||||||
};
|
};
|
||||||
|
const activeName = ref("first");
|
||||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||||
const download = (url) => {
|
const download = (url) => {
|
||||||
console.log(fielPath.value+url)
|
console.log(fielPath.value + url);
|
||||||
window.open(fielPath.value + url);
|
window.open(fielPath.value + url);
|
||||||
};
|
};
|
||||||
const downloads = (url) => {
|
const downloads = (url) => {
|
||||||
@@ -353,120 +339,35 @@ const downloads = (url) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function formateArr(strs) {
|
function formateArr(strs) {
|
||||||
let newArr = [];
|
let newArr;
|
||||||
try {
|
try {
|
||||||
newArr = JSON.parse(strs);
|
newArr = JSON.parse(strs);
|
||||||
} catch {
|
} catch {
|
||||||
newArr = strs?.split(",");
|
newArr = strs?.split(",");
|
||||||
}
|
}
|
||||||
console.log("112233", newArr);
|
|
||||||
return newArr;
|
return newArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
let timer = null;
|
|
||||||
//判断能否签到
|
|
||||||
function isSignClick() {
|
|
||||||
timer = setInterval(() => {
|
|
||||||
let beginTime = new Date(data.value.planDto?.beginTime).getTime();
|
|
||||||
let endTime =
|
|
||||||
!data.value.planDto?.afterStart || data.value.afterStart == "0"
|
|
||||||
? new Date(data.value.planDto?.endTime).getTime()
|
|
||||||
: new Date(data.value.planDto?.beginTime).getTime();
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (
|
|
||||||
data.value.planDto?.beforeStart &&
|
|
||||||
data.value.planDto?.afterStart &&
|
|
||||||
data.value.beforeStart !== "0" &&
|
|
||||||
data.value.afterStart !== "0"
|
|
||||||
) {
|
|
||||||
//有开始前有开始后
|
|
||||||
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
|
|
||||||
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
|
|
||||||
console.log("1111");
|
|
||||||
} else if (
|
|
||||||
data.value.planDto?.beforeStart &&
|
|
||||||
!data.value.planDto?.afterStart &&
|
|
||||||
data.value.beforeStart !== "0" &&
|
|
||||||
data.value.afterStart == "0"
|
|
||||||
) {
|
|
||||||
//只有开始前无开始后
|
|
||||||
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
|
|
||||||
console.log("11112222");
|
|
||||||
} else if (
|
|
||||||
!data.value.planDto?.beforeStart &&
|
|
||||||
data.value.planDto?.afterStart &&
|
|
||||||
data.value.beforeStart == "0" &&
|
|
||||||
data.value.afterStart !== "0"
|
|
||||||
) {
|
|
||||||
//无开始前有开始后
|
|
||||||
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
|
|
||||||
console.log("1111333");
|
|
||||||
}
|
|
||||||
if (nowTime < endTime && nowTime > beginTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
// console.log(
|
|
||||||
// "isAllowSign",
|
|
||||||
// state.isAllowSign,
|
|
||||||
// nowTime,
|
|
||||||
// endTime,
|
|
||||||
// beginTime,
|
|
||||||
// nowTime < endTime,
|
|
||||||
// nowTime > beginTime
|
|
||||||
// );
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
isSignClick();
|
|
||||||
|
|
||||||
//签到
|
//签到
|
||||||
const signClick = () => {
|
const signClick = () => {
|
||||||
if (data.value.signFlag) {
|
if (data.value.signFlag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// console.log(
|
if (!isAllowSign.value) {
|
||||||
// "data.signFlag",
|
|
||||||
// data.value.signFlag,
|
|
||||||
// state.isAllowSign,
|
|
||||||
// !state.isAllowSign
|
|
||||||
// );
|
|
||||||
//if (data.value.planDto.beginTime) {
|
|
||||||
// let date1 = new Date(data.value.planDto.beginTime).getTime()
|
|
||||||
// let date2 = new Date().getTime()
|
|
||||||
// if (date1 > date2) {
|
|
||||||
// ElMessage.info("未到开始时间,请耐心等待!");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
if (!state.isAllowSign) {
|
|
||||||
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
|
||||||
ElMessage.warning("未在允许签到时间范围内");
|
ElMessage.warning("未在允许签到时间范围内");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.value.signFlag = 1;
|
data.value.signFlag = 1;
|
||||||
ElMessage.warning("签到成功");
|
ElMessage.warning("签到成功");
|
||||||
let taskId = courseId
|
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId, taskId: courseId, type: 3 });
|
||||||
console.log("taskId:" + taskId)
|
|
||||||
console.log("courseId:" + courseId)
|
|
||||||
console.log("请求入参:" + JSON.stringify( { courseId: courseId,taskId: taskId,type:type }))
|
|
||||||
|
|
||||||
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId,taskId: taskId,type:type });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function toSurvery() {
|
function toSurvery() {
|
||||||
if (data.value.isSurvery) {
|
if (dayjs().isBefore(data.value.planDto.beginTime)) {
|
||||||
// return;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
data.value.planDto.beginTime &&
|
|
||||||
dayjs().isBefore(data.value.planDto.beginTime)
|
|
||||||
) {
|
|
||||||
ElMessage.warning("课程未开始,请耐心等待!");
|
ElMessage.warning("课程未开始,请耐心等待!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.value.planDto.evalFlag == 0) {
|
if (!data.value.planDto.evalFlag) {
|
||||||
ElMessage.warning("此课程无评估");
|
ElMessage.warning("此课程无评估");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -485,13 +386,10 @@ function toSurvery() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toWork() {
|
function toWork() {
|
||||||
console.log(data)
|
console.log(data);
|
||||||
if (data.value.planDto.beginTime) {
|
if (dayjs().isBefore(data.value.planDto.beginTime)) {
|
||||||
let date1 = new Date(data.value.planDto.beginTime).getTime();
|
|
||||||
let date2 = new Date().getTime();
|
|
||||||
if (date1 > date2) {
|
|
||||||
ElMessage.warning("未到开始时间,请耐心等待!");
|
ElMessage.warning("未到开始时间,请耐心等待!");
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
router.push({
|
router.push({
|
||||||
path: "/homeworkpage",
|
path: "/homeworkpage",
|
||||||
@@ -500,7 +398,7 @@ function toWork() {
|
|||||||
id: taskId,
|
id: taskId,
|
||||||
infoId: data.value.planDto.id,
|
infoId: data.value.planDto.id,
|
||||||
chapterOrStageId: 0,
|
chapterOrStageId: 0,
|
||||||
type,
|
type:3,
|
||||||
pName: "面授课",
|
pName: "面授课",
|
||||||
sName: data.value.planDto.name,
|
sName: data.value.planDto.name,
|
||||||
},
|
},
|
||||||
@@ -519,7 +417,7 @@ function toExamItem(obj) {
|
|||||||
// 判断内部还是外部考试
|
// 判断内部还是外部考试
|
||||||
if (obj.examType == 2) {
|
if (obj.examType == 2) {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/externalexamination',
|
path: "/externalexamination",
|
||||||
query: {
|
query: {
|
||||||
courseId: obj.id,
|
courseId: obj.id,
|
||||||
type: 3,
|
type: 3,
|
||||||
@@ -534,12 +432,6 @@ function toExamItem(obj) {
|
|||||||
"_top"
|
"_top"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// window.open(
|
|
||||||
// window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,
|
|
||||||
// "_top"
|
|
||||||
// );
|
|
||||||
//测评
|
|
||||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
@@ -549,7 +441,6 @@ onUnmounted(() => {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.faceteach {
|
.faceteach {
|
||||||
.crumb {
|
.crumb {
|
||||||
|
|||||||
@@ -158,7 +158,6 @@ const handleClick = (tab, event) => {
|
|||||||
};
|
};
|
||||||
const download = (url) => {
|
const download = (url) => {
|
||||||
console.log('下载url',url)
|
console.log('下载url',url)
|
||||||
// window.open(url);
|
|
||||||
};
|
};
|
||||||
const downloads = (url) => {
|
const downloads = (url) => {
|
||||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||||
@@ -177,7 +176,6 @@ function onLineSignUp() {
|
|||||||
|
|
||||||
function formateArr(strs) {
|
function formateArr(strs) {
|
||||||
let arrs = strs.split(',')
|
let arrs = strs.split(',')
|
||||||
console.log('112233', arrs)
|
|
||||||
return arrs
|
return arrs
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, reactive, toRefs, watch, onUnmounted} from "vue";
|
import {computed, reactive, toRefs, watch, onUnmounted, ref} from "vue";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import {request, useRequest} from "@/api/request";
|
import {request, useRequest} from "@/api/request";
|
||||||
import {
|
import {
|
||||||
@@ -143,16 +143,9 @@ const {
|
|||||||
|
|
||||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||||
|
|
||||||
const teacherInfo = useUserInfo(
|
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||||
computed(() => data.value?.planDto?.teacherId)
|
const activeName = ref("first");
|
||||||
);
|
|
||||||
|
|
||||||
const state = reactive({
|
|
||||||
activeName: "first",
|
|
||||||
enclosure: "",
|
|
||||||
isAllowSign: false,
|
|
||||||
});
|
|
||||||
const {activeName, enclosure, isAllowSign} = toRefs(state);
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log("附件", tab, event);
|
console.log("附件", tab, event);
|
||||||
};
|
};
|
||||||
@@ -181,7 +174,6 @@ function formateArr(strs) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.faceteach {
|
.faceteach {
|
||||||
.crumb {
|
.crumb {
|
||||||
|
|||||||
@@ -321,7 +321,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, reactive, toRefs, watch, onUnmounted, ref} from "vue";
|
import {computed, reactive, toRefs, watch, onUnmounted, ref, onBeforeMount} from "vue";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import {request, useRequest} from "@/api/request";
|
import {request, useRequest} from "@/api/request";
|
||||||
import {
|
import {
|
||||||
@@ -337,49 +337,30 @@ import {useRoute, useRouter} from "vue-router";
|
|||||||
import {useUserInfo} from "@/api/utils";
|
import {useUserInfo} from "@/api/utils";
|
||||||
import {ElMessage, messageConfig} from "element-plus";
|
import {ElMessage, messageConfig} from "element-plus";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import isBetween from "dayjs/plugin/isBetween";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
onBeforeMount(() => dayjs.extend(isBetween));
|
||||||
|
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const {
|
const { query: {courseId} } = useRoute();
|
||||||
query: {courseId, type, id: taskId},
|
|
||||||
} = useRoute();
|
|
||||||
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||||
const teacherInfo = useUserInfo(
|
const teacherInfo = useUserInfo( computed(() => data.value?.planDto?.teacherId));
|
||||||
computed(() => data.value?.planDto?.teacherId)
|
const activeName = ref("first");
|
||||||
);
|
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
|
||||||
const state = reactive({
|
|
||||||
activeName: "first",
|
|
||||||
enclosure: "",
|
|
||||||
isAllowSign: false,
|
|
||||||
});
|
|
||||||
const {activeName, enclosure, isAllowSign} = toRefs(state);
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log("附件", tab, event);
|
console.log("附件", tab, event);
|
||||||
};
|
};
|
||||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||||
const download = (url) => {
|
const download = (url) => {
|
||||||
// console.log('下载url',fielPath.value+url)
|
|
||||||
window.open(fielPath.value+url);
|
window.open(fielPath.value+url);
|
||||||
// window.open(url);
|
|
||||||
};
|
};
|
||||||
const downloads = (url) => {
|
const downloads = (url) => {
|
||||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||||
};
|
};
|
||||||
//判断能否报名 (TODO-大于面授课截止时间就不能报名了,其余均可以)
|
|
||||||
function isSignClick() {
|
|
||||||
let endTime = new Date(data.value.planDto?.endTime).getTime()
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (nowTime < endTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
console.log(state.isAllowSign)
|
|
||||||
}
|
|
||||||
watch(data,()=>{
|
|
||||||
isSignClick();
|
|
||||||
})
|
|
||||||
// 查看更多-展开回复列表
|
// 查看更多-展开回复列表
|
||||||
function lookMore(i) {
|
function lookMore(i) {
|
||||||
i == spreadReply.value ? spreadReply.value = -1 : spreadReply.value = i;
|
i == spreadReply.value ? spreadReply.value = -1 : spreadReply.value = i;
|
||||||
@@ -411,7 +392,6 @@ const getData = () => {
|
|||||||
submitReplayLoading.value = false;
|
submitReplayLoading.value = false;
|
||||||
clearText()
|
clearText()
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
console.log(err)
|
|
||||||
submitLoading.value = false;
|
submitLoading.value = false;
|
||||||
submitReplayLoading.value = false;
|
submitReplayLoading.value = false;
|
||||||
})
|
})
|
||||||
@@ -536,8 +516,7 @@ function submitReplayComment() {
|
|||||||
}
|
}
|
||||||
// 报名
|
// 报名
|
||||||
function onLineSignUp(isAgain) {
|
function onLineSignUp(isAgain) {
|
||||||
if (!state.isAllowSign) {
|
if (!isAllowSign.value) {
|
||||||
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
|
||||||
ElMessage.warning("未在允许报名时间范围内");
|
ElMessage.warning("未在允许报名时间范围内");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -552,9 +531,7 @@ function onLineSignUp(isAgain) {
|
|||||||
ElMessage.success(isAgain? "重新报名成功" : "报名成功");
|
ElMessage.success(isAgain? "重新报名成功" : "报名成功");
|
||||||
}
|
}
|
||||||
function formateArr(strs) {
|
function formateArr(strs) {
|
||||||
let arrs = strs.split(',')
|
return strs?.split(',')
|
||||||
console.log('112233', arrs)
|
|
||||||
return arrs
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
|||||||
@@ -47,14 +47,6 @@
|
|||||||
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
|
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
|
||||||
{{ TASK_TYPES.typeName[value.type] || "" }}
|
{{ TASK_TYPES.typeName[value.type] || "" }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div-->
|
|
||||||
<!-- v-for="(item, key) in value.flag"-->
|
|
||||||
<!-- :key="key"-->
|
|
||||||
<!-- :class="{1:'tag1',2:'tag2',3:'tag3',4:'tag4'}[item.type]"-->
|
|
||||||
<!-- style="margin-right: 11px; margin-top: 16px"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- {{ item.name }}-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="value.type == 1" class="progressBox">
|
<div v-if="value.type == 1" class="progressBox">
|
||||||
<div>当前进度</div>
|
<div>当前进度</div>
|
||||||
@@ -77,30 +69,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="goclass" @click="toFinish(value, i.stageName, i.id)"
|
<el-dropdown trigger="click">
|
||||||
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }">
|
<div class="goclass" @click="toFinish(value, i.stageName, i.id)" :style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }">
|
||||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
<template #dropdown v-if="value.type===2 && value.targetId?.split(',')?.length > 1">
|
||||||
<!-- <div-->
|
<el-dropdown-menu>
|
||||||
<!-- class="goclass"-->
|
<el-dropdown-item v-for="(name,key) in value.targetName?.split(',')" :key="key" @click="toOffcoursePlanPage(value.targetId?.split(',')[key])">{{ name }}</el-dropdown-item>
|
||||||
<!-- :style="{ display: value.currentRatio === 0 ? 'none' : 'flex' }">去上课-->
|
</el-dropdown-menu>
|
||||||
<!-- </div>-->
|
</template>
|
||||||
<!-- <img-->
|
</el-dropdown>
|
||||||
<!-- style="width: 76px; height: 76px; margin-right: 61px"-->
|
|
||||||
<!-- :style="{ display: value.currentRatio === 0 ? 'flex' : 'none' }"-->
|
|
||||||
<!-- src="../../assets/image/pathdetails/notstarted.png"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div ref="contentLoadingDom" id="loadings" v-else style="width:100%;height:400px;background:red;">
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="tag1">必修</div>
|
|
||||||
<div class="tag2">选修</div>
|
|
||||||
<div class="tag3">测评</div>
|
|
||||||
<div class="tag4">#通用力</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detailR">
|
<div class="detailR">
|
||||||
<!-- todo #路径详情 课程公告及共享文档缺失-->
|
<!-- todo #路径详情 课程公告及共享文档缺失-->
|
||||||
@@ -346,14 +326,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, ref, watch } from "vue";
|
import {computed, onMounted, ref} from "vue";
|
||||||
import { ElLoading, ElMessage } from 'element-plus'
|
import {ElMessage} from "element-plus";
|
||||||
import {request} from "@/api/request";
|
import {request} from "@/api/request";
|
||||||
import { CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam, QueryEvaluationTaskStatusOne } from "@/api/api";
|
import {
|
||||||
|
CompletionList,
|
||||||
|
EvaluationToLearn,
|
||||||
|
PointList,
|
||||||
|
QueryEvaluationTaskStatusOne,
|
||||||
|
STUDY_RECORD,
|
||||||
|
SubmitExternalExam,
|
||||||
|
UPDATE_CURRENT_TASK
|
||||||
|
} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {PROJECT, TASK_TYPES} from "@/api/CONST";
|
import {PROJECT, TASK_TYPES} from "@/api/CONST";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import { UPDATE_CURRENT_TASK } from "@/api/api";
|
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -369,7 +356,6 @@ onMounted(() => {
|
|||||||
dispatch('getProjectInfo', { projectId })
|
dispatch('getProjectInfo', { projectId })
|
||||||
})
|
})
|
||||||
const tableRankData = ref([])
|
const tableRankData = ref([])
|
||||||
|
|
||||||
const studyProgress = [
|
const studyProgress = [
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
@@ -462,14 +448,12 @@ async function toFinish(d, sName, chapterOrStageId) {
|
|||||||
ElMessage.error("当前任务已结束")
|
ElMessage.error("当前任务已结束")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (d.type == 2) {
|
if (d.type === 2) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
if(!d.targetId){
|
||||||
let date2 = new Date().getTime();
|
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||||
if (date1 < date2) {
|
}
|
||||||
dialogVisibleTip.value = '当前面授课已结束';
|
if(d.targetId.split(',').length>1){
|
||||||
dialogVisible.value = true;
|
return
|
||||||
|
|
||||||
//return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 作业过期判断
|
// 作业过期判断
|
||||||
@@ -702,6 +686,10 @@ async function toFinish(d, sName, chapterOrStageId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toOffcoursePlanPage(id){
|
||||||
|
window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${id}`, '_top')
|
||||||
|
}
|
||||||
|
|
||||||
function whiteTypes(type) {
|
function whiteTypes(type) {
|
||||||
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
|
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,28 +89,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<el-dropdown trigger="click">
|
||||||
<div v-if="isStudy=='true'" class="goclass"
|
<div v-if="isStudy=='true'" class="goclass"
|
||||||
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }"
|
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }"
|
||||||
@click="toFinish(value)">
|
@click="toFinish(value)">
|
||||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : "未解锁") }}
|
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : "未解锁") }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
<template #dropdown v-if="value.type===2 && value.targetId?.split(',')?.length > 1">
|
||||||
<!-- <div-->
|
<el-dropdown-menu>
|
||||||
<!-- class="goclass"-->
|
<el-dropdown-item v-for="(name,key) in value.targetName?.split(',')" :key="key" @click="toOffcoursePlanPage(value.targetId?.split(',')[key])">{{ name }}</el-dropdown-item>
|
||||||
<!-- :style="{ display: value.currentRatio === 0 ? 'none' : 'flex' }">去上课-->
|
</el-dropdown-menu>
|
||||||
<!-- </div>-->
|
</template>
|
||||||
<!-- <img-->
|
</el-dropdown>
|
||||||
<!-- style="width: 76px; height: 76px; margin-right: 61px"-->
|
|
||||||
<!-- :style="{ display: value.currentRatio === 0 ? 'flex' : 'none' }"-->
|
|
||||||
<!-- src="../../assets/image/pathdetails/notstarted.png"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="tag1">必修</div>
|
|
||||||
<div class="tag2">选修</div>
|
|
||||||
<div class="tag3">测评</div>
|
|
||||||
<div class="tag4">#通用力</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detailR">
|
<div class="detailR">
|
||||||
<!-- 课程公告及共享文档 -->
|
<!-- 课程公告及共享文档 -->
|
||||||
@@ -296,7 +289,6 @@ const returnclick = () => {
|
|||||||
const { commit, dispatch, state } = useStore();
|
const { commit, dispatch, state } = useStore();
|
||||||
const userInfo = computed(() => state.userInfo);
|
const userInfo = computed(() => state.userInfo);
|
||||||
const data = computed(() => state.routerInfo);
|
const data = computed(() => state.routerInfo);
|
||||||
console.log(data);
|
|
||||||
const activeName = ref("first");
|
const activeName = ref("first");
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -353,13 +345,11 @@ async function toFinish(d) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (d.type == 2) {
|
if (d.type == 2) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
if(!d.targetId){
|
||||||
let date2 = new Date().getTime();
|
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||||
if (date1 < date2) {
|
}
|
||||||
dialogVisibleTip.value = "当前面授课已结束";
|
if(d.targetId.split(',').length>1){
|
||||||
dialogVisible.value = true;
|
return
|
||||||
|
|
||||||
//return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (d.type == 4) {
|
if (d.type == 4) {
|
||||||
|
|||||||
Reference in New Issue
Block a user