develoop
于鹏飞 5 months ago
commit 991fa5ab08
  1. 15
      index_1.html
  2. 3
      pnpm-lock.yaml
  3. 6
      src/api/courseChaptersApi.ts
  4. 165
      src/views/course/CourseObjectives.vue

@ -1,15 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<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" />
<title>教学一体化后师生后台</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
</body>
</html>

@ -1,8 +1,11 @@
lockfileVersion: '6.0' lockfileVersion: '6.0'
<<<<<<< HEAD
settings: settings:
autoInstallPeers: true autoInstallPeers: true
excludeLinksFromLockfile: false excludeLinksFromLockfile: false
=======
>>>>>>> 1a620e19de970965f426e07348b1dbc4be900eaf
dependencies: dependencies:
3d-force-graph: 3d-force-graph:

@ -96,8 +96,14 @@ export const deleteCourse = (params: any) => {
// 获取详情 // 获取详情
export const getCourseInfo = (params: any) => { export const getCourseInfo = (params: any) => {
return request({ return request({
<<<<<<< HEAD
url: '/api/objective_contents/' + params.id, url: '/api/objective_contents/' + params.id,
method: 'get', method: 'get',
params, params,
=======
url: '/objective_contents/' + params.id,
method: "get",
// params
>>>>>>> 1a620e19de970965f426e07348b1dbc4be900eaf
}) })
} }

@ -3,6 +3,7 @@ import { ref, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { id } from 'element-plus/es/locales.mjs' import { id } from 'element-plus/es/locales.mjs'
import * as echarts from 'echarts' import * as echarts from 'echarts'
<<<<<<< HEAD
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { import {
getCourseList, getCourseList,
@ -11,7 +12,12 @@ import {
deleteCourse, deleteCourse,
getCourseInfo, getCourseInfo,
} from '@/api/courseChaptersApi' } from '@/api/courseChaptersApi'
=======
import { useRoute ,useRouter} from 'vue-router'
import { getCourseList, addCourse, editCourse, deleteCourse, getCourseInfo } from '@/api/courseChaptersApi'
>>>>>>> 1a620e19de970965f426e07348b1dbc4be900eaf
const route = useRoute() const route = useRoute()
const router = useRouter()
// id id // id id
// targetId // targetId
@ -154,6 +160,9 @@ const getList = async () => {
const data = ref({}) const data = ref({})
const courseId = ref(0) const courseId = ref(0)
onMounted(async () => { onMounted(async () => {
if (!Object.keys(route.query).length){
return router.push('/curriculumCenter/basicCourseInformation')
}
courseId.value = route.query.id courseId.value = route.query.id
console.log(courseId.value) console.log(courseId.value)
getList() getList()
@ -162,40 +171,146 @@ onMounted(async () => {
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
let option let option
option = { option = {
title: { radar: [{
text: '分目标', nameGap: 20,
}, indicator: [{
legend: { text: '目标一\n',
data: ['Allocated Budget', 'Actual Spending'], max: 100
}, {
text: '目标五\n\n',
max: 100
}, {
text: '目标四\n\n',
max: 100
}, {
text: '目标三\n\n',
max: 100
}, {
text: '目标二\n\n',
max: 100
}],
center: ['50%', '50%'],
radius: 100,
startAngle: 90,
splitNumber: 6,
shape: 'circle',
name: {
formatter: '{value}',
textStyle: {
color: '#333333',
fontSize: 20,
},
gap: 60
},
splitArea: {
areaStyle: {
color: ['transparent',
'transparent', 'rgba(114, 172, 209, 0)',
'transparent', 'rgba(114, 172, 209, 0)'
],
}
},
// 线
axisLine: {
lineStyle: {
color: '#C8D9FF'
}
},
splitLine: {
lineStyle: {
color: '#DADADA',
width: 3,
type: 'dashed', //dashed solid dotted 线线 线
}
},
}, },
radar: { {
// shape: 'circle',
indicator: [ nameGap: 20,
{ name: 'Sales', max: 6500 }, indicator: [{
{ name: 'Administration', max: 16000 }, text: '达成度',
{ name: 'Information Technology', max: 30000 }, max: 100
{ name: 'Customer Support', max: 38000 }, }, {
{ name: 'Development', max: 52000 }, text: '达成度',
{ name: 'Marketing', max: 25000 }, max: 100
], }, {
text: '达成度',
max: 100
}, {
text: '达成度',
max: 100
}, {
text: '达成度',
max: 100
}],
center: ['50%', '50%'],
radius: 100,
startAngle: 90,
splitNumber: 1,
shape: 'circle',
splitArea: {
show: false,
},
axisLine: {
show: false
},
name: {
formatter: '{value}',
textStyle: {
color: 'rgba(0,0,0,0.4)',
fontSize: 18,
},
},
splitLine: {
lineStyle: {
color: '#6093FF',
type: 'solid',
width: 8
}
},
}, },
],
series: [ series: [
{ {
name: 'Budget vs spending',
type: 'radar', type: 'radar',
emphasis: {
lineStyle: {
width: 50
}
},
symbol: 'none',
data: [ data: [
{ {
value: [4200, 3000, 20000, 35000, 50000, 18000], value: [74, 60, 80, 60, 74],
name: 'Allocated Budget', name: 'Data C',
}, areaStyle: {
color: '#DBE4F9'
}
}
]
},
{
type: 'radar',
emphasis: {
lineStyle: {
width: 50
}
},
symbol: 'none',
data: [
{ {
value: [5000, 14000, 28000, 26000, 42000, 21000], value: [74, 60, 80, 40, 74],
name: 'Actual Spending', name: 'Data B',
areaStyle: {
color: '#0052FF'
}
}, },
], ]
}, },
],
} ]
};
option && myChart.setOption(option) option && myChart.setOption(option)
}) })
@ -332,7 +447,7 @@ const li
<style lang="scss" scoped> <style lang="scss" scoped>
#main { #main {
padding: 15px; padding: 10px;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }

Loading…
Cancel
Save