This commit is contained in:
Pengxiansen
2025-02-16 23:23:21 +08:00
parent 8f7d22e68d
commit 99a7805190
21 changed files with 53 additions and 43 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -56,22 +56,22 @@
<div class="growth-name-type"> <div class="growth-name-type">
<el-dropdown :teleported="false" trigger="click" ref="dropdownRef"> <el-dropdown :teleported="false" trigger="click" ref="dropdownRef">
<div class="growth-name"> <div class="growth-name">
<div>{{ selectGrowth?.growthName }}</div> <div>{{ selectGrowth?.growthName }}</div>
<div style="margin-left: 20px; cursor: pointer"> <div style="margin-left: 20px; cursor: pointer">
<el-icon color="#000" size="16"><CaretBottom /></el-icon> <el-icon color="#000" size="16"><CaretBottom /></el-icon>
</div> </div>
</div> </div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item <el-dropdown-item
:disabled="selectGrowth.id == item.id" :disabled="selectGrowth.id == item.id"
v-for="item of growthList" v-for="item of growthList"
> >
<div @click="select(item)">{{ item.growthName }}</div> <div @click="select(item)">{{ item.growthName }}</div>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
<div class="growth-type"> <div class="growth-type">
<div class="type-item-list">列表</div> <div class="type-item-list">列表</div>
<div class="type-item-path" @click="templateClick">路径</div> <div class="type-item-path" @click="templateClick">路径</div>
@@ -87,7 +87,12 @@
v-for="(value, index) in stageProcessList" v-for="(value, index) in stageProcessList"
> >
<div class="list-item" @click="toFinish(value)"> <div class="list-item" @click="toFinish(value)">
<div class="item-img"></div> <div class="item-img">
<img
style="width: 100%; height: 100%"
:src="getAssetsFile(value.courseType)"
/>
</div>
<div class="item-content"> <div class="item-content">
<div class="item-name"> <div class="item-name">
{{ {{
@@ -270,6 +275,10 @@ const lastLearned = computed(() =>
stageProcessList.value.find((item) => item.lastStudy) stageProcessList.value.find((item) => item.lastStudy)
); );
const getAssetsFile = (url) => {
return new URL(`../../assets/image/growth/type${url}.png`, import.meta.url)
.href;
};
// 样式类型 // 样式类型
const templateClick = () => { const templateClick = () => {
router.push({ router.push({
@@ -307,7 +316,7 @@ const refresh = () => {
const loading = ref(false); const loading = ref(false);
const getList = () => { const getList = () => {
let params = { let params = {
growthId: selectGrowth.id ? selectGrowth.id : routerId, growthId: selectGrowth.value.id ? selectGrowth.value.id : routerId,
...queryParams, ...queryParams,
}; };
// 3为查询全部状态需给后端传空 // 3为查询全部状态需给后端传空
@@ -656,7 +665,6 @@ function toOffcoursePlanPage(id) {
margin: 15px 0 19px 0; margin: 15px 0 19px 0;
} }
.item-img { .item-img {
height: 240px;
width: 100%; width: 100%;
background: #cccccc; background: #cccccc;
border-radius: 14px 14px 0px 0px; border-radius: 14px 14px 0px 0px;

View File

@@ -4,7 +4,7 @@
style="width: 100%; height: 290px" style="width: 100%; height: 290px"
src="@/assets/image/growth/bg.png" src="@/assets/image/growth/bg.png"
/> />
<div class="nav" :style="{transform:'scale('+ transformSize + ')'}"> <div class="nav" :style="{ transform: 'scale(' + transformSize + ')' }">
<div class="tabs"> <div class="tabs">
<div <div
class="tabs-item" class="tabs-item"
@@ -53,27 +53,29 @@
> >
</div> --> </div> -->
</div> </div>
<div class="growth-path-container" :style="{transform:'scale('+ transformSize + ')'}"> <div
class="growth-path-container"
:style="{ transform: 'scale(' + transformSize + ')' }"
>
<div class="growth-name-type"> <div class="growth-name-type">
<div class="growth-name"> <el-dropdown :teleported="false" trigger="click" ref="dropdownRef">
<div>{{ selectGrowth?.growthName }}</div> <div class="growth-name">
<el-dropdown :teleported="false" trigger="click" ref="dropdownRef"> <div>{{ selectGrowth?.growthName }}</div>
<div style="margin-left: 20px; cursor: pointer"> <div style="margin-left: 20px; cursor: pointer">
<el-icon color="#000" size="16"><CaretBottom /></el-icon> <el-icon color="#000" size="16"><CaretBottom /></el-icon>
</div> </div>
<template #dropdown> </div>
<el-dropdown-menu> <template #dropdown>
<el-dropdown-item <el-dropdown-menu>
:disabled="selectGrowth.id == item.id" <el-dropdown-item
v-for="item of growthList" :disabled="selectGrowth.id == item.id"
> v-for="item of growthList"
<div @click="select(item)">{{ item.growthName }}</div> >
</el-dropdown-item> <div @click="select(item)">{{ item.growthName }}</div>
</el-dropdown-menu> </el-dropdown-item>
</template> </el-dropdown-menu>
</el-dropdown> </template>
</div> </el-dropdown>
<div class="growth-type"> <div class="growth-type">
<div class="type-item-list" @click="templateClick">列表</div> <div class="type-item-list" @click="templateClick">列表</div>
<div class="type-item-path">路径</div> <div class="type-item-path">路径</div>
@@ -282,7 +284,7 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { computed, onMounted,onUnmounted, ref, watch, reactive } from "vue"; import { computed, onMounted, onUnmounted, ref, watch, reactive } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { request } from "@/api/request"; import { request } from "@/api/request";
import { growthRequest } from "@/api/growthRequest"; import { growthRequest } from "@/api/growthRequest";
@@ -411,10 +413,10 @@ const stateData = computed(() => {
const windowWidth = ref(0); const windowWidth = ref(0);
const transformSize = ref(1); const transformSize = ref(1);
const updateWindowWidth = () => { const updateWindowWidth = () => {
windowWidth.value = window.innerWidth; windowWidth.value = window.innerWidth;
transformSize.value = windowWidth.value / 1920; transformSize.value = windowWidth.value / 1920;
} };
// 样式类型 // 样式类型
const templateClick = () => { const templateClick = () => {
router.push({ router.push({
@@ -452,7 +454,7 @@ const refresh = () => {
const loading = ref(false); const loading = ref(false);
const getList = () => { const getList = () => {
let params = { let params = {
growthId: selectGrowth.id ? selectGrowth.id : routerId, growthId: selectGrowth.value.id ? selectGrowth.value.id : routerId,
...queryParams, ...queryParams,
}; };
// 3为查询全部状态需给后端传空 // 3为查询全部状态需给后端传空
@@ -479,7 +481,7 @@ const select = (item) => {
}; };
onMounted(() => { onMounted(() => {
updateWindowWidth(); // 初始化宽度 updateWindowWidth(); // 初始化宽度
window.addEventListener('resize', updateWindowWidth); window.addEventListener("resize", updateWindowWidth);
dispatch("getGrowthInfo", { routerId }); dispatch("getGrowthInfo", { routerId });
getList(); getList();
growthRequest(PROFESSIONAL_STUDENT_LIST).then((res) => { growthRequest(PROFESSIONAL_STUDENT_LIST).then((res) => {
@@ -488,7 +490,7 @@ onMounted(() => {
}); });
// 在组件卸载时移除事件监听器 // 在组件卸载时移除事件监听器
onUnmounted(() => { onUnmounted(() => {
window.removeEventListener('resize', updateWindowWidth); window.removeEventListener("resize", updateWindowWidth);
}); });
watch( watch(
() => state.growthInfo, () => state.growthInfo,