dev-QQq
qinzhenpen 2 years ago
parent 11237c66c3
commit 2e7bdce5ca

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

@ -330,7 +330,7 @@ import { MdEditor, MdPreview } from "md-editor-v3";
import "md-editor-v3/lib/style.css"; import "md-editor-v3/lib/style.css";
import * as API from "@/api/AI.js"; import * as API from "@/api/AI.js";
import { getUserInfo } from "@/utils/auth"; import { getUserInfo } from "@/utils/auth";
import { onMounted, reactive } from "vue"; import { onMounted, reactive, ref } from "vue";
import popModel from "@/views/components/popModal.vue"; import popModel from "@/views/components/popModal.vue";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const formData = reactive({ const formData = reactive({
@ -340,6 +340,8 @@ const formData = reactive({
value4: "", value4: "",
value5: "", value5: "",
}); });
const scrollbar=ref(null)
const loading1 =ref(false)
const task = () => { const task = () => {
if (Object.values(formData).every((item) => item == "")) { if (Object.values(formData).every((item) => item == "")) {
proxy.$modal.msgWarning("请填写完整"); proxy.$modal.msgWarning("请填写完整");
@ -562,14 +564,15 @@ const computation = () => {
return; return;
} }
if (input5.value && input6.value && input4.value) { if (input5.value && input6.value && input4.value) {
loading1.value=true loading1.value = true;
const sendData = { const sendData = {
confidence: parseFloat(input5.value) / 100, confidence: parseFloat(input5.value) / 100,
support: parseFloat(input6.value) / 100, support: parseFloat(input6.value) / 100,
userId: JSON.parse(getUserInfo()).userId, userId: JSON.parse(getUserInfo()).userId,
deduplicatedDataList: resTable2.value, deduplicatedDataList: resTable2.value,
}; };
API.associationRuleMining(sendData).then((res) => { API.associationRuleMining(sendData)
.then((res) => {
uplodFlag.value = true; uplodFlag.value = true;
tableData3.value = []; tableData3.value = [];
tableLabel2.length = 0; tableLabel2.length = 0;
@ -582,8 +585,8 @@ const computation = () => {
tableData3.value = res.data; tableData3.value = res.data;
// //
setTimeout(() => { setTimeout(() => {
loading1.value=false loading1.value = false;
},500) }, 500);
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap"); const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap");
@ -595,8 +598,9 @@ const computation = () => {
} }
}, 500); }, 500);
}); });
}).catch(()=>{ })
loading1.value=false .catch(() => {
loading1.value = false;
}); });
} else { } else {
proxy.$modal.msgWarning("请模型参数进行设置!"); proxy.$modal.msgWarning("请模型参数进行设置!");

@ -80,19 +80,18 @@
<span>重新开始</span> <span>重新开始</span>
</div> </div>
</div> </div>
</div> </div>
<div class="main-right"> <div class="main-right">
<el-scrollbar height="500px" ref="scrollbar" style="padding: 20px;"> <el-scrollbar height="500px" ref="scrollbar" style="padding: 20px">
<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="tableData2" style="width: 98%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350"> <el-table :data="tableData2" style="width: 98%; 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.prop" :prop="column.prop" :label="column.label" align="center" />
</el-table> </el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> --> <!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
</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 class="imgBtn" v-if="flagUP" @click="upLoad"></el-button> <el-button class="imgBtn" v-if="flagUP" @click="upLoad"></el-button>
<el-table :data="tableData3" v-loading="loading1" ref="exportTableRef" row-key="TSuid" style="width: 98%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350"> <el-table :data="tableData3" v-loading="loading1" ref="exportTableRef" row-key="TSuid" style="width: 98%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center" /> <el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center" />
@ -109,13 +108,7 @@
</div> </div>
<!-- </el-scrollbar> --> <!-- </el-scrollbar> -->
<el-dialog <el-dialog v-model="dialogVisible" title="实训任务提交" width="600" custom-class="dialogClass" :show-close="false">
v-model="dialogVisible"
title="实训任务提交"
width="600"
custom-class="dialogClass"
:show-close="false"
>
<template #header="{ close, titleId, titleClass }"> <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>
@ -329,6 +322,7 @@ const formInline3 = reactive({
value2: "", value2: "",
value3: "", value3: "",
}); });
const loading1 = ref(false);
const task = () => { const task = () => {
for (let key in formInline3) { for (let key in formInline3) {
if (formInline3[key] == "") { if (formInline3[key] == "") {
@ -493,7 +487,6 @@ const optionData2 = () => {
}); });
} }
}; };
// //
const computation = () => { const computation = () => {
if (tableData.value.length === 0 || input2.value == "" || input3.value == "") { if (tableData.value.length === 0 || input2.value == "" || input3.value == "") {
@ -506,7 +499,7 @@ const computation = () => {
x: [], x: [],
userId: JSON.parse(getUserInfo()).userId, userId: JSON.parse(getUserInfo()).userId,
}; };
loading1.value=true loading1.value = true;
if (input4.value === "线性回归") { if (input4.value === "线性回归") {
if (input5.value.length > 1) { if (input5.value.length > 1) {
proxy.$modal.msgError("y变量数量有误"); proxy.$modal.msgError("y变量数量有误");
@ -533,7 +526,7 @@ const computation = () => {
data.slopes = data.slopes.join(","); data.slopes = data.slopes.join(",");
tableData3.value = [data]; tableData3.value = [data];
predictionResults.value = ""; predictionResults.value = "";
loading1.value=false loading1.value = false;
}); });
} else { } else {
if (input5.value.length > 1) { if (input5.value.length > 1) {
@ -569,7 +562,7 @@ const computation = () => {
data.slope = data.slope; data.slope = data.slope;
tableData3.value = [data]; tableData3.value = [data];
predictionResults.value = ""; predictionResults.value = "";
loading1.value=true loading1.value = true;
}); });
} }
} else { } else {
@ -577,7 +570,7 @@ const computation = () => {
} }
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
loading1.value=false loading1.value = false;
const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap"); const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap");
if (scrollContainer) { if (scrollContainer) {
scrollContainer.scrollTo({ scrollContainer.scrollTo({

Loading…
Cancel
Save