mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-06 09:26:46 +08:00
多教师显示
This commit is contained in:
@@ -282,14 +282,14 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo?.avatar"/>
|
||||
<div class="teacheritem" v-for="(item,index) in teacherItem">
|
||||
<img class="peopleimg" :src="item.avatar"/>
|
||||
<div class="nameSpan" style="align-items: flex-start;justify-content:flex-start;flex-direction: column;padding-left: 10px;">
|
||||
<div class="teacherName" style="padding: 5px 0;">
|
||||
{{ data.planDto?.teacher }}
|
||||
{{ item.realName }}--
|
||||
</div>
|
||||
<!-- <div class="introduce">{{ data.planDto?.bandDesc }}</div> -->
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(teacherInfo.orgNamePath)}}</div>
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(item.orgNamePath)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -298,9 +298,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, onBeforeMount, onUnmounted, ref} from "vue";
|
||||
import {computed, onBeforeMount, onUnmounted, ref,watch} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {request, useRequest,boeRequest} from "@/api/request";
|
||||
import {STU_OFFCOURSE_DETAIL, TASK_OFFCOURSE_NOTASK_SIGN,} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
@@ -308,6 +308,7 @@ import {ElMessage} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
import { useOrgName } from "@/hooks/useOrgName.js";
|
||||
import {BASE, GET_USER_LIST,GET_USER_INFO_OLDURL} from "@/api/ThirdApi";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
@@ -324,7 +325,22 @@ const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
|
||||
courseId,
|
||||
usePermission: true,
|
||||
});
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
watch(data, (newVal) => {
|
||||
newVal.planDto.offteachers.map(item => teacherInfos(item.teacherId));
|
||||
});
|
||||
const teacherItem = ref([])
|
||||
const teacherInfos = async (id) => {
|
||||
const res = await boeRequest(GET_USER_INFO_OLDURL, { userId: id });
|
||||
console.log(res.result, 'rea');
|
||||
const userInfo = res.result;
|
||||
userInfo.avatar = userInfo.avatar
|
||||
? userInfo.avatar.includes('upload')
|
||||
? userInfo.avatar
|
||||
: '/upload' + userInfo.avatar
|
||||
: '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png';
|
||||
teacherItem.value.push(userInfo)
|
||||
};
|
||||
// const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.offteachers[0].teacherId));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.planDto?.beforeStart || 0, "minute"), dayjs(data.value.planDto?.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.planDto?.afterStart || 0, "minute")));
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
|
||||
@@ -94,16 +94,15 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||
<div class="nameSpan" style="align-items: flex-start;justify-content:flex-start;flex-direction: column;padding-left: 10px;">
|
||||
<div class="teacheritem" v-for="(item,index) in teacherItem">
|
||||
<img class="peopleimg" :src="item.avatar"/>
|
||||
<div class="nameSpan" style="align-items: flex-start;justify-content:flex-start;flex-direction: column;padding-left: 10px;">
|
||||
<div class="teacherName" style="padding: 5px 0;">
|
||||
{{ data.planDto?.teacher }}
|
||||
{{ item.realName }}--
|
||||
</div>
|
||||
<!-- <div class="introduce">{{ data.planDto?.bandDesc }}</div> -->
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(teacherInfo.orgNamePath)}}</div>
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(item.orgNamePath)}}</div>
|
||||
</div>
|
||||
<!-- <div class="follow">+ 关注</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,9 +111,9 @@
|
||||
</template>
|
||||
|
||||
<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 {request, useRequest} from "@/api/request";
|
||||
import {request, useRequest,boeRequest} from "@/api/request";
|
||||
import {
|
||||
STU_OFFCOURSE_DETAIL,
|
||||
FACETEACH_SIGNUP
|
||||
@@ -124,6 +123,7 @@ import {useUserInfo} from "@/api/utils";
|
||||
import {ElMessage, messageConfig} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import { useOrgName } from "@/hooks/useOrgName.js";
|
||||
import {BASE, GET_USER_LIST,GET_USER_INFO_OLDURL} from "@/api/ThirdApi";
|
||||
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
@@ -134,9 +134,24 @@ const {
|
||||
} = useRoute();
|
||||
|
||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
const teacherInfo = useUserInfo(
|
||||
computed(() => data.value?.planDto?.teacherId)
|
||||
);
|
||||
watch(data, (newVal) => {
|
||||
newVal.planDto.offteachers.map(item => teacherInfos(item.teacherId));
|
||||
});
|
||||
const teacherItem = ref([])
|
||||
const teacherInfos = async (id) => {
|
||||
const res = await boeRequest(GET_USER_INFO_OLDURL, { userId: id });
|
||||
console.log(res.result, 'rea');
|
||||
const userInfo = res.result;
|
||||
userInfo.avatar = userInfo.avatar
|
||||
? userInfo.avatar.includes('upload')
|
||||
? userInfo.avatar
|
||||
: '/upload' + userInfo.avatar
|
||||
: '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png';
|
||||
teacherItem.value.push(userInfo)
|
||||
};
|
||||
// const teacherInfo = useUserInfo(
|
||||
// computed(() => data.value?.planDto?.teacherId)
|
||||
// );
|
||||
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
|
||||
@@ -92,14 +92,14 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||
<div class="teacheritem" v-for="(item,index) in teacherItem">
|
||||
<img class="peopleimg" :src="item.avatar"/>
|
||||
<div class="nameSpan" style="align-items: flex-start;justify-content:flex-start;flex-direction: column;padding-left: 10px;">
|
||||
<div class="teacherName" style="padding: 5px 0;">
|
||||
{{ data.planDto?.teacher }}
|
||||
{{ item.realName }}--
|
||||
</div>
|
||||
<!-- <div class="introduce">{{ data.planDto?.bandDesc }}</div> -->
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(teacherInfo.orgNamePath)}}</div>
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(item.orgNamePath)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@
|
||||
<script setup>
|
||||
import {computed, reactive, toRefs, watch, onUnmounted, ref} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {request, useRequest,boeRequest} from "@/api/request";
|
||||
import {
|
||||
STU_OFFCOURSE_DETAIL,
|
||||
FACETEACH_SIGNUP
|
||||
@@ -121,6 +121,7 @@ import {useUserInfo} from "@/api/utils";
|
||||
import {ElMessage, messageConfig} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import { useOrgName } from "@/hooks/useOrgName.js";
|
||||
import {BASE, GET_USER_LIST,GET_USER_INFO_OLDURL} from "@/api/ThirdApi";
|
||||
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
@@ -131,7 +132,21 @@ const {
|
||||
} = useRoute();
|
||||
|
||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
|
||||
watch(data, (newVal) => {
|
||||
newVal.planDto.offteachers.map(item => teacherInfos(item.teacherId));
|
||||
});
|
||||
const teacherItem = ref([])
|
||||
const teacherInfos = async (id) => {
|
||||
const res = await boeRequest(GET_USER_INFO_OLDURL, { userId: id });
|
||||
console.log(res.result, 'rea');
|
||||
const userInfo = res.result;
|
||||
userInfo.avatar = userInfo.avatar
|
||||
? userInfo.avatar.includes('upload')
|
||||
? userInfo.avatar
|
||||
: '/upload' + userInfo.avatar
|
||||
: '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png';
|
||||
teacherItem.value.push(userInfo)
|
||||
};
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
const activeName = ref("first");
|
||||
|
||||
|
||||
@@ -302,15 +302,15 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||
<div class="teacheritem" v-for="(item,index) in teacherItem">
|
||||
<img class="peopleimg" :src="item.avatar"/>
|
||||
<div class="nameSpan" style="align-items: flex-start;justify-content:flex-start;flex-direction: column;padding-left: 10px;">
|
||||
<div class="teacherName" style="padding: 5px 0;">
|
||||
{{ data.planDto?.teacher }}
|
||||
{{ item.realName }}--
|
||||
</div>
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(teacherInfo.orgNamePath)}}</div>
|
||||
<!-- <div class="introduce">{{ data.planDto?.bandDesc }}</div> -->
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(item.orgNamePath)}}</div>
|
||||
</div>
|
||||
<!-- <div class="follow">+ 关注</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -320,7 +320,7 @@
|
||||
<script setup>
|
||||
import {computed, reactive, toRefs, watch, onUnmounted, ref, onBeforeMount} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {request, useRequest,boeRequest} from "@/api/request";
|
||||
import {
|
||||
STU_OFFCOURSE_DETAIL,
|
||||
FACETEACH_SIGNUP,
|
||||
@@ -336,6 +336,7 @@ import {ElMessage, messageConfig} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
import { useOrgName } from "@/hooks/useOrgName.js";
|
||||
import {BASE, GET_USER_LIST,GET_USER_INFO_OLDURL} from "@/api/ThirdApi";
|
||||
const router = useRouter();
|
||||
onBeforeMount(() => dayjs.extend(isBetween));
|
||||
|
||||
@@ -345,7 +346,21 @@ const returnclick = () => {
|
||||
const { query: {courseId} } = useRoute();
|
||||
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
console.log(data.value);
|
||||
|
||||
watch(data, (newVal) => {
|
||||
newVal.planDto.offteachers.map(item => teacherInfos(item.teacherId));
|
||||
});
|
||||
const teacherItem = ref([])
|
||||
const teacherInfos = async (id) => {
|
||||
const res = await boeRequest(GET_USER_INFO_OLDURL, { userId: id });
|
||||
console.log(res.result, 'rea');
|
||||
const userInfo = res.result;
|
||||
userInfo.avatar = userInfo.avatar
|
||||
? userInfo.avatar.includes('upload')
|
||||
? userInfo.avatar
|
||||
: '/upload' + userInfo.avatar
|
||||
: '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png';
|
||||
teacherItem.value.push(userInfo)
|
||||
};
|
||||
const teacherInfo = useUserInfo( computed(() => data.value?.planDto?.teacherId));
|
||||
const activeName = ref("first");
|
||||
const isCourseEnd = computed(() => dayjs(data.value.planDto?.endTime).isBefore(dayjs()));
|
||||
|
||||
@@ -132,14 +132,14 @@
|
||||
<div class="text">面授课讲师</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||
<div class="teacheritem" v-for="(item,index) in teacherItem">
|
||||
<img class="peopleimg" :src="item.avatar"/>
|
||||
<div class="nameSpan" style="align-items: flex-start;justify-content:flex-start;flex-direction: column;padding-left: 10px;">
|
||||
<div class="teacherName" style="padding: 5px 0;">
|
||||
{{ data.planDto?.teacher }}
|
||||
{{ item.realName }}--
|
||||
</div>
|
||||
<!-- <div class="introduce">{{ data.planDto?.bandDesc }}</div> -->
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(teacherInfo.orgNamePath)}}</div>
|
||||
<div class="introduce" style="margin: 0;">{{useOrgName(item.orgNamePath)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,9 +148,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, onBeforeMount, onUnmounted, ref} from "vue";
|
||||
import {computed, onBeforeMount, onUnmounted, ref,watch} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {request, useRequest,boeRequest} from "@/api/request";
|
||||
import {STU_OFFCOURSE_DETAIL, TASK_OFFCOURSE_NOTASK_SIGN,} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
@@ -158,6 +158,7 @@ import {ElMessage} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
import { useOrgName } from "@/hooks/useOrgName.js";
|
||||
import {BASE, GET_USER_LIST,GET_USER_INFO_OLDURL} from "@/api/ThirdApi";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
@@ -168,6 +169,21 @@ const returnclick = () => router.back();
|
||||
const { query: { courseId }} = useRoute();
|
||||
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId, usePermission: true, });
|
||||
watch(data, (newVal) => {
|
||||
newVal.planDto.offteachers.map(item => teacherInfos(item.teacherId));
|
||||
});
|
||||
const teacherItem = ref([])
|
||||
const teacherInfos = async (id) => {
|
||||
const res = await boeRequest(GET_USER_INFO_OLDURL, { userId: id });
|
||||
console.log(res.result, 'rea');
|
||||
const userInfo = res.result;
|
||||
userInfo.avatar = userInfo.avatar
|
||||
? userInfo.avatar.includes('upload')
|
||||
? userInfo.avatar
|
||||
: '/upload' + userInfo.avatar
|
||||
: '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png';
|
||||
teacherItem.value.push(userInfo)
|
||||
};
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value?.planDto?.beginTime).subtract(data.value?.planDto?.beforeStart || 0, "minute"), dayjs(data.value?.planDto?.afterStart ? data.value?.planDto?.beginTime : data.value?.planDto?.endTime).add(data.value?.planDto?.afterStart || 0, "minute")));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user