fix/non-blocking-route-navigation
qinzhenpen 2 years ago
parent 73b97c4295
commit 620a561f7d

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

@ -1,3 +1,11 @@
###
# @Author: qinzhenpen qzp1807@126.com
# @Date: 2024-08-27 10:39:50
# @LastEditors: qinzhenpen qzp1807@126.com
# @LastEditTime: 2024-08-28 17:15:51
# @FilePath: \digital-marketing\.env.production
# @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
###
# 页面标题
VITE_APP_TITLE = 数字营销实训系统
@ -5,7 +13,7 @@ VITE_APP_TITLE = 数字营销实训系统
VITE_APP_ENV = 'production'
# 若依管理系统/生产环境
VITE_APP_BASE_API = 'http://118.31.7.2:9868'
VITE_APP_BASE_API = 'http://120.79.54.255:9868'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

Binary file not shown.

@ -1,3 +1,11 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-28 14:21:24
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-29 08:57:36
* @FilePath: \digital-marketing\src\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<router-view />
</template>
@ -5,11 +13,16 @@
<script setup>
import useSettingsStore from "@/store/modules/settings";
import { handleThemeStyle } from "@/utils/theme";
import cache from "@/plugins/cache";
import { removeUserInfo, removeToken } from "@/utils/auth.js";
onMounted(() => {
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme);
});
if (cache.session.getJSON("sessionObj") === undefined) {
removeToken();
removeUserInfo();
}
});
</script>

@ -1,7 +1,16 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-28 17:09:02
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-28 18:37:43
* @FilePath: \digital-marketing\src\components\video\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="el-Aitools">
<div class="video-title">{{ videlinfo.resourcesName }}</div>
<video-player class="video-player" :options="playerOptions" :volume="0.6" @mounted="handleMounted" @ready="handleEvent($event)" @play="handleEvent($event)" @pause="handleEvent($event)" @ended="handleEvent($event)" @loadeddata="handleEvent($event)" @waiting="handleEvent($event)" @playing="handleEvent($event)" @canplay="handleEvent($event)" @canplaythrough="handleEvent($event)" @timeupdate="handleEvent(player?.currentTime())" />
<video-player v-if="playerOptions.sources[0].src" class="video-player" :options="playerOptions"
:volume="0.6" @mounted="handleMounted" @ready="handleEvent($event)" @play="handleEvent($event)" @pause="handleEvent($event)" @ended="handleEvent($event)" @loadeddata="handleEvent($event)" @waiting="handleEvent($event)" @playing="handleEvent($event)" @canplay="handleEvent($event)" @canplaythrough="handleEvent($event)" @timeupdate="handleEvent(player?.currentTime())" />
</div>
</template>
@ -11,11 +20,11 @@ import useAlgorithmStore from "@/store/modules/algorithm.js";
const algorithmStore = useAlgorithmStore();
import { VideoPlayer } from "@videojs-player/vue";
import "video.js/dist/video-js.css";
import { onMounted } from "vue";
import { nextTick, onMounted } from "vue";
const router = useRouter();
const player = shallowRef();
const videlinfo = ref({});
const videoSrc = ref("https://szjj.sztzjy.com:99/uploadFile/2024/2/26/3ef371decafa4bcc84c181dea4a0797f.mp4");
const videoSrc = ref("");
const playerOptions = ref({
playbackRates: [0.7, 1.0, 1.5, 2.0],
sources: [
@ -24,7 +33,7 @@ const playerOptions = ref({
src: videoSrc.value,
},
],
height: 600,
height: 750,
autoplay: "any",
muted: true,
loop: false,
@ -51,8 +60,12 @@ const handleEvent = (log) => {
// console.log("Basic player event", log);
};
onMounted(() => {
videlinfo.value = cache.session.getJSON("video_history")
videlinfo.value.resourcesName = videlinfo.value.resourcesName.replace(/.mp4/g, "")
videlinfo.value = cache.session.getJSON("video_history");
videlinfo.value.resourcesName = videlinfo.value.resourcesName.replace(/.mp4/g, "");
videoSrc.value = `http://120.79.54.255:8042/file${videlinfo.value.resourcesUrl}`;
nextTick(() => {
playerOptions.value.sources[0].src = videoSrc.value;
});
});
</script>
<style scoped lang="scss">
@ -77,6 +90,10 @@ onMounted(() => {
border: none;
transform: translate(-50%, -50%);
border-radius: 4px;
transition: all 0.3s ease-in-out;
&:hover {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
}
}
</style>

@ -1,4 +1,3 @@
import axios from "axios";
import { ElNotification, ElMessageBox, ElMessage, ElLoading } from "element-plus";
import { getToken } from "@/utils/auth";
@ -17,7 +16,7 @@ axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
// baseURL: import.meta.env.VITE_APP_BASE_API,
baseURL: "http://118.31.7.2:9868/",
baseURL: "http://120.79.54.255:9868/",
// baseURL:'http://192.168.2.14:9868/',
// 超时
timeout: 100000,
@ -46,6 +45,10 @@ service.interceptors.request.use(
time: new Date().getTime(),
};
const sessionObj = cache.session.getJSON("sessionObj");
if (sessionObj === undefined || sessionObj === null || sessionObj === "") {
cache.session.setJSON("sessionObj", requestObj);
} else {
}
}
return config;
},

@ -128,7 +128,7 @@ const sendText = async () => {
const messageId = Date.now();
const newMessage = reactive({ id: messageId, type: "ai-main", displayContent: "" });
messages.push(newMessage);
const resp = await fetch("http://118.31.7.2:9868/api/bigModule/createArticleByAi", {
const resp = await fetch("http://120.79.54.255:9868/api/bigModule/createArticleByAi", {
method: "POST",
headers: {
"Content-Type": "application/json",

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

@ -2,7 +2,7 @@
<!-- <el-scrollbar ref="scrollbar" height="800px"> -->
<div class="main-top">
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
<p style="font-weight: 400; font-size: 12px; color: #e2e7ee !important">使用“购物车数据”,对所购商品进行购物篮分析(关联规则挖掘),其中min_support = 0.4,
<p style="font-weight: 400; font-size: 15px; color: #e2e7ee !important">使用“购物车数据”,对所购商品进行购物篮分析(关联规则挖掘),其中min_support = 0.4,
min_confidence = 0.5,最后将运行结果提交实训任务。</p>
</div>
<div class="main-but">

@ -27,14 +27,16 @@
</div>
</div>
<div class="main-right">
<el-scrollbar height="740px" style="padding: 20px">
<el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
<el-table-column v-for="column in tableLabel" :key="column" :prop="column.prop" :label="column.label" align="center">
<el-table-column v-for="column in tableLabel" :key="column" :prop="column" :label="column" align="center">
<template #default="{ row }">
{{ formatDate(row[column.prop]) ?? "..." }}
{{ formatDate(row[column]) ?? "..." }}
</template>
</el-table-column>
</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" />
</el-scrollbar>
</div>
</div>
</template>
@ -46,14 +48,16 @@ import useUserStore from "@/store/modules/user";
import useAlgorithmStore from "@/store/modules/algorithm.js";
const { proxy } = getCurrentInstance();
import { getUserInfo } from "@/utils/auth";
import { warn } from "vue";
const userInfo = JSON.parse(getUserInfo());
const loading = ref(false);
const fileData = ref(null);
const scrollbarHeight = ref(0);
const algorithmStore = useAlgorithmStore();
// 数据表query
const n_dataTableQuery = ref({
index: 1,
size: 7,
size: 15,
tableName: "",
userId: userInfo.userId,
});
@ -62,42 +66,19 @@ const nzIndex = ref(0);
const nzData = ref([]);
const zjIndex = ref(-1);
const zjData = ref([]);
const tableLabel = ref([
{ prop: "id", label: "ID" },
{ prop: "age", label: "年龄" },
{ prop: "annualIncome", label: "年收入" },
{ prop: "spendingScore", label: "消费水平" },
]);
const tableLabel3 = ref([
{ prop: "id", label: "ID" },
{ prop: "content", label: "评论内容" },
{ prop: "creationTime", label: "评论时间" },
{ prop: "nickName", label: "昵称" },
{ prop: "referenceName", label: "评论对象" },
{ prop: "contentType", label: "评论类型" },
]);
const tableLabel4 = ref([
{ prop: "id", label: "ID" },
{ prop: "salesVolume", label: "销售量" },
{ prop: "salesForehead", label: "销售额" },
]);
const tableLabel5 = ref([
{ prop: "id", label: "ID" },
{ prop: "consumerGoods", label: "消费商品" },
]);
const tableLabel = ref([]);
const tableLabel2 = ref([]);
const arrhander = ref([]);
const arrhanderkey = ref([]);
const arrMap = {
客户细分数据表: tableLabel.value,
销售预测数据表: tableLabel4.value,
购物车数据表: tableLabel5.value,
用户评论表: tableLabel3.value,
};
// const arrMap = {
// 客户细分数据表: tableLabel.value,
// 销售预测数据表: tableLabel4.value,
// 购物车数据表: tableLabel5.value,
// 用户评论表: tableLabel3.value,
// };
const goNZ = (index, item) => {
nzIndex.value = index;
tableLabel.value = arrMap[item];
// tableLabel.value = arrMap[item];
n_dataTableQuery.value.tableName = item;
delete n_dataTableQuery.value.selfTableName;
getSurface();
@ -125,6 +106,7 @@ const getSurface = () => {
portraitModel
.getUserTableData(n_dataTableQuery.value)
.then((res) => {
tableLabel.value = Object.keys(res?.data?.list[0]);
tableData.value = res?.data?.list;
datatotal.value = res?.data?.total;
tableLabel2.value = [];
@ -137,7 +119,7 @@ const getSurface = () => {
label: item,
});
});
tableLabel.value = tableLabel2.value;
tableLabel.value = arrhanderkey.value;
}
setTimeout(() => {
loading.value = false;
@ -172,6 +154,7 @@ const importData = (e) => {
const selectZJ = (item) => {
portraitModel.getUserTableInfo({ userId: userInfo.userId }).then((res) => {
nzData.value = res.data.tableNames;
console.log(tableLabel.value, " tableLabel.value");
n_dataTableQuery.value.tableName = nzData.value[0];
getSurface();
algorithmStore.userDataLabel = [...res?.data.tableNames, ...res.data.selfBuiltTable].filter((item) => item !== "用户评论表");
@ -191,13 +174,12 @@ onMounted(() => {
<style lang="scss" scoped>
.app-main {
// background-color: #f5f5f5;
margin: 20px 20px 0;
height: calc(100vh - 150px);
display: flex;
overflow: auto;
// width: 100%;
.main-left {
width: 205px;
width: 12.3rem;
height: 100%;
background: #041c49;
.left-top {
@ -273,12 +255,9 @@ onMounted(() => {
}
}
.main-right {
width: 1639px;
width: calc(100% - 12.3rem);
height: 100%;
padding: 20px;
// background: #001D40;
border: 1px solid #0452c6;
// opacity: 0.5;
}
}
:deep(.el-table__header) {
@ -294,4 +273,8 @@ onMounted(() => {
color: #e6e6e6;
}
}
:deep(.pagination-container .el-pagination) {
// 去除定位
position: static;
}
</style>

@ -2,7 +2,7 @@
<!-- <el-scrollbar ref="scrollbar" height="800px"> -->
<div class="main-top">
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
<p style="font-weight: 400; font-size: 12px; color: #e6e6e6">使用“客户细分数据”,对客户进行聚类分析,并提交实训任务。</p>
<p style="font-weight: 400; font-size: 15px; color: #e6e6e6">使用“客户细分数据”,对客户进行聚类分析,并提交实训任务。</p>
</div>
<div class="main-but">
<el-button @click="algorithmicKnowledge()">

@ -2,7 +2,7 @@
<!-- <el-scrollbar ref="scrollbar" height="800px"> -->
<div class="main-top">
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
<p style="font-weight: 400; font-size: 12px; color: #e6e6e6">使用“销售预测数据”,建立回归模型,并预测销量是84610下的销售额,最后提交实训任务。</p>
<p style="font-weight: 400; font-size: 15px; color: #e6e6e6">使用“销售预测数据”,建立回归模型,并预测销量是84610下的销售额,最后提交实训任务。</p>
</div>
<div class="main-but">
<el-button @click="runResultShow = true">

@ -476,7 +476,7 @@ const uploadReport = async (id) => {
if (!id) {
return;
}
window.open(`http://118.31.7.2:9868/api/stu/concept/block/download?TOKEN=${"Bearer " + getToken()}&id=${id}`);
window.open(`http://120.79.54.255:9868/api/stu/concept/block/download?TOKEN=${"Bearer " + getToken()}&id=${id}`);
// 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}`)
// 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}`)
};

@ -3,15 +3,15 @@
<el-scrollbar :height="height + 'px'" always style="padding-right: 15px">
<div class="main">
<el-row :gutter="40">
<el-col :span="3" v-for="i in item" :key="i">
<el-col :span="3" v-for="i in item" :key="i" @click="showResource(i)">
<div class="zs">
<div class="el_top">
<a target="_blank" @click="showResource(i.resourcesUrl)">
<a target="_blank">
<span>{{ i.resourcesName }}</span>
</a>
</div>
<div class="el_bon">
<a target="_blank" @click="showResource(i)">
<a target="_blank">
<img data-src="https://jrdsj.sztzjy.com:598/assets/%E5%AD%A6%E4%B9%A0%E8%B5%84%E6%BA%90-1.a6a80357.png" :src="getImg(i.resourcesImg)" />
</a>
</div>
@ -51,8 +51,10 @@ onMounted(() => {
});
const showResource = async (i) => {
await cache.session.set("video_history", JSON.stringify(i));
setTimeout(() => {
window.open("/video", "_blank");
cache.session.set('video_history',JSON.stringify(i))
}, 300);
// const newWindow=window.open(`http://192.168.2.4:8800/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
// window.open(`http://qkljr.sztzjy.com:90/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
// if (i.includes("mp4")) {

@ -1,5 +1,5 @@
<template>
<div class="login" v-loading="loading">
<div class="login" v-loading="loadpage">
<div class="login-main">
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">数字营销</h3>
@ -47,32 +47,34 @@ const loginForm = ref({
username: "",
password: "",
rememberMe: false,
code: "",
uuid: "",
TOKEN: "",
});
const loginRules = {
username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
};
const codeUrl = ref("");
const loading = ref(false);
const loadpage = ref(false);
// 验证码开关
const captchaEnabled = ref(true);
// 注册开关
const register = ref(false);
const redirect = ref(undefined);
watch(
route,
(newRoute) => {
redirect.value = newRoute.query && newRoute.query.redirect;
if (newRoute.query.token) {
loadpage.value = true;
setTimeout(() => {
loginForm.value.TOKEN = newRoute.query.token;
return handleLogin();
}, 1000);
}
},
{ immediate: true }
);
function handleLogin() {
// proxy.$refs.loginRef.validate(valid => {
// if (valid) {
@ -100,29 +102,19 @@ function handleLogin() {
router.push({ path: redirect.value || "/index" });
if (params.token) {
setTimeout(() => {
loadpage.value = false;
loading.value = false;
}, 3000);
} else {
loadpage.value = false;
loading.value = false;
}
})
.catch(() => {
loadpage.value = false;
loading.value = false;
});
// }
// });
}
// function getCode() {
// getCodeImg().then(res => {
// captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
// if (captchaEnabled.value) {
// codeUrl.value = "data:image/gif;base64," + res.img;
// loginForm.value.uuid = res.uuid;
// }
// });
// }
function getCookie() {
const username = Cookies.get("username");
const password = Cookies.get("password");
@ -133,7 +125,6 @@ function getCookie() {
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
};
}
// getCode();
getCookie();
</script>

@ -2,7 +2,7 @@
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-16 09:16:26
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-27 10:15:10
* @LastEditTime: 2024-08-28 17:51:46
* @FilePath: \vue3\src\views\visual-analysis\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

Loading…
Cancel
Save