fwb 4 months ago
commit 2e0e7e8261
  1. 154
      teaching_integration_platform_admin_template/src/views/configurationPage/index.vue
  2. 175
      teaching_integration_platform_admin_template/src/views/favoritesRecords/index.vue
  3. 170
      teaching_integration_platform_admin_template/src/views/likesHistory/index.vue
  4. 1
      teaching_integration_platform_template/index.html
  5. 81
      teaching_integration_platform_template/src/Layout/footer/index copy.vue
  6. 367
      teaching_integration_platform_template/src/Layout/footer/index.vue
  7. 2
      teaching_integration_platform_template/src/Layout/tabbar/index.vue
  8. 1
      teaching_integration_platform_template/src/assets/icons/QQ.svg
  9. 4
      teaching_integration_platform_template/src/store/module/user.ts
  10. 37
      teaching_integration_platform_template/src/views/course/index.vue
  11. 4
      teaching_integration_platform_template/src/views/knowledge/index.vue
  12. 75
      teaching_integration_platform_template/src/views/roadbedRecommendation/components/mountNode.vue

@ -1,96 +1,100 @@
<template>
<div class="configuration-page">
<el-form :model="form" label-width="auto" style="max-width: 600px">
<el-form-item label="LOGO">
<my-update v-model="form.logo"></my-update>
</el-form-item>
<el-form-item label="项目名称">
<el-input v-model="form.name" />
</el-form-item>
<el-form-item label="门户头部宣传大图">
<my-update v-model="form.promotionalImages"></my-update>
</el-form-item>
<el-form-item label="门户首页">
<el-input v-model="form.home" />
</el-form-item>
<el-form-item label="后台登陆首页地址">
<el-input v-model="form.loginAddress" />
</el-form-item>
<el-form-item label="系统标题">
<el-input v-model="form.title" />
</el-form-item>
<el-form-item label="版权信息">
<el-input v-model="form.copyrightInformation" />
</el-form-item>
<el-form-item label="备案号">
<el-input v-model="form.recordNumber" />
</el-form-item>
<el-form-item label="备案号信息">
<el-input v-model="form.recordInformation" type="textarea" />
</el-form-item>
<el-form-item label="qq">
<el-input v-model="form.qqNumber" />
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="form.mailbox" />
</el-form-item>
<el-form-item label="电话">
<el-input v-model="form.phone" />
</el-form-item>
<el-form-item label="联系地址">
<el-input v-model="form.address" />
</el-form-item>
<el-form-item label="二维码">
<my-update v-model="form.qrCode"></my-update>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
</el-form>
</div>
<div class="configuration-page">
<el-form :model="form" label-width="auto" style="max-width: 600px">
<el-form-item label="LOGO">
<my-update v-model="form.logo"></my-update>
</el-form-item>
<el-form-item label="项目名称">
<el-input v-model="form.name" />
</el-form-item>
<el-form-item label="门户头部宣传大图">
<my-update v-model="form.promotionalImages"></my-update>
</el-form-item>
<el-form-item label="门户首页">
<el-input v-model="form.home" />
</el-form-item>
<el-form-item label="后台登陆首页地址">
<el-input v-model="form.loginAddress" />
</el-form-item>
<el-form-item label="系统标题">
<el-input v-model="form.title" />
</el-form-item>
<el-form-item label="版权信息">
<el-input v-model="form.copyrightInformation" />
</el-form-item>
<el-form-item label="备案号">
<el-input v-model="form.recordNumber" />
</el-form-item>
<el-form-item label="备案号信息">
<el-input v-model="form.recordInformation" type="textarea" />
</el-form-item>
<el-form-item label="qq">
<el-input v-model="form.qqNumber" />
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="form.mailbox" />
</el-form-item>
<el-form-item label="电话">
<el-input v-model="form.phone" />
</el-form-item>
<el-form-item label="联系地址">
<el-input v-model="form.address" />
</el-form-item>
<el-form-item label="二维码">
<my-update v-model="form.qrCode"></my-update>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script lang="ts" setup>
import { getSysSettingApi, proxPutSysSettingApi, uploadApi } from '@/api/configuration';
import {
getSysSettingApi,
proxPutSysSettingApi,
uploadApi,
} from '@/api/configuration'
import { ref, reactive } from 'vue'
import MyUpdate from './MyUpdate.vue';
import useUserStore from '@/store/modules/user';
import MyUpdate from './MyUpdate.vue'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
// do not use same name with ref
const form = reactive({
address: '',
copyrightInformation: '',
id: userStore.data.id,
loginAddress: '',
logo: '',
name: '',
phone: '',
promotionalImages: '',
qqNumber: '',
qrCode: '',
recordNumber: '',
title: '',
mailbox: '',
home: '',
recordInformation: ''
address: '',
copyrightInformation: '',
id: userStore.data.id,
loginAddress: '',
logo: '',
name: '',
phone: '',
promotionalImages: '',
qqNumber: '',
qrCode: '',
recordNumber: '',
title: '',
mailbox: '',
home: '',
recordInformation: '',
})
const ran = ref(false)
getSysSettingApi().then((res) => {
Object.assign(form, res.data)
ran.value = true
Object.assign(form, res.data)
ran.value = true
})
const onSubmit = async () => {
form.logo = await uploadApi(form.logo)
form.promotionalImages = await uploadApi(form.promotionalImages)
form.qrCode = await uploadApi(form.qrCode)
await proxPutSysSettingApi(form)
form.logo = await uploadApi(form.logo)
form.promotionalImages = await uploadApi(form.promotionalImages)
form.qrCode = await uploadApi(form.qrCode)
await proxPutSysSettingApi(form)
}
</script>
<style lang="scss" scoped>
.configuration-page {
width: 600px;
margin: auto;
width: 600px;
margin: auto;
}
</style>

@ -1,14 +1,173 @@
<template>
<div>
收藏记录
<div class="container">
<el-card>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="课程名称">
<el-input
v-model="formInline.user"
placeholder="请输入课程名称"
clearable
style="width: 300px"
/>
</el-form-item>
<el-form-item label="日期">
<el-date-picker
v-model="formInline.date"
type="date"
placeholder="请选择日期"
clearable
style="width: 300px"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
:loading="inquireLoading"
@click="handleInquire"
>
查询
</el-button>
<el-button
type="danger"
v-if="selectID.length"
@click="deleteSelected"
>
批量删除
</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="margin-top: 20px; height: calc(100vh - 200px); width: 100%">
<el-table
:data="recordList"
border
style="width: 100%"
@selection-change="selectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" width="55" label="序号" />
<el-table-column prop="courseName" label="课程名称" />
<el-table-column prop="number" label="收藏人数" />
<el-table-column prop="time" label="时间" />
<el-table-column label="操作">
<template #default="{ row }">
<el-button type="danger" link @click="onDeleteRecord(row.id)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
</template>
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import useUserStore from '@/store/modules/user'
import { ElMessageBox, ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
const router = useRouter()
const userStore = useUserStore()
const formInline = reactive({
user: '',
region: '',
date: '',
})
const inquireLoading = ref(false)
function handleInquire() {
inquireLoading.value = true
setTimeout(() => {
inquireLoading.value = false
ElMessage({
type: 'success',
message: '查询成功',
})
}, Math.random() * 1000)
}
const recordList = ref([
{
courseId: 'de3100cad98f76be3176dd39aa748a9e',
courseName: '离散数学及其应用',
id: '1818126244841295873',
img: '',
number: 5,
time: '2024-07-30 11:27:30',
userId: '2',
},
{
id: '1818114181813293057',
courseId: '2fa0fd63262230639d2c45a3acd9045c',
courseName: '计算机导论12',
userId: '2',
number: 2,
img: '',
time: '2024-07-30 10:39:34',
},
])
const params = ref({
pagesize: 10,
pagenum: '1',
userId: userStore.data.id,
})
const total = ref(0)
//
const onDeleteRecord = async (ids: any) => {
await ElMessageBox.confirm('你确认删除该条浏览信息吗?', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消',
})
}
const selectID = ref([])
const selectionChange = (e: { map: (arg0: (item: any) => any) => never[] }) => {
if (e) {
selectID.value = e.map((item: { id: any }) => item.id)
console.log(selectID.value)
}
}
const deleteSelected = async () => {
//
if (selectID.value.length === 0) {
await ElMessageBox.confirm('请选择你要删除的内容', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
})
return
}
await ElMessageBox.confirm('你确认删除浏览记录吗?', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消',
})
}
</script>
<style lang="scss" scoped>
.container {
position: relative;
width: 100%;
<script lang='ts' setup>
// import { onMounted, reactive, ref, toRefs, watch } from 'vue'
// height: calc(100vh - 100px);
.pagination {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
}
}
</script>
:deep(.el-form-item) {
margin-bottom: 0;
}
<style lang='scss' scoped>
:deep(.el-scrollbar__wrap) {
padding: 0;
}
</style>
</style>

@ -1,14 +1,172 @@
<template>
<div>
点赞记录
</div>
<div class="container">
<el-card>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="课程名称">
<el-input
v-model="formInline.user"
placeholder="请输入课程名称"
clearable
style="width: 300px"
/>
</el-form-item>
<el-form-item label="日期">
<el-date-picker
v-model="formInline.date"
type="date"
placeholder="请选择日期"
clearable
style="width: 300px"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
:loading="inquireLoading"
@click="handleInquire"
>
查询
</el-button>
<el-button
type="danger"
v-if="selectID.length"
@click="deleteSelected"
>
批量删除
</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="margin-top: 20px; height: calc(100vh - 200px); width: 100%">
<el-table
:data="recordList"
border
style="width: 100%"
@selection-change="selectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" width="55" label="序号" />
<el-table-column prop="courseName" label="课程名称" />
<el-table-column prop="number" label="点赞人数" />
<el-table-column prop="time" label="时间" />
<el-table-column label="操作">
<template #default="{ row }">
<el-button type="danger" link @click="onDeleteRecord(row.id)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import useUserStore from '@/store/modules/user'
import { ElMessageBox, ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
const router = useRouter()
const userStore = useUserStore()
const formInline = reactive({
user: '',
region: '',
date: '',
})
const inquireLoading = ref(false)
function handleInquire() {
inquireLoading.value = true
setTimeout(() => {
inquireLoading.value = false
ElMessage({
type: 'success',
message: '查询成功',
})
}, Math.random() * 1000)
}
const recordList = ref([
{
courseId: 'de3100cad98f76be3176dd39aa748a9e',
courseName: '离散数学及其应用',
id: '1818126244841295873',
img: '',
number: 5,
time: '2024-07-30 11:27:30',
userId: '2',
},
{
id: '1818114181813293057',
courseId: '2fa0fd63262230639d2c45a3acd9045c',
courseName: '计算机导论12',
userId: '2',
number: 2,
img: '',
time: '2024-07-30 10:39:34',
},
])
const params = ref({
pagesize: 10,
pagenum: '1',
userId: userStore.data.id,
})
const total = ref(0)
//
const onDeleteRecord = async (ids: any) => {
await ElMessageBox.confirm('你确认删除该条浏览信息吗?', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消',
})
}
const selectID = ref([])
const selectionChange = (e: { map: (arg0: (item: any) => any) => never[] }) => {
if (e) {
selectID.value = e.map((item: { id: any }) => item.id)
console.log(selectID.value)
}
}
const deleteSelected = async () => {
//
if (selectID.value.length === 0) {
await ElMessageBox.confirm('请选择你要删除的内容', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
})
return
}
await ElMessageBox.confirm('你确认删除浏览记录吗?', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消',
})
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.container {
position: relative;
width: 100%;
// height: calc(100vh - 100px);
.pagination {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
}
}
:deep(.el-form-item) {
margin-bottom: 0;
}
:deep(.el-scrollbar__wrap) {
padding: 0;
}
</style>

@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<title>Vite + Vue + TS</title>
</head>
<body>

@ -0,0 +1,81 @@
<template>
<div class="footer">
<ul>
<li>
系统标题
{{ adminInfoStore.info.title }}
</li><el-divider direction="vertical" border-style="dashed" />
<li>
版权信息
{{ adminInfoStore.info.copyrightInformation }}
</li> <el-divider direction="vertical" border-style="dashed" />
<li>
备案号
{{ adminInfoStore.info.recordNumber }}
</li> <el-divider direction="vertical" border-style="dashed" />
<li>
qq:
{{ adminInfoStore.info.qqNumber }}
</li><el-divider direction="vertical" border-style="dashed" />
<li>
邮箱:
{{ adminInfoStore.info.mailbox }}
</li> <el-divider direction="vertical" border-style="dashed" />
<li>
电话:
{{ adminInfoStore.info.phone }}
</li>
<li>
地址:
{{ adminInfoStore.info.address }}
</li>
<el-divider direction="vertical" border-style="dashed" />
<li>
<el-image style="width: 50px; height: 50px" :src="adminInfoStore.info.qrCode" fit="cover" />
</li>
<el-divider direction="vertical" border-style="dashed" />
<li>
备案信息:
{{ adminInfoStore.info.recordInformation }}
</li>
</ul>
</div>
</template>
<script lang="ts" setup>
import useAdminInfoStore from '@/store/module/adminInfo'
const adminInfoStore = useAdminInfoStore()
console.log(adminInfoStore);
</script>
<style lang="scss" scoped>
.footer {
background-color: #252527;
height: 300px;
display: flex;
align-items: center;
justify-content: center;
ul {
width: 600px;
height: 200px;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
color: #ccc;
font-family:'Courier New', Courier, monospace;
// background: linear-gradient(white,#38495a);
// background-clip: text;
// color: transparent;
}
}
</style>

@ -1,81 +1,312 @@
<template>
<div class="footer">
<ul>
<li>
系统标题
{{ adminInfoStore.info.title }}
</li><el-divider direction="vertical" border-style="dashed" />
<li>
版权信息
{{ adminInfoStore.info.copyrightInformation }}
</li> <el-divider direction="vertical" border-style="dashed" />
<li>
备案号
{{ adminInfoStore.info.recordNumber }}
</li> <el-divider direction="vertical" border-style="dashed" />
<li>
qq:
{{ adminInfoStore.info.qqNumber }}
</li><el-divider direction="vertical" border-style="dashed" />
<li>
邮箱:
{{ adminInfoStore.info.mailbox }}
</li> <el-divider direction="vertical" border-style="dashed" />
<li>
电话:
{{ adminInfoStore.info.phone }}
</li>
<li>
地址:
{{ adminInfoStore.info.address }}
</li>
<el-divider direction="vertical" border-style="dashed" />
<li>
<el-image style="width: 50px; height: 50px" :src="adminInfoStore.info.qrCode" fit="cover" />
</li>
<el-divider direction="vertical" border-style="dashed" />
<li>
备案信息:
{{ adminInfoStore.info.recordInformation }}
</li>
</ul>
</div>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import useAdminInfoStore from '@/store/module/adminInfo'
const adminInfoStore = useAdminInfoStore()
console.log(adminInfoStore);
const info = adminInfoStore.info;
const footer = ref(null)
function handleDark() {
// @ts-ignore
footer.value.classList.toggle('dark__mode')
isShow.value = !isShow.value
}
const isShow = ref(false)
</script>
<template>
<footer ref="footer" class="dark__mode">
<div class="container">
<div class="container__footer">
<div class="profil">
<div class="logo__area">
<img src="../../assets/images/LOGO.png" alt="">
<span class="logo__name">LESSON</span>
<button v-show="isShow" @click="handleDark" class="moon"><i class='bx bxs-moon'></i></button>
<button v-show="!isShow" @click="handleDark" class="sun"><i class='bx bxs-sun'></i></button>
</div>
<div class="desc__area">
<p>
Thanks for using the integrated teaching portal system
</p>
</div>
<div class="social__media">
<i class='bx bxl-linkedin-square'></i>
<i class='bx bxl-facebook-square'></i>
<i class='bx bxl-instagram-alt'></i>
<i class='bx bxl-github'></i>
<!-- <i>
<svg class="svg">
<use :xlink:href="'#icon-QQ'"></use>
</svg>
</i> -->
</div>
</div>
<div class="service__area">
<ul class="service__header">
<li class="service__name">Information</li>
<li>
<i>
系统标题{{ info.title }}
</i>
</li>
<li>
<i>
版权信息{{ info.copyrightInformation }}
</i>
</li>
<li>
<i>
备案号{{ info.recordNumber }}
</i>
</li>
<li>
<i>
备案信息{{ info.recordInformation }}
</i>
</li>
</ul>
<ul class="service__header">
<li class="service__name">Relation</li>
<li>
<i>
邮箱{{ info.mailbox }}
</i>
</li>
<li>
<i>
电话{{ info.phone }}
</i>
</li>
<li>
<i>
QQ{{ info.qqNumber }}
</i>
</li>
<li>
<i>
地址{{ info.address }}
</i>
</li>
</ul>
</div>
</div>
<hr>
<!-- <div class="footer__bottom">
<div class="copy__right">
<i class='bx bxs-copyright'></i>
<span>2024 ayprojex</span>
</div>
<div class="tou">
<i>Term of Use</i>
<i>Privacy Policy</i>
<i>Cookie</i>
</div>
</div> -->
</div>
</footer>
</template>
<style lang="scss" scoped>
.footer {
background-color: #252527;
height: 300px;
display: flex;
align-items: center;
justify-content: center;
ul {
width: 600px;
height: 200px;
display: flex;
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
.svg {
width: 24px;
height: 25px;
}
.dark__mode {
--primary-color: #000;
--secondary-color: #fff;
}
footer {
--primary-color: #fff;
--secondary-color: #000;
background-color: var(--primary-color);
box-shadow: 0 16px 70px -8px rgba(0, 0, 0, 0.25);
border-radius: 20px 20px 0 0;
transition: background 0.3s linear;
.container {
max-width: 1240px;
padding: 30px 40px;
margin: auto;
.container__footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1em;
.profil {
.logo__area {
display: flex;
align-items: center;
margin-bottom: 1em;
.logo__name {
font-size: 1.5em;
font-weight: 700;
margin: 0 1em;
color: var(--secondary-color);
}
img {
width: 35px;
height: 35px;
border-radius: 50%;
border: 1px solid var(--primary-color);
}
button {
border: none;
outline: none;
background-color: transparent;
font-size: 15px;
cursor: pointer;
&.sun {
color: #fff;
}
}
}
.desc__area {
max-width: 320px;
margin-bottom: 1.25em;
p {
color: #828282;
font-weight: 400;
line-height: 1.8;
}
}
.social__media {
// display: flex;
i {
color: #828282;
margin-right: 22px;
font-size: 24px;
// &:hover {
// color: #313131;
// }
}
}
}
.service__area {
display: flex;
.service__header {
margin-right: 40px;
li.service__name {
color: var(--secondary-color);
font-weight: 600;
}
li {
margin-bottom: 10px;
i {
color: #828282;
margin-bottom: 1px;
font-weight: 400;
// &:hover {
// color: #313131;
// }
}
}
}
}
}
hr {
height: 1px;
border: none;
background-color: #828282;
margin-bottom: 1em;
}
.footer__bottom {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.857em;
.copy__right {
color: #828282;
display: flex;
align-items: center;
span {
margin-left: 8px;
font-weight: 400;
letter-spacing: 0.135em;
}
}
.tou {
i {
color: #828282;
margin-left: 1.5em;
// &:hover {
// color: #313131;
// }
}
}
}
}
}
@media screen and (max-width:768px) {
.container__footer,
.service__area {
flex-wrap: wrap;
justify-content: left;
}
.service__header {
margin-left: 0;
margin-right: 40px;
}
.social_media {
margin-bottom: 1em;
}
.footer_bottom {
flex-wrap: wrap;
align-items: center;
justify-content: center;
color: #ccc;
font-family:'Courier New', Courier, monospace;
// background: linear-gradient(white,#38495a);
// background-clip: text;
// color: transparent;
}
}
@media screen and (max-width: 510px) {
.service__header {
margin-bottom: 8px;
}
.copy__right {
margin-bottom: 8px;
}
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Rubik", sans-serif;
font-size: 16px;
}
a {
text-decoration: none;
}
</style>

@ -104,7 +104,7 @@ function logout() {
send()
setTimeout(() => {
otherWin.postMessage('logout', import.meta.env.VITE_APP_OTHER_ORIGIN)
}, 500)
}, 700)
}
}
const handleCommand = (command: string) => {

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726655680044" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2686" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m210.5 612.4c-11.5 1.4-44.9-52.7-44.9-52.7 0 31.3-16.2 72.2-51.1 101.8 16.9 5.2 54.9 19.2 45.9 34.4-7.3 12.3-125.6 7.9-159.8 4-34.2 3.8-152.5 8.3-159.8-4-9.1-15.2 28.9-29.2 45.8-34.4-35-29.5-51.1-70.4-51.1-101.8 0 0-33.4 54.1-44.9 52.7-5.4-0.7-12.4-29.6 9.4-99.7 10.3-33 22-60.5 40.2-105.8-3.1-116.9 45.3-215 160.4-215 113.9 0 163.3 96.1 160.4 215 18.1 45.2 29.9 72.8 40.2 105.8 21.7 70.1 14.6 99.1 9.3 99.7z" p-id="2687" fill="#828282"></path></svg>

After

Width:  |  Height:  |  Size: 869 B

@ -4,7 +4,7 @@ import { ref, reactive } from 'vue'
const userStore = defineStore('userStore', () => {
const userInfo = reactive<any>({})
const isLogin = ref(false)
const token = ref(sessionStorage.getItem('TOKEN') || '')
const token = ref(localStorage.getItem('TOKEN') || '')
const verifyToken = () => { }
const clearUserInfo = () => {
Object.keys(userInfo).forEach(function (prop) {
@ -13,7 +13,7 @@ const userStore = defineStore('userStore', () => {
}
const setToken = (data: string) => {
token.value = data
sessionStorage.setItem('TOKEN', data)
localStorage.setItem('TOKEN', data)
}
const setUserInfo = async () => {
try {

@ -92,7 +92,9 @@
</div>
<div class="description">
<div class="description-box">
{{ Route.query.name }}这个课程的简介{{ learn.description }}
<!-- 课程简介 -->
<div class="title">{{ Route.query.name }}</div>
<div style="text-indent: 2em;">{{ learn.description }}</div>
<!-- Vues 设计与实现这本书的简介 Vues 设计与实现是一本深入剖析
Vues 框架核心原理的权威著作
本书首先会为读者搭建起一个坚实的知识基础详细介绍 Vues
@ -568,12 +570,39 @@ getCourseObjectivesListEvent()
overflow-y: auto;
height: 260px;
padding: 10px 20px;
text-indent: 2em;
// text-indent: 2em;
/* 2em 约等于两个汉字的宽度 */
font-size: 18px;
line-height: 40px;
.description-box {}
position: relative;
.description-box {
.title {
border-radius: 16px;
border: 1px solid #e8e9fb;
box-shadow: 0 0 10px #e8e9fb;
text-align: center;
color: #12a3f5;
width: fit-content;
min-width: 80px;
padding: 0 10px;
position: relative;
left: 50%;
translate: -50%;
margin-bottom: 6px;
&:before {
content: "";
width: 300%;
height: 2px;
background: #e8e9fb;
position: absolute;
bottom: -6px;
left: 50%;
translate: -50%;
background: linear-gradient(to right, rgba(255, 255, 255, 0) ,#e8e9fb,rgba(255, 255, 255, 0));
}
}
}
}
.hours {

@ -1,5 +1,5 @@
<template>
<div class="title">xxx知识点
<div class="title">{{ Route.query.title }}
<div class="back" @click="router.go(-1)">返回</div>
</div>
<div class="container" v-if="loading">
@ -99,7 +99,7 @@ import VueOfficeDocx from '@vue-office/docx'
const Route = useRoute()
const router = useRouter()
// const courseId: string = Route.query.id as string
console.log(Route.query.id)
// console.log(Route.query.id)
const loading = ref(false)
const activeName = ref<string>('1')

@ -8,7 +8,7 @@ import { getCoursePath } from '@/api/course'
import { useRouter } from 'vue-router'
import { proxrequest } from '@/api/configuration';
const Router = useRouter()
const props = defineProps(['corseId']);
const props = defineProps(['corseId','options']);
const nodeList = ref({ nodes: [], edges: [] })
watch(() => props.corseId, () => getCoursePathEvent());
let prOpt: any;
@ -36,7 +36,39 @@ const getCoursePathEvent = async () => {
console.log(nodeList.value)
init()
}
var graph:any;
onMounted(()=>{
graph = new G6.Graph({
container: 'mountNode',
width: window.innerWidth - 19,
height: 600,
layout: {
type: 'dagre',
rankdir: 'LR',
nodesep: 30,
ranksep: 100,
},
modes: {
default: ['drag-canvas'],
},
defaultNode: {
shape: 'round-rect',
labelCfg: {
style: {
fill: '#000000A6',
fontSize: 10,
},
},
style: {
stroke: '#72CC4A',
width: 150,
},
},
defaultEdge: {
shape: 'polyline',
},
})
})
const init = () => {
var colorMap = {
凭证开立: '#72CC4A',
@ -46,6 +78,8 @@ const init = () => {
第二阶段: '#1A91FF',
第三阶段: '#FFAA15',
}
// #region
// var data = {
// nodes: [
// {
@ -186,6 +220,7 @@ const init = () => {
// },
// ],
// }
// #endregion
G6.registerNode(
'round-rect',
@ -357,46 +392,14 @@ const init = () => {
},
})
var graph = new G6.Graph({
container: 'mountNode',
width: window.innerWidth - 19,
height: 600,
layout: {
type: 'dagre',
rankdir: 'LR',
nodesep: 30,
ranksep: 100,
},
modes: {
default: ['drag-canvas'],
},
defaultNode: {
shape: 'round-rect',
labelCfg: {
style: {
fill: '#000000A6',
fontSize: 10,
},
},
style: {
stroke: '#72CC4A',
width: 150,
},
},
defaultEdge: {
shape: 'polyline',
},
})
graph.data(nodeList.value)
graph.render()
graph.on('node:click', ev => {
console.log(ev.item._cfg.id);
console.log(ev, ev.item._cfg.id);
Router.push({
path: '/knowledge',
query: { id: ev.item._cfg.id }
query: { id: ev.item._cfg.id,title:ev.item._cfg.model.label }
})
});
var edges = graph.getEdges()
edges.forEach(function (edge: any) {

Loading…
Cancel
Save