mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-13 04:46:48 +08:00
init
This commit is contained in:
@@ -2,6 +2,8 @@ import {watch, ref} from "vue";
|
|||||||
import {boeRequest} from "@/api/request";
|
import {boeRequest} from "@/api/request";
|
||||||
import {BASE, GET_USER_LIST} from "@/api/ThirdApi";
|
import {BASE, GET_USER_LIST} from "@/api/ThirdApi";
|
||||||
|
|
||||||
|
const BASE_AVATAR = import.meta.env.DEV ? `${BASE}/upload` : ''
|
||||||
|
|
||||||
export function useImage(src) {
|
export function useImage(src) {
|
||||||
return new URL(`../assets/image/${src}`, import.meta.url).href
|
return new URL(`../assets/image/${src}`, import.meta.url).href
|
||||||
}
|
}
|
||||||
@@ -16,12 +18,13 @@ export function getCookie(name) {
|
|||||||
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`, '') || ''
|
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`, '') || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useUserInfoAvatar(id) {
|
export function useUserInfo(id) {
|
||||||
const avatar = ref(import.meta.env.DEV ? `${BASE}/upload` : '')
|
const userInfo = ref({})
|
||||||
watch(id, () => {
|
watch(id, () => {
|
||||||
id.value && boeRequest(GET_USER_LIST, {id: id.value}).then(res => {
|
id.value && boeRequest(GET_USER_LIST, {id: id.value}).then(res => {
|
||||||
avatar.value = avatar.value + res.result.userInfoList[0].avatar
|
userInfo.value = res.result.userInfoList[0]
|
||||||
|
userInfo.value.avatar = BASE_AVATAR + userInfo.value.avatar
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return avatar
|
return userInfo
|
||||||
}
|
}
|
||||||
@@ -115,9 +115,9 @@
|
|||||||
<div class="tag3" style="margin-left: 11px">考试</div>
|
<div class="tag3" style="margin-left: 11px">考试</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="submit" @click="toExamItem(data.examinationDto)">-->
|
<!-- <div class="submit" @click="toExamItem(data.examinationDto)">-->
|
||||||
<!-- 去考试-->
|
<!-- 去考试-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -155,16 +155,16 @@ import FileTypeImg from "@/components/FileTypeImg.vue";
|
|||||||
import {request, useRequest} from "@/api/request";
|
import {request, useRequest} from "@/api/request";
|
||||||
import {STU_OFFCOURSE_DETAIL} from "@/api/api";
|
import {STU_OFFCOURSE_DETAIL} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {useUserInfoAvatar} from "@/api/utils";
|
import {useUserInfo} from "@/api/utils";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {
|
const {
|
||||||
query: {courseId,type},
|
query: {courseId, type},
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
|
|
||||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||||
|
|
||||||
const userAvatar = useUserInfoAvatar(computed(() => data.value?.planDto?.teacherId))
|
const {avatar: userAvatar} = useUserInfo(computed(() => data.value?.planDto?.teacherId))
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
activeName: "first",
|
activeName: "first",
|
||||||
@@ -183,7 +183,10 @@ function toSurvery() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toWork() {
|
function toWork() {
|
||||||
router.push({path: "/homeworkpage", query: {courseId: data.value.workDto.workId, id: data.value.offcourseDto.categoryId, type}})
|
router.push({
|
||||||
|
path: "/homeworkpage",
|
||||||
|
query: {courseId: data.value.workDto.workId, id: data.value.offcourseDto.categoryId, type}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function toExamItem(obj) {
|
function toExamItem(obj) {
|
||||||
|
|||||||
@@ -42,17 +42,20 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
style="background: rgb(59, 191, 252)"
|
style="background: rgb(59, 191, 252)"
|
||||||
@click="showClick"
|
@click="showClick"
|
||||||
>观看</botton
|
>观看
|
||||||
|
</botton
|
||||||
>
|
>
|
||||||
<botton
|
<botton
|
||||||
class="btn"
|
class="btn"
|
||||||
style="background: rgb(57, 146, 249)"
|
style="background: rgb(57, 146, 249)"
|
||||||
@click="signClick"
|
@click="signClick"
|
||||||
v-if="!data.signFlag"
|
v-if="!data.signFlag"
|
||||||
>签到</botton
|
>签到
|
||||||
|
</botton
|
||||||
>
|
>
|
||||||
<botton class="btn" @click="commitClick" v-if="!data.evalFlag"
|
<botton class="btn" @click="commitClick" v-if="!data.evalFlag"
|
||||||
>评估</botton
|
>评估
|
||||||
|
</botton
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -74,14 +77,14 @@
|
|||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
<!-- todo #直播 没有课前预习字段-->
|
<!-- todo #直播 没有课前预习字段-->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
通过对各级人员的软件平台培训,使其能够了解如何运用乾元坤和智能信息管理系统来提升企业管理水平,最大限度发挥软件产品在企业中的作用;<br />
|
通过对各级人员的软件平台培训,使其能够了解如何运用乾元坤和智能信息管理系统来提升企业管理水平,最大限度发挥软件产品在企业中的作用;<br/>
|
||||||
● 培训目标
|
● 培训目标
|
||||||
<br />1.使企业不同部门人员掌握便捷、有效的系统平台操作方法;<br />
|
<br/>1.使企业不同部门人员掌握便捷、有效的系统平台操作方法;<br/>
|
||||||
2.通过系统平台的培训提高员工对企业的管理理念认识与提升。<br />
|
2.通过系统平台的培训提高员工对企业的管理理念认识与提升。<br/>
|
||||||
3.通过系统平台培训加强沟通,统一部署,协同工作,提高效率。
|
3.通过系统平台培训加强沟通,统一部署,协同工作,提高效率。
|
||||||
<br />
|
<br/>
|
||||||
●培训对象<br />
|
●培训对象<br/>
|
||||||
集团领导、各相关部门领导、总经理、车间主管、车间操作员等;<br />
|
集团领导、各相关部门领导、总经理、车间主管、车间操作员等;<br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -98,8 +101,8 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<span style="font-weight: 600"
|
<span style="font-weight: 600"
|
||||||
>网易有道词典现有功能结构拆解+问题分析</span
|
>网易有道词典现有功能结构拆解+问题分析</span
|
||||||
><br />
|
><br/>
|
||||||
查找资料,介绍一种国外(日本、美国、欧洲)道路(公路、铁路、城市道路、地铁)设计规范的演变过程,可以一种或几种主要技术指标为例,并说明其原因。<br />
|
查找资料,介绍一种国外(日本、美国、欧洲)道路(公路、铁路、城市道路、地铁)设计规范的演变过程,可以一种或几种主要技术指标为例,并说明其原因。<br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -128,24 +131,17 @@
|
|||||||
<div class="box"></div>
|
<div class="box"></div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="(el, index) in teacher"
|
|
||||||
:key="el.id"
|
|
||||||
class="teacheritem"
|
class="teacheritem"
|
||||||
:style="{
|
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)'}"
|
||||||
'border-bottom':
|
|
||||||
index === teacher.length - 1
|
|
||||||
? null
|
|
||||||
: '1px solid rgba(56, 125, 247, 0.2)',
|
|
||||||
}"
|
|
||||||
>
|
>
|
||||||
<img class="peopleimg" :src="el.peopleimg" />
|
<img class="peopleimg" :src="userAvatar"/>
|
||||||
<div style="margin-left: 17px; width: 190px">
|
<div style="margin-left: 17px; width: 190px">
|
||||||
<div class="teacherName" style="margin-right: 5px">
|
<div class="teacherName" style="margin-right: 5px">
|
||||||
{{ data.userInfoBo?.userName }}
|
{{ data.userInfoBo?.userName }}
|
||||||
</div>
|
</div>
|
||||||
<div class="introduce">{{ data.userInfoBo?.bandDesc }}</div>
|
<div class="introduce">{{ data.userInfoBo?.bandDesc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="follow">+ 关注</div>
|
<!-- <div class="follow">+ 关注</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -155,22 +151,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, toRefs } from "vue";
|
import {computed, reactive, toRefs} from "vue";
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import { request, useRequest } from "@/api/request";
|
import {request, useRequest} from "@/api/request";
|
||||||
import {
|
import {
|
||||||
TASK_BROADCAST_DETAIL,
|
TASK_BROADCAST_DETAIL,
|
||||||
TASK_BROADCAST_SIGN,
|
TASK_BROADCAST_SIGN,
|
||||||
} from "@/api/api";
|
} from "@/api/api";
|
||||||
import { useRoute } from "vue-router/dist/vue-router";
|
import {useRoute} from "vue-router/dist/vue-router";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
|
import {useUserInfo} from "@/api/utils";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: { courseId: liveId },
|
query: {courseId: liveId},
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId });
|
const {data} = useRequest(TASK_BROADCAST_DETAIL, {liveId});
|
||||||
|
|
||||||
|
const {avatar: userAvatar} = useUserInfo(computed(() => data.value.userInfoBo?.userId))
|
||||||
|
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
activeName: "first",
|
activeName: "first",
|
||||||
teacher: [
|
teacher: [
|
||||||
@@ -186,7 +187,7 @@ const state = reactive({
|
|||||||
const {activeName, teacher} = toRefs(state)
|
const {activeName, teacher} = toRefs(state)
|
||||||
const signClick = () => {
|
const signClick = () => {
|
||||||
data.value.signFlag = 1
|
data.value.signFlag = 1
|
||||||
request(TASK_BROADCAST_SIGN, { courseId: liveId })
|
request(TASK_BROADCAST_SIGN, {courseId: liveId})
|
||||||
};
|
};
|
||||||
const commitClick = () => {
|
const commitClick = () => {
|
||||||
router.push({path: '/surveydetail', query: {courseId: data.value.assessmentId}})
|
router.push({path: '/surveydetail', query: {courseId: data.value.assessmentId}})
|
||||||
|
|||||||
@@ -320,12 +320,12 @@ import {boeRequest, useRequest} from "@/api/request";
|
|||||||
import {ROUTER_PROCESS} from "@/api/api";
|
import {ROUTER_PROCESS} from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import {useUserInfoAvatar} from "@/api/utils";
|
import {useUserInfo} from "@/api/utils";
|
||||||
|
|
||||||
const {query: {routerId}} = useRoute()
|
const {query: {routerId}} = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const {data} = useRequest(ROUTER_PROCESS, {routerId})
|
const {data} = useRequest(ROUTER_PROCESS, {routerId})
|
||||||
const userAvatar = useUserInfoAvatar(computed(() => data.value?.userInfoBo?.userId))
|
const {avatar: userAvatar} = useUserInfo(computed(() => data.value?.userInfoBo?.userId))
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
course: [
|
course: [
|
||||||
|
|||||||
Reference in New Issue
Block a user