dev-QQq
方佳 博 2 years ago
parent e643847b11
commit 657f49dddd

Binary file not shown.

@ -17,6 +17,7 @@
"dependencies": {
"@antv/g2": "^5.2.3",
"@element-plus/icons-vue": "2.0.10",
"@videojs-player/vue": "^1.0.0",
"@vueup/vue-quill": "1.1.0",
"@vueuse/core": "9.5.0",
"axios": "0.27.2",
@ -35,6 +36,7 @@
"md-editor-v3": "^4.18.1",
"nprogress": "0.2.0",
"pinia": "2.0.22",
"video.js": "^8.17.3",
"vue": "^3.2.47",
"vue-cropper": "1.0.3",
"vue-router": "4.1.4",

@ -112,4 +112,12 @@ export function regressionAnalysisTrendChart(data) {
method: "post",
data: data,
});
}
//哈希函数知识概要分数
export function knowledgeProfileScore(data) {
return request({
url: "/api/stu/concept/block/hashReadingScore",
method: "post",
data: data,
});
}

@ -0,0 +1,211 @@
import request from "@/utils/request";
// 成绩总览 v 加 搜索 v
export function getDigitalCurrencyScoreAPI(data) {
return request({
url: "/api/tch/grades/getGeneralViewList",
method: "post",
data: data,
});
}
// 成绩总览权重弹窗数据回显 v
export function getResultsOverviewWeightAPI(schoolId) {
return request({
url: "/api/tch/grades/getResultsOverviewWeight",
method: "get",
params: schoolId,
});
}
// 导出
export function generalViewExportAPI(data) {
return request({
url: "api/tch/generalView/generalViewExport",
method: "get",
params: data,
});
}
// 成绩总览权限设置确定 v
export function setResultsOverviewWeight(data) {
return request({
url: "/api/tch/grades/setResultsOverviewWeight",
method: "post",
data: data,
});
}
// 区块链概念成绩情况 v + 区块链技术
export function getAchievementListAPI(data) {
return request({
url: "/api/tch/valueOfData/getGeneralViewList",
method: "post",
params: data,
});
}
// 区块链概念 加 区块链技术 详情 v
export function getGradeDetailsAPI(data) {
return request({
url: "/api/tch/valueOfData/getGradeDetails",
method: "post",
params: data,
});
}
// 区块链概念权重回显 哈希and 区块链 v
export function getDetailWeightAPI(data) {
return request({
url: "/api/tch/valueOfData/getWeightEcho",
method: "post",
params: data,
});
}
// 区块链权重更新 v
export function setConceptTechnologyWeightAPI(data) {
return request({
url: "/api/tch/valueOfData/getWeightSettings",
method: "post",
data: data,
});
}
// 区块链实训报告 v
export function getAchievementAPI(data) {
return request({
url: "/api/tch/valueOfData/getTrainingReportList",
method: "get",
params: data,
});
}
// 区块链 噶链 技术 导出
export function conceptExportAPI(data) {
return request({
url: "/api/tch/conceptTechnologyAchievement/conceptTechnologyExport",
method: "get",
data: data,
});
}
// 数字货币页面表格展示 v
export function getScoreAPI(data) {
return request({
url: "/api/tch/review/getCurrencyScoreReport",
method: "get",
params: data,
});
}
// 数字货币权重展示 v
export function getCurrencyScore(data) {
return request({
url: "/api/tch/digitalCurrency/getDigitalCurrencyScore",
method: "get",
params: data,
});
}
// 数字货币权重展示 v
export function getDigitalWeightAPI(data) {
return request({
url: "/api/tch/digitalCurrency/getDigitalCurrencyWeight",
method: "get",
params: data,
});
}
// 数字货币权限修改 v
export function updateDigitalWeightAPI(data) {
return request({
url: "/api/tch/digitalCurrency/updateDigitalCurrencyWeight",
method: "put",
data: data,
});
}
// 数字货币 成绩详情 v
export function getGradeAPI(data) {
return request({
url: "/api/stu/grande/getStuDigitalCurrencyGrade",
method: "get",
params: data,
});
}
// 数字货币实训报告 x
export function getReportBySchoolAPI(data) {
return request({
url: "/api/tch/grades/reportPresentation",
method: "get",
// data: data,
params: data,
});
}
// 获取单个学生报告 v
export function getReportAPI(data) {
return request({
url: "/api/tch/digitalCurrency/getReport",
method: "get",
params: data,
});
}
// 下载报告 v jj
// export function downloadAPI(data) {
// return request({
// url: "/api/tch/digitalCurrency/download",
// method: "get",
// params: data,
// });
// }
export function downloadAPI(data) {
return request({
url: "/api/stu/concept/block/download",
method: "get",
params: data,
});
}
// 评语和打分 v
export function ratingAndCommentAPI(data) {
return request({
url: "/api/tch/review/ratingAndComment",
method: "post",
data: data,
});
}
// 班级下拉框
export function getClassAPI(data) {
return request({
url: "/api/tch/grades/getClassNameBySchoolId",
method: "get",
params: data,
});
}
//评阅界面
export function trainingReportReviewPage(query) {
return request({
url: "/api/tch/grades/getCurrencyScoreReport",
method: "get",
params: query,
});
}
//实训报告评阅页面老师评分或评语
export function trainingReportReviewTeacherGradeComment(query) {
return request({
url: "/api/tch/grades/ratingAndComment",
method: "post",
data: query,
});
}
//单条学生报告
export function singleStudentReport(query) {
return request({
url: "/api/tch/grades/getReportFileURLByUserIdAndModule",
method: "get",
params: query,
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<section class="app-main">
<section :class="[role===4?'app-main':'app-main2']">
<router-view v-slot="{ Component, route }">
<transition name="fade-transform" mode="out-in" :key="route.path">
<keep-alive :include="tagsViewStore.cachedViews">
@ -22,7 +22,9 @@
<script setup>
import iframeToggle from "./IframeToggle/index";
import useTagsViewStore from "@/store/modules/tagsView";
import { getUserInfo } from '@/utils/auth'
const tagsViewStore = useTagsViewStore();
const role=ref(JSON.parse(getUserInfo()).roleId)
</script>
<style lang="scss" scoped>
@ -35,7 +37,14 @@ const tagsViewStore = useTagsViewStore();
background: url("@/assets/images/背景.webp") no-repeat;
background-size: 100% 100%;
}
.app-main2{
min-height: calc(100vh - 58px);
width: 100%;
position: relative;
overflow: hidden;
background: url("@/assets/images/背景f6.png") no-repeat;
background-size: 100% 100%;
}
.fixed-header + .app-main {
padding-top: 50px;
}

@ -22,7 +22,7 @@
mode="vertical"
>
<sidebar-item
v-for="(route, index) in dynamicRoutes"
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"

@ -1,12 +1,12 @@
<template>
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div class="title" style="height: 58px; background-color: #072048 !important; z-index: 900 !important; position: relative">
<div class="navTitle">
<span class="nacber-name"> </span>
<div :class="[role!==3 ? 'navTitle':'TnavTitle']">
<span class="nacber-name"> - </span>
</div>
</div>
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" :class="[role===3?'newImg':'']" />
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }"></div>
<app-main />
@ -20,10 +20,11 @@ import { useWindowSize } from "@vueuse/core";
import Sidebar from "./components/Sidebar/index.vue";
import { AppMain, Navbar, Settings, TagsView } from "./components";
import defaultSettings from "@/settings";
import { getUserInfo } from '@/utils/auth'
import useAppStore from "@/store/modules/app";
import useSettingsStore from "@/store/modules/settings";
const role=ref(JSON.parse(getUserInfo()).roleId)
const settingsStore = useSettingsStore();
const theme = computed(() => settingsStore.theme);
const sideTheme = computed(() => settingsStore.sideTheme);
@ -67,7 +68,10 @@ function setLayout() {
<style lang="scss" scoped>
@import "@/assets/styles/mixin.scss";
@import "@/assets/styles/variables.module.scss";
.newImg{
background: url('../assets/images/侧边栏1e.png') no-repeat center !important;
background-size: 100% 100% !important;
}
.app-wrapper {
@include clearfix;
position: relative;
@ -101,6 +105,23 @@ function setLayout() {
letter-spacing: 1px;
}
}
.TnavTitle{
background: url('../assets/images/top1.png');
background-size: 100% 100% !important;
box-shadow: 0 1px 4px #00152914;
position: fixed;
width: 100%;
height: 58px;
z-index: 1000;
padding: 5px 20px;
span{
font-size: 26px;
font-family: Source Han Sans CN;
font-weight: 700;
color: #fff;
line-height: 50px;
}
}
.sidebar-container {
margin-top: 58px;
}

@ -10,13 +10,12 @@ import router from './router'
import { ElMessage } from 'element-plus'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
import { getToken,getUserInfo } from '@/utils/auth'
import { isHttp } from '@/utils/validate'
import { isRelogin } from '@/utils/request'
import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission'
NProgress.configure({ showSpinner: false });
const whiteList = ['/login', '/register'];
@ -26,15 +25,18 @@ router.beforeEach((to, from, next) => {
if (getToken()) {
if (to.path === '/login') {
next({ path: '/' })
NProgress.done()
} else {
next()
if (isHttp(to.path)) {
next()
} else {
next()
// console.log(JSON.parse(getUserInfo()).roleId);
if(JSON.parse(getUserInfo()).roleId===3){
next({ path: '/index' })
NProgress.done()
}else if(JSON.parse(getUserInfo()).roleId===4){
next({ path: '/teacher/index' })
NProgress.done()
}
} else {
usePermissionStore().getRoutersPermission().then(accessRoutes => {
next() // hack方法 确保addRoutes已完成
})
}
} else {
// 没有token

@ -1,5 +1,5 @@
import useUserStore from '@/store/modules/user'
import { getUserInfo } from '@/utils/auth'
function authPermission(permission) {
const all_permission = "*:*:*";
const permissions = useUserStore().permissions
@ -14,7 +14,7 @@ function authPermission(permission) {
function authRole(role) {
const super_admin = "admin";
const roles = useUserStore().roles
const roles = [parseFloat(JSON.parse(getUserInfo()).roleId)===3 ? 'teacher':'student']
if (role && role.length > 0) {
return roles.some(v => {
return super_admin === v || v === role

@ -57,27 +57,54 @@ export const constantRoutes = [
component: () => import("@/views/error/401"),
hidden: true,
},
// {
// path: "",
// component: Layout,
// redirect: "/index",
// children: [
// {
// path: "/index",
// component: () => import("@/views/index"),
// name: "Index",
// meta: { title: "首页", icon: "首页", affix: true },
// },
// ],
// },
];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{
path: "",
path:"/teacher" ,
redirect: "/teacher/index",
roles:['teacher'],
component: Layout,
redirect: "/index",
children: [
{
path: "/index",
component: () => import("@/views/index"),
name: "Index",
meta: { title: "首页", icon: "首页", affix: true },
path: "index",
component: () => import("@/views/teacherEnd/index.vue"),
name: "Tindex",
meta: { title: "成绩中心", icon: "成绩中心", affix: true },
},
{
name: "pl",
path: "pl",
hidden: true,
component: () => import('@/views/teacherEnd/review.vue'),
meta: {
title: "评阅",
icon: "list", // 您可以根据需要更改图标
noCache: false,
link: null,
}
},
],
},
];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{
path: "",
component: Layout,
redirect: "/index",
roles:['student'],
children: [
{
path: "/index",
@ -91,6 +118,7 @@ export const dynamicRoutes = [
path: "/technology",
component: Layout,
redirect: "/technology/digitalMarketTech",
roles:['student'],
alwaysShow: true,
meta: { title: "数字营销技术", icon: "数据浏览", affix: true },
children: [
@ -127,6 +155,7 @@ export const dynamicRoutes = [
path: "/",
component: Layout,
redirect: "/digitalMarketingAlgorithms",
roles:['student'],
alwaysShow: true,
meta: { title: "数字营销算法", icon: "tongxunlu_B", affix: true },
children: [
@ -184,6 +213,7 @@ export const dynamicRoutes = [
{
path: "/userProfile",
component: Layout,
roles:['student'],
redirect: "/userProfile/portraitModel",
alwaysShow: true,
meta: { title: "用户画像模型", icon: "智能算法", affix: true },
@ -270,6 +300,7 @@ export const dynamicRoutes = [
{
path: "",
component: Layout,
roles:['student'],
redirect: "/bi",
children: [
{
@ -285,6 +316,7 @@ export const dynamicRoutes = [
path: "",
component: Layout,
redirect: "/learningResources",
roles:['student'],
children: [
{
path: "/learningResources",
@ -298,6 +330,7 @@ export const dynamicRoutes = [
path: "",
component: Layout,
redirect: "/evaluation",
roles:['student'],
children: [
{
path: "/evaluation",
@ -311,6 +344,7 @@ export const dynamicRoutes = [
path: "",
component: Layout,
redirect: "/Achievement",
roles:['student'],
children: [
{
path: "/Achievement",
@ -326,6 +360,7 @@ export const dynamicRoutes = [
// component: Layout,
hidden: true,
redirect: "/video",
roles:['student'],
children: [
{
path: "/video",

@ -16,7 +16,7 @@ const usePermissionStore = defineStore(
addRoutes: [],
defaultRoutes: [],
topbarRouters: [],
sidebarRouters: []
sidebarRouters: [],
}),
actions: {
setRoutes(routes) {
@ -51,6 +51,18 @@ const usePermissionStore = defineStore(
resolve(rewriteRoutes)
})
})
},
getRoutersPermission(roles){
return new Promise(resolve => {
// const sdata = JSON.parse(JSON.stringify(this.data))
// const sidebarRoutes = filterAsyncRouter(sdata)
console.log(dynamicRoutes);
const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
console.log(asyncRoutes);
asyncRoutes.forEach(route => { router.addRoute(route) })
this.setSidebarRouters(constantRoutes.concat(asyncRoutes))
resolve(asyncRoutes)
})
}
}
})

@ -17,7 +17,7 @@ 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:'http://192.168.2.13:9868/',
// 超时
timeout: 100000,
});

@ -18,8 +18,12 @@
</div>
</template>
<script setup>
import * as API from "@/api/AI.js";
import { getUserInfo } from "@/utils/auth";
const emits = defineEmits(["closePop", "submit"]);
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
const props = defineProps({
modelValue: [String, Object, Array],
//
@ -46,6 +50,26 @@ const close = () => {
const submit = () => {
emits("submit");
};
watch(() => props.showModel, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
</script>
<style lang="scss" scoped>
.diaMain {

@ -134,6 +134,30 @@ Elasticsearch是一个开源的全文搜索引擎基于Lucene的搜索服务
import {topicPresentation,topicSelection,submitTrainingTask} from '@/api/hash/digitalEconomy.js'
const { proxy } = getCurrentInstance();
const frameDialogVisible = ref(false);
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => frameDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const radio1 = ref(-1)
const data = ref([
{

@ -212,6 +212,29 @@ import { ref } from "vue";
const { proxy } = getCurrentInstance();
const dialogVisible = ref(false);
const centerDialogVisible = ref(false);
import * as API from "@/api/AI.js";
const timer=ref(null)
let seconds=0
watch(() => centerDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const topicList = ref([]);
const Answer = ref("");
const imgList = ref([

@ -384,6 +384,30 @@ import * as commonality from "@/api/commonality";
import { getUserInfo } from "@/utils/auth";
const { proxy } = getCurrentInstance();
const NaturallanguageprocessingVisible = ref(false);
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => NaturallanguageprocessingVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const text1 = ref({
input1: "",
input2: "",

@ -289,6 +289,30 @@ import * as commonality from "@/api/commonality.js";
import { getUserInfo } from "@/utils/auth";
const { proxy } = getCurrentInstance();
const robotlearningVisible = ref(false);
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => robotlearningVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const TrainingSet = ref([
{
age: "25",

@ -133,6 +133,30 @@ import {getToken,getUserInfo} from "@/utils/auth.js";
import * as commonality from "@/api/commonality.js";
const { proxy } = getCurrentInstance()
const textDialogVisible = ref(false);
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => textDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const downloadShow = ref(false);
//
const errorCount = ref(0);

@ -151,6 +151,30 @@ const {proxy} = getCurrentInstance();
import {getAssetsFile} from '@/utils/index.js'
const SelectVisible=ref(false);
const faceDialogVisible = ref(false);
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => faceDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const Characterphoto=ref([
{
id:1,

@ -403,6 +403,30 @@ import { getAssetsFile } from "@/utils/index.js";
import { onMounted, ref } from "vue";
const { proxy } = getCurrentInstance();
const voiceTechnologyVisible = ref(false);
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer2=ref(null)
let seconds=0
watch(() => voiceTechnologyVisible.value, (newValue) => {
if (newValue) {
timer2.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer2.value){
clearInterval(timer2.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const imgesList = ref([
{
id: 1,

@ -942,9 +942,33 @@
import { getUserInfo } from '@/utils/auth'
import {submitTrainingTask,trainingOperationRecords,HDFSViewOperationRecords} from '@/api/hash/digitalEconomy.js'
import { onMounted } from 'vue';
import * as API from "@/api/AI.js";
const hadoophdfsDialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => hadoophdfsDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const { proxy } = getCurrentInstance();
const dialogVisible=ref(false)
const hadoophdfsDialogVisible = ref(false);
let errorNumber=0
const value1=ref('')
const value2=ref('')

@ -361,7 +361,7 @@
<el-dialog
v-model="dialogVisible"
title="案例任务--实验项目:数字营销"
title="实验项目:数字营销"
width="65%"
custom-class="dialog"
>
@ -520,7 +520,30 @@
import { getUserInfo } from '@/utils/auth'
import {submitTrainingTask,marketingReadQuestionRecords,digitalSavesAutomatically} from '@/api/hash/digitalEconomy.js'
import { onMounted } from 'vue';
import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => dialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const dialogVisible2 = ref(false);
const dialogVisible3 = ref(false);
const dialogVisible4 = ref(false);

@ -410,9 +410,34 @@
import { getUserInfo } from '@/utils/auth'
import {hadoopExperimentTraining,hadoopCleansData,hadoopEcho} from '@/api/hash/digitalEconomy.js'
import { watch } from 'vue';
import * as API from "@/api/AI.js";
const hadoopDialogVisible = ref(false);
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => hadoopDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const { proxy } = getCurrentInstance();
const isHadoop=ref(false)
const hadoopDialogVisible = ref(false);
const radio=ref(0)
const selection=ref(['','','','','','','','','','','','','','','','',''])
const data = ref([

@ -132,8 +132,32 @@
// import {getUserId} from '@/utils/auth.js'
import { getUserInfo } from '@/utils/auth'
import {topicPresentation,topicSelection,submitTrainingTask} from '@/api/hash/digitalEconomy.js'
const { proxy } = getCurrentInstance();
const frameDialogVisible = ref(false);
const frameDialogVisible = ref(false);import * as API from "@/api/AI.js";
const dialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => frameDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const radio1 = ref(-1)
const data = ref([
]);

@ -87,6 +87,7 @@
</template>
<script setup>
import {LookBlockchainComposition} from '@/api/economy/bigData.js'
import * as API from "@/api/AI.js";
import {getTopic,submitJudgmentResults} from '@/api/hash/digitalEconomy.js'
// import { getUserId } from '@/utils/auth'
import { getUserInfo } from '@/utils/auth'
@ -223,6 +224,28 @@ import { getUserInfo } from '@/utils/auth'
return Array.from(set1).every(value => set2.has(value)) && Array.from(set2).every(value => set1.has(value));
}
const bigDataDialogVisible = ref(false);
const timer=ref(null)
let seconds=0
watch(() => bigDataDialogVisible.value, (newValue) => {
if (newValue) {
timer.value=setInterval(()=>{
seconds++
},1000)
} else {
if(timer.value){
clearInterval(timer.value)
}
const data=ref({
"stuScoreDetailsDTO":{
"viewingTime": seconds,
"userId":JSON.parse(getUserInfo()).userId,
}
})
API.knowledgeProfileScore(data.value).then((res)=>{
})
}
});
const data = ref([
{
topicId: "1b2eccf76e0e4080a99c19358dfcd7b7",

@ -399,16 +399,17 @@ const calculateAverageScore = () => {
const totalWeightedScore = weightedScores.reduce((acc, curr) => acc + curr, 0);
// 5
const finalResult = totalWeightedScore;
const finalResult1 = String(finalResult.toFixed());
const finalResult1 = String(finalResult.toFixed(2));
const newData = {
sid: "合计",
project: "",
project: "5",
assessmentItems: "100%",
scoringCriteria: "/",
totalScore: finalResult,
weight: "",
condition: "",
score: "",
totalScore: '',
scoreWeight:finalResult1,
weight: "2",
condition: "1",
score: "3",
};
tableData4.value.push(newData);
};
@ -556,7 +557,7 @@ const cerateGrade = () => {
tableData4.value[2].scoreWeight = weight2;
tableData4.value[2].schedule = item.schedule + "%";
}
if (item.learningProjects === "实报告") {
if (item.learningProjects === "实报告") {
tableData4.value[4].scoringCriteria = `提交实训报告,教师评分`;
tableData4.value[4].completionStatus = item.completionStatus;
if (item.scoreProject !== null) {

@ -37,7 +37,7 @@ import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";
import useUserStore from "@/store/modules/user";
import { getUserInfo } from '@/utils/auth'
const userStore = useUserStore();
const route = useRoute();
const router = useRouter();
@ -79,6 +79,7 @@ function handleLogin() {
// proxy.$refs.loginRef.validate(valid => {
// if (valid) {
loading.value = true;
loadpage.value = true;
// cookie
if (loginForm.value.rememberMe) {
Cookies.set("username", loginForm.value.username, { expires: 30 });
@ -96,18 +97,32 @@ function handleLogin() {
password: loginForm.value.password !== "" ? encrypt(loginForm.value.password) : loginForm.value.password,
token: loginForm.value.TOKEN,
};
if (loginForm.value.TOKEN !== "") {
params.token = loginForm.value.TOKEN;
}
userStore
.login(params)
.then((res) => {
router.push({ path: redirect.value || "/index" });
if (params.token) {
setTimeout(() => {
loadpage.value = false;
loading.value = false;
}, 3000);
loadpage.value = false;
if (parseFloat(JSON.parse(getUserInfo()).roleId)===4) {
router.push({ path: redirect.value || "/index" });
}
if (parseFloat(JSON.parse(getUserInfo()).roleId)===3) {
router.push({ path: redirect.value || "/teacher/index" });
}
}, 2000);
} else {
loadpage.value = false;
loading.value = false;
if (parseFloat(JSON.parse(getUserInfo()).roleId)===4) {
router.push({ path: redirect.value || "/index" });
}
if (parseFloat(JSON.parse(getUserInfo()).roleId)===3) {
router.push({ path: redirect.value || "/teacher/index" });
}
}
})
.catch(() => {

@ -0,0 +1,617 @@
<!-- 成绩总览 -->
<template>
<div class="content">
<!-- log -->
<!-- <div class="log"></div> -->
<el-row>
<el-col :span="24">
<img src="../../assets/images/下载1.png" alt="">
<span class="spanCen1">成绩情况</span>
</el-col>
</el-row>
<!-- 同步搜索 -->
<div class="select">
<el-form :model="params">
<el-row typ="flex">
<el-form-item label="用户名:">
<div class="conter" style="display: flex;height: 31px;">
<el-input style="width:224px" v-model="params.name" class="w-50 m-2" size="small" ></el-input>
</div>
</el-form-item>
<div class="serlog" @click="getDigitalCurrencyScore"></div>
<div style="width: 20px;"></div>
<el-form-item label="学号">
<div class="conter" style="display: flex;height: 31px;">
<el-input style="width:224px" v-model="params.studentId" class="w-50 m-2" size="small"
></el-input>
</div>
</el-form-item>
<div class="serlog" @click="getDigitalCurrencyScore"></div>
<div style="width: 20px;"></div>
<el-form-item label="班级">
<el-select style="width:224px;height: 31px;" clearable v-model="params.className" placeholder="全部" class="w-50 m-2" size="small" @change="getDigitalCurrencyScore">
<el-option v-for="item in classData" :label="item" :value="item" />
</el-select>
<!-- <el-input v-model="formSearch.className" class="w-50 m-2" size="small"></el-input> -->
</el-form-item>
<div style="margin: 4px 0 0 10px;">
<el-button type="primary" size="small" @click="generalViewExport" class="daochu"> 导出 </el-button>
<el-button type="primary" size="small" @click="getResultsOverviewWeight"></el-button>
</div>
</el-row>
</el-form>
</div>
<!-- 表格数据 -->
<div class="tab" >
<el-table :data="tableData" style="width: 100%" stripe v-loading="loading">
<el-table-column prop="name" label="用户名" align="center" width="135" />
<el-table-column prop="studentId" label="学号" align="center" width="130" />
<el-table-column prop="className" label="班级" align="center" width="130" />
<el-table-column label="知识概要" align="center">
<el-table-column prop="summaryKnowledgeWeight" label="权重" align="center" />
<el-table-column prop="summaryKnowledgeScore" label="成绩" align="center" />
</el-table-column>
<el-table-column label="资源学习" align="center">
<el-table-column prop="resourceWeiht" label="权重" align="center" />
<el-table-column prop="resourceScore" label="成绩" align="center" />
</el-table-column>
<el-table-column label="学习测评" align="center">
<el-table-column prop="learningAssessmentWeiht" label="权重" align="center" />
<el-table-column prop="learningAssessmentScore" label="成绩" align="center" />
</el-table-column>
<el-table-column label="实验实训" align="center">
<el-table-column prop="experimentTrainingWeith" label="权重" align="center" />
<el-table-column prop="experimentTrainingScore" label="成绩" align="center" />
</el-table-column>
<el-table-column label="实验报告" align="center">
<el-table-column prop="testReportWeith" label="权重" align="center" />
<el-table-column prop="testReportSocre" label="成绩" align="center" />
</el-table-column>
<el-table-column label="总成绩" align="center">
<el-table-column prop="totalScore" label="综合得分" align="center" />
<el-table-column prop="totalRank" label="排名" align="center" />
</el-table-column>
</el-table>
</div>
<pagination class="paginationClass" v-show="total > 0" :total="total" v-model:page="params.index"
v-model:limit="params.size" @pagination="getDigitalCurrencyScore" />
<div class="practical">
<div class="rows">
<div class="log1"></div>
<span class="spanCen">实训报告</span>
</div>
<!-- 表格数据 实训报告 -->
<div class="tab">
<el-table :data="practicalData" style="width: 100%" stripe>
<el-table-column prop="name" label="用户名" align="center" />
<el-table-column prop="studentId" label="学号" align="center" />
<el-table-column prop="className" label="班级" align="center" />
<el-table-column prop="module" label="归属模块" align="center" />
<el-table-column prop="fileName" label="报告名称" align="center" width="300"/>
<el-table-column prop="createTime" label="上传时间" align="center" />
<el-table-column prop="fileSize" label="报告大小" align="center">
<template v-slot="{ row }">
<span>{{ (row.fileSize/100000).toFixed(2) }}</span><span v-if="row.fileSize">KB</span>
</template>
</el-table-column>
<el-table-column prop="rating" label="教师评分" align="center" />
<el-table-column prop="handle" label="操作" align="center" v-slot="{ row }">
<el-link type="success" :underline="false" @click="reviewSkip(row)">
<img src="../../assets/images/评价_评审.png" alt="">评阅</el-link>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total3 > 0"
:total="total3"
v-model:page="practicalParams.page"
v-model:limit="practicalParams.size"
@pagination="getReportBySchool" />
</div>
<!-- 权重设置弹窗 -->
<el-dialog v-model="dialogFormVisible" title="权重设置" width="30%">
<el-form :model="form" label-position="left" ref="ruleFormRef" :rules="rules">
<el-form-item v-for="(item, index) in weightData" :key="index" :label="item.name">
<div style="display: flex;justify-content: end;width: 100%;">
<el-input v-model="item.value" autocomplete="off" class="inputmax" @input="validateInput">
</el-input>
<span style="margin-left: 10px;">%</span>
</div>
</el-form-item>
<el-form-item label="权重合计:">
<div style="display: flex;justify-content: end;width: 100%;">
<div style="margin-right: 20px;">{{ doubleCount }}</div>
<span style="margin-left: 10px;">%</span>
</div>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<div style="text-align: center;">
<el-button @click="dialogconfirm" class="determine">确定</el-button>
<el-button class="cancel" @click="dialogFormVisible = false">
取消
</el-button>
</div>
</span>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { watch, ref, reactive, onMounted, computed } from 'vue'
import * as teacher from '@/api/teacher'
import { getUserInfo } from '@/utils/auth'
import {formatDate} from '@/utils/index.js'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
import { ElMessage } from 'element-plus'
import { useRoute ,useRouter} from 'vue-router'
const router = useRouter();
const { proxy } = getCurrentInstance()
const schoolId = ref(JSON.parse(getUserInfo()).schoolId); //id
const userId = ref(JSON.parse(getUserInfo()).userId) //userid
//
const tableData = ref([])
//
const practicalData = ref([])
//
const formSearch = ref({
name: '', //
studentId: '',
className: '',
})
const queryParams = ref({
pageNum: 1,
pageSize: 10,
});
const total = ref(0)
onMounted(() => {
// console.log(userId.value, schoolId.value, 'userid,schoolid');
getDigitalCurrencyScore()
getclassList()
getReportBySchool()
});
const rules = reactive({
name: [
{ reactive: true, message: '错误', trigger: 'blur' },
{ type: 'number', message: '必须为数字值' }
]
})
//
const page = reactive({
index: 1,
size: 10,
schoolId: schoolId.value
});
// params
const params = reactive({
index: 1,
size: 10,
schoolId: schoolId.value,
name:'',
className:'',
studentId:''
})
// v
const getDigitalCurrencyScore = async () => {
try{
const res = await teacher.getDigitalCurrencyScoreAPI(params)
tableData.value = res.data.list
total.value = res.data.total
tableData.value.forEach(item=>{
item.summaryKnowledgeWeight=item.summaryKnowledgeWeight*100+'%'
item.resourceWeiht=item.resourceWeiht*100+'%'
item.learningAssessmentWeiht=item.learningAssessmentWeiht*100+'%'
item.experimentTrainingWeith=item.experimentTrainingWeith*100+'%'
item.testReportWeith=item.testReportWeith*100+'%'
// item.technologyWeight=item.technologyWeight*100+'%'
// item.traceabilityAndAntiCounterfeitingWeight=item.traceabilityAndAntiCounterfeitingWeight*100+'%'
// item.ticketResultsWeight=item.ticketResultsWeight*100+'%'
})
// console.log(res, '');
}catch(e){
console.log(e);
}
}
// v
const getGeneralView = async () => {
const res = await teacher.getDigitalCurrencyScoreAPI({
schoolId: schoolId.value,
index: 1,
size: 10,
name: formSearch.value.name,
className: formSearch.value.className,
studentId: formSearch.value.studentId
})
tableData.value = res.data.list
}
//
const generalViewExport = async () => {
window.open(`https://szyx.sztzjy.com:9868/api/tch/grades/generalViewExport?schoolId=${schoolId.value}`)
// window.open(`http://120.79.54.255:8800/api/tch/generalView/generalViewExport?schoolId=${schoolId.value}`)
}
//
const dialogFormVisible = ref(false)
const form = reactive({
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: '',
})
//
const weightData = ref([
{
name: '知识概要成绩权重',
property: 'summaryOfKnowledgeWeight',
value: ''
}, {
name: '资源学习成绩权重',
property: 'resourceLearningWeight',
value: ''
}, {
name: '学习测评成绩权重',
property: 'learningAssessmentWeight',
value: ''
}, {
name: '实验实训成绩权重',
property: 'experimentalTrainingWeight',
value: ''
},
{
name: '实验报告成绩权重',
property: 'reportWeight',
value: ''
},
])
let sum = ref(0)
//
// watch(() => weightData.value.map((item) => item.value), (newValue, oldValue) => {
// // console.log(newValue, oldValue, '--------------');
// sum.value = weightData.value.reduce((prev, item) => {
// if (sum.value >= 100) {
// return 100
// }
// return prev + Number(item.value)
// }, 0);
// })
const doubleCount=computed(()=>{
sum.value=0
weightData.value.forEach(item=>{
sum.value+=Number(item.value)
})
return sum
})
// v
const getResultsOverviewWeight = async () => {
dialogFormVisible.value = true
const res = await teacher.getResultsOverviewWeightAPI({
schoolId: schoolId.value
})
let backData = res.data;
weightData.value.forEach((item, index) => {
for (let key in backData) {
if (key == item.property) {
item.value = backData[key]*100
}
}
})
// console.log(res, '');
}
const loading = ref(false)
// v
const dialogconfirm = async () => {
let backParams = { schoolId: schoolId.value };
let sumWeights=0
weightData.value.forEach((item, index) => {
if(item.value===null||item.value===''){
item.value = 0
}
sumWeights+=parseFloat(item.value)
// backParams[item.property] = parseFloat(item.value)/100
if(item.property==='summaryOfKnowledgeWeight'){
backParams.summaryKnowledgeWeight=parseFloat(item.value)/100
}
if(item.property==='resourceLearningWeight'){
backParams.resourceWeiht=parseFloat(item.value)/100
}
if(item.property==='learningAssessmentWeight'){
backParams.learningAssessmentWeiht=parseFloat(item.value)/100
}
if(item.property==='experimentalTrainingWeight'){
backParams.experimentTrainingWeith=parseFloat(item.value)/100
}
if(item.property==='reportWeight'){
backParams.testReportWeith=parseFloat(item.value)/100
}
})
if(sumWeights!==100){
proxy.$modal.msgError(`权重合计必须为100%`);
return
}
let isTure = weightData.value.every(i => {
return !isNaN(Number(sum.value)) && !isNaN(Number(i.value))
})
if (!isTure) {
ElMessage({
message: '请输入合法数字',
type: 'warning',
})
} else {
try{
dialogFormVisible.value = false;
loading.value = true
const res = await teacher.setResultsOverviewWeight(backParams)
if (res.code == 200) {
loading.value = false
//
ElMessage({
message: '权重设置设置成功',
type: 'success',
})
getDigitalCurrencyScore()
}
}catch(e){
console.log(e);
}
}
}
//
//
const currentPage3 = ref(1)
const pageSize3 = ref(100)
const small = ref(false)
const background = ref(true)
const disabled = ref(false)
// v
const handleCurrentChange = async (val) => {
const res = await teacher.getDigitalCurrencyScoreAPI({
index: val,
size: page.size,
schoolId: schoolId.value
})
tableData.value = res.data.list
}
const classData = ref(null)
//
const getclassList = () => {
teacher.getClassAPI({ schoolId:schoolId.value}).then(res=>{
classData.value=res.data
})
}
const total3 = ref(0)
// parasm
const practicalParams = reactive({
page: 1,
size: 10,
schoolId: schoolId.value,
});
//
const getReportBySchool = () => {
teacher.getReportBySchoolAPI(practicalParams).then(res=>{
practicalData.value = res.data.list
practicalData.value.forEach(item=>{
item.createTime=formatDate(item.createTime)
})
console.log(res, '实训报告');
total3.value = res.data.total
})
}
const reviewSkip = (val) => {
router.push({
path: 'pl',
query:{
className:val.className,
userName:val.name,
id:val.studentId,
module:val.module,
reportId:val.reportId,
userId:val.userId
}
})
}
</script>
<style lang="scss" scoped>
:deep(.tab){
border: 1px solid #516BF6;
.el-table td.el-table__cell{
border-right:1px solid #516BF6 !important;
}
.el-table thead tr:first-child th:nth-child(-n+11){
border-right:1px solid #516BF6 !important;
}
.el-table thead tr:nth-child(2) th:nth-child(-n+16){
border-right:1px solid #516BF6 !important;
}
}
.content {
margin: 10px;
padding: 20px 10px;
background: #FFFFFF;
// border: 1px solid #ccc;
box-shadow: 0px 0px 13px 0px #D6E0FE;
border-radius: 10px;
.log {
width: 40px;
height: 40px;
background-image: url();
}
.select {
display: flex;
margin-top: 5px;
.serlog {
width: 26px;
height: 25px;
line-height: 25px;
background: #003A81;
border-radius: 2px;
background-image: url(../../assets/images/搜索.png);
margin: 3px 5px;
cursor: pointer;
}
}
.demo-pagination-block {
margin-top: 20px !important;
}
.inputmax {
width: 60px !important;
height: 29px !important;
margin-right: 10px;
}
}
:deep(.el-table thead tr:first-child th:nth-child(-n+11)) {
background: #0099FA !important;
color: white;
}
:deep(.el-table thead tr:nth-child(2) th:nth-child(-n+16)) {
background: #D8E8FF !important;
color: #0E65FE;
}
:deep(.el-table tr) {
background: white !important;
}
:deep(.el-table tr.el-table__row--striped td.el-table__cell) {
background: #D8E8FF !important;
}
:deep(.el-form--default .el-button--primary:nth-of-type(1)) {
background-color: #007E51 !important;
border: 0;
}
:deep(.el-form--default .el-button--primary:nth-of-type(2)) {
background-color: #007E51 !important;
border: 0;
}
:deep(.el-row .serlog) {
background-color: #007E51 !important;
}
:deep(.el-overlay .el-overlay-dialog .el-dialog__header) {
background-color: #007E51 !important;
}
:deep(.dialog-footer .el-button--default:nth-of-type(1)) {
background-color: #007E51 !important;
border: 0;
}
:deep(.el-dialog__headerbtn .el-dialog__close) {
color: white !important;
}
// :deep(.el-form div.el-form-item) {
// background-color: red !important;
// }
:deep(.el-dialog){
border-radius: 16px !important;
.el-dialog__header{
border-radius: 16px 16px 0 0 !important;
margin-right:0 !important;
}
}
:deep(.el-dialog__title){
color:#FFFFFF;
}
:deep(.w-50){
.el-input--small{
height: 31px !important;
}
}
:deep(.el-form--default .el-button--primary:nth-of-type(-n+2)) {
background-color: #007E51 !important;
border: 0;
width: 120px;
height: 27px;
}
.btntext {
width: 88px !important;
height: 22px !important;
}
.spanCen1 {
margin-left: 8px;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
margin-bottom: 30px;
}
.cancel{
color:#333333;
}
.determine{
color:#333333;
}
:deep(.pagination-container .el-pagination__total){
color:#333333 !important;
}
.practical {
margin-top: 30px;
}
.rows {
display: flex;
height: 60px;
line-height: 60px;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
}
</style>

@ -0,0 +1,470 @@
<template>
<div class="content">
<el-row>
<el-col :span="24">
<img src="../../assets/images/成绩总览.png" alt="">
<span >成绩情况</span>
</el-col>
</el-row>
<div class="layout">
<div class="left">
<div class="tab">
<el-form>
<div style="margin-top: 10px;">
<el-form-item label="选择班级">
<el-select v-model="currentChangeParasm.classId" placeholder="请选择" @change="getScore('none')" :clearable="true" class="w-50 m-2 inputMax" size="small" clearable>
<el-option v-for="item in classData" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="选择模块">
<el-select v-model="currentChangeParasm.module" placeholder="请选择" @change="getScore('none')" :clearable="true" class="w-50 m-2 inputMax" size="small" clearable>
<el-option v-for="item in chapterData" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</div>
<el-form-item>
<div style="display: flex; ">
<el-input v-model="currentChangeParasm.name" class="w-50 m-2 searchMax" size="small"
placeholder="请输入姓名"></el-input>
<el-button type="primary" :icon="Search" style="margin-left: 5px;"
@click="getScore('none')">搜索</el-button>
</div>
</el-form-item>
</el-form>
<el-table :data="tableData" border stripe style="width: 100%" class="inner-wrapper"
:row-class-name="tableRowClassName"
highlight-current-row
@row-click="handleRowClick">
<el-table-column prop="name" label="姓名" align="center" />
<el-table-column prop="studentId" label="学号" align="center" />
<el-table-column prop="score" label="得分" align="center" >
<template #default="{row}">
<span>{{row.rating !== null ? row.rating:'-' }}</span>
</template>
</el-table-column>
<el-table-column label="归属章节" align="center" prop="module">
</el-table-column>
</el-table>
</div>
<pagination
v-show="currentChangeParasm.total>0"
:total="currentChangeParasm.total"
v-model:page="currentChangeParasm.index"
v-model:limit="currentChangeParasm.size"
@pagination="handleCurrentChange"
:layout="'total, prev, pager, next'"
:pagerCount="2"
/>
</div>
<div class="conter">
<div style="margin: 0px 20px;width: 96%;height: 775px;background: #626262;overflow: hidden;">
<iframe class="iframe" :src="srcpdf" frameborder="0"></iframe>
</div>
</div>
<div class="right">
<h4 style="margin-top: 0;">评分满分100分</h4>
<el-form>
<el-form-item>
<el-input v-model="form.rating" class="searchMax1"></el-input>
</el-form-item>
<el-form-item>
<el-form-item>
<el-input v-model="form.teacherComments" type="textarea" placeholder="请输入评语" rows="15"
cols="38" />
</el-form-item>
</el-form-item>
</el-form>
<div>
<!-- <el-button type="primary" @click="download"></el-button> -->
<el-button type="primary" @click="ratingAndComment"></el-button>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { Search } from '@element-plus/icons-vue'
import { ref, onMounted } from 'vue'
import * as teacher from '@/api/teacher.js'
import { getUserInfo } from '@/utils/auth'
// import { , useRoute } from 'vue-router';
// import useUserStore from '@/store/modules/user'
// const userStore = useUserStore()
// import { getUseid, getschoolId } from '@/utils/auth'
import { ElMessage } from 'element-plus'
import { useRoute ,useRouter} from 'vue-router'
const route = useRoute();
const router = useRouter();
const srcpdf=ref('')
const schoolId = ref(JSON.parse(getUserInfo()).schoolId); //id
const userId = ref() //userid
const form = ref({
schoolName: '',
name: '',
rating: '',
teacherComments: '',
id: ''
})
const pdf = ref('http://static.shanhuxueyuan.com/test.pdf') //
const reportId=ref('')
onMounted(() => {
// schoolId.value = getschoolId()
// console.log(getschoolId(), schoolId.value );
getScore()
// getChapterList()
getclassList()
})
const userList =reactive({
username:'',
className:'',
name:'',
reportId:''
})
const currentChangeParasm=reactive({
index: 1,
size: 10,
schoolId:schoolId.value,
classId: '',
name: '',
module: '',
name:''
})
const tableData = ref([])
const getScore = (name) => {
teacher.trainingReportReviewPage(currentChangeParasm).then(res=>{
tableData.value = res.data.list
currentChangeParasm.total = res.data.total
// console.log(res.data.total, '')
})
if(name!=="none"){
teacher.singleStudentReport({reportId:userList.reportId}).then((res)=>{
srcpdf.value=`https://szyx.sztzjy.com:8042/file${res.data}`
})
// srcpdf.value=`http://192.168.2.13:9868/api/tch/grades/getReportFileURLByUserIdAndModule?reportId=${userList.reportUrl}`
}
}
//
const modules=ref('')
const id=ref()
const handleRowClick = (row,rowIndex) => {
console.log(row,"r");
if(row.reportId==null){
ElMessage({
message: '该学生暂无报告',
type: 'warning',
})
srcpdf.value=''
return
}
userId.value=row.reportId
id.value=row.userId
// reportId.value=row.id
// srcpdf.value=`http://qkljr.sztzjy.com:8800/api/tch/digitalCurrency/getReport?module=${row.module}&userId=${row.userId}`
teacher.singleStudentReport({reportId:row.reportId}).then((res)=>{
srcpdf.value=`https://szyx.sztzjy.com:8042/file${res.data}`
})
modules.value=row.module
}
const tital=ref(0)
const handleCurrentChange = () => {
teacher.trainingReportReviewPage(currentChangeParasm).then(res=>{
tableData.value = res.data.list
currentChangeParasm.total = res.data.total
// console.log(res.data.total, '')
})
}
//
const ratingAndComment = async () => {
if(form.value.rating==''){
ElMessage({
message: '请填写评分',
type: 'warning',
})
return
}
if(form.value.teacherComments==''){
ElMessage({
message: '请填写评语',
type: 'warning',
})
return
}
if(userId.value==''){
ElMessage({
message: '请选择学生',
type: 'warning',
})
return
}
const res = await teacher.trainingReportReviewTeacherGradeComment({
rating: Number(form.value.rating),
teacherComments: form.value.teacherComments,
id: userId.value,
userid:id.value
})
ElMessage({
message: '评分成功',
type: 'success',
})
form.value.rating = ''
form.value.teacherComments = ''
userId.value=''
reportId.value=''
getScore('none')
}
const classData = ref([])
//
const getclassList = () => {
teacher.getClassAPI({schoolId:schoolId.value}).then((res)=>{
res.data.forEach((item)=>{
const newData={
label:item,
value:item
}
classData.value.push(newData)
})
})
}
const chapterData=ref([
{
label:'AI修图',
value:'AI修图'
},
{
label:'AI写作',
value:'AI写作'
},{
label:'AI数据分析',
value:'AI数据分析'
},{
label:'AI文生图',
value:'AI文生图'
},{
label:'AI视频',
value:'AI视频'
},{
label:'BI可视化分析',
value:'BI可视化分析'
},
])
// const getChapterList=()=>{
// teacher.reviewSectionDropDownBox({schoolId:schoolId.value}).then((res)=>{
// res.data.forEach((item)=>{
// const newData={
// label:item,
// value:item
// }
// chapterData.value.push(newData)
// })
// })
// }
watch(
route,
(newRoute) => {
// currentChangeParasm.module=newRoute.query.module
currentChangeParasm.name=newRoute.query.userName
userList.name=newRoute.query.name
if(newRoute.query.className&&newRoute.query.userName){
userList.className=newRoute.query.className
userList.username=newRoute.query.userName
userList.reportId=newRoute.query.reportId
userList.module=newRoute.query.module
userList.userId=newRoute.query.id
userId.value=newRoute.query.reportId
id.value=newRoute.query.userId
currentChangeParasm.classId=newRoute.query.className
currentChangeParasm.module=newRoute.query.module
// srcpdf.value=`http://202.199.90.115:8800/api/tch/digitalCurrency/getReport?module=&userId=${newRoute.query.id}`
return getScore()
}
},
{ immediate: true }
);
const tableRowClassName=({row, rowIndex})=>{
//
if(userList.className&&userList.username){
if(row.className==userList.className&&row.name==userList.username){
return 'current-row'
}
}
return '';
}
</script>
<style lang="scss" scoped>
:deep(.el-table .warning-row) {
background: oldlace !important;
}
:deep( .el-table__body tr.current-row > td ){
background: #f0f9eb !important;
}
:deep(.el-select .el-input__wrapper){
width: 100% !important;
height: 32px;
}
:deep(.tab){
.el-table .el-table__header-wrapper th {
background-color: #007E51 !important;
color: #ffffff !important;
font-weight: 600;
}
.el-table tr.el-table__row--striped td.el-table__cell {
background-color: #D9E9E5 !important;
color: #333333;
}
}
.content {
margin: 20px;
padding: 10px;
height: calc(100% - 40px);
box-shadow: 0px 0px 13px 0px #D6E0FE;
border-radius: 10px;
background-color: #ffffff;
.layout{
display: flex;
.left{
width: 360px;
}
.conter{
flex: 1;
}
.right{
}
}
.log {
width: 40px;
height: 40px;
background-image: url(../../assets//laoshi/icon-.png);
}
.rows {
display: flex;
height: 60px;
line-height: 60px;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
}
.spanCen {
margin-left: 8px;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
margin-top: -10px;
}
}
.inputMax {
width: 205px !important;
}
.searchMax {
width: 190px !important;
}
.searchMax1 {
width: 310px;
}
.demo-pagination-block {
margin-top: 10px !important;
}
.scrollbar-demo-item {
display: flex;
align-items: center;
justify-content: center;
height: 50px;
margin: 10px;
text-align: center;
border-radius: 4px;
background: var(--el-color-primary-light-9);
color: var(--el-color-primary);
}
.location {
width: 40px;
height: 40px;
line-height: 40px;
background: #D2D2D2;
border-radius: 50%;
position: absolute;
font-size: 12px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
text-align: center;
right: 8px;
bottom: 10px;
}
.inner-wrapper {
// width: 400px !important;
}
.imgscore {
width: 100%;
height: 100%;
background: no-repeat;
overflow: scroll;
background-size: contain;
}
.even-row {
background-color: red !important;
}
.container {
// display: grid;
// grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
// display: flex;
display: flex;
justify-content: space-between !important;
}
.item {
padding: 20px;
text-align: center;
// background-color: lightblue;
}
.item2 {
border: 1px solid #ccc;
background-color: #626262;
position: relative;
}
/* 在较小屏幕上应用的样式 */
@media (max-width: 768px) {
.container {
grid-template-columns: repeat(2, 1fr);
/* 两列布局 */
}
}
/* 在更小的屏幕上应用的样式 */
@media (max-width: 480px) {
.container {
grid-template-columns: 1fr;
/* 单列布局 */
}
}
.iframe{
width: 100%;
height: 775px;
}
:deep(.el-form .el-form-item__label){
width:68px !important;
}
</style>
Loading…
Cancel
Save