dev-QQq
方佳 博 2 years ago
commit 95dc3ff528

@ -5,4 +5,4 @@ VITE_APP_TITLE = 数字营销实训系统
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VITE_APP_BASE_API = 'http://192.168.2.28:9868' VITE_APP_BASE_API = 'http://118.31.7.2:9868'

@ -0,0 +1,5 @@
{
"htmlWhitespaceSensitivity": "ignore",
"printWidth": 1000
}

@ -24,11 +24,14 @@
"element-plus": "2.2.27", "element-plus": "2.2.27",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.6.2", "fuse.js": "6.6.2",
"highlight.js": "^11.10.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.3.1", "jsencrypt": "3.3.1",
"marked": "^14.0.0",
"md-editor-v3": "^4.18.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"pinia": "2.0.22", "pinia": "2.0.22",
"vue": "3.2.45", "vue": "^3.2.47",
"vue-cropper": "1.0.3", "vue-cropper": "1.0.3",
"vue-router": "4.1.4" "vue-router": "4.1.4"
}, },

@ -0,0 +1,33 @@
/*
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-16 10:14:59
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 16:38:09
* @FilePath: \vue3\src\api\marketing-algorithm.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "@/utils/request";
// 选择指标分析数据展示
export function getMarketingAlgorithm(data) {
return request({
url: "/api/model/viewAnalyzeData",
method: "POST",
data,
});
}
// 查看指标
export function getMarketingAlgorithmList(params) {
return request({
url: "/api/model/viewMetrics",
method: "POST",
params,
});
}
// 描述性统计数据预处理
export function getMarketingAlgorithmPreprocessing(data) {
return request({
url: "/api/model/descriptiveStatistics",
method: "POST",
data,
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@ -134,6 +134,10 @@ aside {
.pagination-container { .pagination-container {
margin-top: 30px; margin-top: 30px;
background-color: transparent !important;
.el-pagination__total,.el-pagination__goto,.el-pagination__classifier{
color: #ffffff !important;
}
} }
.text-center { .text-center {
@ -183,7 +187,8 @@ aside {
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.app-container{
.app-container {
margin: 10px; margin: 10px;
box-shadow: 0px 0px 13px 0px #0452C6; box-shadow: 0px 0px 13px 0px #0452C6;
border-radius: 10px; border-radius: 10px;
@ -192,14 +197,17 @@ aside {
.dialog-footer { .dialog-footer {
text-align: center; text-align: center;
.el-button:nth-child(1) { .el-button:nth-child(1) {
background: url("../../assets/images/确定222.png") no-repeat; background: url("../../assets/images/确定222.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.el-button:nth-child(2) { .el-button:nth-child(2) {
background: url("../../assets/images/取消.png") no-repeat; background: url("../../assets/images/取消.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.el-button--large.is-round { .el-button--large.is-round {
padding: 12px 20px 12px 40px !important; padding: 12px 20px 12px 40px !important;
} }
@ -212,6 +220,7 @@ aside {
color: #080138; color: #080138;
} }
} }
.app-container2 { .app-container2 {
position: relative; position: relative;
padding: 20px; padding: 20px;

@ -119,7 +119,7 @@
} }
.pagination-container .el-pagination { .pagination-container .el-pagination {
right: 0; // right: 0;
position: absolute; position: absolute;
} }

@ -1,10 +1,11 @@
#app { #app {
.main-container { .main-container {
height: 100%; height:calc(100% - 58px);
transition: margin-left .28s; transition: margin-left .28s;
margin-left: $base-sidebar-width; margin-left: $base-sidebar-width;
position: relative; position: relative;
} }
.sidebarHide { .sidebarHide {

@ -42,7 +42,7 @@ $--color-warning: #E6A23C;
$--color-danger: #F56C6C; $--color-danger: #F56C6C;
$--color-info: #909399; $--color-info: #909399;
$base-sidebar-width: 200px; $base-sidebar-width: 239px;
// the :export directive is the magic sauce for webpack // the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass

@ -1,9 +1,17 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-07-15 15:44:46
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 17:40:50
* @FilePath: \vue3\src\layout\components\AppMain.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<section class="app-main"> <section class="app-main">
<router-view v-slot="{ Component, route }"> <router-view v-slot="{ Component, route }">
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in" :key="route.path">
<keep-alive :include="tagsViewStore.cachedViews"> <keep-alive :include="tagsViewStore.cachedViews">
<component v-if="!route.meta.link" :is="Component" :key="route.path"/> <component v-if="!route.meta.link" :is="Component" :key="route.path" />
</keep-alive> </keep-alive>
</transition> </transition>
</router-view> </router-view>
@ -12,18 +20,20 @@
</template> </template>
<script setup> <script setup>
import iframeToggle from "./IframeToggle/index" import iframeToggle from "./IframeToggle/index";
import useTagsViewStore from '@/store/modules/tagsView' import useTagsViewStore from "@/store/modules/tagsView";
const tagsViewStore = useTagsViewStore() const tagsViewStore = useTagsViewStore();
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 50= navbar 50 */ /* 50= navbar 50 */
min-height: calc(100vh - 50px); min-height: calc(100vh - 58px);
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: url("@/assets/images/背景.png") no-repeat;
background-size: 100% 100%;
} }
.fixed-header + .app-main { .fixed-header + .app-main {
@ -33,7 +43,7 @@ const tagsViewStore = useTagsViewStore()
.hasTagsView { .hasTagsView {
.app-main { .app-main {
/* 84 = navbar + tags-view = 50 + 34 */ /* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px); min-height: calc(100vh - 58px);
} }
.fixed-header + .app-main { .fixed-header + .app-main {
@ -64,4 +74,3 @@ const tagsViewStore = useTagsViewStore()
border-radius: 3px; border-radius: 3px;
} }
</style> </style>

@ -1,3 +1,11 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-09 17:36:23
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 17:00:39
* @FilePath: \vue3\src\layout\components\Sidebar\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> --> <!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
@ -13,7 +21,7 @@
mode="vertical" mode="vertical"
> >
<sidebar-item <sidebar-item
v-for="(route, index) in constantRoutes" v-for="(route, index) in dynamicRoutes"
:key="route.path + index" :key="route.path + index"
:item="route" :item="route"
:base-path="route.path" :base-path="route.path"
@ -30,7 +38,7 @@ import variables from '@/assets/styles/variables.module.scss'
import useAppStore from '@/store/modules/app' import useAppStore from '@/store/modules/app'
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission' import usePermissionStore from '@/store/modules/permission'
import {constantRoutes} from '@/router/index.js' import {constantRoutes,dynamicRoutes} from '@/router/index.js'
const route = useRoute(); const route = useRoute();
const appStore = useAppStore() const appStore = useAppStore()

@ -4,9 +4,11 @@
class="app-wrapper" class="app-wrapper"
:style="{ '--current-color': theme }" :style="{ '--current-color': theme }"
> >
<div class="navTitle"> <div class="title" style="height: 58px;background-color: #072048 !important;">
<div class="navTitle">
<span class="nacber-name"> </span> <span class="nacber-name"> </span>
</div> </div>
</div>
<div <div
v-if="device === 'mobile' && sidebar.opened" v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg" class="drawer-bg"
@ -85,14 +87,14 @@ function setLayout() {
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
background: url("@/assets/images/背景.png");
&.mobile.openSidebar { &.mobile.openSidebar {
position: fixed; position: fixed;
top: 0; top: 0;
} }
.navTitle { .navTitle {
background: url("@/assets/images/top.png"); background: url("@/assets/images/top.png") no-repeat;
background-size: 100% 100%;
height: 58px; height: 58px;
width: 100%; width: 100%;
z-index: 1; z-index: 1;
@ -111,18 +113,12 @@ function setLayout() {
margin-left: 33px; margin-left: 33px;
margin-top: 3px; margin-top: 3px;
letter-spacing: 1px; letter-spacing: 1px;
} }
} }
.sidebar-container { .sidebar-container {
margin-top: 58px; margin-top: 58px;
} }
.main-container { .main-container {
// margin-top: 58px;
padding-top: 70px;
padding-left: 60px;
padding-right: 20px;
.caseData { .caseData {
position: fixed; position: fixed;
right: 2%; right: 2%;

@ -70,6 +70,23 @@ export const constantRoutes = [
}, },
], ],
}, },
];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{
path: "",
component: Layout,
redirect: "/index",
children: [
{
path: "/index",
component: () => import("@/views/index"),
name: "Index",
meta: { title: "首页", icon: "首页", affix: true },
},
],
},
// { // {
// path: "", // path: "",
// component: Layout, // component: Layout,
@ -92,7 +109,21 @@ export const constantRoutes = [
path: "/digitalMarketTech", path: "/digitalMarketTech",
component: () => import("@/views/digitalMarketTech/index"), component: () => import("@/views/digitalMarketTech/index"),
name: "digitalMarketTech", name: "digitalMarketTech",
meta: { title: "数字营销技术", icon: "monitor2", affix: true }, meta: { title: "数字营销技术", icon: "数据浏览", affix: true },
},
],
},
// Bi可视化分析
{
path: "",
component: Layout,
redirect: "/bi",
children: [
{
path: "/bi",
component: () => import("@/views/visual-analysis/index.vue"),
name: "bi",
meta: { title: "BI可视化分析", icon: "tongxunlu_B", affix: true },
}, },
], ],
}, },
@ -118,7 +149,7 @@ export const constantRoutes = [
path: "/digitalMarketingAlgorithms", path: "/digitalMarketingAlgorithms",
component: () => import("@/views/digitalMarketingAlgorithms/index"), component: () => import("@/views/digitalMarketingAlgorithms/index"),
name: "digitalMarketingAlgorithms", name: "digitalMarketingAlgorithms",
meta: { title: "数字营销算法", icon: "tongxunlu_B", affix: true }, meta: { title: "数字营销算法", icon: "monitor2", affix: true },
}, },
], ],
}, },
@ -147,7 +178,8 @@ export const constantRoutes = [
meta: { title: "知识测评", icon: "学习测评", affix: true }, meta: { title: "知识测评", icon: "学习测评", affix: true },
}, },
], ],
},{ },
{
path: "", path: "",
component: Layout, component: Layout,
redirect: "/Achievement", redirect: "/Achievement",
@ -162,12 +194,9 @@ export const constantRoutes = [
}, },
]; ];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [];
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes: constantRoutes, routes: [...constantRoutes, ...dynamicRoutes],
scrollBehavior(to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
if (savedPosition) { if (savedPosition) {
return savedPosition; return savedPosition;

@ -0,0 +1,39 @@
import Cookies from "js-cookie";
import * as portraitModel from "@/api/portraitModel";
import * as marketingAlgorithmApi from "@/api/marketing-algorithm.js";
const useAlgorithmStore = defineStore("algorithm", {
state: () => ({
userDatabase: [],
tableData: [],
tableKey:[],
userDataLabel:["用户属性表", "用户登录活跃表", "用户消费能力表", "用户行为表", "用户评论表"], //用户数据标签
indexLibrary: [],
analysisData: [],
}),
actions: {
getlist(data){
portraitModel.getUserTableData(data).then((res) => {
this.tableData = res?.data?.list;
this.tableKey = Object.keys(res?.data?.list[0]).map(item => {
return {
label: item,
};
});
})
},
getUserDatabase(val) {
marketingAlgorithmApi.getMarketingAlgorithmList(val).then((res) => {
this.indexLibrary= res?.data?.map(item => {
return {
label: item,
};
}
)
});
}
},
getters: {},
});
export default useAlgorithmStore;

@ -5,7 +5,7 @@ const useAppStore = defineStore(
{ {
state: () => ({ state: () => ({
sidebar: { sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, opened: true,
withoutAnimation: false, withoutAnimation: false,
hide: false hide: false
}, },

@ -1,5 +1,13 @@
/*
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-15 09:41:09
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-17 11:30:38
* @FilePath: \vue3\src\store\modules\user.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken,setUserInfo,removeUserInfo } from '@/utils/auth' import { getToken, setToken, removeToken,setUserInfo,removeUserInfo,getUserInfo } from '@/utils/auth'
import defAva from '@/assets/images/profile.jpg' import defAva from '@/assets/images/profile.jpg'
const useUserStore = defineStore( const useUserStore = defineStore(
@ -10,7 +18,8 @@ const useUserStore = defineStore(
name: '', name: '',
avatar: '', avatar: '',
roles: [], roles: [],
permissions: [] permissions: [],
userInfo: getUserInfo(),
}), }),
actions: { actions: {
// 登录 // 登录

@ -21,7 +21,6 @@ const service = axios.create({
// 超时 // 超时
timeout: 10000 timeout: 10000
}) })
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
// 是否需要设置 token // 是否需要设置 token
@ -45,21 +44,6 @@ service.interceptors.request.use(config => {
time: new Date().getTime() time: new Date().getTime()
} }
const sessionObj = cache.session.getJSON('sessionObj') const sessionObj = cache.session.getJSON('sessionObj')
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
cache.session.setJSON('sessionObj', requestObj)
} else {
const s_url = sessionObj.url; // 请求地址
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
const message = '数据正在处理,请勿重复提交';
console.warn(`[${s_url}]: ` + message)
return Promise.reject(new Error(message))
} else {
cache.session.setJSON('sessionObj', requestObj)
}
}
} }
return config return config
}, error => { }, error => {

@ -2,38 +2,31 @@
<div class="app-containere"> <div class="app-containere">
<el-scrollbar ref="scrollbar" height="530px"> <el-scrollbar ref="scrollbar" height="530px">
<div class="one-AI" v-if="textOne"> <div class="one-AI" v-if="textOne">
<img src="@/assets/images/ai.png" alt="" /> <img src="@/assets/images/ai.png" alt="" />
<div class="AI-item"> <div class="AI-item">
<h2>你好我是AI助手</h2> <h2>你好我是AI助手</h2>
<p>作为你的智能伙伴我既能写文章想点子又能陪你聊天答疑解惑</p> <p>作为你的智能伙伴我既能写文章想点子又能陪你聊天答疑解惑</p>
<p>想知道我还能做什么点这里快速上手可以浏览器收藏网站下次使用更高效哦 ~</p> <p>想知道我还能做什么点这里快速上手可以浏览器收藏网站下次使用更高效哦 ~</p>
<div class="examples"> <div class="examples">
<div style="flex-basis: 100%;"> <div style="flex-basis: 100%">
<p>你可以试着问我</p> <p>你可以试着问我</p>
</div> </div>
<div class="example-item" v-for="item in itemData" :key="item" @click="sendExample(item)"> <div class="example-item" v-for="item in itemData" :key="item" @click="sendExample(item)">
<div style="display:flex"> <div style="display: flex">
<img :src="getImg(item.img)" alt=""> <img :src="getImg(item.img)" alt="" />
<span>{{item.title}}</span> <span>{{ item.title }}</span>
</div>
<p>{{item.text}}</p>
</div> </div>
<p>{{ item.text }}</p>
</div> </div>
</div> </div>
</div> </div>
<div </div>
v-for="(message, index) in messages" <div v-for="(message, index) in messages" :key="index" :class="['message', message.type]">
:key="index"
:class="['message', message.type]"
>
<div class="items-end" v-if="message.type === 'ai-main'"> <div class="items-end" v-if="message.type === 'ai-main'">
<img src="@/assets/images/ai.png" alt="" /> <img src="@/assets/images/ai.png" alt="" />
</div> </div>
<div <div :class="['items-text', message.type]" :id="'text-container-' + message.id">
:class="['items-text', message.type]" <MdPreview :editorId="id" :modelValue="message.displayContent" :codeFoldable="false" theme="dark" />
:id="'text-container-' + message.id"
>
<p>{{ message.displayContent }}</p>
</div> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
@ -41,19 +34,8 @@
<form @submit.prevent="sendText"> <form @submit.prevent="sendText">
<el-scrollbar height="140px"> <el-scrollbar height="140px">
<div class="inputCode" style="display: flex"> <div class="inputCode" style="display: flex">
<el-input <el-input @keydown="handleKeyDown" v-model="input" type="textarea" rows="6" resize="none" placeholder="文件拖拽进来,使用“/”调用指令可通过shift+回车换行" />
@keydown="handleKeyDown" <el-button class="sendButton" :disabled="input === '' || butFlag" @click="sendText">
v-model="input"
type="textarea"
rows="6"
resize="none"
placeholder="文件拖拽进来,使用“/”调用指令可通过shift+回车换行"
/>
<el-button
class="sendButton"
:disabled="input === '' || butFlag"
@click="sendText"
>
<img src="@/assets/images/发送.png" /> <img src="@/assets/images/发送.png" />
</el-button> </el-button>
</div> </div>
@ -62,60 +44,70 @@
</div> </div>
</div> </div>
</template> </template>
<script setup>
<script setup> import { MdPreview, MdCatalog } from "md-editor-v3";
import { ref, reactive } from "vue"; import { getToken,getUserInfo } from '@/utils/auth'
import useUserStore from "@/store/modules/user";
import "md-editor-v3/lib/preview.css";
import * as AI from "@/api/AI.js"; import * as AI from "@/api/AI.js";
import {getAssetsFile} from "@/utils/index.js" import { getAssetsFile } from "@/utils/index.js";
import { computed, onMounted } from "vue";
const userStore = useUserStore();
const input = ref(""); const input = ref("");
const butFlag = ref(false); const butFlag = ref(false);
const messages = reactive([]); const messages = reactive([]);
const scrollbar = ref(null); const scrollbar = ref(null);
const isRequestPending = ref(false); const isRequestPending = ref(false);
const textOne=ref(true) const textOne = ref(true);
const getImg=(img)=>{ const getImg = (img) => {
return getAssetsFile(img) return getAssetsFile(img);
} };
const itemData=[ const itemData = [
{ {
title:'热点文章编写', title: "热点文章编写",
text:'你是一位编辑,请从数学老师王闰秋鼓励支持其发挥数学…', text: "你是一位编辑,请从数学老师王闰秋鼓励支持其发挥数学…",
img:'热点.png' img: "热点.png",
}, },
{ {
title:'暑期实践活动安排', title: "暑期实践活动安排",
text:'仿照这些优秀范例设计一份初中生2024年暑期社会实践…', text: "仿照这些优秀范例设计一份初中生2024年暑期社会实践…",
img:'安排.png' img: "安排.png",
}, },
{ {
title:'PPT内容框架', title: "PPT内容框架",
text:'现在你需要制作一份PPT你需要按照我给出的主题来准备…', text: "现在你需要制作一份PPT你需要按照我给出的主题来准备…",
img:'框架.png' img: "框架.png",
},{
title:'最新学术论文检索',
text:'帮我检索一下今年6月的人工智能领域的最新论文记得给…',
img:'检索.png'
},{
title:'期末备考计划',
text:'你是大学期末备考专家,我是一名学【工商管理】的学生…',
img:'科研论文.png'
},{
title:'科普2024世界人工智能大会',
text:'阅读下面这些链接科普一下2024世界人工智能大会究…',
img:'新闻01.png'
}, },
] {
const sendExample=(item)=>{ title: "最新学术论文检索",
textOne.value=false text: "帮我检索一下今年6月的人工智能领域的最新论文记得给…",
input.value=item.text img: "检索.png",
sendText() },
} {
const sendText = async() => { title: "期末备考计划",
if (input.value.trim() === '' || isRequestPending.value) return; text: "你是大学期末备考专家,我是一名学【工商管理】的学生…",
img: "科研论文.png",
},
{
title: "科普2024世界人工智能大会",
text: "阅读下面这些链接科普一下2024世界人工智能大会究…",
img: "新闻01.png",
},
];
const sendExample = (item) => {
textOne.value = false;
input.value = item.text;
sendText();
};
const aiUserid=computed(()=>{
return getUserInfo() ? JSON.parse(getUserInfo()) : "";
})
const sendText = async () => {
if (input.value.trim() === "" || isRequestPending.value) return;
if (input.value.trim() === "") return; if (input.value.trim() === "") return;
isRequestPending.value = true; isRequestPending.value = true;
let text = input.value; let text = input.value;
textOne.value=false textOne.value = false;
input.value = ""; input.value = "";
// //
@ -130,54 +122,70 @@ const sendText = async() => {
}, },
name: "", name: "",
role: "user", role: "user",
userId: "487", userId: aiUserid.value.userId,
}, },
]; ];
const messageId = Date.now(); const messageId = Date.now();
const newMessage = reactive({ id: messageId, type: 'ai-main', displayContent: '' }); const newMessage = reactive({ id: messageId, type: "ai-main", displayContent: "" });
messages.push(newMessage); messages.push(newMessage);
const resp=await fetch('http://192.168.2.16:9868/api/bigModule/createArticleByAi',{ const resp = await fetch("http://118.31.7.2:9868/api/bigModule/createArticleByAi", {
method: 'POST', method: "POST",
headers: { headers: {
'Content-Type': 'application/json', "Content-Type": "application/json",
}, Authorization: `Bearer ${getToken()}`,
},
body: JSON.stringify(sendData), body: JSON.stringify(sendData),
}) });
const reader=resp.body.getReader() const reader = resp.body.getReader();
while(1){ while (1) {
const {done,value}=await reader.read() const { done, value } = await reader.read();
if(done){ if (done) {
break break;
} }
const decoder=new TextDecoder() const decoder = new TextDecoder("utf-8");
const tet=decoder.decode(value) const tet = decoder.decode(value, { stream: true });
newMessage.displayContent+=tet
console.log(tet); await typeText(newMessage, tet);
} }
isRequestPending.value = false;
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
const scrollContainer = scrollbar.value?.$el.querySelector('.el-scrollbar__wrap'); const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap");
if (scrollContainer) { if (scrollContainer) {
scrollContainer.scrollTop = scrollContainer.scrollHeight; scrollContainer.scrollTop = scrollContainer.scrollHeight;
} }
}, 10); }, 10);
}); });
isRequestPending.value = false; };
const typeText = (message, text) => {
return new Promise((resolve) => {
let index = 0;
function type() {
if (index < text.length) {
const nextChar = text[index];
message.displayContent += nextChar;
index++;
setTimeout(type, 30); //
} else {
resolve();
}
}
type();
});
}; };
const handleKeyDown = (event) => { const handleKeyDown = (event) => {
if (event.key === "Enter" && !event.shiftKey) { if (event.key === "Enter" && !event.shiftKey) {
event.preventDefault(); event.preventDefault();
sendText(); sendText();
} }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-containere { .app-containere {
margin: 10px 4px 10px 10px; margin: 10px 4px 10px 10px;
box-shadow: 0px 0px 13px 0px #0452c6; border: 1px solid #0452c6;
border-radius: 10px; background-color: rgba(0, 0, 0, 0.5);
padding: 25px; padding: 25px;
} }
.message { .message {
@ -249,50 +257,69 @@ const handleKeyDown = (event) => {
margin-right: 15px; margin-right: 15px;
} }
} }
.one-AI{ .one-AI {
display: flex; display: flex;
width: 100%; width: 100%;
img{ img {
width: 31px; width: 31px;
height: 31px; height: 31px;
} }
.AI-item{ .AI-item {
width: calc(100% - 200px); width: calc(100% - 200px);
margin-left: 10px; margin-left: 10px;
background: #011031; background: #011031;
border-radius: 10px; border-radius: 10px;
border: 1px solid #003E7C; border: 1px solid #003e7c;
padding: 10px 15px; padding: 10px 15px;
color:#FFFFFF; color: #ffffff;
p{ p {
font-size: 12px; font-size: 12px;
} }
.examples{ .examples {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 60px; margin-top: 60px;
width: calc(100% - 300px); width: calc(100% - 300px);
.example-item{ .example-item {
margin: 0 25px 15px 0; margin: 0 25px 15px 0;
cursor: pointer; cursor: pointer;
width: 349px; width: 349px;
height: 72px; height: 72px;
background: #002C5B; background: #002c5b;
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
img{ img {
width: 20px; width: 20px;
height: 20px; height: 20px;
} }
span{ span {
margin-left: 5px; margin-left: 5px;
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
color: #FFFFFF; color: #ffffff;
} }
} }
} }
} }
} }
.md-editor-dark,
.md-editor-modal-container[data-theme="dark"] {
--md-color: #ffffff;
--md-bk-color: transparent;
--md-border-color: transparent;
--md-border-color-hover: transparent;
--md-border-color-focus: transparent;
--md-border-color-active: transparent;
--md-border-color-disabled: transparent;
--md-border-color-focus-inner: transparent;
--md-border-color-hover-inner: transparent;
--md-border-color-active-inner: transparent;
--md-border-color-disabled-inner: transparent;
--md-border-color-focus-outer: transparent;
--md-border-color-hover-outer: transparent;
--md-border-color-active-outer: transparent;
}
.md-editor-preview hr {
border-color: #ffffff;
}
</style> </style>

@ -1,3 +1,11 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-16 17:56:32
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 17:59:16
* @FilePath: \vue3\src\views\digitalMarketTech\AIGCLargeModel\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="app-top"> <div class="app-top">
<el-button v-for="(item,index) in imgData" :key="index" :class="item.img" @click="clickIndx(index)">{{item.text}}</el-button> <el-button v-for="(item,index) in imgData" :key="index" :class="item.img" @click="clickIndx(index)">{{item.text}}</el-button>

@ -213,7 +213,7 @@ const downloadArticle=()=>{
return proxy.$modal.msgWarning("请先完成上一步") return proxy.$modal.msgWarning("请先完成上一步")
} }
answerRecord.value=2 answerRecord.value=2
window.open(`http://192.168.2.16:9868/api/stu/experimental/downloadImg?userId=${JSON.parse(getUserInfo()).userId}&TOKEN=${getToken()}`) window.open(`http://118.31.7.2:9868/api/stu/experimental/downloadImg?userId=${JSON.parse(getUserInfo()).userId}&TOKEN=${getToken()}`)
} }
// //

@ -61,11 +61,11 @@
若以现有的蓝光光盘为计量标准那么 40ZB 的数据全部存入蓝光光盘所需要的光盘总重量将达到 424 艘尼米兹号航母的总重量而这些数据中 80% 是非结构化或半结构化类型的数据甚至更有一部分是不断变化的流数据因此数据的爆炸性增长态势以及其数据构成特点使得人们进入了大数据时代 若以现有的蓝光光盘为计量标准那么 40ZB 的数据全部存入蓝光光盘所需要的光盘总重量将达到 424 艘尼米兹号航母的总重量而这些数据中 80% 是非结构化或半结构化类型的数据甚至更有一部分是不断变化的流数据因此数据的爆炸性增长态势以及其数据构成特点使得人们进入了大数据时代
</p> </p>
<p> 一般认为大数据主要具有以下4个方面的典型特征即大量(Volume)多样(Variety)高速(Velocity)和价值(Value)即所谓的4V接下来通过一张图来具休描述</p> <p> 一般认为大数据主要具有以下4个方面的典型特征即大量(Volume)多样(Variety)高速(Velocity)和价值(Value)即所谓的4V接下来通过一张图来具休描述</p>
<p><img src="../../../assets/images/szjj/u1592.png" alt=""></p> <p><img src="@/assets/images/szjj/u1592.png" alt=""></p>
<p style="font-weight:600;"> Volume(大量)</p><p>大数据的特征首先就是数据规模大随着互联网物联网移动互联技术的发展人和事物的所有轨迹都可以被记录下来数据呈现出爆发性增长数据相关计量单位的换算关系如下表所示</p> <p style="font-weight:600;"> Volume(大量)</p><p>大数据的特征首先就是数据规模大随着互联网物联网移动互联技术的发展人和事物的所有轨迹都可以被记录下来数据呈现出爆发性增长数据相关计量单位的换算关系如下表所示</p>
<p><img src="../../../assets/images/szjj/u1594.png" alt=""></p> <p><img src="@/assets/images/szjj/u1594.png" alt=""></p>
<p>互联网每分钟产生的数据</p> <p>互联网每分钟产生的数据</p>
<p><img src="../../../assets/images/szjj/u1597.png" alt=""></p> <p><img src="@/assets/images/szjj/u1597.png" alt=""></p>
<p style="font-weight:600;"> Variety(多样)</p><p> <p style="font-weight:600;"> Variety(多样)</p><p>
数据来源的广泛性决定了数据形式的多样性我们把这些数据大致分为三类结构化的数据半结构化的数据和非结构化的数据<br/> 数据来源的广泛性决定了数据形式的多样性我们把这些数据大致分为三类结构化的数据半结构化的数据和非结构化的数据<br/>
结构化的数据一般指的是关系型数据库中的数据例如MySQLOracle中的表中的数据如财务系统数据信息管理系统数据医疗系统数据等,其特点是数据间因果关系强这些数据中每一行的数据都保持着相同的数据格式有规律可循非常容易处理<br/> 结构化的数据一般指的是关系型数据库中的数据例如MySQLOracle中的表中的数据如财务系统数据信息管理系统数据医疗系统数据等,其特点是数据间因果关系强这些数据中每一行的数据都保持着相同的数据格式有规律可循非常容易处理<br/>

@ -1,5 +1,13 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-12 09:29:39
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 17:36:43
* @FilePath: \vue3\src\views\digitalMarketTech\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="rgzn_top"> <div class="rgzn_top app-container">
<div class="top_item"> <div class="top_item">
<el-button :class="{'active':isActive===1}" @click="activeIndex(1)"><img src="@/assets/images/大数据.png">大数据</el-button> <el-button :class="{'active':isActive===1}" @click="activeIndex(1)"><img src="@/assets/images/大数据.png">大数据</el-button>
<el-button :class="{'active':isActive===2}" @click="activeIndex(2)"><img src="@/assets/images/人工智能.png">人工智能</el-button> <el-button :class="{'active':isActive===2}" @click="activeIndex(2)"><img src="@/assets/images/人工智能.png">人工智能</el-button>

@ -1,118 +1,121 @@
<template> <template>
<div class="app-main"> <div class="app-main">
<div class="main-left"> <div class="main-left">
<div class="left-top"> <div class="left-top">
<img style="width: 26px;height: 26px;" src="../../../assets/images/图标1.png" alt=""> <img style="width: 26px; height: 26px" src="../../../assets/images/图标1.png" alt="" />
<span>内置表</span> <span>内置表</span>
</div>
<div class="left-item">
<div v-for="(item, index) in nzData" :key="index" class="item" :class="{ 'is-active': nzIndex === index }" @click="goNZ(index, item)">
<span>{{ item }}</span>
</div> </div>
<div class="left-item"> </div>
<div v-for="(item,index) in nzData" :key="index" class="item" :class="{ 'is-active': nzIndex === index}" @click="goNZ(index)"> <div class="left-top" style="margin-top: 35px">
<span>{{item}}</span> <img style="width: 26px; height: 26px" src="../../../assets/images/图标.png" alt="" />
</div> <span>自建表</span>
</div> </div>
<div class="left-top" style="margin-top:35px"> <div class="left-item">
<img style="width: 26px;height: 26px;" src="../../../assets/images/图标.png" alt=""> <div v-for="(item, index) in zjData" :key="index" class="item" :class="{ 'is-active': zjIndex === index }" @click="goZJ(index)">
<span>自建表</span> <span>{{ item }}</span>
</div>
<div class="left-item">
<div v-for="(item,index) in zjData" :key="index" class="item" :class="{ 'is-active': zjIndex === index}" @click="goZJ(index)">
<span>{{item}}</span>
</div>
</div> </div>
</div>
</div> </div>
<div class="main-right"> <div class="main-right">
<el-table :data="tableData" style="width: 94%" :header-cell-style="headerCellStyle"> <el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/> <el-table-column v-for="column in tableLabel" :key="column" :prop="column.prop" :label="column.label" align="center" />
</el-table> </el-table>
<pagination v-show="datatotal > 0" :total="datatotal" v-model:page="n_dataTableQuery.index" v-model:limit="n_dataTableQuery.size" @pagination="getSurface" style="margin-top: 10px" />
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { reactive } from "vue" import * as portraitModel from "@/api/portraitModel";
const nzIndex=ref(0) import useUserStore from "@/store/modules/user";
const nzData=['用户属性表','用户登录活跃表','用户消费能力表','用户行为表','用户评论表'] import useAlgorithmStore from "@/store/modules/algorithm.js";
const zjIndex=ref(-1) import { ref } from "vue";
const zjData=['用户属性表','用户登录活跃表','用户消费能力表','用户行为表','用户评论表'] const userStore = useUserStore();
const tableLabel=reactive([ const algorithmStore = useAlgorithmStore();
{prop:'date',label:'用户ID'}, // query
{prop:'name',label:'登录名'}, const n_dataTableQuery = ref({
{prop:'name',label:'用户姓名'}, index: 1,
{prop:'name',label:'学号'}, size: 20,
{prop:'name',label:'班级'}, tableName: "用户属性表",
{prop:'name',label:'专业'}, userId: userStore.userInfo.userId,
{prop:'name',label:'学校'}, });
{prop:'name',label:'角色名称'}, const datatotal = ref(0);
{prop:'name',label:'角色性别'}, const nzIndex = ref(0);
{prop:'name',label:'角色年龄'}, const nzData = ["用户属性表", "用户登录活跃表", "用户消费能力表", "用户行为表", "用户评论表"];
{prop:'name',label:'注册时间'}, const zjIndex = ref(-1);
{prop:'name',label:'所在地'} const zjData = ["用户属性表", "用户登录活跃表", "用户消费能力表", "用户行为表", "用户评论表"];
]) const tableLabel = reactive([
const goNZ=(index)=>{ { prop: "id", label: "用户ID" },
nzIndex.value=index { prop: "loginName", label: "登录名" },
zjIndex.value=-1 { prop: "userName", label: "用户姓名" },
} { prop: "studentId", label: "学号" },
const goZJ=(index)=>{ { prop: "stuClass", label: "班级" },
zjIndex.value=index { prop: "major", label: "专业" },
nzIndex.value=-1 { prop: "school", label: "学校" },
} { prop: "roleName", label: "角色名称" },
{ prop: "roleGender", label: "角色性别" },
{ prop: "roleAge", label: "角色年龄" },
{ prop: "updateTime", label: "注册时间" },
{ prop: "location", label: "所在地" },
]);
const goNZ = (index, item) => {
nzIndex.value = index;
zjIndex.value = -1;
n_dataTableQuery.value.tableName = item;
getSurface();
};
const goZJ = (index) => {
zjIndex.value = index;
nzIndex.value = -1;
};
const tableData = ref([]);
const tableData = [ const headerCellStyle = () => {
{ return {
date: '2016-05-03',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
date: '2016-05-02',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
date: '2016-05-01',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
]
const headerCellStyle=()=>{
return {
// backgroundColor: "#0087F9 !important", //
// background:"linear-gradient(0deg, #002651 0%, #0087F9 100%) !important;",
color: "#ffffff !important", color: "#ffffff !important",
}; };
} };
//
const selectType = (type) => {};
const getSurface = () => {
portraitModel.getUserTableData(n_dataTableQuery.value).then((res) => {
tableData.value = res?.data?.list;
datatotal.value = res.data.total;
});
};
onMounted(() => {
getSurface();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
// background-color: #f5f5f5; // background-color: #f5f5f5;
margin: 20px 20px 0; margin: 20px 20px 0;
height: calc(100vh - 150px); height: calc(100vh - 150px);
display: flex; display: flex;
overflow: auto; overflow: auto;
.main-left{ .main-left {
width: 205px; width: 205px;
height: 100%; height: 100%;
background: #041C49; background: #041c49;
.left-top{ .left-top {
gap: 5px; gap: 5px;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 10px 20px; padding: 10px 20px;
span{ span {
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
color: #3596EB; color: #3596eb;
}
} }
} .left-item {
.left-item{ .item {
.item{
width: 195px; width: 195px;
height: 31px; height: 31px;
// background: #1983DD; // background: #1983DD;
@ -120,40 +123,40 @@ const headerCellStyle=()=>{
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
span{ span {
color: #9BD1FF; color: #9bd1ff;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
} }
} }
.is-active{ .is-active {
background: #1983DD; background: #1983dd;
span{ span {
color:#FFFFFF; color: #ffffff;
} }
}
} }
} }
} .main-right {
.main-right{
width: 1639px; width: 1639px;
height: 100%; height: 100%;
padding: 20px; padding: 20px;
// background: #001D40; // background: #001D40;
border: 1px solid #0452C6; border: 1px solid #0452c6;
// opacity: 0.5; // opacity: 0.5;
} }
} }
:deep(.el-table__header){ :deep(.el-table__header) {
.el-table__cell{ .el-table__cell {
background:linear-gradient(0deg, #002651 0%, #0087F9 100%) !important; background: linear-gradient(0deg, #002651 0%, #0087f9 100%) !important;
} }
} }
:deep(.el-table) { :deep(.el-table) {
--el-table-row-hover-bg-color:#002651 !important; --el-table-row-hover-bg-color: #002651 !important;
--el-table-border-color: #002651; --el-table-border-color: #002651;
.el-table__row{ .el-table__row {
background-color: #002652 !important; background-color: #002652 !important;
color: #E6E6E6; color: #e6e6e6;
} }
} }
</style> </style>

@ -1,297 +1,342 @@
<template> <template>
<el-scrollbar height="800px"> <el-scrollbar height="800px">
<div class="main-top"> <div class="main-top">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">任务描述</span> <span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
<p style="font-weight: 400;font-size: 12px;color: #E6E6E6;">给出任务清单参考做哪些数据的统计分析Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p> <p style="font-weight: 400; font-size: 12px; color: #e6e6e6">给出任务清单参考做哪些数据的统计分析Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
</div> </div>
<div class="main-but"> <div class="main-but">
<el-button><img src="../../../assets/images/导入.png" alt="">算法知识导入</el-button> <el-button>
<el-button @click="taskSubmit"><img src="../../../assets/images/提交.png" alt="">实训任务提交</el-button> <img src="../../../assets/images/导入.png" alt="" />
算法知识导入
</el-button>
<el-button @click="taskSubmit">
<img src="../../../assets/images/提交.png" alt="" />
实训任务提交
</el-button>
</div> </div>
<div class="app-main"> <div class="app-main">
<div class="main-left"> <div class="main-left">
<div> <div>
<div class="left-top"> <div class="left-top">
<span>选择指标</span> <span>选择指标</span>
</div> </div>
<div class="metrics"> <div class="metrics">
<el-select v-model="input" placeholder="请选择数据" style="width: 180px"> <el-select v-model="input" placeholder="请选择数据" style="width: 180px" @change="selectType">
<el-option <el-option v-for="item in algorithmStore.userDataLabel" :key="item" :label="item" :value="item" />
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<div class="metrics-table" style="margin-top: 10px"> <div class="metrics-table" style="margin-top: 10px">
<el-table border :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"> <el-table border :data="algorithmStore.indexLibrary" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handleSelectionChange">
<el-table-column type="selection" prop="date" label="Date" align="center"/> <el-table-column type="selection" prop="date" label="Date" align="center" />
<el-table-column prop="name" label="指标" align="center"/> <el-table-column label="指标" align="center" prop="label" />
</el-table> </el-table>
<el-button>确定</el-button> <el-button @click="submit"></el-button>
</div> </div>
<div class="left-top"> <div class="left-top">
<span>数据预处理</span> <span>数据预处理</span>
</div> </div>
<div class="metrics"> <div class="metrics">
<el-select v-model="input" placeholder="请选择数据" style="width: 180px"> <el-select v-model="preProcessText.text1" placeholder="请选择数据" style="width: 180px">
<el-option <el-option label="数据去重" value="数据去重" />
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<div class="metrics" style="margin-top:15px"> <div class="metrics" style="margin-top: 15px">
<el-select v-model="input" placeholder="请选择数据" style="width: 180px"> <el-select v-model="preProcessText.text2" placeholder="请选择数据" style="width: 180px" @change="preProcess">
<el-option <el-option label="缺失值处理-剔除数据" value="缺失值处理-剔除数据" />
v-for="item in options" <el-option label="缺失值处理一均值替代" value="缺失值处理一均值替代" />
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<div class="left-top" style="margin-top: 10px"> <div class="left-top" style="margin-top: 10px">
<span>模型参数设置</span> <span>模型参数设置</span>
</div> </div>
<div class="metrics-table" style="margin-top: 10px"> <div class="metrics-table" style="margin-top: 10px">
<el-table border :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"> <el-table border :data="modelParams" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handlemodelSelectionChange">
<el-table-column type="selection" prop="date" label="Date" align="center"/> <el-table-column type="selection" prop="date" label="Date" align="center" />
<el-table-column prop="name" label="指标" align="center"/> <el-table-column prop="name" label="统计量" align="center" />
</el-table> </el-table>
<el-button>计算</el-button> <el-button @click="modelCalculation"></el-button>
</div> </div>
</div> </div>
<div style="margin-top: auto;"> <div style="margin-top: auto">
<div class="startOver"> <div class="startOver">
<img src="../../../assets/images/重新开始.png" alt=""> <img src="../../../assets/images/重新开始.png" alt="" />
<span>重新开始</span> <span>重新开始</span>
</div>
</div> </div>
</div>
</div> </div>
<div class="main-right"> <div class="main-right">
<div> <div>
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">分析数据</span> <span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据</span>
<el-table :data="tableData" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350"> <el-table :data="analysisData" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/> <el-table-column v-for="column in analysisHanderKry" :key="column" :prop="column" :label="column" align="center" />
</el-table> </el-table>
<el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> <!-- <pagination v-show="datatotal > 0" :total="datatotal" v-model:page="dataqueryParams.index" v-model:limit="dataqueryParams.size" @pagination="submit" style="margin-top: 10px" /> -->
</div> </div>
<div class="analysisResults" style="margin-top: 20px"> <div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果</span> <span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果</span>
<el-button>下载</el-button> <el-button>下载</el-button>
<el-table :data="tableData" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350"> <el-table :data="tableData" style="width: 94%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/> <el-table-column v-for="column in tableLabel" :key="column.label" :prop="column.label" :label="column.label" align="center"></el-table-column>
</el-table> <p v-for="column in tableLabel" :key="column.label">{{ column.label }}</p>
<el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> </el-table>
<el-pagination style="margin-top: 10px" background layout="prev, pager, next" :total="1000" />
</div> </div>
</div> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
<el-dialog v-model="dialogVisible" title="实训任务提交" width="565" custom-class="dialogClass" :show-close="false">
<el-dialog <template #header="{ close, titleId, titleClass }">
v-model="dialogVisible"
title="实训任务提交"
width="565"
custom-class="dialogClass"
:show-close="false"
>
<template #header="{ close, titleId, titleClass }">
<div class="my-header"> <div class="my-header">
<span :id="titleId" :class="titleClass">实训任务提交</span> <span :id="titleId" :class="titleClass">实训任务提交</span>
<img class="gbImg" src="../../../assets/images/关闭.png" @click="close" alt=""> <img class="gbImg" src="../../../assets/images/关闭.png" @click="close" alt="" />
</div> </div>
<img class="xtImg" src="../../../assets/images/线条.png" alt=""> <img class="xtImg" src="../../../assets/images/线条.png" alt="" />
</template> </template>
<div class="from-item"> <div class="from-item">
<el-form :inline="true" label-position="right" label-width="84px" :model="form" class="demo-form-inline"> <el-form :inline="true" label-position="right" label-width="84px" :model="form" class="demo-form-inline">
<el-form-item label="平均数:"> <el-form-item label="平均数:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="众数:"> <el-form-item label="众数:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="中位数:"> <el-form-item label="中位数:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="标准差:"> <el-form-item label="标准差:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="方差:"> <el-form-item label="方差:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="峰度:"> <el-form-item label="峰度:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="标准误差:"> <el-form-item label="标准误差:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="偏度:"> <el-form-item label="偏度:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="最大值:"> <el-form-item label="最大值:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="最小值:"> <el-form-item label="最小值:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="求和:"> <el-form-item label="求和:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
<el-form-item label="观测数:"> <el-form-item label="观测数:">
<el-input style="width: 120px;" v-model="formInline.user" clearable /> <el-input style="width: 120px" v-model="formInline.user" clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="dialogVisible = false">确定</el-button> <el-button @click="dialogVisible = false">确定</el-button>
<el-button type="primary" @click="dialogVisible = false"> <el-button type="primary" @click="dialogVisible = false">返回</el-button>
返回
</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
const dialogVisible=ref(false) import * as API from "@/api/AI.js";
const tableLabel=reactive([
{prop:'date',label:'用户ID'}, import * as marketingAlgorithmApi from "@/api/marketing-algorithm.js";
{prop:'name',label:'登录名'}, import useAlgorithmStore from "@/store/modules/algorithm.js";
{prop:'name',label:'用户姓名'}, import useUserStore from "@/store/modules/user";
{prop:'name',label:'学号'}, import { onMounted, ref } from "vue";
{prop:'name',label:'班级'}, const userStore = useUserStore();
{prop:'name',label:'专业'}, const algorithmStore = useAlgorithmStore();
{prop:'name',label:'学校'}, const n_dataTableQuery = ref({
{prop:'name',label:'角色名称'}, index: 1,
{prop:'name',label:'角色性别'}, size: 20,
{prop:'name',label:'角色年龄'}, tableName: "用户属性表",
{prop:'name',label:'注册时间'}, userId: userStore.userInfo.userId,
{prop:'name',label:'所在地'} });
]) const dialogVisible = ref(false);
const formInline=reactive({ //
user:'', const modelParams = reactive([
region:''
})
const input=ref()
const options = [
{ {
value: 'Option1', name: "平均数",
label: 'Option1',
}, },
{ {
value: 'Option2', name: "中位数",
label: 'Option2',
}, },
{ {
value: 'Option3', name: "众数",
label: 'Option3',
}, },
{ {
value: 'Option4', name: "标准差",
label: 'Option4',
}, },
{ {
value: 'Option5', name: "方差",
label: 'Option5',
}, },
] {
const taskSubmit=()=>{ name: "标准误差",
dialogVisible.value=true },
} {
name: "峰度;",
},
{
name: "偏度",
},
{
name: "最大值",
},
{
name: "最小值",
},
{
name: "求和",
},
{
name: "观测数",
},
]);
const analysisData = ref([]);
const analysisHanderKry = ref([]);
const tableLabel = reactive([
{ prop: "date", label: "用户ID" },
{ prop: "name", label: "登录名" },
{ prop: "name", label: "用户姓名" },
{ prop: "name", label: "学号" },
{ prop: "name", label: "班级" },
{ prop: "name", label: "专业" },
{ prop: "name", label: "学校" },
{ prop: "name", label: "角色名称" },
{ prop: "name", label: "角色性别" },
{ prop: "name", label: "角色年龄" },
{ prop: "name", label: "注册时间" },
{ prop: "name", label: "所在地" },
]);
const formInline = ref({});
const input = ref();
const g_indicatorData = ref([]);
const preProcessText = ref({
text1: "数据去重",
text2: "",
});
//
const g_modelParameter = ref([]);
//
const preProcess = (tetx) => {
API.dataPreprocessing({
mapList: analysisData.value,
method: preProcessText.value.text2,
userId: n_dataTableQuery.value.userId,
}).then((res) => {
analysisData.value = res.data;
});
};
//
const taskSubmit = () => {
dialogVisible.value = true;
};
const tableData = [ const tableData = [
{ {
date: '2016-05-03', date: "2016-05-03",
name: 'Tom', name: "Tom",
address: 'No. 189, Grove St, Los Angeles', address: "No. 189, Grove St, Los Angeles",
}, },
{ {
date: '2016-05-02', date: "2016-05-02",
name: 'Tom', name: "Tom",
address: 'No. 189, Grove St, Los Angeles', address: "No. 189, Grove St, Los Angeles",
}, },
{ {
date: '2016-05-04', date: "2016-05-04",
name: 'Tom', name: "Tom",
address: 'No. 189, Grove St, Los Angeles', address: "No. 189, Grove St, Los Angeles",
}, },
{ {
date: '2016-05-04', date: "2016-05-01",
name: 'Tom', name: "Tom",
address: 'No. 189, Grove St, Los Angeles', address: "No. 189, Grove St, Los Angeles",
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
}, },
] ];
const headerCellStyle=()=>{ const headerCellStyle = () => {
return { return {
backgroundColor: "#1882DE !important", // backgroundColor: "#1882DE !important", //
color: "#ffffff !important", color: "#ffffff !important",
}; };
};
//
const selectType = (type) => {
n_dataTableQuery.value.tableName = type;
getIndicator();
};
//
const handleSelectionChange = (type) => {
g_indicatorData.value = type.map((item) => item.label);
};
//
const submit = () => {
marketingAlgorithmApi.getMarketingAlgorithm({ userId: n_dataTableQuery.value.userId, tableName: n_dataTableQuery.value.tableName, fieldList: g_indicatorData.value }).then((res) => {
analysisData.value = res.data;
analysisHanderKry.value = Object.keys(res.data[0]);
});
};
//
const handlemodelSelectionChange = (type) => {
g_modelParameter.value = type.map((item) => item.name);
};
//
const modelCalculation = () => {
const processedData = processArrayData(analysisHanderKry.value, analysisData.value);
marketingAlgorithmApi.getMarketingAlgorithmPreprocessing(JSON.stringify({ map: processedData, statistic: g_modelParameter.value, userId: n_dataTableQuery.value.userId }));
};
function processArrayData(keys, data) {
//
const result = {};
//
keys.forEach((key) => {
// data
const values = data.map((item) => item[key]);
//
result[key] = values;
});
return result;
} }
onMounted(() => {
getIndicator();
});
//
const getIndicator = () => {
algorithmStore.getUserDatabase({ userId: n_dataTableQuery.value.userId, tableName: n_dataTableQuery.value.tableName });
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main-top { .main-top {
margin: 20px 20px 0; margin: 20px 20px 0;
margin-top: 10px; margin-top: 10px;
height: 85px; height: 85px;
background: #001d40; background: #001d40;
border: 1px solid #0452c6; border: 1px solid #0452c6;
padding: 5px 20px; padding: 5px 20px;
} }
.main-but{ .main-but {
margin: 5px 20px 0; margin: 5px 20px 0;
display: flex; display: flex;
.el-button:nth-child(1) { .el-button:nth-child(1) {
width: 180px; width: 180px;
height: 56px; height: 56px;
background: url('../../../assets/images/011.png'); background: url("../../../assets/images/011.png");
color:#FFFFFF; color: #ffffff;
border-color:#FFFFFF00; border-color: #ffffff00;
} }
.el-button:nth-child(2) { .el-button:nth-child(2) {
width: 180px; width: 180px;
height: 56px; height: 56px;
background: url('../../../assets/images/022.png'); background: url("../../../assets/images/022.png");
color:#FFFFFF; color: #ffffff;
border-color:#FFFFFF00; border-color: #ffffff00;
} }
} }
.app-main { .app-main {
// background-color: #f5f5f5; // background-color: #f5f5f5;
@ -317,118 +362,118 @@ margin: 20px 20px 0;
color: #3596eb; color: #3596eb;
} }
} }
.metrics-table{ .metrics-table {
.el-button { .el-button {
width: 149px; width: 149px;
height: 48px; height: 48px;
background: url('../../../assets/images/确定.png'); background: url("../../../assets/images/确定.png");
color:#FFFFFF; color: #ffffff;
border-color:#FFFFFF00; border-color: #ffffff00;
background-size: 100% 100%; background-size: 100% 100%;
margin: 15px; margin: 15px;
} }
} }
.startOver{ .startOver {
margin-left: -10px; margin-left: -10px;
width: 205px; width: 205px;
height: 55px; height: 55px;
background: #00F4FF; background: #00f4ff;
// //
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
} }
:deep(.el-table) { :deep(.el-table) {
--el-table-row-hover-bg-color:#002651 !important; --el-table-row-hover-bg-color: #002651 !important;
--el-table-border-color: #7AC1FF; --el-table-border-color: #7ac1ff;
.el-table__row{ .el-table__row {
background-color: #002652 !important; background-color: #002652 !important;
color: #E6E6E6; color: #e6e6e6;
} }
} }
} }
.main-right { .main-right {
width: 1639px; width: 1639px;
// height: 100%; // height: 100%;
padding: 20px; padding: 20px;
border: 1px solid #0452c6; border: 1px solid #0452c6;
:deep(.el-table__header){ :deep(.el-table__header) {
.el-table__cell{ .el-table__cell {
background:linear-gradient(0deg, #5304BE 0%, #9126FE 100%) !important; background: linear-gradient(0deg, #5304be 0%, #9126fe 100%) !important;
} }
} }
:deep(.el-table) { :deep(.el-table) {
--el-table-row-hover-bg-color:#002651 !important; --el-table-row-hover-bg-color: #002651 !important;
--el-table-border-color: #002651; --el-table-border-color: #002651;
--el-table-bg-color:#FFFFFF00; --el-table-bg-color: #ffffff00;
.el-table__row{ .el-table__row {
background-color: #002652 !important; background-color: #002652 !important;
color: #E6E6E6; color: #e6e6e6;
} }
} }
} }
.metrics{ .metrics {
:deep(.el-input){ :deep(.el-input) {
.el-input__wrapper{ .el-input__wrapper {
background-color:#FFFFFF00; background-color: #ffffff00;
background-image:url('../../../assets/images/下拉框.png'); background-image: url("../../../assets/images/下拉框.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
--el-input-text-color:#FFFFFF; --el-input-text-color: #ffffff;
--el-input-border-color:#FFFFFF00; --el-input-border-color: #ffffff00;
--el-input-hover-border-color:#FFFFFF00; --el-input-hover-border-color: #ffffff00;
--el-input-hover-border:#FFFFFF00; --el-input-hover-border: #ffffff00;
--el-select-border-color-hover:#FFFFFF00; --el-select-border-color-hover: #ffffff00;
--el-select-input-focus-border-color:#FFFFFF00; --el-select-input-focus-border-color: #ffffff00;
--el-input-placeholder-color:#FFFFFF; --el-input-placeholder-color: #ffffff;
.el-input__inner{ .el-input__inner {
color:#FFFFFF; color: #ffffff;
} }
}
} }
}
} }
.analysisResults{ .analysisResults {
.el-button { .el-button {
width: 89px; width: 89px;
height: 31px; height: 31px;
background: url('../../../assets/images/下载.png'); background: url("../../../assets/images/下载.png");
color:black; color: black;
border-color:#FFFFFF00; border-color: #ffffff00;
// background-size: 100% 100%; // background-size: 100% 100%;
margin: 15px 0px 5px; margin: 15px 0px 5px;
} }
} }
:deep(.el-form-item__label){ :deep(.el-form-item__label) {
color: #FFFFFF;; color: #ffffff;
} }
.from-item{ .from-item {
padding: 20px; padding: 20px;
.el-input{ .el-input {
--el-input-text-color:#FFFFFF; --el-input-text-color: #ffffff;
--el-input-bg-color:#002651; --el-input-bg-color: #002651;
--el-input-border-color:#67B3D6; --el-input-border-color: #67b3d6;
} }
} }
.dialog-footer{ .dialog-footer {
margin-bottom: 20px; margin-bottom: 20px;
} }
</style> </style>
<style lang="scss"> <style lang="scss">
.dialogClass{ .el-dialog {
background:url('../../../assets/images/弹框.png') !important; background: url("../../../assets/images/弹框.png") !important;
background-size: 100% 100% !important; background-size: 100% 100% !important;
.el-dialog__header{ .el-dialog__header {
padding: 5px 0px; padding: 5px 0px;
margin-right: 5px !important; margin-right: 5px !important;
.gbImg{ .gbImg {
cursor: pointer; cursor: pointer;
width: 51px; width: 51px;
height: 31px; height: 31px;
background-size: 100% 100%; background-size: 100% 100%;
}
} }
.xtImg{ }
.xtImg {
margin-left: 18px; margin-left: 18px;
width: 530px; width: 530px;
} }
@ -439,9 +484,12 @@ margin: 20px 20px 0;
justify-content: space-between; justify-content: space-between;
gap: 16px; gap: 16px;
text-align: center; text-align: center;
span{ span {
color: #FFFFFF; color: #ffffff;
padding: 38px 20px 0; padding: 38px 20px 0;
} }
} }
</style> .el-table__body-wrapper {
// background: #020620 !important;
}
</style>

@ -1,5 +1,5 @@
<template> <template>
<div class="rgzn_top"> <div class="rgzn_top app-container">
<div class="top_item"> <div class="top_item">
<el-button :class="{'active':isActive===1}" @click="activeIndex(1)"></el-button> <el-button :class="{'active':isActive===1}" @click="activeIndex(1)"></el-button>
<el-button :class="{'active':isActive===2}" @click="activeIndex(2)"></el-button> <el-button :class="{'active':isActive===2}" @click="activeIndex(2)"></el-button>
@ -36,6 +36,7 @@
color: #fff; color: #fff;
} }
.rgzn_top{ .rgzn_top{
margin-top: 20px;
.top_item{ .top_item{
img{ img{
margin-right: 5px; margin-right: 5px;

@ -1,5 +1,5 @@
<template> <template>
<div class="content"> <div class="content app-container">
<div class="title"> <div class="title">
<img src="@/assets/images/indexTopTitle.png" alt="" /> <img src="@/assets/images/indexTopTitle.png" alt="" />
</div> </div>

@ -1,265 +1,183 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="study_main"> <div class="study_main">
<div class="study_main_up"> <div class="study_main_up">
<div class="study_main_up_top"> <div class="study_main_up_top">
<div class="study_main_up_left"> <div class="study_main_up_left">
<img src="../../assets/icons/svg/score.svg" /> <img src="../../assets/icons/svg/score.svg" />
<span style="color:#FFFFFF">得分情况</span> <span style="color: #ffffff">得分情况</span>
</div> </div>
<el-button type="primary" :icon="Refresh" round @click="updateReportGrade"></el-button> <el-button type="primary" :icon="Refresh" round @click="updateReportGrade"></el-button>
</div> </div>
<div class="study_main_up_foot"> <div class="study_main_up_foot">
<el-table <el-table :data="tableData4" :span-method="tableSpanMethod" stripe border :header-cell-style="{ background: '#A2C9FF' }" style="width: 100%">
:data="tableData4" <el-table-column prop="sid" label="序号" width="80" align="center" />
:span-method="tableSpanMethod" <el-table-column prop="learningProjects" label="学习项目" align="center" />
stripe <el-table-column prop="assessmentItems" label="考核项目" width="150" align="center" />
border <el-table-column prop="scoringCriteria" label="计分标准" width="314" align="center" />
:header-cell-style="{background: '#A2C9FF'}" <el-table-column prop="totalScore" label="总分" width="129" align="center" />
<el-table-column prop="scoreWeight" label="成绩权重" width="129" align="center" />
style="width: 100%" <el-table-column prop="completionStatus" label="完成情况" width="225" align="center" />
> <el-table-column prop="schedule" label="进度" align="center" />
<el-table-column prop="sid" label="序号" width="80" align="center" /> <el-table-column prop="scoreProject" label="得分" width="131" align="center" />
<el-table-column </el-table>
prop="learningProjects" </div>
label="学习项目" </div>
align="center" <div class="study_main_but">
/> <div class="study_main_but_left">
<el-table-column <img src="../../assets/icons/svg/sxbg.svg" />
prop="assessmentItems" <span style="color: #ffffff">实训报告</span>
label="考核项目" </div>
width="150" <!-- action="http://qkljr.sztzjy.com:90/api/stu/concept/block/upload" -->
align="center"
/> <el-upload ref="uploadRef" class="upload-demo" :file-list="fileList" :auto-upload="false" :on-change="handleChange" :show-file-list="false" multiple="multiple">
<el-table-column <template #trigger>
prop="scoringCriteria" <el-button color="#626aef" round>
label="计分标准" <el-icon><UploadFilled /></el-icon>
width="314" 点击上传
align="center" </el-button>
/> </template>
<el-table-column <!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> -->
prop="totalScore" </el-upload>
label="总分" <div class="study_main_but_foot">
width="129" <el-table :data="tableData2" stripe style="width: 100%" border :header-cell-style="{ background: '#A2C9FF' }">
align="center" <el-table-column prop="reportName" label="报告名称" width="289" align="center" />
/> <el-table-column prop="uploadTime" label="上传时间" width="289" align="center" />
<el-table-column <el-table-column prop="size" label="文件大小" width="290" align="center" />
prop="scoreWeight" <el-table-column prop="rating" label="评分" width="289" align="center" />
label="成绩权重" <el-table-column label="操作" class="controls" width="286" align="center">
width="129" <el-link type="success" @click="uploadReport">
align="center" <el-icon><Download /></el-icon>
/> 下载
<el-table-column </el-link>
prop="completionStatus" <el-link type="warning" @click="showComments">
label="完成情况" <el-icon><Tickets /></el-icon>
width="225" 查看评语
align="center" </el-link>
/> </el-table-column>
<el-table-column </el-table>
prop="schedule" </div>
label="进度" </div>
align="center" </div>
/> </div>
<el-table-column
prop="scoreProject" <el-dialog v-model="dialogVisible" title="评语" width="30%" :before-close="handleClose">
label="得分" <span>{{ tableData2[0].teacherComments }}</span>
width="131" <template #footer>
align="center" <span class="dialog-footer">
/> <el-button @click="dialogVisible = false">确定</el-button>
</el-table> <!-- <el-button type="primary" @click="dialogVisible = false">
</div>
</div>
<div class="study_main_but">
<div class="study_main_but_left">
<img src="../../assets/icons/svg/sxbg.svg" />
<span style="color:#FFFFFF">实训报告</span>
</div>
<!-- action="http://qkljr.sztzjy.com:90/api/stu/concept/block/upload" -->
<el-upload
ref="uploadRef"
class="upload-demo"
:file-list="fileList"
:auto-upload="false"
:on-change="handleChange"
:show-file-list="false"
multiple="multiple"
>
<template #trigger>
<el-button color="#626aef" round ><el-icon><UploadFilled /></el-icon></el-button>
</template>
<!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> -->
</el-upload>
<div class="study_main_but_foot">
<el-table
:data="tableData2"
stripe
style="width: 100%"
border
:header-cell-style="{background: '#A2C9FF'}"
>
<el-table-column
prop="reportName"
label="报告名称"
width="289"
align="center"
/>
<el-table-column
prop="uploadTime"
label="上传时间"
width="289"
align="center"
/>
<el-table-column
prop="size"
label="文件大小"
width="290"
align="center"
/>
<el-table-column
prop="rating"
label="评分"
width="289"
align="center"
/>
<el-table-column
label="操作"
class="controls"
width="286"
align="center"
>
<el-link type="success" @click="uploadReport"><el-icon><Download /></el-icon></el-link>
<el-link type="warning" @click="showComments"><el-icon><Tickets /></el-icon></el-link>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
<el-dialog
v-model="dialogVisible"
title="评语"
width="30%"
:before-close="handleClose"
>
<span>{{tableData2[0].teacherComments}}</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">确定</el-button>
<!-- <el-button type="primary" @click="dialogVisible = false">
Confirm Confirm
</el-button> --> </el-button> -->
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { Refresh } from "@element-plus/icons-vue"; import { Refresh } from "@element-plus/icons-vue";
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import * as API from "@/api/prtrait/prtrait.js" import * as API from "@/api/prtrait/prtrait.js";
// import {Base64} from 'js-base64' // import {Base64} from 'js-base64'
// import { useRouter } from "vue-router"; // import { useRouter } from "vue-router";
import {download} from '@/utils/request.js' import { download } from "@/utils/request.js";
import { getToken,getUserInfo } from '@/utils/auth' import { getToken, getUserInfo } from "@/utils/auth";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
// const router=useRouter(); // const router=useRouter();
// //
const dialogVisible = ref(false) const dialogVisible = ref(false);
const tableSpanMethod = computed(() => { const tableSpanMethod = computed(() => {
// if (tableData.value.length >= 5) { // if (tableData.value.length >= 5) {
if (tableData4.value.length >= 6) { if (tableData4.value.length >= 6) {
return arraySpanMethod; return arraySpanMethod;
} }
return null; return null;
}); });
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => { const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
if (rowIndex === tableData4.value.length - 1) { if (rowIndex === tableData4.value.length - 1) {
if (columnIndex === 0) { if (columnIndex === 0) {
return [1, 5]; return [1, 5];
} else if (columnIndex === 1) { } else if (columnIndex === 1) {
return [0, 0]; return [0, 0];
} }
} }
}; };
const tableData2 =ref([]) const tableData2 = ref([]);
const tableData=ref([]) const tableData = ref([]);
const tableData4=ref([ const tableData4 = ref([
{ {
sid:1, sid: 1,
assessmentItems:"阅读知识", assessmentItems: "阅读知识",
learningProjects:"知识概要", learningProjects: "知识概要",
scoreProject:null, scoreProject: null,
scoreWeight:null, scoreWeight: null,
scoringCriteria:"", scoringCriteria: "",
schedule:'0%', schedule: "0%",
totalScore:100 totalScore: 100,
}, },
{ {
sid:2, sid: 2,
assessmentItems:"观看资源", assessmentItems: "观看资源",
learningProjects:"资源学习", learningProjects: "资源学习",
scoreProject:null, scoreProject: null,
scoreWeight:null, scoreWeight: null,
scoringCriteria:"", scoringCriteria: "",
schedule:'0%', schedule: "0%",
totalScore:100 totalScore: 100,
}, },
{ {
sid:3, sid: 3,
assessmentItems:"客观题测试", assessmentItems: "客观题测试",
learningProjects:"学习测评", learningProjects: "学习测评",
scoreProject:null, scoreProject: null,
scoreWeight:null, scoreWeight: null,
scoringCriteria:"", scoringCriteria: "",
schedule:'0%', schedule: "0%",
totalScore:100 totalScore: 100,
}, },
{ {
sid:4, sid: 4,
assessmentItems:"输错/选错次数", assessmentItems: "输错/选错次数",
learningProjects:"实验实训", learningProjects: "实验实训",
scoreProject:null, scoreProject: null,
scoreWeight:null, scoreWeight: null,
scoringCriteria:"", scoringCriteria: "",
schedule:'0%', schedule: "0%",
totalScore:100 totalScore: 100,
}, },
{ {
sid:5, sid: 5,
assessmentItems:"", assessmentItems: "",
learningProjects:"实训报告", learningProjects: "实训报告",
scoreProject:null, scoreProject: null,
scoreWeight:null, scoreWeight: null,
scoringCriteria:"", scoringCriteria: "",
schedule:'0%', schedule: "0%",
totalScore:100 totalScore: 100,
}, },
]) ]);
const calculateAverageScore=()=>{ const calculateAverageScore = () => {
//
// const weightedScores = tableData4.value.map((item) => {
const weightedScores = tableData4.value.map(item => { if (item.scoreProject !== null) {
if(item.scoreProject!==null){ //
// const weight = parseFloat(item.scoreWeight.replace("%", "")) / 100;
const weight = parseFloat(item.scoreWeight.replace('%', ''))/100; //
// const score = parseFloat(item.scoreProject);
const score = parseFloat(item.scoreProject); //
// const weightedScore = weight * score;
const weightedScore = weight * score; return weightedScore;
return weightedScore; }
} return 0;
return 0 });
});
// 使 reduce
// 使 reduce const totalWeightedScore = weightedScores.reduce((acc, curr) => acc + curr, 0);
const totalWeightedScore = weightedScores.reduce((acc, curr) => acc + curr, 0); // 5
// 5 const finalResult = totalWeightedScore;
const finalResult = totalWeightedScore; const finalResult1 = String(finalResult.toFixed());
const finalResult1=String(finalResult.toFixed()) const newData = {
const newData = {
sid: "合计", sid: "合计",
project: "", project: "",
assessmentItems: "100%", assessmentItems: "100%",
@ -268,247 +186,241 @@
weight: "", weight: "",
condition: "", condition: "",
score: "", score: "",
} };
tableData4.value.push(newData) tableData4.value.push(newData);
} };
const fileList=ref([]) const fileList = ref([]);
const data=ref({ const data = ref({
"ascription":'', ascription: "",
"userId":JSON.parse(getUserInfo()).userId, userId: JSON.parse(getUserInfo()).userId,
"schoolId":JSON.parse(getUserInfo()).schoolId schoolId: JSON.parse(getUserInfo()).schoolId,
}) });
const handleChange =(info)=> { const handleChange = (info) => {
fileList.value.push(info); fileList.value.push(info);
let formData2 = new FormData(); let formData2 = new FormData();
formData2.append("file", fileList.value[0].raw) formData2.append("file", fileList.value[0].raw);
formData2.append("stuBlockProduct", JSON.stringify(data.value)) formData2.append("stuBlockProduct", JSON.stringify(data.value));
fileList.value.splice(0, fileList.value.length); fileList.value.splice(0, fileList.value.length);
API.uploadTrainingReport(formData2).then(()=>{ API.uploadTrainingReport(formData2).then(() => {
getReports() getReports();
}) });
} };
const uploadRef = ref(null); const uploadRef = ref(null);
const getReports=()=>{ const getReports = () => {
API.getDetailsTrainingReport(data.value).then((res)=>{ API.getDetailsTrainingReport(data.value).then((res) => {
tableData2.value.splice(0, tableData2.value.length); tableData2.value.splice(0, tableData2.value.length);
if(res.data!==null){ if (res.data !== null) {
tableData2.value.push(res.data) tableData2.value.push(res.data);
tableData2.value[0].size=tableData2.value[0].size+"kb" tableData2.value[0].size = tableData2.value[0].size + "kb";
} }
}) });
} };
const data2={
"userId":JSON.parse(getUserInfo()).userId,
"TOKEN":'Bearer '+getToken()
}
//
const uploadReport=async()=>{
window.open(`http://118.31.7.2:7899/api/stu/concept/block/download?TOKEN= ${'Bearer '+getToken()}&userId=${data2.userId}`) const data2 = {
// window.open(`http://202.97.179.126:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`) userId: JSON.parse(getUserInfo()).userId,
// window.open(`http://202.199.90.115:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`) TOKEN: "Bearer " + getToken(),
} };
const isUpdate=ref(false) //
// const uploadReport = async () => {
const showComments=()=>{ window.open(`http://118.31.7.2:7899/api/stu/concept/block/download?TOKEN= ${"Bearer " + getToken()}&userId=${data2.userId}`);
if(tableData2.value.length<=0){ // window.open(`http://202.97.179.126:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`)
ElMessage({ // window.open(`http://202.199.90.115:8800/api/stu/concept/block/download?reportName=${tableData2.value[0].reportName}&TOKEN= ${'Bearer '+getToken()}&module=${data2.module}&userId=${data.userId}`)
message: "暂无评语", };
type: "warning", const isUpdate = ref(false);
}); //
return const showComments = () => {
} if (tableData2.value.length <= 0) {
dialogVisible.value=true ElMessage({
} message: "暂无评语",
onMounted(()=>{ type: "warning",
});
return;
}
dialogVisible.value = true;
};
onMounted(() => {
// data.value.module='' // data.value.module=''
setTimeout(() => { setTimeout(() => {
cerateGrade() cerateGrade();
}, 300); }, 300);
setTimeout(() => { setTimeout(() => {
getReports() getReports();
}, 600); }, 600);
}) });
const cerateGrade=()=>{ const cerateGrade = () => {
API.academicRecordEnquiry(data.value).then((res)=>{ API.academicRecordEnquiry(data.value).then((res) => {
let currentId =1 let currentId = 1;
const tableData3 = res.data.map(item => { const tableData3 = res.data.map((item) => {
const weight1 = parseInt(item.scoreWeight*100) const weight1 = parseInt(item.scoreWeight * 100);
const weight2 = `${weight1}%`; const weight2 = `${weight1}%`;
if(item.learningProjects==="知识概要"){ if (item.learningProjects === "知识概要") {
const score=parseFloat(item.scoringCriteria) const score = parseFloat(item.scoringCriteria);
const time = reactive({value: '/'}); const time = reactive({ value: "/" });
if(item.completionStatus!==null){ if (item.completionStatus !== null) {
time.value=parseFloat(item.completionStatus) time.value = parseFloat(item.completionStatus);
} }
tableData4.value[0].scoringCriteria=`阅读1分钟得${score}分,1分钟以下不得分` tableData4.value[0].scoringCriteria = `阅读1分钟得${score}分,1分钟以下不得分`;
tableData4.value[0].completionStatus=`阅读${time.value}分钟` tableData4.value[0].completionStatus = `阅读${time.value}分钟`;
tableData4.value[0].scoreProject=item.scoreProject tableData4.value[0].scoreProject = item.scoreProject;
tableData4.value[0].scoreWeight=weight2 tableData4.value[0].scoreWeight = weight2;
tableData4.value[0].schedule=item.schedule+'%' tableData4.value[0].schedule = item.schedule + "%";
} }
if(item.learningProjects==="实验实训"){ if (item.learningProjects === "实验实训") {
const score=parseFloat(item.scoringCriteria) const score = parseFloat(item.scoringCriteria);
const time = reactive({value: '/'}); const time = reactive({ value: "/" });
if(item.completionStatus!==null){ if (item.completionStatus !== null) {
time.value=parseFloat(item.completionStatus) time.value = parseFloat(item.completionStatus);
} }
tableData4.value[3].scoringCriteria=`输错/选错次数扣${score}` tableData4.value[3].scoringCriteria = `输错/选错次数扣${score}`;
tableData4.value[3].completionStatus=`输错/选错 ${time.value}` tableData4.value[3].completionStatus = `输错/选错 ${time.value}`;
tableData4.value[3].scoreProject=item.scoreProject tableData4.value[3].scoreProject = item.scoreProject;
tableData4.value[3].scoreWeight=weight2 tableData4.value[3].scoreWeight = weight2;
tableData4.value[3].schedule=item.schedule+'%' tableData4.value[3].schedule = item.schedule + "%";
} }
if(item.learningProjects==="资源学习"){ if (item.learningProjects === "资源学习") {
const score=parseFloat(item.scoringCriteria) const score = parseFloat(item.scoringCriteria);
const time = reactive({value: '/'}); const time = reactive({ value: "/" });
if(item.completionStatus!==null){ if (item.completionStatus !== null) {
time.value=parseFloat(item.completionStatus) time.value = parseFloat(item.completionStatus);
} }
tableData4.value[1].scoringCriteria=`观看资源1分钟得${score}` tableData4.value[1].scoringCriteria = `观看资源1分钟得${score}`;
tableData4.value[1].completionStatus=`观看${time.value}分钟` tableData4.value[1].completionStatus = `观看${time.value}分钟`;
tableData4.value[1].scoreProject=item.scoreProject tableData4.value[1].scoreProject = item.scoreProject;
tableData4.value[1].scoreWeight=weight2 tableData4.value[1].scoreWeight = weight2;
tableData4.value[1].schedule=item.schedule+'%' tableData4.value[1].schedule = item.schedule + "%";
} }
if(item.learningProjects==="学习测评"){ if (item.learningProjects === "学习测评") {
const time = reactive({value: '/'}); const time = reactive({ value: "/" });
if(item.completionStatus!==null){ if (item.completionStatus !== null) {
time.value=parseFloat(item.completionStatus) time.value = parseFloat(item.completionStatus);
} }
const score=parseFloat(item.scoringCriteria) const score = parseFloat(item.scoringCriteria);
tableData4.value[2].scoringCriteria=`${score}分/道` tableData4.value[2].scoringCriteria = `${score}分/道`;
tableData4.value[2].completionStatus=`${time.value}` tableData4.value[2].completionStatus = `${time.value}`;
tableData4.value[2].scoreProject=item.scoreProject tableData4.value[2].scoreProject = item.scoreProject;
tableData4.value[2].scoreWeight=weight2 tableData4.value[2].scoreWeight = weight2;
tableData4.value[2].schedule=item.schedule+'%' tableData4.value[2].schedule = item.schedule + "%";
} }
if(item.learningProjects==="实训报告"){ if (item.learningProjects === "实训报告") {
tableData4.value[4].scoringCriteria=`提交实训报告,教师评分` tableData4.value[4].scoringCriteria = `提交实训报告,教师评分`;
tableData4.value[4].completionStatus=item.completionStatus tableData4.value[4].completionStatus = item.completionStatus;
if(item.scoreProject!==null){ if (item.scoreProject !== null) {
tableData4.value[4].scoreProject=item.scoreProject tableData4.value[4].scoreProject = item.scoreProject;
} }
tableData4.value[4].scoreWeight=weight2 tableData4.value[4].scoreWeight = weight2;
tableData4.value[4].schedule=item.schedule+'%' tableData4.value[4].schedule = item.schedule + "%";
} }
return { return {
...item ...item,
}; };
}); });
if(isUpdate.value){ if (isUpdate.value) {
return return;
} }
tableData.value.push(...tableData3) tableData.value.push(...tableData3);
calculateAverageScore() calculateAverageScore();
}) });
} };
const updateReportGrade=()=>{ const updateReportGrade = () => {
getReports() getReports();
cerateGrade() cerateGrade();
} };
</script>
</script> <style lang="scss" scoped>
<style lang="scss" scoped> .study_main {
.study_main { margin-top: 15px;
margin-top: 15px; width: 1443px;
width: 1443px; .study_main_up {
.study_main_up { .el-button {
.el-button { margin-right: 0px;
margin-right: 0px; height: 28px;
height: 28px; width: 125px;
width: 125px; background: #0e64fe;
background: #0E64FE; }
} .study_main_up_top {
.study_main_up_top { display: flex;
display: flex; justify-content: space-between;
justify-content: space-between; margin-bottom: 10px;
margin-bottom: 10px; .study_main_up_left {
.study_main_up_left{ align-items: center;
align-items: center; justify-content: center;
justify-content: center; display: flex;
display: flex; span {
span{ margin-left: 10px;
margin-left: 10px; }
} }
} img {
img { width: 30px !important;
width: 30px !important; height: 30px;
height: 30px; }
} }
} }
} .study_main_but {
.study_main_but { margin-top: 25px;
margin-top: 25px; .study_main_but_left {
.study_main_but_left { align-items: center;
align-items: center; display: flex;
display: flex; span {
span{ margin-left: 10px;
margin-left: 10px; }
} img {
img { width: 30px;
width: 30px; height: 30px;
height: 30px; }
} }
} .upload-demo {
.upload-demo{ margin-top: 15px;
margin-top: 15px; .el-button {
.el-button { margin-right: 0px;
margin-right: 0px; height: 30px;
height: 30px; width: 125px;
width: 125px; }
} }
} .is-underline:nth-child(1) {
.is-underline:nth-child(1){ margin-left: 26px;
margin-left: 26px; }
} .is-underline:nth-child(2) {
.is-underline:nth-child(2){ margin-left: 36px;
margin-left: 36px; }
} .study_main_but_foot {
.study_main_but_foot{ margin-top: 20px;
margin-top: 20px; }
} }
} }
}
//
// :deep(.el-table__body tr, .el-table__body td) {
:deep(.el-table__body tr, padding: 0;
.el-table__body td) { height: 40px !important;
padding: 0; border: 2px solid #8ca4ec;
height: 40px !important; }
border: 2px solid #8CA4EC;
} :deep(.el-table__body tr:nth-child(6), .el-table__body td) {
padding: 0;
height: 40px !important;
:deep(.el-table__body tr:nth-child(6), color: #ff8c01;
.el-table__body td) { }
padding: 0; ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
height: 40px !important; background: #f2f5fb;
color: #FF8C01; }
}
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td { ::v-deep .study_main_up_foot .el-table {
background: #F2F5FB; --el-table-border-color: #8ca4ec;
} }
::v-deep .study_main_up_foot .el-table { ::v-deep .study_main_but_foot .el-table {
--el-table-border-color: #8CA4EC; --el-table-border-color: #9e74ff;
} }
::v-deep .el-table__header-wrapper {
::v-deep .study_main_but_foot .el-table { background: red;
--el-table-border-color: #9E74FF; }
} .reportPromptFile {
::v-deep .el-table__header-wrapper{ font-size: 12px;
background: red; line-height: 7px;
} font-family: "微软雅黑";
.reportPromptFile{ font-weight: 300;
font-size: 12px; }
line-height: 7px; </style>
font-family: '微软雅黑';
font-weight: 300;
}
</style>

@ -1,5 +1,5 @@
<template> <template>
<el-scrollbar height="850px" always>
<div class="app-container"> <div class="app-container">
<div class="tl_top"> <div class="tl_top">
<div class="eval_top"> <div class="eval_top">
@ -26,6 +26,7 @@
</div> </div>
<hr /> <hr />
</div> </div>
<el-scrollbar height="800px" always>
<div <div
class="eval_main" class="eval_main"
v-for="(item, index) in mlist" v-for="(item, index) in mlist"
@ -153,8 +154,8 @@
</div> </div>
</div> </div>
</div> </div>
</el-scrollbar>
</div> </div>
</el-scrollbar>
</template> </template>
<script setup> <script setup>
// import { useRouter } from "vue-router"; // import { useRouter } from "vue-router";

@ -1,12 +1,7 @@
<template> <template>
<div class="content"> <div class="content app-container">
<div class="tabList"> <div class="tabList">
<div <div class="tabs" v-for="item in tabList" :key="item.id" @click="changeTab(item)">
class="tabs"
v-for="item in tabList"
:key="item.id"
@click="changeTab(item)"
>
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<img :src="item.backImg" alt="" /> <img :src="item.backImg" alt="" />
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
@ -23,16 +18,7 @@
<img src="@/assets/images/图标1.png" alt="" /> <img src="@/assets/images/图标1.png" alt="" />
<span>内置表</span> <span>内置表</span>
</div> </div>
<el-menu <el-menu default-active="1" @open="handleOpen" @close="handleClose" @select="handleChange" background-color="#041C49" style="border-right: none" active-text-color="#ffffff" text-color="#9BD1FF">
default-active="1"
@open="handleOpen"
@close="handleClose"
@select="handleChange"
background-color="#041C49"
style="border-right: none"
active-text-color="#ffffff"
text-color="#9BD1FF"
>
<el-menu-item index="1"> <el-menu-item index="1">
<span>用户属性表</span> <span>用户属性表</span>
</el-menu-item> </el-menu-item>
@ -61,30 +47,18 @@
background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`, background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`,
}" }"
> >
<el-table-column label="用户ID" align="center" prop="id"> <el-table-column label="用户ID" align="center" prop="id"></el-table-column>
</el-table-column> <el-table-column label="登录名" align="center" prop="loginName"></el-table-column>
<el-table-column label="登录名" align="center" prop="loginName"> <el-table-column label="用户姓名" align="center" prop="userName"></el-table-column>
</el-table-column> <el-table-column label="学号" align="center" prop="studentId"></el-table-column>
<el-table-column label="用户姓名" align="center" prop="userName"> <el-table-column label="班级" align="center" prop="stuClass"></el-table-column>
</el-table-column> <el-table-column label="专业" align="center" prop="major"></el-table-column>
<el-table-column label="学号" align="center" prop="studentId"> <el-table-column label="学校" align="center" prop="school"></el-table-column>
</el-table-column> <el-table-column label="角色名称" align="center" prop="roleName"></el-table-column>
<el-table-column label="班级" align="center" prop="stuClass"> <el-table-column label="角色性别" align="center" prop="roleGender"></el-table-column>
</el-table-column> <el-table-column label="角色年龄" align="center" prop="roleAge"></el-table-column>
<el-table-column label="专业" align="center" prop="major"> <el-table-column label="注册时间" align="center" prop="updateTime"></el-table-column>
</el-table-column> <el-table-column label="所在地" align="center" prop="location"></el-table-column>
<el-table-column label="学校" align="center" prop="school">
</el-table-column>
<el-table-column label="角色名称" align="center" prop="roleName">
</el-table-column>
<el-table-column label="角色性别" align="center" prop="roleGender">
</el-table-column>
<el-table-column label="角色年龄" align="center" prop="roleAge">
</el-table-column>
<el-table-column label="注册时间" align="center" prop="updateTime">
</el-table-column>
<el-table-column label="所在地" align="center" prop="location">
</el-table-column>
</el-table> </el-table>
<el-table <el-table
v-if="menuIndex == 2" v-if="menuIndex == 2"
@ -96,30 +70,18 @@
background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`, background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`,
}" }"
> >
<el-table-column label="用户ID" align="center" prop="a1"> <el-table-column label="用户ID" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="登录名" align="center" prop="a1"></el-table-column>
<el-table-column label="登录名" align="center" prop="a1"> <el-table-column label="用户姓名" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="学号" align="center" prop="a1"></el-table-column>
<el-table-column label="用户姓名" align="center" prop="a1"> <el-table-column label="班级" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="专业" align="center" prop="a1"></el-table-column>
<el-table-column label="学号" align="center" prop="a1"> <el-table-column label="学校" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="角色名称" align="center" prop="a1"></el-table-column>
<el-table-column label="班级" align="center" prop="a1"> <el-table-column label="常登录地" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="最近登录日期" align="center" prop="a1"></el-table-column>
<el-table-column label="专业" align="center" prop="a1"> <el-table-column label="登录频次" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="登录时长" align="center" prop="a1"></el-table-column>
<el-table-column label="学校" align="center" prop="a1">
</el-table-column>
<el-table-column label="角色名称" align="center" prop="a1">
</el-table-column>
<el-table-column label="常登录地" align="center" prop="a1">
</el-table-column>
<el-table-column label="最近登录日期" align="center" prop="a1">
</el-table-column>
<el-table-column label="登录频次" align="center" prop="a1">
</el-table-column>
<el-table-column label="登录时长" align="center" prop="a1">
</el-table-column>
</el-table> </el-table>
<el-table <el-table
v-if="menuIndex == 3" v-if="menuIndex == 3"
@ -131,71 +93,21 @@
background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`, background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`,
}" }"
> >
<el-table-column label="用户ID" align="center" prop="a1"> <el-table-column label="用户ID" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="登录名" align="center" prop="a1"></el-table-column>
<el-table-column label="登录名" align="center" prop="a1"> <el-table-column label="用户姓名" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="学号" align="center" prop="a1"></el-table-column>
<el-table-column label="用户姓名" align="center" prop="a1"> <el-table-column label="班级" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="专业" align="center" prop="a1"></el-table-column>
<el-table-column label="学号" align="center" prop="a1"> <el-table-column label="学校" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="角色名称" align="center" prop="a1"></el-table-column>
<el-table-column label="班级" align="center" prop="a1"> <el-table-column label="消费商品小类" align="center" prop="a1" width="110"></el-table-column>
</el-table-column> <el-table-column label="消费商品类型" align="center" prop="a1" width="110"></el-table-column>
<el-table-column label="专业" align="center" prop="a1"> <el-table-column label="累计消费金额" align="center" prop="a1" width="110"></el-table-column>
</el-table-column> <el-table-column label="累计消费次数" align="center" prop="a1" width="110"></el-table-column>
<el-table-column label="学校" align="center" prop="a1"> <el-table-column label="近七天消费金额" align="center" prop="a1" width="130"></el-table-column>
</el-table-column> <el-table-column label="近七天消费次数" align="center" prop="a1" width="130"></el-table-column>
<el-table-column label="角色名称" align="center" prop="a1"> <el-table-column label="最近消费时间" align="center" prop="a1" width="110"></el-table-column>
</el-table-column>
<el-table-column
label="消费商品小类"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="消费商品类型"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="累计消费金额"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="累计消费次数"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="近七天消费金额"
align="center"
prop="a1"
width="130"
>
</el-table-column>
<el-table-column
label="近七天消费次数"
align="center"
prop="a1"
width="130"
>
</el-table-column>
<el-table-column
label="最近消费时间"
align="center"
prop="a1"
width="110"
>
</el-table-column>
</el-table> </el-table>
<el-table <el-table
v-if="menuIndex == 4" v-if="menuIndex == 4"
@ -207,65 +119,23 @@
background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`, background: `linear-gradient(0deg, #002651 0%, #0087F9 100%)`,
}" }"
> >
<el-table-column label="用户ID" align="center" prop="a1"> <el-table-column label="用户ID" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="登录名" align="center" prop="a1"></el-table-column>
<el-table-column label="登录名" align="center" prop="a1"> <el-table-column label="用户姓名" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="学号" align="center" prop="a1"></el-table-column>
<el-table-column label="用户姓名" align="center" prop="a1"> <el-table-column label="班级" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="专业" align="center" prop="a1"></el-table-column>
<el-table-column label="学号" align="center" prop="a1"> <el-table-column label="学校" align="center" prop="a1"></el-table-column>
</el-table-column> <el-table-column label="角色名称" align="center" prop="a1"></el-table-column>
<el-table-column label="班级" align="center" prop="a1"> <el-table-column label="商品名称" align="center" prop="a1" width="110"></el-table-column>
</el-table-column> <el-table-column label="商品小类" align="center" prop="a1" width="110"></el-table-column>
<el-table-column label="专业" align="center" prop="a1"> <el-table-column label="商品类型" align="center" prop="a1" width="110"></el-table-column>
</el-table-column> <el-table-column label="用户行为类型" align="center" prop="a1" width="110"></el-table-column>
<el-table-column label="学校" align="center" prop="a1"> <el-table-column label="行为日期" align="center" prop="a1" width="130"></el-table-column>
</el-table-column>
<el-table-column label="角色名称" align="center" prop="a1">
</el-table-column>
<el-table-column
label="商品名称"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="商品小类"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="商品类型"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="用户行为类型"
align="center"
prop="a1"
width="110"
>
</el-table-column>
<el-table-column
label="行为日期"
align="center"
prop="a1"
width="130"
>
</el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<main-content <main-content v-if="menuIndex == 0" :currentComponent="currentComponent" ref="contentRef"></main-content>
v-if="menuIndex == 0"
:currentComponent="currentComponent"
ref="contentRef"
></main-content>
</div> </div>
</template> </template>
@ -363,12 +233,12 @@ const getTableData = (name) => {
.getUserTableData({ .getUserTableData({
userId: 492, userId: 492,
tableName: name, tableName: name,
size:10, size: 10,
index:1 index: 1,
}) })
.then((res) => { .then((res) => {
// fileTable.value.push(res.data.list); // fileTable.value.push(res.data.list);
fileTable.value = res.data.list fileTable.value = res.data.list;
// console.log(res,'--'); // console.log(res,'--');
}) })
.catch((error) => {}); .catch((error) => {});
@ -398,7 +268,7 @@ const submit = () => {
}; };
const retrain = () => { const retrain = () => {
contentRef.value.retrainMethod(); contentRef.value.retrainMethod();
} };
// defineExpose({ // defineExpose({
// submit, // submit,
// }); // });

@ -0,0 +1,19 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-16 09:16:26
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 09:18:05
* @FilePath: \vue3\src\views\visual-analysis\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>
<iframe src="http://118.31.7.2:96" width="100%" height="900" scrolling="no" frameborder="0"></iframe>
</div>
</template>
<script setup>
</script>
<style lang='scss' scoped>
</style>
Loading…
Cancel
Save