From 2e7bdce5ca8737ed98ccca83113e9b4ec66ed48e Mon Sep 17 00:00:00 2001 From: qinzhenpen Date: Fri, 23 Aug 2024 09:29:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 +- .../components/associationRuleMining.vue | 78 +++++----- .../components/regressionAnalysis.vue | 139 +++++++++--------- 3 files changed, 108 insertions(+), 111 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 6d841c8..8d85d2f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -16,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://118.31.7.2:9868/", // baseURL:'http://192.168.2.16:9868/', // 超时 timeout: 100000, diff --git a/src/views/digitalMarketingAlgorithms/components/associationRuleMining.vue b/src/views/digitalMarketingAlgorithms/components/associationRuleMining.vue index e66afb8..9dd5e19 100644 --- a/src/views/digitalMarketingAlgorithms/components/associationRuleMining.vue +++ b/src/views/digitalMarketingAlgorithms/components/associationRuleMining.vue @@ -69,16 +69,16 @@ 计算 - -
-
- - 重新开始 -
+ +
+
+ + 重新开始
-
- +
+
+
分析数据: @@ -330,7 +330,7 @@ import { MdEditor, MdPreview } from "md-editor-v3"; import "md-editor-v3/lib/style.css"; import * as API from "@/api/AI.js"; import { getUserInfo } from "@/utils/auth"; -import { onMounted, reactive } from "vue"; +import { onMounted, reactive, ref } from "vue"; import popModel from "@/views/components/popModal.vue"; const { proxy } = getCurrentInstance(); const formData = reactive({ @@ -340,6 +340,8 @@ const formData = reactive({ value4: "", value5: "", }); +const scrollbar=ref(null) +const loading1 =ref(false) const task = () => { if (Object.values(formData).every((item) => item == "")) { proxy.$modal.msgWarning("请填写完整"); @@ -562,42 +564,44 @@ const computation = () => { return; } if (input5.value && input6.value && input4.value) { - loading1.value=true + loading1.value = true; const sendData = { confidence: parseFloat(input5.value) / 100, support: parseFloat(input6.value) / 100, userId: JSON.parse(getUserInfo()).userId, deduplicatedDataList: resTable2.value, }; - API.associationRuleMining(sendData).then((res) => { - uplodFlag.value = true; - tableData3.value = []; - tableLabel2.length = 0; - for (const key in res.data[0]) { - tableLabel2.push({ - label: key, - prop: key, - }); - } - tableData3.value = res.data; - //一秒后执行 - setTimeout(() => { - loading1.value=false - },500) - nextTick(() => { - setTimeout(() => { - const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap"); - if (scrollContainer) { - scrollContainer.scrollTo({ - top: scrollContainer.scrollHeight, - behavior: "smooth", // 平滑滚动 + API.associationRuleMining(sendData) + .then((res) => { + uplodFlag.value = true; + tableData3.value = []; + tableLabel2.length = 0; + for (const key in res.data[0]) { + tableLabel2.push({ + label: key, + prop: key, }); } - }, 500); - }); - }).catch(()=>{ - loading1.value=false - }); + tableData3.value = res.data; + //一秒后执行 + setTimeout(() => { + loading1.value = false; + }, 500); + nextTick(() => { + setTimeout(() => { + const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap"); + if (scrollContainer) { + scrollContainer.scrollTo({ + top: scrollContainer.scrollHeight, + behavior: "smooth", // 平滑滚动 + }); + } + }, 500); + }); + }) + .catch(() => { + loading1.value = false; + }); } else { proxy.$modal.msgWarning("请模型参数进行设置!"); } diff --git a/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue b/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue index 22d572d..1b5f73c 100644 --- a/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue +++ b/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue @@ -1,22 +1,22 @@