实训阅读时间联调

dev-QQq
HeHaonan 2 years ago
parent c86b542ad8
commit 74ea6bf12a

@ -138,3 +138,11 @@ export function getCommentPoint(data) {
data: data,
});
}
//阅读时长提交
export function timeCountSubmit(data) {
return request({
url: "/api/stu/concept/block/hashReadingScore",
method: "post",
data: data,
});
}

@ -16,8 +16,8 @@ axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: import.meta.env.VITE_APP_BASE_API,
baseURL: "https://szyx.sztzjy.com:9868/",
// baseURL:'http://192.168.2.14:9868/',
// baseURL: "https://szyx.sztzjy.com:9868/",
baseURL:'http://192.168.2.14:9868/',
// 超时
timeout: 100000,
});

@ -1,6 +1,6 @@
<template>
<div>
<el-dialog :title="title" style="width: 1308px; height: 838px" custom-class="gdialog" v-model="props.showModel" :before-close="close">
<el-dialog :title="title" style="width: 1308px; height: 838px" custom-class="gdialog" :model-value="props.showModel" @close="close()">
<div class="diaMain" style="margin-top: -35px; padding: 10px; padding-left: 20px">
<el-scrollbar height="730px">
<slot name="content" class="main"></slot>
@ -18,8 +18,8 @@
</div>
</template>
<script setup>
const emits = defineEmits(["closePop", "submit"]);
const dialogVisible = ref(false);
const emits = defineEmits(["closePop", "submit",]);
// const dialogVisible = ref(false);
const props = defineProps({
modelValue: [String, Object, Array],
//

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
<template>
<div class="content">
<div class="import" @click="dialogVisible = true">
<div class="import" @click="openKnowledge">
<img src="@/assets/images/导入.png" alt="" />
<span>任务知识导入</span>
</div>
@ -294,7 +294,7 @@
</div>
</div>
</div>
<pop-modal :showModel="dialogVisible" @closePop="dialogVisible = false">
<pop-modal :showModel="dialogVisible" @closePop="handlClose">
<template v-slot:content>
<p>
帕累托分析法源于经典的二八法则意大利经济学家维尔弗雷多·帕累托于1906年提出了著名的关于意大利社会财务分配的研究结论20%的人口掌握了80%的社会财富这个结论对大多数国家的社会财富分配情况都成立因此帕累托法则又被称为80/20法则
@ -328,6 +328,8 @@ import * as portraitModel from "@/api/portraitModel";
import { downBlobFile } from "@/utils/index.js";
const { proxy } = getCurrentInstance();
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const timer = ref(null);
const timeCount = ref(0);
const barData = ref(["", "", "", ""]);
const lineData = ref(["", "", "", ""]);
const showAnswerFlag = ref(false);
@ -1240,6 +1242,40 @@ defineExpose({
retrain,
// practicalTraining,
});
const openKnowledge = () => {
dialogVisible.value = true;
startCount();
};
const handlClose = () => {
console.log('123');
dialogVisible.value = false;
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
console.log("阅读时长", timeCount.value + "s");
submitTimeCount();
timeCount.value = 0;
};
const handleTest = ()=>{
console.log('aa');
}
const startCount = () => {
timer.value = setInterval(() => {
timeCount.value++;
}, 1000);
};
const submitTimeCount = () => {
portraitModel
.timeCountSubmit({
stuScoreDetailsDTO: {
userId: JSON.parse(getUserInfo()).userId,
viewingTime: timeCount.value,
},
})
.then((res) => {})
.catch((error) => {});
};
</script>
<style scoped lang="scss">

@ -1,6 +1,6 @@
<template>
<div class="content">
<div class="import" @click="dialogVisible = true">
<div class="import" @click="openKnowledge">
<img src="@/assets/images/导入.png" alt="" />
<span>任务知识导入</span>
</div>
@ -250,7 +250,7 @@
</div>
</div>
</div>
<pop-modal :showModel="dialogVisible" @closePop="dialogVisible = false">
<pop-modal :showModel="dialogVisible" @closePop="handlClose">
<template v-slot:content>
<div v-html="knowledgeHtml"></div>
</template>
@ -267,6 +267,8 @@ import { downBlobFile } from "@/utils/index.js";
import { onBeforeUnmount, onMounted } from "vue";
const { proxy } = getCurrentInstance();
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const timer = ref(null);
const timeCount = ref(0);
const showAnswerFlag = ref(false);
const comListError = ref(false);
const knowledgeHtml = ref(
@ -1141,6 +1143,37 @@ defineExpose({
retrain,
// practicalTraining,
});
const openKnowledge = () => {
dialogVisible.value = true;
startCount();
};
const handlClose = () => {
console.log('123');
dialogVisible.value = false;
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
console.log("阅读时长", timeCount.value + "s");
submitTimeCount();
timeCount.value = 0;
};
const startCount = () => {
timer.value = setInterval(() => {
timeCount.value++;
}, 1000);
};
const submitTimeCount = () => {
portraitModel
.timeCountSubmit({
stuScoreDetailsDTO: {
userId: JSON.parse(getUserInfo()).userId,
viewingTime: timeCount.value,
},
})
.then((res) => {})
.catch((error) => {});
};
</script>
<style scoped lang="scss">

@ -1,6 +1,6 @@
<template>
<div class="content">
<div class="import" @click="dialogVisible = true">
<div class="import" @click="openKnowledge">
<img src="@/assets/images/导入.png" alt="" />
<span>任务知识导入</span>
</div>
@ -291,7 +291,7 @@
</div>
</div>
</div>
<pop-modal :showModel="dialogVisible" @closePop="dialogVisible = false">
<pop-modal :showModel="dialogVisible" @closePop="handlClose">
<template v-slot:content>
<p style="line-height: 25px; font-size: 14px">
波士顿矩阵BCG Matrix又称市场增长率-相对市场份额矩阵由美国著名的管理学家波士顿咨询公司创始人布鲁斯·亨德森于1970年首创它是通过销售增长率反应市场引力的指标和市场占有率反应企业实力的指标来分析决定企业的产品结构
@ -345,6 +345,8 @@ import { downBlobFile } from "@/utils/index.js";
import { onMounted } from "vue";
const { proxy } = getCurrentInstance();
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const timer = ref(null);
const timeCount = ref(0);
const showAnswerFlag = ref(false);
const dialogVisible = ref(false);
const knowledgeFlag = ref(false);
@ -1931,6 +1933,37 @@ defineExpose({
retrain,
// practicalTraining,
});
const openKnowledge = () => {
dialogVisible.value = true;
startCount();
};
const handlClose = () => {
console.log('123');
dialogVisible.value = false;
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
console.log("阅读时长", timeCount.value + "s");
submitTimeCount();
timeCount.value = 0;
};
const startCount = () => {
timer.value = setInterval(() => {
timeCount.value++;
}, 1000);
};
const submitTimeCount = () => {
portraitModel
.timeCountSubmit({
stuScoreDetailsDTO: {
userId: JSON.parse(getUserInfo()).userId,
viewingTime: timeCount.value,
},
})
.then((res) => {})
.catch((error) => {});
};
</script>
<style scoped lang="scss">

@ -1,6 +1,6 @@
<template>
<div class="content">
<div class="import" @click="dialogVisible = true">
<div class="import" @click="openKnowledge">
<img src="@/assets/images/导入.png" alt="" />
<span>任务知识导入</span>
</div>
@ -294,7 +294,7 @@
</div>
<div class="line"></div>
</div>
<pop-modal :showModel="dialogVisible" @closePop="dialogVisible = false">
<pop-modal :showModel="dialogVisible" @closePop="handlClose">
<template v-slot:content>
<div
v-html="
@ -599,6 +599,8 @@ const showAnswerFlag = ref(false);
const errorNum = ref(0);
const option = ref({});
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const timer = ref(null);
const timeCount = ref(0);
onBeforeUnmount(() => {
saveData();
});
@ -1213,6 +1215,37 @@ defineExpose({
retrain,
// practicalTraining,
});
const openKnowledge = () => {
dialogVisible.value = true;
startCount();
};
const handlClose = () => {
console.log('123');
dialogVisible.value = false;
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
console.log("阅读时长", timeCount.value + "s");
submitTimeCount();
timeCount.value = 0;
};
const startCount = () => {
timer.value = setInterval(() => {
timeCount.value++;
}, 1000);
};
const submitTimeCount = () => {
portraitModel
.timeCountSubmit({
stuScoreDetailsDTO: {
userId: JSON.parse(getUserInfo()).userId,
viewingTime: timeCount.value,
},
})
.then((res) => {})
.catch((error) => {});
};
</script>
<style scoped lang="scss">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
<template>
<div class="content">
<div class="import" @click="dialogVisible = true">
<div class="import" @click="openKnowledge">
<img src="@/assets/images/导入.png" alt="" />
<span style="color: #fff">任务知识导入</span>
</div>
@ -451,7 +451,7 @@
</div>
</div>
</div>
<el-dialog v-model="dialogVisible" title="任务知识导入" style="width: 1108px; height: 798px" custom-class="gdialog" >
<el-dialog v-model="dialogVisible" title="任务知识导入" style="width: 1108px; height: 798px" custom-class="gdialog" @close="handlClose">
<div style="color: #fff; margin-top: -35px; padding: 10px; padding-left: 20px">
<el-scrollbar height="650px">
<div v-html="knowledge"></div>
@ -477,6 +477,8 @@ import { onBeforeUnmount, onMounted } from "vue";
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const dialogVisible = ref(false);
const { proxy } = getCurrentInstance();
const timer = ref(null);
const timeCount = ref(0);
const errorNum = ref(0); //
const stepError1 = ref(0);
const stepError2 = ref(0);
@ -1107,8 +1109,8 @@ const submitData = () => {
}
errorNum.value = stepError1.value + stepError2.value + step4Error.value + step5Error.value + step6Error.value + step7Error.value;
console.log(errorNum.value, "总错误次数");
if(errorNum.value > 5){
errorNum.value = 5
if (errorNum.value > 5) {
errorNum.value = 5;
}
portraitModel
.submit({
@ -1545,6 +1547,36 @@ const tableSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
}
}
};
const openKnowledge = () => {
dialogVisible.value = true;
startCount();
};
const handlClose = () => {
console.log(111);
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
console.log("阅读时长", timeCount.value + "s");
submitTimeCount();
timeCount.value = 0;
};
const startCount = () => {
timer.value = setInterval(() => {
timeCount.value++;
}, 1000);
};
const submitTimeCount = () => {
portraitModel
.timeCountSubmit({
stuScoreDetailsDTO: {
userId: JSON.parse(getUserInfo()).userId,
viewingTime: timeCount.value,
},
})
.then((res) => {})
.catch((error) => {});
};
</script>
<style scoped lang="scss">
@ -1644,7 +1676,6 @@ const tableSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
background-color: #f5f7fa !important;
}
::v-deep .el-table td {
padding-top: 4px;
padding-bottom: 4px;

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save