Compare commits
No commits in common. "cf49fbf23f89b96941e3d90280f28249d3668244" and "4d20a271777f3d728d47fd6098bd7e0c2ae8ebc7" have entirely different histories.
cf49fbf23f
...
4d20a27177
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.1.19",
|
"version": "2.1.18",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "上海交大重庆人工智能研究院",
|
"author": "上海交大重庆人工智能研究院",
|
||||||
|
|
|
@ -244,8 +244,7 @@ const onSubmit = (formEl) => {
|
||||||
entpcourseworklist: '[' + props.rows[i].entpcourseworklist + ']',
|
entpcourseworklist: '[' + props.rows[i].entpcourseworklist + ']',
|
||||||
needMsgNotifine: 'false',
|
needMsgNotifine: 'false',
|
||||||
msgkey: 'newclasswork',
|
msgkey: 'newclasswork',
|
||||||
//title: '作业任务',
|
title: '作业任务',
|
||||||
title: props.rows[i].title,
|
|
||||||
msgcontent: '',
|
msgcontent: '',
|
||||||
teachername: userInfo.nickName,
|
teachername: userInfo.nickName,
|
||||||
unixstamp: new Date().getTime(),
|
unixstamp: new Date().getTime(),
|
||||||
|
@ -255,7 +254,6 @@ const onSubmit = (formEl) => {
|
||||||
ary.push(obj)
|
ary.push(obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('ary->', ary)
|
|
||||||
setLoading.value = true
|
setLoading.value = true
|
||||||
saveByClassWorkArray({
|
saveByClassWorkArray({
|
||||||
classworkarray: JSON.stringify(ary)
|
classworkarray: JSON.stringify(ary)
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-drawer v-model="model" class="preview-drawer" :modal="true" :destroy-on-close="true" :with-header="false" :append-to-body="true"
|
|
||||||
size="50%">
|
|
||||||
<div class="drawer-content">
|
|
||||||
<el-image v-for="(url,index) in srcList" :key="index" :src="url" lazy />
|
|
||||||
</div>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
|
||||||
<script setup>
|
|
||||||
import {ref} from 'vue'
|
|
||||||
import {getImgPath} from "@/api/file/third";
|
|
||||||
|
|
||||||
const model = defineModel()
|
|
||||||
//显示图片的路径
|
|
||||||
const srcList = ref([])
|
|
||||||
const init = (id) => {
|
|
||||||
srcList.value = []
|
|
||||||
getImgPath({itemId:id}).then(res => {
|
|
||||||
if(res.code === 200){
|
|
||||||
res.data.forEach(item => {
|
|
||||||
item.subsets.forEach(previewItem => {
|
|
||||||
previewItem.previewFiles.forEach(fileItem => {
|
|
||||||
srcList.value.push(fileItem.fileUrl)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
defineExpose({
|
|
||||||
init
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
|
@ -75,12 +75,12 @@ let studentList = ref([]) // 学生数据
|
||||||
|
|
||||||
// 初始-数据处理
|
// 初始-数据处理
|
||||||
const initData = () => {
|
const initData = () => {
|
||||||
|
console.log('xxx', props)
|
||||||
// window.test = activeCourse
|
// window.test = activeCourse
|
||||||
studentList.value = props.activeData.studentList || []
|
studentList.value = props.activeData.studentList || []
|
||||||
const activeWorkFeedList = props.activeData.workFeedList || []
|
const activeWorkFeedList = props.activeData.workFeedList || []
|
||||||
const quizlist = props.activeData.quizlist || []
|
const quizlist = props.activeData.quizlist || []
|
||||||
console.log(quizlist,'quizlist');
|
const timeArr = groupByField(props.activeData.workFeedList,'entpcourseworkid')
|
||||||
|
|
||||||
// 习题特殊处理
|
// 习题特殊处理
|
||||||
let data = quizlist.map(o => {
|
let data = quizlist.map(o => {
|
||||||
// 解析题选项
|
// 解析题选项
|
||||||
|
@ -90,9 +90,14 @@ const initData = () => {
|
||||||
let rightIds = [] // 正确学生
|
let rightIds = [] // 正确学生
|
||||||
let hasAnswers= [] // 答过题的学生
|
let hasAnswers= [] // 答过题的学生
|
||||||
let timeAnalyse = [] // 平均时长和编号
|
let timeAnalyse = [] // 平均时长和编号
|
||||||
// let subjectCourese = [] // 题目编号
|
|
||||||
const quizFeedList = activeWorkFeedList.filter(f => f.entpcourseworkid == o.id) // 做该题的列表
|
const quizFeedList = activeWorkFeedList.filter(f => f.entpcourseworkid == o.id) // 做该题的列表
|
||||||
|
// 获取所有的做题时间
|
||||||
|
timeArr.forEach((item,index) => {
|
||||||
|
const arr = item.reduce((acc, cur) => {
|
||||||
|
return acc + (cur.timelength ? Number(cur.timelength) : 0);
|
||||||
|
},0)
|
||||||
|
timeAnalyse.push(arr)
|
||||||
|
})
|
||||||
let children = []
|
let children = []
|
||||||
const allStudents = [];
|
const allStudents = [];
|
||||||
if (o.worktype == '单选题') { // '单选题','多选题'
|
if (o.worktype == '单选题') { // '单选题','多选题'
|
||||||
|
@ -103,11 +108,6 @@ const initData = () => {
|
||||||
// 改选项的学生id
|
// 改选项的学生id
|
||||||
const studentIds = quizFeedList.filter(f => f.feedcontent==v&&f.finishtimelength!='0').map(f => f.studentid)||[];
|
const studentIds = quizFeedList.filter(f => f.feedcontent==v&&f.finishtimelength!='0').map(f => f.studentid)||[];
|
||||||
accSum += studentIds.length;
|
accSum += studentIds.length;
|
||||||
// 该到题的用时时间
|
|
||||||
timeAnalyse = quizFeedList.reduce((acc, cur) => {
|
|
||||||
return acc + (cur.timelength ? Number(cur.timelength) : 0);
|
|
||||||
},0)
|
|
||||||
|
|
||||||
if (isOk) {
|
if (isOk) {
|
||||||
activeIds.push(...studentIds)
|
activeIds.push(...studentIds)
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ const initData = () => {
|
||||||
const res = isSame((f.feedcontent||'').split(','), workanswer);
|
const res = isSame((f.feedcontent||'').split(','), workanswer);
|
||||||
return f.entpcourseworkid == o.id && f.finishtimelength!='0' && res;
|
return f.entpcourseworkid == o.id && f.finishtimelength!='0' && res;
|
||||||
});
|
});
|
||||||
|
|
||||||
const list = workdesc.includes('#&') ? workdesc.split('#&') : isJson(workdesc)?JSON.parse(workdesc):[];
|
const list = workdesc.includes('#&') ? workdesc.split('#&') : isJson(workdesc)?JSON.parse(workdesc):[];
|
||||||
children = list.map((v,i) => {
|
children = list.map((v,i) => {
|
||||||
const isOne = o.worktype == '单选题'
|
const isOne = o.worktype == '单选题'
|
||||||
|
@ -135,10 +135,6 @@ const initData = () => {
|
||||||
if (studentIds.length>0) {
|
if (studentIds.length>0) {
|
||||||
allStudents.push(...studentIds);
|
allStudents.push(...studentIds);
|
||||||
}
|
}
|
||||||
// 该到题的用时时间
|
|
||||||
timeAnalyse = quizFeedList.reduce((acc, cur) => {
|
|
||||||
return acc + (cur.timelength ? Number(cur.timelength) : 0);
|
|
||||||
},0)
|
|
||||||
if(isOk) {
|
if(isOk) {
|
||||||
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
||||||
}
|
}
|
||||||
|
@ -157,10 +153,6 @@ const initData = () => {
|
||||||
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
||||||
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
||||||
accSum = activeIds.length
|
accSum = activeIds.length
|
||||||
// 该到题的用时时间
|
|
||||||
timeAnalyse = quizFeedList.reduce((acc, cur) => {
|
|
||||||
return acc + (cur.timelength ? Number(cur.timelength) : 0);
|
|
||||||
},0)
|
|
||||||
return { def, code, txt, isOk:true, studentIds }
|
return { def, code, txt, isOk:true, studentIds }
|
||||||
})
|
})
|
||||||
} else if (o.worktype == '判断题') { // 判断题
|
} else if (o.worktype == '判断题') { // 判断题
|
||||||
|
@ -202,10 +194,6 @@ const initData = () => {
|
||||||
accSum += studentIds.length;
|
accSum += studentIds.length;
|
||||||
if(isOk) activeIds.push(...studentIds)
|
if(isOk) activeIds.push(...studentIds)
|
||||||
hasAnswers.push(...studentIds)
|
hasAnswers.push(...studentIds)
|
||||||
// 该到题的用时时间
|
|
||||||
timeAnalyse = quizFeedList.reduce((acc, cur) => {
|
|
||||||
return acc + (cur.timelength ? Number(cur.timelength) : 0);
|
|
||||||
},0)
|
|
||||||
return { def: v, code: v, isOk, studentIds }
|
return { def: v, code: v, isOk, studentIds }
|
||||||
})
|
})
|
||||||
} else { // 论述题
|
} else { // 论述题
|
||||||
|
@ -215,10 +203,6 @@ const initData = () => {
|
||||||
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
||||||
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
||||||
accSum = activeIds.length
|
accSum = activeIds.length
|
||||||
// 该到题的用时时间
|
|
||||||
timeAnalyse = quizFeedList.reduce((acc, cur) => {
|
|
||||||
return acc + (cur.timelength ? Number(cur.timelength) : 0);
|
|
||||||
},0)
|
|
||||||
children = [{ def, code, isOk:true, studentIds }]
|
children = [{ def, code, isOk:true, studentIds }]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +222,7 @@ const initData = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// def: 原始题数据 type 类型 active: 选中 points: 得分率, accSum 题解答人数
|
// def: 原始题数据 type 类型 active: 选中 points: 得分率, accSum 题解答人数
|
||||||
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers,timeAnalyse,score:o.score }
|
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers,timeAnalyse }
|
||||||
})
|
})
|
||||||
if (data.length === 0) return
|
if (data.length === 0) return
|
||||||
useOverview.getAllData([...data])
|
useOverview.getAllData([...data])
|
||||||
|
|
|
@ -24,7 +24,6 @@ const dataList = ref([
|
||||||
// 答过题的学生才进行统计
|
// 答过题的学生才进行统计
|
||||||
const hasStudents = ref([])
|
const hasStudents = ref([])
|
||||||
|
|
||||||
|
|
||||||
// 根据数据生成不同的颜色
|
// 根据数据生成不同的颜色
|
||||||
function getColor(name) {
|
function getColor(name) {
|
||||||
const colorMap = {
|
const colorMap = {
|
||||||
|
@ -105,18 +104,7 @@ const showEcharts = () => {
|
||||||
}
|
}
|
||||||
//执行
|
//执行
|
||||||
watch(() => useOverview.tableList, () => {
|
watch(() => useOverview.tableList, () => {
|
||||||
// 判断是不是客观题
|
hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item);
|
||||||
const subType = useOverview.allData.map(item => item.type)
|
|
||||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
|
||||||
if( !subType.every(item => objectiveQuestion.includes(item)) ){
|
|
||||||
hasStudents.value = useOverview.tableList.filter(item => {
|
|
||||||
if(item.rating > 0 && useOverview.allData[0].hasAnswers.includes(item.studentid)){
|
|
||||||
return item
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item);
|
|
||||||
}
|
|
||||||
showEcharts();
|
showEcharts();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initChart();
|
initChart();
|
||||||
|
|
|
@ -81,18 +81,7 @@ const showStudents = (index) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
watch(() => useOverview.tableList, () => {
|
watch(() => useOverview.tableList, () => {
|
||||||
// 判断是不是客观题
|
hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item);
|
||||||
const subType = useOverview.allData.map(item => item.type)
|
|
||||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
|
||||||
if( !subType.every(item => objectiveQuestion.includes(item)) ){
|
|
||||||
hasStudents.value = useOverview.tableList.filter(item => {
|
|
||||||
if(item.rating > 0 && useOverview.allData[0].hasAnswers.includes(item.studentid)){
|
|
||||||
return item
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item);
|
|
||||||
}
|
|
||||||
showStudents(0)
|
showStudents(0)
|
||||||
},{deep: true})
|
},{deep: true})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -20,80 +20,82 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ref, watch} from 'vue'
|
import {ref, watch} from 'vue'
|
||||||
import overviewStore from '@/store/modules/overview'
|
import overviewStore from '@/store/modules/overview'
|
||||||
|
import {listEntpcoursework} from '@/api/education/entpCourseWork'
|
||||||
|
|
||||||
const useOverview = overviewStore()
|
const useOverview = overviewStore()
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
|
//获取题目id
|
||||||
|
const ids = ref('')
|
||||||
|
//总分
|
||||||
|
const allScore = ref(0)
|
||||||
//用来获取所有知识点
|
//用来获取所有知识点
|
||||||
const konwledge = ref([])
|
const konwledge = ref([])
|
||||||
const hasStudents = ref([])
|
|
||||||
// 获取的所有得分
|
|
||||||
const allScore = ref([])
|
|
||||||
//所有题目的知识点
|
//所有题目的知识点
|
||||||
const getKonwledge = () => {
|
const getKonwledge = () => {
|
||||||
const getScoreRate = []
|
useOverview.tableList.forEach(item => {
|
||||||
// 获取知识点的种数
|
|
||||||
const ledges = []
|
|
||||||
hasStudents.value.forEach((item,index) => {
|
|
||||||
//判断是否存在知识点
|
|
||||||
if(item.knowledgePoint){
|
if(item.knowledgePoint){
|
||||||
const title = JSON.parse(item.knowledgePoint)
|
konwledge.value.push({...JSON.parse(item.knowledgePoint),...{scoingRate:Number(item.scoingRate),point:item.point,allPoint:allScore.value}})
|
||||||
//判断知识点是否重复
|
|
||||||
if(!ledges.includes(title.id)){
|
|
||||||
ledges.push(title.id)
|
|
||||||
// 假如分数是0 或者 得分率为空
|
|
||||||
konwledge.value.push({title:title.title,allPoint:allScore.value,id:title.id})
|
|
||||||
}
|
|
||||||
// 判断学生是否答过题
|
|
||||||
if(useOverview.allData[0].hasAnswers.includes(item.studentid))
|
|
||||||
getScoreRate.push({rate:item.scoingRate,id:title.id})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
tableData.value = getTableList(konwledge.value)
|
||||||
// 看看有几个知识点
|
tableData.value = tableData.value.map(item => {
|
||||||
konwledge.value.forEach(item => {
|
return{
|
||||||
let sunRate = 0
|
|
||||||
let num = 0
|
|
||||||
if(getScoreRate.length === 0) return
|
|
||||||
|
|
||||||
getScoreRate.forEach(item2 => {
|
|
||||||
if(item.id === item2.id){
|
|
||||||
sunRate += extractedNumber(item2.rate)
|
|
||||||
num ++
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const scoreRate = sunRate / num
|
|
||||||
tableData.value.push({
|
|
||||||
scoingRate:scoreRate.toFixed(2),
|
|
||||||
...item,
|
...item,
|
||||||
point:(item.allPoint * scoreRate / 100).toFixed(2)
|
allPoint: allScore.value
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
|
console.log(tableData.value,'tableData.value')
|
||||||
}
|
}
|
||||||
// 获取百分比的数字
|
//获取总分
|
||||||
const extractedNumber = (score) => {
|
const getScore = async () => {
|
||||||
const match = score.match(/\d+/);
|
const scoreId = useOverview.tableList[0].entpcourseworklist
|
||||||
return match ? parseInt(match[0], 10) : null;
|
const fixedJsonString = `[${scoreId}]`;
|
||||||
|
const objects = JSON.parse(fixedJsonString);
|
||||||
|
const id = objects.map(obj => obj.id);
|
||||||
|
ids.value = id.join(',')
|
||||||
|
const res = await listEntpcoursework({ids: ids.value, pageSize: 500})
|
||||||
|
if(res.code === 200){
|
||||||
|
allScore.value = res.rows.reduce((acc, cur) => acc + cur.workScore, 0);
|
||||||
|
getKonwledge()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//组装tableList表格
|
//组装tableList表格
|
||||||
|
const getTableList = (data) => {
|
||||||
|
const result = [];
|
||||||
|
data.forEach(item => {
|
||||||
|
const existingItem = result.find(i => i.id === item.id);
|
||||||
|
if (existingItem) {
|
||||||
|
// 累加point和scoingRate
|
||||||
|
existingItem.pointTotal += parseInt(item.point);
|
||||||
|
existingItem.scoingRateTotal += parseFloat(item.scoingRate);
|
||||||
|
existingItem.count++;
|
||||||
|
} else {
|
||||||
|
// 新的对象
|
||||||
|
result.push({
|
||||||
|
id: item.id,
|
||||||
|
title: item.title,
|
||||||
|
pointTotal: item.point,
|
||||||
|
scoingRateTotal: parseFloat(item.scoingRate),
|
||||||
|
count: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
watch(() => useOverview.tableList,() => {
|
// 计算平均值
|
||||||
// 判断是不是客观题
|
result.forEach(item => {
|
||||||
const subType = useOverview.allData.map(item => item.type)
|
item.point = Math.round(item.pointTotal / item.count);
|
||||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
// item.scoingRate = Math.round((item.scoingRateTotal / item.count) * 100) / 100;
|
||||||
if( !subType.every(item => objectiveQuestion.includes(item)) ){
|
item.scoingRate = Math.round((item.point / allScore.value) * 100);
|
||||||
hasStudents.value = useOverview.tableList.filter(item => {
|
delete item.pointTotal;
|
||||||
if(item.rating > 0 && useOverview.allData[0].hasAnswers.includes(item.studentid)){
|
delete item.scoingRateTotal;
|
||||||
return item
|
delete item.count;
|
||||||
}
|
});
|
||||||
})
|
|
||||||
}else{
|
return result;
|
||||||
hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item);
|
}
|
||||||
}
|
watch(() => useOverview.tableList,() => {
|
||||||
// 这里获取所有知识点的总分
|
console.log(useOverview.tableList,'useOverview.tableList')
|
||||||
allScore.value = useOverview.allData.reduce((acc, cur) => {
|
getScore()
|
||||||
return acc + Number(cur.score)
|
|
||||||
},0)
|
|
||||||
getKonwledge()
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -9,155 +9,134 @@ import * as echarts from 'echarts';
|
||||||
import {ref, nextTick, watch} from 'vue'
|
import {ref, nextTick, watch} from 'vue'
|
||||||
import overviewStore from '@/store/modules/overview'
|
import overviewStore from '@/store/modules/overview'
|
||||||
|
|
||||||
const useOverview = overviewStore();
|
const useOverview = overviewStore()
|
||||||
|
|
||||||
// 获取图表容器的引用
|
// 获取图表容器的引用
|
||||||
const chartRef = ref(null);
|
const chartRef = ref(null);
|
||||||
// 预计用时
|
|
||||||
const expectedDuration = ref([]);
|
|
||||||
|
|
||||||
// 初始化图表
|
// 初始化图表
|
||||||
function initChart() {
|
function initChart() {
|
||||||
const myChart = echarts.init(chartRef.value);
|
const myChart = echarts.init(chartRef.value);
|
||||||
|
// 指定图表的配置项和数据
|
||||||
// 指定图表的配置项和数据
|
let option = {
|
||||||
let option = {
|
tooltip: {
|
||||||
tooltip: {
|
trigger: "axis",
|
||||||
trigger: "axis",
|
axisPointer: {
|
||||||
axisPointer: {
|
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
||||||
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
},
|
||||||
},
|
formatter: function(parms) {
|
||||||
formatter: function (parms) {
|
let str =
|
||||||
let str = "";
|
parms[0].axisValue +
|
||||||
parms.forEach(param => {
|
"</br>" +
|
||||||
if (param.seriesType === 'bar') {
|
parms[0].marker +
|
||||||
str += param.axisValue + "</br>" + param.marker + "平均用时:" + param.value + 's' + "</br>";
|
"平均用时:" +
|
||||||
} else if (param.seriesType === 'line') {
|
parms[0].value + 's'
|
||||||
str += param.marker + "预计用时:" + param.value + 's';
|
return str;
|
||||||
}
|
},
|
||||||
});
|
|
||||||
return str;
|
},
|
||||||
},
|
textStyle: {
|
||||||
},
|
|
||||||
textStyle: {
|
|
||||||
color: "#333",
|
|
||||||
},
|
|
||||||
color: ["#7BA9FA", "#4690FA"],
|
|
||||||
grid: {
|
|
||||||
containLabel: true,
|
|
||||||
left: "10%",
|
|
||||||
top: "20%",
|
|
||||||
bottom: "10%",
|
|
||||||
right: "10%",
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: "category",
|
|
||||||
data: getXValue(),
|
|
||||||
axisLine: {
|
|
||||||
lineStyle: {
|
|
||||||
color: "#333",
|
color: "#333",
|
||||||
},
|
},
|
||||||
},
|
color: ["#7BA9FA", "#4690FA"],
|
||||||
axisTick: {
|
grid: {
|
||||||
show: false,
|
containLabel: true,
|
||||||
},
|
left: "10%",
|
||||||
axisLabel: {
|
top: "20%",
|
||||||
margin: 20, //刻度标签与轴线之间的距离。
|
bottom: "10%",
|
||||||
textStyle: {
|
right: "10%",
|
||||||
color: "#000",
|
|
||||||
},
|
},
|
||||||
},
|
xAxis: {
|
||||||
name: '题目编号'
|
type: "category",
|
||||||
},
|
data: getXValue(),
|
||||||
yAxis: {
|
axisLine: {
|
||||||
type: "value",
|
lineStyle: {
|
||||||
axisLine: {
|
color: "#333",
|
||||||
show: true,
|
},
|
||||||
lineStyle: {
|
},
|
||||||
color: "#B5B5B5",
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
margin: 20, //刻度标签与轴线之间的距离。
|
||||||
|
textStyle: {
|
||||||
|
color: "#000",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name:'题目编号'
|
||||||
},
|
},
|
||||||
},
|
yAxis: {
|
||||||
name: '平均时长',
|
type: "value",
|
||||||
splitLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
show: true,
|
||||||
// 使用深浅的间隔色
|
lineStyle: {
|
||||||
color: ["#B5B5B5"],
|
color: "#B5B5B5",
|
||||||
type: "dashed",
|
},
|
||||||
opacity: 0.5,
|
},
|
||||||
|
name:'平均时长',
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
// 使用深浅的间隔色
|
||||||
|
color: ["#B5B5B5"],
|
||||||
|
type: "dashed",
|
||||||
|
opacity: 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {},
|
||||||
},
|
},
|
||||||
},
|
series: [{
|
||||||
axisLabel: {},
|
data: getYValue(),
|
||||||
},
|
stack: "zs",
|
||||||
series: [
|
type: "bar",
|
||||||
{
|
barMaxWidth: "auto",
|
||||||
data: getYValue(),
|
barWidth: 60,
|
||||||
stack: "zs",
|
itemStyle: {
|
||||||
type: "bar",
|
color: {
|
||||||
barMaxWidth: "auto",
|
x: 0,
|
||||||
barWidth: 60,
|
y: 0,
|
||||||
itemStyle: {
|
x2: 0,
|
||||||
color: {
|
y2: 1,
|
||||||
x: 0,
|
type: "linear",
|
||||||
y: 0,
|
global: false,
|
||||||
x2: 0,
|
colorStops: [{
|
||||||
y2: 1,
|
offset: 0,
|
||||||
type: "linear",
|
color: "#5EA1FF",
|
||||||
global: false,
|
},
|
||||||
colorStops: [
|
{
|
||||||
{ offset: 0, color: "#5EA1FF" },
|
offset: 1,
|
||||||
{ offset: 1, color: "#90BEFF" },
|
color: "#90BEFF",
|
||||||
],
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
label: {
|
],
|
||||||
show: true,
|
};
|
||||||
position: 'top',
|
|
||||||
formatter: '{c}s',
|
|
||||||
color: '#333',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
//折线的加入
|
|
||||||
{
|
|
||||||
data: expectedDuration.value,
|
|
||||||
type: "line",
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolSize: 8,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#FF7F50',
|
|
||||||
width: 2,
|
|
||||||
},
|
|
||||||
itemStyle: {
|
|
||||||
color: '#FF7F50',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
}
|
}
|
||||||
|
//获取平均时长纵坐标
|
||||||
// 获取平均时长纵坐标
|
|
||||||
const getYValue = () => {
|
const getYValue = () => {
|
||||||
const arr = useOverview.allData.map(item => item.timeAnalyse)
|
const arr = [...useOverview.allData[0].timeAnalyse]
|
||||||
const num = useOverview.allData[0].hasAnswers.length;
|
const num = useOverview.allData[0].hasAnswers.length
|
||||||
if (arr.length === 0) return [];
|
|
||||||
return arr.map(item => (item ? (item / num).toFixed(2) : 0));
|
return arr.map(item => {
|
||||||
};
|
return item ? (item / num).toFixed(2) : 0
|
||||||
|
})
|
||||||
// 获取横纵轴坐标数据
|
}
|
||||||
|
// 获取横纵轴坐标数据
|
||||||
const getXValue = () => {
|
const getXValue = () => {
|
||||||
return useOverview.allData.map((item, index) => `第${index + 1}题`);
|
return useOverview.allData.map(item => item.id)
|
||||||
};
|
}
|
||||||
|
|
||||||
watch(() => useOverview.tableList, () => {
|
|
||||||
expectedDuration.value = useOverview.tableList.map(item => (Number(item.timelength) * 60 / useOverview.allData.length).toFixed(2));
|
|
||||||
|
|
||||||
// 获取横纵坐标
|
|
||||||
|
watch(() => useOverview.tableList,() => {
|
||||||
|
//获取横纵坐标
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initChart();
|
initChart();
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<span>学生答案:
|
<span>学生答案:
|
||||||
<span
|
<span
|
||||||
v-if="stuItem.feedcontent !=''"
|
v-if="stuItem.feedcontent !=''"
|
||||||
:style="{backgroundColor: `${formatWorkAnswer(quItem) == formatFeedContent(stuItem, quItem)? '#0ed116' : 'red'}`,color: 'white', padding: '0 5px', borderRadius: '5px'}"
|
style="background-color: red; color: white; padding: 0 5px; border-radius: 5px;"
|
||||||
v-html="formatFeedContent(stuItem, quItem)"
|
v-html="formatFeedContent(stuItem, quItem)"
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
|
@ -619,13 +619,13 @@ const checkWorkType = (params) => {
|
||||||
// 获取学生答题列表
|
// 获取学生答题列表
|
||||||
|
|
||||||
const score = extractedNumber(params.studentObj.scoingRate)
|
const score = extractedNumber(params.studentObj.scoingRate)
|
||||||
if(0<=score && score<=59){
|
if(0<=score<=59){
|
||||||
classWorkFormScore.rating = 5
|
classWorkFormScore.rating = 5
|
||||||
}else if(60<=score && score<=69){
|
}else if(60<=score<=69){
|
||||||
classWorkFormScore.rating = 4
|
classWorkFormScore.rating = 4
|
||||||
}else if(70<=score && score<=79){
|
}else if(70<=score<=79){
|
||||||
classWorkFormScore.rating = 3
|
classWorkFormScore.rating = 3
|
||||||
}else if(80<=score && score<=99){
|
}else if(80<=score<=99){
|
||||||
classWorkFormScore.rating = 2
|
classWorkFormScore.rating = 2
|
||||||
}else{
|
}else{
|
||||||
classWorkFormScore.rating = 1
|
classWorkFormScore.rating = 1
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
<!-- 训练报告-->
|
<!-- 训练报告-->
|
||||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
||||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||||
<ClassOverview :active-data="classWorkActiveData" :table-list="overviewData"></ClassOverview>
|
<ClassOverview :table-list="overviewData"></ClassOverview>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <template #footer>
|
<!-- <template #footer>
|
||||||
|
@ -393,46 +393,11 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.value = '1'
|
tableRadio.value = '1'
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
tableRadio.list = tableRadio.list.map((item) => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
teacherRating : checkWorkType(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading_dt_table.value = false
|
loading_dt_table.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const checkWorkType = (item) => {
|
|
||||||
//这里判断题目类型
|
|
||||||
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
|
||||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
|
||||||
let rating = 0
|
|
||||||
//判断题目是不是客观题
|
|
||||||
if(subType.every(item => objectiveQuestion.includes(item))){
|
|
||||||
// 获取学生答题列表
|
|
||||||
const score = extractedNumber(item.scoingRate)
|
|
||||||
if(0<=score && score<=59){
|
|
||||||
rating = 5
|
|
||||||
}else if(60<=score && score<=69){
|
|
||||||
rating = 4
|
|
||||||
}else if(70<=score && score<=79){
|
|
||||||
rating = 3
|
|
||||||
}else if(80<=score && score<=99){
|
|
||||||
rating = 2
|
|
||||||
}else{
|
|
||||||
rating = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return rating
|
|
||||||
|
|
||||||
}
|
|
||||||
// 获取百分比的数字
|
|
||||||
const extractedNumber = (score) => {
|
|
||||||
const match = score.match(/\d+/);
|
|
||||||
return match ? parseInt(match[0], 10) : null;
|
|
||||||
}
|
|
||||||
/** 2、查看某一个学生的学习任务完成详情*/
|
/** 2、查看某一个学生的学习任务完成详情*/
|
||||||
const getStudentClassWorkDataDetail = (row) => {
|
const getStudentClassWorkDataDetail = (row) => {
|
||||||
// 这里取出的是学生完成情况
|
// 这里取出的是学生完成情况
|
||||||
|
|
|
@ -74,28 +74,28 @@
|
||||||
|
|
||||||
<div class="title">试题详情</div>
|
<div class="title">试题详情</div>
|
||||||
<!-- 习题训练 -->
|
<!-- 习题训练 -->
|
||||||
<el-card class="item-card">
|
<el-card style="max-width: 100%; margin-bottom: 10px; text-align: left;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" style="padding: 10px">
|
<el-col :span="24" style="padding: 10px">
|
||||||
<!-- 题源、题目标题、题目选项 -->
|
<!-- 题源、题目标题、题目选项 -->
|
||||||
<span>{{ activeExam.worktag }}</span>
|
<span>{{ activeExam.worktag }}</span>
|
||||||
<span v-html="activeExam.titleFormat"></span>
|
<span style="margin-left: 4px" v-html="activeExam.titleFormat"></span>
|
||||||
<div :span="24" style="padding: 12px 6px 2px" v-html="activeExam.workdescFormat"></div>
|
<div :span="24" style="padding: 6px" v-html="activeExam.workdescFormat"></div>
|
||||||
<!-- 折叠: 详情分析解答 -->
|
<!-- 折叠: 详情分析解答 -->
|
||||||
<div class="demo-collapse">
|
<div class="demo-collapse">
|
||||||
<el-collapse v-model="activeExamFlag" class="custom-collapse">
|
<el-collapse v-model="activeExamFlag">
|
||||||
<el-collapse-item title="详情分析解答" name="1">
|
<el-collapse-item title="详情分析解答" name="1">
|
||||||
<el-row style=" padding: 4px; border: 2px dotted;">
|
<el-row style=" padding: 6px 10px; border: 2px dotted;">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-col :span="3" style="padding: 4px 0px"><em>【答案】</em></el-col>
|
<el-col :span="2" style="padding: 6px 0px"><em>【答案】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.workanswerFormat"></el-col>
|
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.workanswerFormat"></el-col>
|
||||||
<el-col :span="3" style="padding: 4px 0px"><em>【分析】</em></el-col>
|
<el-col :span="2" style="padding: 6px 0px"><em>【分析】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.method"></el-col>
|
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.method"></el-col>
|
||||||
<el-col :span="3" style="padding: 4px 0px"><em>【解答】</em></el-col>
|
<el-col :span="2" style="padding: 6px 0px"><em>【解答】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.analyse"></el-col>
|
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.analyse"></el-col>
|
||||||
<el-col :span="3" style="padding: 4px 0px"><em>【点评】</em></el-col>
|
<el-col :span="2" style="padding: 6px 0px"><em>【点评】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.discuss"></el-col>
|
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.discuss"></el-col>
|
||||||
<!-- <el-col :span="21" style="padding: 4px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
|
<!-- <el-col :span="21" style="padding: 6px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
|
||||||
</template>
|
</template>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
|
@ -433,17 +433,6 @@ watchEffect(() => { initData() })
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-card {
|
|
||||||
max-width: 100%;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
text-align: left;
|
|
||||||
font-size: 18px;
|
|
||||||
|
|
||||||
:deep(.el-collapse-item__content){
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -390,58 +390,11 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.value = '1'
|
tableRadio.value = '1'
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
// 自动批阅判断
|
|
||||||
teacherCriticism();
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading_dt_table.value = false
|
loading_dt_table.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 自动批阅判断:
|
|
||||||
* 已交 并 作业类型为习题训练
|
|
||||||
*/
|
|
||||||
const teacherCriticism = ()=>{
|
|
||||||
// 已交的list才自动批阅判断
|
|
||||||
if(tableRadio.value == '1'&& classWorkAnalysis.worktype == '习题训练'){
|
|
||||||
// 只有习题训练才会自动批阅
|
|
||||||
tableRadio.list = tableRadio.list.map((item) => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
teacherRating : item.teacherRating || checkWorkType(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const checkWorkType = (item) => {
|
|
||||||
//这里判断题目类型
|
|
||||||
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
|
||||||
const objectiveQuestion = ['单选题','多选题','判断题']
|
|
||||||
let rating = 0
|
|
||||||
//判断题目是不是客观题
|
|
||||||
if(subType.every(item => objectiveQuestion.includes(item))){
|
|
||||||
// 获取学生答题列表 scoingRate 得分率
|
|
||||||
const score = extractedNumber(item.scoingRate)
|
|
||||||
if(0<=score && score<=59){
|
|
||||||
rating = 5
|
|
||||||
}else if(60<=score && score<=69){
|
|
||||||
rating = 4
|
|
||||||
}else if(70<=score && score<=79){
|
|
||||||
rating = 3
|
|
||||||
}else if(80<=score && score<=99){
|
|
||||||
rating = 2
|
|
||||||
}else{
|
|
||||||
rating = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return rating
|
|
||||||
|
|
||||||
}
|
|
||||||
// 获取百分比的数字
|
|
||||||
const extractedNumber = (score) => {
|
|
||||||
const match = score.match(/\d+/);
|
|
||||||
return match ? parseInt(match[0], 10) : null;
|
|
||||||
}
|
|
||||||
/** 2、查看某一个学生的学习任务完成详情*/
|
/** 2、查看某一个学生的学习任务完成详情*/
|
||||||
const getStudentClassWorkDataDetail = (row) => {
|
const getStudentClassWorkDataDetail = (row) => {
|
||||||
// 这里取出的是学生完成情况
|
// 这里取出的是学生完成情况
|
||||||
|
@ -563,8 +516,6 @@ const tableRadioChange = (e) => {
|
||||||
tableRadio.value = '1';
|
tableRadio.value = '1';
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length;
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length;
|
||||||
tableRadio.num1 = tableRadio.list.length;
|
tableRadio.num1 = tableRadio.list.length;
|
||||||
// 自动批阅判断
|
|
||||||
teacherCriticism();
|
|
||||||
}else if(e=='0'){
|
}else if(e=='0'){
|
||||||
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0')
|
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0')
|
||||||
tableRadio.value = '0';
|
tableRadio.value = '0';
|
||||||
|
|
|
@ -7,11 +7,12 @@
|
||||||
v-for="item in sourceStore.thirdResult.list"
|
v-for="item in sourceStore.thirdResult.list"
|
||||||
:key="item.itemId"
|
:key="item.itemId"
|
||||||
class="list-item"
|
class="list-item"
|
||||||
@click="handleRow(item)"
|
@click="handleRow"
|
||||||
>
|
>
|
||||||
<div class="item-left flex">
|
<div class="item-left flex">
|
||||||
<div style="position: relative">
|
<div style="position: relative" @click="clickImg(item.itemId)">
|
||||||
<FileImage :file-name="item.fileType" :size="50" />
|
<FileImage :file-name="item.fileType" :size="50" />
|
||||||
|
<el-icon style="position: absolute;top: 1px;right: 5px"><Search /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex item-left-content">
|
<div class="flex item-left-content">
|
||||||
<div class="name flex" :title="item.title">
|
<div class="name flex" :title="item.title">
|
||||||
|
@ -65,7 +66,14 @@
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<FilePreview ref="thirdPreview" v-model="isViewImg"></FilePreview>
|
<el-dialog v-model="isViewImg" width="80%" :modal-append-to-body="false" :append-to-body="false">
|
||||||
|
<div class="demo-image__lazy">
|
||||||
|
<el-image v-for="(url,index) in srcList" :key="index" :src="url" lazy />
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- <video width="550" controls autoplay loop>-->
|
||||||
|
<!-- <source src="https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4" type="video/mp4" />-->
|
||||||
|
<!-- </video>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -74,9 +82,10 @@ import { ref } from 'vue'
|
||||||
// import { ElMessage, ElMessageBox } from 'element-plus'
|
// import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { Clock,View,Folder,Search } from '@element-plus/icons-vue'
|
import { Clock,View,Folder,Search } from '@element-plus/icons-vue'
|
||||||
import FileImage from '@/components/file-image/index.vue'
|
import FileImage from '@/components/file-image/index.vue'
|
||||||
import FilePreview from '@/components/thirdFile-preview/index.vue'
|
import { getFileSuffix } from '@/utils/ruoyi'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import useResoureStore from '../store'
|
import useResoureStore from '../store'
|
||||||
|
import {getImgPath} from "@/api/file/third";
|
||||||
|
|
||||||
const userstore = useUserStore()
|
const userstore = useUserStore()
|
||||||
const sourceStore = useResoureStore()
|
const sourceStore = useResoureStore()
|
||||||
|
@ -84,7 +93,8 @@ const sourceStore = useResoureStore()
|
||||||
// const userInfo = userstore.user
|
// const userInfo = userstore.user
|
||||||
//判断是否预览图片
|
//判断是否预览图片
|
||||||
const isViewImg = ref(false)
|
const isViewImg = ref(false)
|
||||||
const thirdPreview = ref()
|
//显示图片的路径
|
||||||
|
const srcList = ref([])
|
||||||
|
|
||||||
// 分页change
|
// 分页change
|
||||||
const handleSizeChange = (limit) => {
|
const handleSizeChange = (limit) => {
|
||||||
|
@ -110,9 +120,20 @@ function timestampToDate(timestamp) {
|
||||||
return `${year}-${month}-${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
}
|
}
|
||||||
//获取图片的路径
|
//获取图片的路径
|
||||||
const handleRow = (item) => {
|
const clickImg = (id) => {
|
||||||
isViewImg.value = true
|
srcList.value = []
|
||||||
thirdPreview.value.init(item.itemId)
|
getImgPath({itemId:id}).then(res => {
|
||||||
|
if(res.code === 200){
|
||||||
|
isViewImg.value = true
|
||||||
|
res.data.forEach(item => {
|
||||||
|
item.subsets.forEach(previewItem => {
|
||||||
|
previewItem.previewFiles.forEach(fileItem => {
|
||||||
|
srcList.value.push(fileItem.fileUrl)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,9 @@ const list = computed(() => props.data.map((o,i) => {
|
||||||
}))
|
}))
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
posBtnAll = btnRef.value.getBoundingClientRect()
|
posBtnAll = btnRef.value.getBoundingClientRect()
|
||||||
hPost.value = Math.round(posBtnAll.height)
|
hPost.value = posBtnAll.height
|
||||||
curNode = sessionStore?.get?.('subject.curNode')
|
|
||||||
|
curNode = sessionStore.get('subject.curNode')
|
||||||
})
|
})
|
||||||
// === 方法 ===
|
// === 方法 ===
|
||||||
// 获取颜色索引
|
// 获取颜色索引
|
||||||
|
@ -96,7 +97,7 @@ const clickHandel = (o, e) => {
|
||||||
isVisible.value = !isColse // 相同的按钮且打开状态,点击关闭
|
isVisible.value = !isColse // 相同的按钮且打开状态,点击关闭
|
||||||
activeObj.value = o
|
activeObj.value = o
|
||||||
const nodeH = parseInt(node.height / 2) // 高度的一半
|
const nodeH = parseInt(node.height / 2) // 高度的一半
|
||||||
topPos.value = Math.round(parseInt(node.top) - posBtnAll.top + nodeH)
|
topPos.value = parseInt(node.top) - posBtnAll.top + nodeH
|
||||||
}
|
}
|
||||||
emit('change', o)
|
emit('change', o)
|
||||||
}
|
}
|
||||||
|
@ -148,8 +149,8 @@ const closeActive = () =>{
|
||||||
--top: 30px;
|
--top: 30px;
|
||||||
--height: 40vh;
|
--height: 40vh;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0 75px auto auto;
|
inset: 50% 75px auto auto;
|
||||||
// transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
background-color: #121212;
|
background-color: #121212;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="props.test">
|
<div v-if="props.test">
|
||||||
<el-button type="primary" @click="trigger(1)" v-tap:trigger="[1,'']">点赞</el-button>
|
<el-button type="primary" @click="trigger" v-tap:trigger="">点赞</el-button>
|
||||||
<el-button type="primary" @click="trigger(2, '学生A')" v-tap:trigger="[2,'学生A']">疑惑</el-button>
|
<el-button type="primary" @click="trigger(2, '学生A')" v-tap:trigger="[2,'学生A']">疑惑</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 温度计-模式 -->
|
<!-- 温度计-模式 -->
|
||||||
|
@ -258,11 +258,11 @@ defineExpose({ trigger })
|
||||||
min-width: 15px;
|
min-width: 15px;
|
||||||
// height: 500px;
|
// height: 500px;
|
||||||
&.like{
|
&.like{
|
||||||
background-image: linear-gradient(to top, #d2f0cb, #2f9e44);
|
background-image: linear-gradient(to top, #fef0f0, #f56c6c);
|
||||||
// animation: striped-flow 5s linear infinite;
|
// animation: striped-flow 5s linear infinite;
|
||||||
}
|
}
|
||||||
&.doubt{
|
&.doubt{
|
||||||
background-image: linear-gradient(to top, #ebc6c6, #ff0000);
|
background-image: linear-gradient(to top, #fdf6ec, #e6a23c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue