Compare commits
8 Commits
a229e9933e
...
8c36d59b19
Author | SHA1 | Date |
---|---|---|
“zouyf” | 8c36d59b19 | |
yangws | 6c1bb40826 | |
小杨 | ea861dd2ea | |
lyc | ff2e05fb6b | |
lyc | b7425da4da | |
zouyf | b0075b86ba | |
yangws | 54d4896e18 | |
小杨 | 3042e874e4 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.1.12",
|
"version": "2.1.14",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
等级分布
|
等级分布
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<Distribution></Distribution>
|
<Distribution :stuHasAnswers=stuHasAnswers></Distribution>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
|
@ -218,8 +218,9 @@ const initData = () => {
|
||||||
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers }
|
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers }
|
||||||
})
|
})
|
||||||
console.log('获取数据: ', data)
|
console.log('获取数据: ', data)
|
||||||
|
if (data.length === 0) return
|
||||||
|
if (!data[0].hasAnswers[0]) return
|
||||||
stuHasAnswers.value = [...data[0].hasAnswers]
|
stuHasAnswers.value = [...data[0].hasAnswers]
|
||||||
provide('hasAnswer', stuHasAnswers.value)
|
|
||||||
}
|
}
|
||||||
// 百分比现在 0-100
|
// 百分比现在 0-100
|
||||||
const percent = v => v > 1 ? 1 : v < 0 ? 0 : Math.round(v * 100)
|
const percent = v => v > 1 ? 1 : v < 0 ? 0 : Math.round(v * 100)
|
||||||
|
|
|
@ -3,19 +3,26 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="400px">
|
<el-aside width="400px">
|
||||||
<!-- 柱状图学情分布-->
|
<!-- 柱状图学情分布-->
|
||||||
<Echarts></Echarts>
|
<Echarts :stuHasAnswers=stuHasAnswers></Echarts>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main>
|
<el-main>
|
||||||
<!-- 列表分布的人员-->
|
<!-- 列表分布的人员-->
|
||||||
<StuList></StuList>
|
<StuList :stuHasAnswers=stuHasAnswers></StuList>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Echarts from '@/views/classTask/container/classOverview/distribution/echarts.vue'
|
import { defineProps } from 'vue'
|
||||||
import StuList from "@/views/classTask/container/classOverview/distribution/stuList.vue";
|
import Echarts from './distribution/echarts.vue'
|
||||||
|
import StuList from "./distribution/stuList.vue";
|
||||||
|
const props = defineProps({
|
||||||
|
stuHasAnswers: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -13,6 +13,13 @@ const useOverview = overviewStore();
|
||||||
// 获取图表容器的引用
|
// 获取图表容器的引用
|
||||||
const chartRef = ref(null);
|
const chartRef = ref(null);
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
stuHasAnswers: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataList = ref([
|
const dataList = ref([
|
||||||
{ name: '完美', value: 0, rating: 1, max: 100, min: 100 },
|
{ name: '完美', value: 0, rating: 1, max: 100, min: 100 },
|
||||||
|
@ -22,7 +29,6 @@ const dataList = ref([
|
||||||
{ name: '不及格', value: 0, rating: 5, max: 59, min: 0 },
|
{ name: '不及格', value: 0, rating: 5, max: 59, min: 0 },
|
||||||
]);
|
]);
|
||||||
// 答过题的学生才进行统计
|
// 答过题的学生才进行统计
|
||||||
const hasAnswersData = ref([]);
|
|
||||||
const hasStudents = ref([])
|
const hasStudents = ref([])
|
||||||
|
|
||||||
// 根据数据生成不同的颜色
|
// 根据数据生成不同的颜色
|
||||||
|
@ -105,18 +111,12 @@ const showEcharts = () => {
|
||||||
}
|
}
|
||||||
//执行
|
//执行
|
||||||
watch(() => useOverview.tableList, () => {
|
watch(() => useOverview.tableList, () => {
|
||||||
hasStudents.value = useOverview.tableList.filter(item => hasAnswersData.value.includes(item.studentid)).map(item => item);
|
hasStudents.value = useOverview.tableList.filter(item => props.stuHasAnswers.includes(item.studentid)).map(item => item);
|
||||||
showEcharts();
|
showEcharts();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initChart();
|
initChart();
|
||||||
});
|
});
|
||||||
},{deep: true})
|
},{deep: true})
|
||||||
//监听
|
|
||||||
watchEffect(() => {
|
|
||||||
const stus = inject('hasAnswer');
|
|
||||||
if (!stus) return;
|
|
||||||
hasAnswersData.value = [...stus]
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -16,13 +16,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {nextTick, ref, watch,inject,watchEffect} from 'vue'
|
import {ref, watch} from 'vue'
|
||||||
import overviewStore from '@/store/modules/overview'
|
import overviewStore from '@/store/modules/overview'
|
||||||
|
|
||||||
const useOverview = overviewStore()
|
const useOverview = overviewStore()
|
||||||
const tabPosition = ref('left')
|
const tabPosition = ref('left')
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
stuHasAnswers: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
//答过题的学生才进行统计
|
//答过题的学生才进行统计
|
||||||
const hasAnswersData = ref([])
|
|
||||||
const hasStudents = ref([])
|
const hasStudents = ref([])
|
||||||
const leftList = ref([
|
const leftList = ref([
|
||||||
{
|
{
|
||||||
|
@ -81,14 +87,9 @@ const showStudents = (index) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
watch(() => useOverview.tableList, () => {
|
watch(() => useOverview.tableList, () => {
|
||||||
hasStudents.value = useOverview.tableList.filter(item => hasAnswersData.value.includes(item.studentid)).map(item => item);
|
hasStudents.value = useOverview.tableList.filter(item => props.stuHasAnswers.includes(item.studentid)).map(item => item);
|
||||||
showStudents(0)
|
showStudents(0)
|
||||||
},{deep: true})
|
},{deep: true})
|
||||||
watchEffect(() => {
|
|
||||||
const stus = inject('hasAnswer')
|
|
||||||
if(!stus) return
|
|
||||||
hasAnswersData.value = [...stus]
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -570,6 +570,10 @@ const getWorkFeedList = async() =>{
|
||||||
function: 训练报告的处理
|
function: 训练报告的处理
|
||||||
*/
|
*/
|
||||||
const handleClassOverviewOpen = (type) =>{
|
const handleClassOverviewOpen = (type) =>{
|
||||||
|
// 每次进来都重新调用一次
|
||||||
|
if(type == 'report') {
|
||||||
|
getWorkFeedList();
|
||||||
|
}
|
||||||
// 关闭右侧批阅ui
|
// 关闭右侧批阅ui
|
||||||
isopen_dtwk_table.value = false;
|
isopen_dtwk_table.value = false;
|
||||||
classWorkAnalysis.view = type
|
classWorkAnalysis.view = type
|
||||||
|
|
Loading…
Reference in New Issue