@ -1,10 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
//获取浏览记录列表
|
||||
export const getRecordListService = (params) => |
||||
request.get('http://39.106.16.162:8080/learningrecords/getall', { params }) |
||||
//删除浏览记录
|
||||
export function DelRecordService(ids) { |
||||
return request.delete( |
||||
`http://39.106.16.162:8080/learningrecords/delete?ids=${ids}`, |
||||
) |
||||
} |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 8.5 KiB |
@ -0,0 +1,10 @@ |
||||
import OSS from 'ali-oss' |
||||
|
||||
export const client = new OSS({ |
||||
bucket: 'wenyu132', //bucket名称
|
||||
region: 'oss-cn-beijing', //区域
|
||||
endpoint: 'oss-cn-beijing.aliyuncs.com', //地域节点==>外网访问
|
||||
accessKeyId: 'LTAI5tPe9x46aWZt8FScytst', //访问键id
|
||||
accessKeySecret: '0mfxSLzmRgtHMXpD5pCBTl9RfwbmDG', //访问密钥
|
||||
secure: true, //http就是false,https就是true
|
||||
}) |
@ -0,0 +1,23 @@ |
||||
import { client } from '@/config/index.js' |
||||
import { nanoid } from 'nanoid' //随机函数
|
||||
const tool = { |
||||
oss: { |
||||
async upload(file) { |
||||
// 文件名
|
||||
const uuid = nanoid() |
||||
// 文件后缀名
|
||||
const index = file.name.lastIndexOf('.') |
||||
const suffix = file.name.substring(index + 1) |
||||
//完整路径
|
||||
let fileName = 'wenyu/' + uuid + '.' + suffix |
||||
|
||||
return await client.multipartUpload(fileName, file, { |
||||
progress: function (p) { |
||||
console.log('进度', p) |
||||
}, |
||||
}) |
||||
}, |
||||
}, |
||||
} |
||||
|
||||
export default tool |
@ -1,121 +1,475 @@ |
||||
<script lang="ts" setup> |
||||
import {} from 'vue' |
||||
// import allclass from '@/assets/images/allclass.png' |
||||
<script setup> |
||||
import { ref, onMounted } from 'vue' |
||||
import { ElMessage, ElMessageBox } from 'element-plus' |
||||
import { id } from 'element-plus/es/locales.mjs' |
||||
import * as echarts from 'echarts' |
||||
import { useRoute } from 'vue-router' |
||||
import { getCourseList, addCourse, editCourse, deleteCourse, getCourseInfo } from '@/api/courseChaptersApi' |
||||
const route = useRoute() |
||||
// id : 分目标id |
||||
// targetId : 选中的分类 |
||||
|
||||
const targetList = ref([ |
||||
{ |
||||
label: '课程目标一', |
||||
id: 1, |
||||
disabled: false, |
||||
}, |
||||
{ |
||||
label: '课程目标二', |
||||
disabled: false, |
||||
id: 2, |
||||
}, |
||||
{ |
||||
label: '课程目标三', |
||||
id: 3, |
||||
disabled: false, |
||||
}, |
||||
]) |
||||
const formData = ref({ |
||||
description: '', |
||||
}) |
||||
const activeIndex = ref(0) |
||||
const addBook = (id) => { |
||||
activeIndex.value = id |
||||
dialogVisible.value = true |
||||
flog.value = false |
||||
// updateDisabledStatus() |
||||
} |
||||
const text = ref('我是后台获取的值') |
||||
const textChange = (val) => { |
||||
console.log(text.value) |
||||
} |
||||
// 弹窗 |
||||
const dialogVisible = ref(false) |
||||
// 关闭弹窗 |
||||
const handleClose = () => { |
||||
dialogVisible.value = false |
||||
} |
||||
// 弹窗提交事件 |
||||
const submit = async () => { |
||||
if (flog.value) { |
||||
await editCourse({ id: activeIndex.value, content: formData.value.description }) |
||||
} else { |
||||
await addCourse({ objectiveId: activeIndex.value, content: formData.value.description }) |
||||
} |
||||
|
||||
getList() |
||||
dialogVisible.value = false |
||||
formData.value.description = '' |
||||
activeIndex.value = '' |
||||
// // 判断当前点击的是新增还是修改 |
||||
// if (flog.value) { |
||||
// console.log('编辑', formData.value.target) |
||||
// // 找到新增的一项 |
||||
// const index = booksList.value.findIndex( |
||||
// (item) => formData.value.id == item.id, |
||||
// ) |
||||
// console.log(index, 'index') |
||||
// console.log(booksList.value[index]) |
||||
// booksList.value[index].id = formData.value.id |
||||
// booksList.value[index].targetId = formData.value.target |
||||
// booksList.value[index].introduce = formData.value.description |
||||
// close() |
||||
// } else { |
||||
// courseList.value[activeIndex.value].booklist.push({ |
||||
// id: booksList.value.length + 1, |
||||
// targetId: formData.value.target, |
||||
// introduce: formData.value.description, |
||||
// }) |
||||
// close() |
||||
// flog.value = false |
||||
|
||||
} |
||||
const close = () => { |
||||
formData.value = { |
||||
id: null, |
||||
target: '', |
||||
description: '', |
||||
} |
||||
dialogVisible.value = false |
||||
} |
||||
// 筛选目标 |
||||
const filterTarger = (target) => { |
||||
const res = targetList.value.find((item) => { |
||||
if (item.id === target) { |
||||
console.log(item) |
||||
return item |
||||
} |
||||
}) |
||||
return res.label |
||||
} |
||||
|
||||
// 编辑事件 |
||||
const flog = ref(false) |
||||
const editBook = async (obj) => { |
||||
const res = await getCourseInfo({ id: obj.id }) |
||||
|
||||
flog.value = true |
||||
console.log(obj) |
||||
activeIndex.value = res.data.id |
||||
// formData.value.id = obj.id |
||||
// formData.value.target = obj.targetId |
||||
formData.value.description = res.data.content |
||||
dialogVisible.value = true |
||||
} |
||||
const del = async (obj) => { |
||||
await ElMessageBox.confirm('你确认要删除该课程目标吗', '温馨提示', { |
||||
type: 'warning', |
||||
confirmButtonText: '确认', |
||||
cancelButtonText: '取消' |
||||
}) |
||||
await deleteCourse({ id: obj.id }) |
||||
ElMessage.success('删除成功') |
||||
getList() |
||||
// console.log(id); |
||||
// activeIndex.value = id |
||||
// courseList.booksList.value = booksList.value.filter((item) => item.id !== id) |
||||
} |
||||
|
||||
// const disableChange = (id) => { |
||||
// const index = booksList.value.findIndex((item,index) => item.id === id) |
||||
// console.log(index); |
||||
// if(index){ |
||||
// targetList.value[index].disabled = false |
||||
// } |
||||
// } |
||||
// 定义一个方法来更新 targetList 中的 disabled 属性 |
||||
|
||||
const getList = async () => { |
||||
const res = await getCourseList({ id: courseId.value }) |
||||
data.value = res.data[0] |
||||
text.value = res.data[0].name |
||||
} |
||||
const data = ref({}) |
||||
const courseId = ref(0) |
||||
onMounted(async () => { |
||||
courseId.value = route.query.id |
||||
console.log(courseId.value); |
||||
getList() |
||||
console.log(data.value); |
||||
let chartDom = document.getElementById('main') |
||||
let myChart = echarts.init(chartDom) |
||||
let option |
||||
option = { |
||||
title: { |
||||
text: '分目标', |
||||
}, |
||||
legend: { |
||||
data: ['Allocated Budget', 'Actual Spending'], |
||||
}, |
||||
radar: { |
||||
// shape: 'circle', |
||||
indicator: [ |
||||
{ name: 'Sales', max: 6500 }, |
||||
{ name: 'Administration', max: 16000 }, |
||||
{ name: 'Information Technology', max: 30000 }, |
||||
{ name: 'Customer Support', max: 38000 }, |
||||
{ name: 'Development', max: 52000 }, |
||||
{ name: 'Marketing', max: 25000 }, |
||||
], |
||||
}, |
||||
series: [ |
||||
{ |
||||
name: 'Budget vs spending', |
||||
type: 'radar', |
||||
data: [ |
||||
{ |
||||
value: [4200, 3000, 20000, 35000, 50000, 18000], |
||||
name: 'Allocated Budget', |
||||
}, |
||||
{ |
||||
value: [5000, 14000, 28000, 26000, 42000, 21000], |
||||
name: 'Actual Spending', |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
} |
||||
|
||||
option && myChart.setOption(option) |
||||
}) |
||||
</script> |
||||
|
||||
<template> |
||||
<el-row :gutter="20"> |
||||
<el-col :span="8"> |
||||
<div class="grid-content main"> |
||||
<div class="title"><p>| 课程总目标</p></div> |
||||
<div class="ac_content"> |
||||
<div class="ma_content"> |
||||
通过本课程的学习,使学生进一步了解计算机的工作原理,更好地理解和应用计算机,掌 |
||||
握用计算机处理问题的方法和技能:培养学生分析问题、解决问题的能力以及编制程序实现算 |
||||
法的能力。 |
||||
</div> |
||||
<div class="container"> |
||||
<div class="leftContent"> |
||||
<div class="topContent"> |
||||
<div class="title">| 课程总目标</div> |
||||
<div class="content1"> |
||||
<textarea class="textarea" @change="textChange" v-model="text">文本内容</textarea> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="grid-content picture"> |
||||
<div class="title"><p>| 课程总目标</p></div> |
||||
<div class="ac_pic"></div> |
||||
<div class="footContent"> |
||||
<div class="title">| 分目标雷达图</div> |
||||
<div class="content3"> |
||||
<div id="main"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="rightContent"> |
||||
<div class="title" style=" |
||||
width: 100%; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 0 20px; |
||||
height: 60px;"> |
||||
<div class="left2">| 课程分目标</div> |
||||
<div class="right2"> |
||||
<!-- <el-button type="primary" @click="addBook">新增</el-button> --> |
||||
</div> |
||||
</div> |
||||
</el-col> |
||||
<el-col :span="16"> |
||||
<div class="grid-content object"> |
||||
<div class="title"><p>| 课程分目标</p></div> |
||||
<div class="slice"></div> |
||||
<div class="content2"> |
||||
<el-scrollbar height="600px"> |
||||
<ul class="objectLi"> |
||||
<li v-for="(item, index) in data.courseObjectivesTrees" :key="item.id"> |
||||
<div class="courseObject"> |
||||
<!-- {{ filterTarger(item.targetId) }} --> |
||||
<div class="courseObject1">{{ item.name }}</div> |
||||
<div class="courseObject2"> |
||||
<!-- <el-button class="edit" type="text" @click="editBook(item)"> |
||||
编辑 |
||||
</el-button> --> |
||||
<el-button type="primary" @click="addBook(item.id)">新增</el-button> |
||||
</div> |
||||
</div> |
||||
<div class="smallContent"> |
||||
<el-scrollbar height="250px"> |
||||
<ul class="small"> |
||||
<li v-for="(obj, i) in item.contents" :key="obj.id"> |
||||
<div class="partObject"> |
||||
<div class="partObject1"> |
||||
<!-- {{ item.content }} --> |
||||
<!-- {{ item.introduce }} --> |
||||
课程目标{{ i + 1 }} |
||||
<!-- {{ filterTarger(obj.targetId) }} --> |
||||
</div> |
||||
<div class="partObject2"> |
||||
<el-button class="edit" type="text" @click="editBook(obj)"> |
||||
编辑 |
||||
</el-button> |
||||
<el-button class="destroy" type="text" @click="del(obj)"> |
||||
删除 |
||||
</el-button> |
||||
</div> |
||||
</div> |
||||
<div class="partObjectIntroduce"> |
||||
{{ obj.content }} |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</el-scrollbar> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</el-scrollbar> |
||||
</div> |
||||
</el-col> |
||||
</el-row> |
||||
</div> |
||||
</div> |
||||
<el-dialog v-if="dialogVisible" v-model="dialogVisible" :title="flog ? '编辑' : '新增'" width="500" |
||||
:before-close="handleClose"> |
||||
<el-form :model="formData" label-width="auto" style="max-width: 600px"> |
||||
<!-- <el-form-item label="目标" prop="target"> |
||||
<el-select v-model="formData.target" placeholder="Select" size="large" style="width: 240px"> |
||||
<el-option v-for="item in targetList" :key="item.id" :label="item.label" :value="item.id" |
||||
:disabled="item.disabled" /> |
||||
</el-select> |
||||
</el-form-item> --> |
||||
<el-form-item label="内容" prop="description"> |
||||
<el-input v-model="formData.description" placeholder="请输入内容"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<template #footer> |
||||
<div class="dialog-footer"> |
||||
<el-button @click="close">取消</el-button> |
||||
<el-button type="primary" @click="submit">确定</el-button> |
||||
</div> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<!-- <script setup> |
||||
import {ref} 'vue' |
||||
const li |
||||
</script> --> |
||||
|
||||
<style scoped> |
||||
.el-row { |
||||
margin-bottom: 20px; |
||||
} |
||||
.el-col { |
||||
border-radius: 4px; |
||||
} |
||||
.bg-purple { |
||||
background: #d3dce6; |
||||
} |
||||
.bg-purple-light { |
||||
background: #e5e9f2; |
||||
<style lang="scss" scoped> |
||||
#main { |
||||
padding: 15px; |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
.grid-content { |
||||
border-radius: 4px; |
||||
|
||||
.container { |
||||
display: flex; |
||||
flex-direction: column; |
||||
flex-direction: row; |
||||
flex-wrap: nowrap; |
||||
width: 100%; |
||||
|
||||
padding: 0 10px 0 10px; |
||||
justify-content: space-around; |
||||
} |
||||
.ac_content { |
||||
background: linear-gradient(180deg, #c7e3ff 0%, #ffffff 100%); |
||||
border-radius: 29px 29px 29px 29px; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
height: 206px; |
||||
} |
||||
.ma_content { |
||||
height: 160px; |
||||
font-family: Inter, Inter; |
||||
font-weight: 400; |
||||
font-size: 16px; |
||||
color: #333333; |
||||
line-height: 20px; |
||||
text-align: left; |
||||
font-style: normal; |
||||
text-transform: none; |
||||
margin-left: 33px; |
||||
margin-right: 33px; |
||||
} |
||||
.ac_pic { |
||||
height: 488px; |
||||
background: linear-gradient(180deg, #ffe9c7 0%, #ffffff 100%); |
||||
border-radius: 29px 29px 29px 29px; |
||||
} |
||||
img { |
||||
order: -1; |
||||
} |
||||
.object { |
||||
height: 857px; |
||||
background: linear-gradient(180deg, #4984ff 0%, #74deff 100%); |
||||
border-radius: 29px 29px 29px 29px; |
||||
} |
||||
.slice { |
||||
height: 791px; |
||||
background: linear-gradient(180deg, #c7e3ff 0%, #ffffff 100%); |
||||
border-radius: 29px 29px 29px 29px; |
||||
} |
||||
.picture { |
||||
height: 553px; |
||||
margin-top: 28px; |
||||
border-radius: 29px 29px 29px 29px; |
||||
background-image: linear-gradient(to right, #f9e397, #ffa674); |
||||
} |
||||
.main { |
||||
height: 272px; |
||||
border-radius: 29px 29px 29px 29px; |
||||
|
||||
.leftContent { |
||||
width: 450px; |
||||
height: 730px; |
||||
margin: 10px; |
||||
|
||||
.topContent { |
||||
border-radius: 20px 20px 0 0px; |
||||
height: 280px; |
||||
background-color: #74deff; |
||||
margin-button: 5px; |
||||
background-image: linear-gradient(to right, #4984ff, #74deff); |
||||
} |
||||
|
||||
.footContent { |
||||
border-radius: 20px; |
||||
margin-top: 20px; |
||||
height: 430px; |
||||
background-color: #ffa674; |
||||
background-image: linear-gradient(to right, #f9e397, #ffa674); |
||||
} |
||||
} |
||||
|
||||
.rightContent { |
||||
margin: 10px; |
||||
width: 950px; |
||||
height: 730px; |
||||
background-image: linear-gradient(to right, #4984ff, #74deff); |
||||
display: flex; |
||||
justify-content: end; |
||||
border-radius: 20px; |
||||
} |
||||
|
||||
.title { |
||||
flex: 1; |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
p { |
||||
height: 29px; |
||||
font-family: Inter, Inter; |
||||
font-weight: bold; |
||||
margin-left: 34px; |
||||
padding-left: 30px; |
||||
font-size: 24px; |
||||
color: #ffffff; |
||||
line-height: 28px; |
||||
text-align: left; |
||||
font-style: normal; |
||||
text-transform: none; |
||||
font-weight: 600; |
||||
color: #fff; |
||||
height: 40px; |
||||
line-height: 40px; |
||||
padding-top: 10px; |
||||
} |
||||
|
||||
.content1 { |
||||
border-radius: 20px 20px 0 0px; |
||||
margin-top: 20px; |
||||
width: 100%; |
||||
height: 220px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#c7e3ff, #ffffff); |
||||
|
||||
.textarea { |
||||
width: 100%; |
||||
border: none; |
||||
background: transparent; |
||||
padding: 20px; |
||||
height: 215px; |
||||
} |
||||
|
||||
p { |
||||
padding: 30px; |
||||
font-size: 16px; |
||||
} |
||||
} |
||||
|
||||
.content2 { |
||||
border-radius: 20px; |
||||
padding: 10px; |
||||
width: 100%; |
||||
height: 670px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#c7e3ff, #ffffff); |
||||
|
||||
.objectLi>li { |
||||
width: 845px; |
||||
height: 250px; |
||||
// margin: 40px; |
||||
// background-color: #ffffff; |
||||
border-radius: 5px; |
||||
margin: 20px; |
||||
|
||||
.courseObject { |
||||
height: 45px; |
||||
line-height: 40px; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 0 20px; |
||||
border-bottom: 1px solid #e7e7e7; |
||||
|
||||
.courseObject1 { |
||||
height: 30px; |
||||
line-height: 30px; |
||||
font-size: 14px; |
||||
background-color: #6093ff; |
||||
padding: 0px 16px; |
||||
color: #fff; |
||||
} |
||||
|
||||
.courseObject2 { |
||||
font-size: 14px; |
||||
color: #0052d9; |
||||
} |
||||
} |
||||
} |
||||
|
||||
// overflow-y: auto |
||||
.smallContent { |
||||
// border-radius: 20px; |
||||
padding: 10px; |
||||
width: 100%; |
||||
height: 200px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#c7e3ff, #ffffff); |
||||
} |
||||
|
||||
.small>li { |
||||
// display: inline-flex; |
||||
width: 650px; |
||||
height: 150px; |
||||
// margin: 40px; |
||||
background-color: #ffffff; |
||||
border-radius: 5px; |
||||
margin: 20px; |
||||
|
||||
.partObject { |
||||
height: 45px; |
||||
line-height: 40px; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 0 20px; |
||||
border-bottom: 1px solid #e7e7e7; |
||||
|
||||
.partObject1 { |
||||
height: 30px; |
||||
line-height: 30px; |
||||
font-size: 14px; |
||||
background-color: #6093ff; |
||||
padding: 0px 16px; |
||||
color: #fff; |
||||
} |
||||
|
||||
.partObject2 { |
||||
font-size: 14px; |
||||
color: #0052d9; |
||||
} |
||||
} |
||||
|
||||
.partObjectIntroduce { |
||||
height: 149px; |
||||
font-size: 16px; |
||||
padding: 15px; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.content3 { |
||||
border-radius: 20px; |
||||
margin-top: 20px; |
||||
width: 100%; |
||||
height: 370px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#ffe9c7, #ffffff); |
||||
} |
||||
</style> |
||||
|
@ -0,0 +1,476 @@ |
||||
<script setup> |
||||
import { ref, onMounted } from 'vue' |
||||
import { ElMessage, ElMessageBox } from 'element-plus' |
||||
import { id } from 'element-plus/es/locales.mjs' |
||||
import * as echarts from 'echarts' |
||||
import {useRoute } from 'vue-router' |
||||
import { getCourseList } from '@/api/courseChaptersApi' |
||||
const route = useRoute() |
||||
// id : 分目标id |
||||
// targetId : 选中的分类 |
||||
const booksList = ref([ |
||||
{ id: 1, targetId: 1, introduce: '内容111111' }, |
||||
// { id: 3, introduce: '内容333333' }, |
||||
// { id: 4, introduce: '内容333333' }, |
||||
]) |
||||
|
||||
const courseList = ref([ |
||||
{ id: 1, specific: '思政目标', booklist: [{ id: 1, targetId: 1, introduce: '内容111111' }] }, |
||||
{ id: 2, specific: '知识目标', booklist: [{ id: 1, targetId: 1, introduce: '内容222222' }] }, |
||||
{ id: 3, specific: '能力目标', booklist: [{ id: 1, targetId: 1, introduce: '内容333333' }] }, |
||||
{ id: 4, specific: '素质目标', booklist: [{ id: 1, targetId: 1, introduce: '内容444444' }] }, |
||||
]) |
||||
const targetList = ref([ |
||||
{ |
||||
label: '课程目标一', |
||||
id: 1, |
||||
disabled: false, |
||||
}, |
||||
{ |
||||
label: '课程目标二', |
||||
disabled: false, |
||||
id: 2, |
||||
}, |
||||
{ |
||||
label: '课程目标三', |
||||
id: 3, |
||||
disabled: false, |
||||
}, |
||||
]) |
||||
const formData = ref({ |
||||
id: null, |
||||
target: '', |
||||
description: '', |
||||
}) |
||||
const activeIndex = ref(0) |
||||
const addBook = (index) => { |
||||
activeIndex.value = index |
||||
dialogVisible.value = true |
||||
updateDisabledStatus() |
||||
} |
||||
const text = ref('我是后台获取的值') |
||||
const textChange = (val) => { |
||||
console.log(text.value) |
||||
} |
||||
// 弹窗 |
||||
const dialogVisible = ref(false) |
||||
// 关闭弹窗 |
||||
const handleClose = () => { |
||||
dialogVisible.value = false |
||||
} |
||||
// 弹窗提交事件 |
||||
const submit = () => { |
||||
// 判断当前点击的是新增还是修改 |
||||
if (flog.value) { |
||||
console.log('编辑', formData.value.target) |
||||
// 找到新增的一项 |
||||
const index = booksList.value.findIndex( |
||||
(item) => formData.value.id == item.id, |
||||
) |
||||
console.log(index, 'index') |
||||
console.log(booksList.value[index]) |
||||
booksList.value[index].id = formData.value.id |
||||
booksList.value[index].targetId = formData.value.target |
||||
booksList.value[index].introduce = formData.value.description |
||||
close() |
||||
} else { |
||||
courseList.value[activeIndex.value].booklist.push({ |
||||
id: booksList.value.length + 1, |
||||
targetId: formData.value.target, |
||||
introduce: formData.value.description, |
||||
}) |
||||
close() |
||||
flog.value = false |
||||
} |
||||
} |
||||
const close = () => { |
||||
formData.value = { |
||||
id: null, |
||||
target: '', |
||||
description: '', |
||||
} |
||||
dialogVisible.value = false |
||||
} |
||||
// 筛选目标 |
||||
const filterTarger = (target) => { |
||||
const res = targetList.value.find((item) => { |
||||
if (item.id === target) { |
||||
console.log(item) |
||||
return item |
||||
} |
||||
}) |
||||
return res.label |
||||
} |
||||
|
||||
// 编辑事件 |
||||
const flog = ref(false) |
||||
const editBook = (obj) => { |
||||
updateDisabledStatus() |
||||
flog.value = true |
||||
console.log(obj) |
||||
formData.value.id = obj.id |
||||
formData.value.target = obj.targetId |
||||
formData.value.description = obj.introduce |
||||
dialogVisible.value = true |
||||
} |
||||
const del = (id) => { |
||||
// console.log(id); |
||||
courseList.booksList.value = booksList.value.filter((item) => item.id !== id) |
||||
} |
||||
|
||||
// const disableChange = (id) => { |
||||
// const index = booksList.value.findIndex((item,index) => item.id === id) |
||||
// console.log(index); |
||||
// if(index){ |
||||
// targetList.value[index].disabled = false |
||||
// } |
||||
// } |
||||
// 定义一个方法来更新 targetList 中的 disabled 属性 |
||||
const updateDisabledStatus = () => { |
||||
// 遍历 targetList |
||||
targetList.value.forEach((targetItem) => { |
||||
// 检查 booksList 中是否有相同的 id |
||||
const hasIdInBooks = booksList.value.some( |
||||
(bookItem) => bookItem.id === targetItem.id, |
||||
) |
||||
// 如果存在,则设置 disabled 为 true |
||||
if (hasIdInBooks) { |
||||
targetItem.disabled = true |
||||
} |
||||
}) |
||||
} |
||||
const list=ref([]) |
||||
const content88=ref() |
||||
const courseId = ref(0) |
||||
onMounted(async() => { |
||||
courseId.value = route.query.id |
||||
console.log(courseId.value); |
||||
const res = await getCourseList({ id: courseId.value }) |
||||
console.log(res); |
||||
list.value=res.data |
||||
console.log(list.value); |
||||
content88.value = list.value[0].contents[0].content |
||||
console.log(list.value[0].contents[0].content); |
||||
console.log(content88.value); |
||||
|
||||
|
||||
let chartDom = document.getElementById('main') |
||||
let myChart = echarts.init(chartDom) |
||||
let option |
||||
option = { |
||||
title: { |
||||
text: '分目标', |
||||
}, |
||||
legend: { |
||||
data: ['Allocated Budget', 'Actual Spending'], |
||||
}, |
||||
radar: { |
||||
// shape: 'circle', |
||||
indicator: [ |
||||
{ name: 'Sales', max: 6500 }, |
||||
{ name: 'Administration', max: 16000 }, |
||||
{ name: 'Information Technology', max: 30000 }, |
||||
{ name: 'Customer Support', max: 38000 }, |
||||
{ name: 'Development', max: 52000 }, |
||||
{ name: 'Marketing', max: 25000 }, |
||||
], |
||||
}, |
||||
series: [ |
||||
{ |
||||
name: 'Budget vs spending', |
||||
type: 'radar', |
||||
data: [ |
||||
{ |
||||
value: [4200, 3000, 20000, 35000, 50000, 18000], |
||||
name: 'Allocated Budget', |
||||
}, |
||||
{ |
||||
value: [5000, 14000, 28000, 26000, 42000, 21000], |
||||
name: 'Actual Spending', |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
} |
||||
|
||||
option && myChart.setOption(option) |
||||
}) |
||||
</script> |
||||
<!-- v-model="text" --> |
||||
<template> |
||||
<div class="container"> |
||||
<div class="leftContent"> |
||||
<div class="topContent"> |
||||
<div class="title">| 课程总目标</div> |
||||
<div class="content1"> |
||||
<textarea class="textarea" @change="textChange">{{ content88 }}</textarea> |
||||
</div> |
||||
</div> |
||||
<div class="footContent"> |
||||
<div class="title">| 分目标雷达图</div> |
||||
<div class="content3"> |
||||
<div id="main"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="rightContent"> |
||||
<div class="title" style=" |
||||
width: 100%; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 0 20px; |
||||
height: 60px;"> |
||||
<div class="left2">| 课程分目标</div> |
||||
<div class="right2"> |
||||
<!-- <el-button type="primary" @click="addBook">新增</el-button> --> |
||||
</div> |
||||
</div> |
||||
<div class="content2"> |
||||
<el-scrollbar height="600px"> |
||||
<ul class="objectLi"> |
||||
<li v-for="(item, index) in courseList" :key="item.id"> |
||||
<div class="courseObject"> |
||||
<!-- {{ filterTarger(item.targetId) }} --> |
||||
<div class="courseObject1">{{ item.specific }}</div> |
||||
<div class="courseObject2"> |
||||
<!-- <el-button class="edit" type="text" @click="editBook(item)"> |
||||
编辑 |
||||
</el-button> --> |
||||
<el-button type="primary" @click="addBook(index)">新增</el-button> |
||||
</div> |
||||
</div> |
||||
<div class="smallContent"> |
||||
<el-scrollbar height="250px"> |
||||
<ul class="small"> |
||||
<li v-for="(obj, i) in item.booklist" :key="obj.id"> |
||||
<div class="partObject"> |
||||
<div class="partObject1"> |
||||
<!-- {{ item.introduce }} --> |
||||
课程目标{{ i+1 }} |
||||
<!-- {{ filterTarger(obj.targetId) }} --> |
||||
</div> |
||||
<div class="partObject2"> |
||||
<el-button class="edit" type="text" @click="editBook(obj)"> |
||||
编辑 |
||||
</el-button> |
||||
<el-button class="destroy" type="text" @click="del(obj.id)"> |
||||
删除 |
||||
</el-button> |
||||
</div> |
||||
</div> |
||||
<div class="partObjectIntroduce"> |
||||
{{ obj.introduce }} |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</el-scrollbar> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</el-scrollbar> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<el-dialog v-if="dialogVisible" v-model="dialogVisible" title="新增目标" width="500" :before-close="handleClose"> |
||||
<el-form :model="formData" label-width="auto" style="max-width: 600px"> |
||||
<!-- <el-form-item label="目标" prop="target"> |
||||
<el-select v-model="formData.target" placeholder="Select" size="large" style="width: 240px"> |
||||
<el-option v-for="item in targetList" :key="item.id" :label="item.label" :value="item.id" |
||||
:disabled="item.disabled" /> |
||||
</el-select> |
||||
</el-form-item> --> |
||||
<el-form-item label="内容" prop="description"> |
||||
<el-input v-model="formData.description" placeholder="请输入内容"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<template #footer> |
||||
<div class="dialog-footer"> |
||||
<el-button @click="close">取消</el-button> |
||||
<el-button type="primary" @click="submit">确定</el-button> |
||||
</div> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<!-- <script setup> |
||||
import {ref} 'vue' |
||||
const li |
||||
</script> --> |
||||
|
||||
<style lang="scss" scoped> |
||||
#main { |
||||
padding: 15px; |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.container { |
||||
display: flex; |
||||
flex-direction: row; |
||||
flex-wrap: nowrap; |
||||
width: 100%; |
||||
|
||||
padding: 0 10px 0 10px; |
||||
justify-content: space-around; |
||||
} |
||||
|
||||
.leftContent { |
||||
width: 450px; |
||||
height: 730px; |
||||
margin: 10px; |
||||
|
||||
.topContent { |
||||
border-radius: 20px 20px 0 0px; |
||||
height: 280px; |
||||
background-color: #74deff; |
||||
margin-button: 5px; |
||||
background-image: linear-gradient(to right, #4984ff, #74deff); |
||||
} |
||||
|
||||
.footContent { |
||||
border-radius: 20px; |
||||
margin-top: 20px; |
||||
height: 430px; |
||||
background-color: #ffa674; |
||||
background-image: linear-gradient(to right, #f9e397, #ffa674); |
||||
} |
||||
} |
||||
|
||||
.rightContent { |
||||
margin: 10px; |
||||
width: 950px; |
||||
height: 730px; |
||||
background-image: linear-gradient(to right, #4984ff, #74deff); |
||||
border-radius: 20px; |
||||
} |
||||
|
||||
.title { |
||||
padding-left: 30px; |
||||
font-size: 24px; |
||||
font-weight: 600; |
||||
color: #fff; |
||||
height: 40px; |
||||
line-height: 40px; |
||||
padding-top: 10px; |
||||
} |
||||
|
||||
.content1 { |
||||
border-radius: 20px 20px 0 0px; |
||||
margin-top: 20px; |
||||
width: 100%; |
||||
height: 220px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#c7e3ff, #ffffff); |
||||
|
||||
.textarea { |
||||
width: 100%; |
||||
border: none; |
||||
background: transparent; |
||||
padding: 20px; |
||||
height: 215px; |
||||
} |
||||
|
||||
p { |
||||
padding: 30px; |
||||
font-size: 16px; |
||||
} |
||||
} |
||||
|
||||
.content2 { |
||||
border-radius: 20px; |
||||
padding: 10px; |
||||
width: 100%; |
||||
height: 670px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#c7e3ff, #ffffff); |
||||
|
||||
.objectLi > li { |
||||
width: 845px; |
||||
height: 250px; |
||||
// margin: 40px; |
||||
// background-color: #ffffff; |
||||
border-radius: 5px; |
||||
margin: 20px; |
||||
.courseObject { |
||||
height: 45px; |
||||
line-height: 40px; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 0 20px; |
||||
border-bottom: 1px solid #e7e7e7; |
||||
|
||||
.courseObject1 { |
||||
height: 30px; |
||||
line-height: 30px; |
||||
font-size: 14px; |
||||
background-color: #6093ff; |
||||
padding: 0px 16px; |
||||
color: #fff; |
||||
} |
||||
|
||||
.courseObject2 { |
||||
font-size: 14px; |
||||
color: #0052d9; |
||||
} |
||||
} |
||||
} |
||||
// overflow-y: auto |
||||
.smallContent { |
||||
// border-radius: 20px; |
||||
padding: 10px; |
||||
width: 100%; |
||||
height: 200px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#c7e3ff, #ffffff); |
||||
} |
||||
.small > li { |
||||
// display: inline-flex; |
||||
width: 750px; |
||||
height: 150px; |
||||
// margin: 40px; |
||||
background-color: #ffffff; |
||||
border-radius: 5px; |
||||
margin: 20px; |
||||
|
||||
.partObject { |
||||
height: 45px; |
||||
line-height: 40px; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 0 20px; |
||||
border-bottom: 1px solid #e7e7e7; |
||||
|
||||
.partObject1 { |
||||
height: 30px; |
||||
line-height: 30px; |
||||
font-size: 14px; |
||||
background-color: #6093ff; |
||||
padding: 0px 16px; |
||||
color: #fff; |
||||
} |
||||
|
||||
.partObject2 { |
||||
font-size: 14px; |
||||
color: #0052d9; |
||||
} |
||||
} |
||||
|
||||
.partObjectIntroduce { |
||||
height: 149px; |
||||
font-size: 16px; |
||||
padding: 15px; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.content3 { |
||||
border-radius: 20px; |
||||
margin-top: 20px; |
||||
width: 100%; |
||||
height: 370px; |
||||
background-color: #fff; |
||||
background-image: linear-gradient(#ffe9c7, #ffffff); |
||||
} |
||||
</style> |
@ -0,0 +1,244 @@ |
||||
<script lang="ts" setup> |
||||
import { ref } from 'vue' |
||||
// import axios from 'axios' |
||||
import { CourseResourceControllerService } from '../../../../generated/services/CourseResourceControllerService' |
||||
const props = defineProps(['dafulIndex']) |
||||
import { QuillEditor } from '@vueup/vue-quill' |
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css' |
||||
import { ElMessage } from 'element-plus' |
||||
//默认抽屉隐藏 |
||||
const visibleDramwer = ref(false) |
||||
//默认数据 |
||||
const defaultForm = { |
||||
description: '', |
||||
id: '', |
||||
img: '', |
||||
name: '', |
||||
type: '', |
||||
path: '', |
||||
} |
||||
//准备数据 |
||||
const formModel = ref({ |
||||
...defaultForm, |
||||
}) |
||||
//表单的校验 |
||||
const rules = { |
||||
name: [ |
||||
{ required: true, message: '请输入资源名称', trigger: 'blur' }, |
||||
{ min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' }, |
||||
], |
||||
} |
||||
|
||||
//组件对外暴露一个open 方法 根据传来的参数区分添加还是编辑 |
||||
const open = async (row) => { |
||||
visibleDramwer.value = true |
||||
//console.log(row.id) |
||||
|
||||
if (row.id) { |
||||
//需要基于row.id 发送请求,获取编辑的详情数据,进行回显 |
||||
const res = await CourseResourceControllerService.getAllUsingGet1(row.id) |
||||
//回显 |
||||
formModel.value = res.data.records |
||||
console.log(res) |
||||
|
||||
//图片回显 |
||||
//富文本框回显 |
||||
console.log('编辑回显') |
||||
} else { |
||||
//重置表单数据 |
||||
formModel.value = { |
||||
...defaultForm, |
||||
} |
||||
} |
||||
} |
||||
|
||||
defineExpose({ |
||||
open, |
||||
}) |
||||
|
||||
const selectVal = ref(props.dafulIndex) |
||||
const selectOp = ref([ |
||||
{ label: 'ppt', value: '1' }, |
||||
{ label: '图片', value: '2' }, |
||||
{ label: '视频', value: '3' }, |
||||
{ label: 'PDF', value: '4' }, |
||||
{ label: '文件', value: '5' }, |
||||
{ label: '音频', value: '6' }, |
||||
]) |
||||
|
||||
const fileList = ref([]) |
||||
function clearFileList() { |
||||
fileList.value.length = 0 |
||||
} |
||||
const handleSel = () => { |
||||
fileList.value.length = 0 |
||||
} |
||||
|
||||
//上传图片 |
||||
import type { UploadProps } from 'element-plus' |
||||
|
||||
const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => { |
||||
console.log(uploadFile, uploadFiles) |
||||
} |
||||
|
||||
const handlePreview: UploadProps['onPreview'] = (file) => { |
||||
console.log(file) |
||||
} |
||||
const formRef = ref() |
||||
function isSubmit() { |
||||
formRef.value.validate((valid, fields) => { |
||||
if (valid) { |
||||
const params = { |
||||
name: formModel.value.name, |
||||
type: selectVal.value, |
||||
img: fileList.value[0]?.raw, |
||||
description: formModel.value.description, |
||||
} |
||||
console.log('根据参数:', params, '去调用接口???') |
||||
} else { |
||||
console.log('error submit!', fields) |
||||
} |
||||
}) |
||||
} |
||||
// upd |
||||
const beforeAvatarUpload = (rawFile) => { |
||||
console.log('执行了') |
||||
switch (+selectVal.value) { |
||||
case 1: |
||||
if (rawFile.type !== 'application/vnd.ms-powerpoint') { |
||||
clearFileList() |
||||
ElMessage.error('必须是ppt文件!') |
||||
} else { |
||||
clearFileList() |
||||
fileList.value.push(rawFile) |
||||
} |
||||
break |
||||
case 2: |
||||
if (!rawFile.type.startsWith('image/')) { |
||||
clearFileList() |
||||
ElMessage.error('必须是??文件!') |
||||
} else { |
||||
clearFileList() |
||||
fileList.value.push(rawFile) |
||||
} |
||||
break |
||||
// case 3: |
||||
// if (false) { |
||||
// clearFileList() |
||||
// ElMessage.error('必须是??文件!') |
||||
// } else { |
||||
// clearFileList() |
||||
// fileList.value.push(rawFile) |
||||
// } |
||||
// break |
||||
// case 4: |
||||
// if (false) { |
||||
// clearFileList() |
||||
// ElMessage.error('必须是??文件!') |
||||
// } else { |
||||
// clearFileList() |
||||
// fileList.value.push(rawFile) |
||||
// } |
||||
// break |
||||
// case 5: |
||||
// if (false) { |
||||
// clearFileList() |
||||
// ElMessage.error('必须是??文件!') |
||||
// } else { |
||||
// clearFileList() |
||||
// fileList.value.push(rawFile) |
||||
// } |
||||
// break |
||||
// case 6: |
||||
// if (false) { |
||||
// clearFileList() |
||||
// ElMessage.error('必须是??文件!') |
||||
// } else { |
||||
// clearFileList() |
||||
// fileList.value.push(rawFile) |
||||
// } |
||||
// break |
||||
} |
||||
} |
||||
</script> |
||||
<template> |
||||
<el-drawer |
||||
v-model="visibleDramwer" |
||||
:title="formModel.id ? '编辑资源' : '添加资源'" |
||||
direction="rtl" |
||||
size="50%" |
||||
> |
||||
<!-- 添加资源表单 --> |
||||
<el-form |
||||
class="resourceformModel" |
||||
:model="formModel" |
||||
ref="formRef" |
||||
:rules="rules" |
||||
label-width="100px" |
||||
> |
||||
<el-form-item label="资源名称" prop="name"> |
||||
<el-input |
||||
v-model="formModel.name" |
||||
placeholder="请输入资源名称" |
||||
></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="资源类型"> |
||||
<el-select |
||||
@change="handleSel" |
||||
v-model="selectVal" |
||||
placeholder="请选择资源类型" |
||||
size="large" |
||||
style="width: 100%" |
||||
> |
||||
<el-option |
||||
v-for="item in selectOp" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="上传资源" prop="fileList"> |
||||
<el-upload |
||||
v-model:file-list="fileList" |
||||
:limit="1" |
||||
class="upload-demo" |
||||
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
||||
:on-preview="handlePreview" |
||||
:on-remove="handleRemove" |
||||
list-type="picture" |
||||
:before-upload="beforeAvatarUpload" |
||||
> |
||||
<el-button type="primary">点击上传资源</el-button> |
||||
<template #tip> |
||||
<div class="el-upload__tip"> |
||||
jpg/png files with a size less than 500kb |
||||
</div> |
||||
</template> |
||||
</el-upload> |
||||
</el-form-item> |
||||
<el-form-item label="资源简介" prop="description"> |
||||
<div class="editor"> |
||||
<quill-editor |
||||
v-model:content="formModel.description" |
||||
content-type="html" |
||||
theme="snow" |
||||
></quill-editor> |
||||
</div> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button type="primary">取消</el-button> |
||||
<el-button type="info" @click="isSubmit">确定</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</el-drawer> |
||||
</template> |
||||
<style lang="scss" scoped> |
||||
.editor { |
||||
width: 100%; |
||||
|
||||
:deep(.ql-editor) { |
||||
min-height: 200px; |
||||
} |
||||
} |
||||
</style> |
@ -1,133 +0,0 @@ |
||||
<template> |
||||
<div class="ch"> |
||||
<video |
||||
src="D:\前端\前端code\vedio\薛之谦 - 病态.mp4" |
||||
width="240px" |
||||
controls |
||||
> |
||||
法学 |
||||
</video> |
||||
<div class="ch1"> |
||||
<p>开课时间:2018年11月14日~2023年11月14日</p> |
||||
<p>课程类型:公共开放课程</p> |
||||
<p>学习人数:120人</p> |
||||
</div> |
||||
</div> |
||||
<div class="ma"></div> |
||||
<div class="en"></div> |
||||
<div class="ph"></div> |
||||
<div class="or"></div> |
||||
<div class="warpper"></div> |
||||
<div class="vo"> |
||||
请选择院系专业: |
||||
<button> |
||||
<select> |
||||
<option>国际教育学院</option> |
||||
<option>能源工程学院</option> |
||||
<option>体育学院</option> |
||||
<option>马克思主义学院</option> |
||||
<option>智能制造学院</option> |
||||
<option>商务英语学院</option> |
||||
</select> |
||||
</button> |
||||
<button> |
||||
<select> |
||||
<option>01班</option> |
||||
<option>02班</option> |
||||
<option>03班</option> |
||||
<option>04班</option> |
||||
<option>05班</option> |
||||
</select> |
||||
</button> |
||||
<br /> |
||||
请选择年级: |
||||
<button> |
||||
<select> |
||||
<option>大一</option> |
||||
<option>大二</option> |
||||
<option>大三</option> |
||||
<option>大四</option> |
||||
</select> |
||||
</button> |
||||
<br /> |
||||
上传学科文件: |
||||
<input type="file" /> |
||||
<form> |
||||
<button type="submit">提交</button> |
||||
<button type="reset">重置</button> |
||||
<br /> |
||||
<div style="width: 100%; display: flex; justify-content: space-between"> |
||||
<button>上一页</button> |
||||
<button>下一页</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</template> |
||||
|
||||
<script lang="ts" setup> |
||||
import {} from 'vue' |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.ch { |
||||
height: 300px; |
||||
width: 240px; |
||||
float: left; |
||||
line-height: 1.5; |
||||
margin-right: 5px; |
||||
background-color: rgba(183, 126, 164, 0.17); |
||||
box-sizing: border-box; |
||||
} |
||||
.ma { |
||||
height: 300px; |
||||
width: 240px; |
||||
float: left; |
||||
line-height: 1.5; |
||||
margin-right: 5px; |
||||
background-color: rgba(183, 126, 164, 0.17); |
||||
box-sizing: border-box; |
||||
} |
||||
.en { |
||||
height: 300px; |
||||
width: 240px; |
||||
float: left; |
||||
line-height: 1.5; |
||||
margin-right: 5px; |
||||
background-color: rgba(183, 126, 164, 0.17); |
||||
box-sizing: border-box; |
||||
} |
||||
.ph { |
||||
height: 300px; |
||||
width: 240px; |
||||
float: left; |
||||
line-height: 1.5; |
||||
margin-right: 5px; |
||||
background-color: rgba(183, 126, 164, 0.17); |
||||
box-sizing: border-box; |
||||
} |
||||
.warpper { |
||||
width: 1222px; |
||||
height: 300px; |
||||
float: left; |
||||
background-color: rgb(202, 194, 236); |
||||
box-sizing: border-box; |
||||
} |
||||
.or { |
||||
height: 300px; |
||||
width: 240px; |
||||
float: left; |
||||
line-height: 1.5; |
||||
margin-right: 5px; |
||||
background-color: rgba(183, 126, 164, 0.17); |
||||
box-sizing: border-box; |
||||
} |
||||
.vo { |
||||
width: 1222px; |
||||
height: 130px; |
||||
background-color: rgb(250, 225, 243); |
||||
border: solid 1px rgb(220, 214, 214); |
||||
float: left; |
||||
} |
||||
.ch.ch1 { |
||||
} |
||||
</style> |
@ -0,0 +1,40 @@ |
||||
// vite.config.ts
|
||||
import vue from "file:///D:/aaa/teaching/Teaching_integration_platform_admin_template/node_modules/.pnpm/@vitejs+plugin-vue@5.0.4_vite@5.1.4_vue@3.4.19/node_modules/@vitejs/plugin-vue/dist/index.mjs"; |
||||
import path from "path"; |
||||
import { viteMockServe } from "file:///D:/aaa/teaching/Teaching_integration_platform_admin_template/node_modules/.pnpm/vite-plugin-mock@3.0.1_esbuild@0.19.12_mockjs@1.1.0_vite@5.1.4/node_modules/vite-plugin-mock/dist/index.mjs"; |
||||
import { createSvgIconsPlugin } from "file:///D:/aaa/teaching/Teaching_integration_platform_admin_template/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.1.4/node_modules/vite-plugin-svg-icons/dist/index.mjs"; |
||||
var vite_config_default = ({ command }) => { |
||||
return { |
||||
plugins: [ |
||||
vue(), |
||||
viteMockServe({ |
||||
enable: command === "serve" |
||||
}), |
||||
createSvgIconsPlugin({ |
||||
// Specify the icon folder to be cached
|
||||
iconDirs: [path.resolve(process.cwd(), "src/assets/icons")], |
||||
// Specify symbolId format
|
||||
symbolId: "icon-[dir]-[name]" |
||||
}) |
||||
], |
||||
resolve: { |
||||
alias: { |
||||
"@": path.resolve("./src") |
||||
// 相对路径别名配置,使用 @ 代替 src
|
||||
} |
||||
}, |
||||
// 配置scss
|
||||
css: { |
||||
preprocessorOptions: { |
||||
scss: { |
||||
javascriptEnabled: true, |
||||
additionalData: '@import "./src/styles/variable.scss";' |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
export { |
||||
vite_config_default as default |
||||
}; |
||||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxhYWFcXFxcdGVhY2hpbmdcXFxcVGVhY2hpbmdfaW50ZWdyYXRpb25fcGxhdGZvcm1fYWRtaW5fdGVtcGxhdGVcIjtjb25zdCBfX3ZpdGVfaW5qZ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