分析数据:
@@ -89,7 +89,7 @@
分析结果:
下载
-
+
@@ -344,6 +344,8 @@ const task=()=>{
dialogVisible.value = false
proxy.$modal.msgSuccess("提交完成!");
}
+const scrollbar = ref(null);
+const loading1=ref(false)
const dialogVisible = ref(false);
const runResultShow = ref(false);
const tableLabel = reactive([{ prop: "date", label: "" }]);
@@ -550,6 +552,7 @@ const computation = () => {
return;
}
if (input5.value && input6.value && input4.value) {
+ loading1.value=true
const sendData = {
confidence: parseFloat(input5.value) / 100,
support: parseFloat(input6.value) / 100,
@@ -567,6 +570,23 @@ const computation = () => {
});
}
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/clusterAnalysis.vue b/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue
index 3330e6c..735b2d5 100644
--- a/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue
+++ b/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue
@@ -28,7 +28,7 @@
-
+
@@ -82,7 +82,7 @@
分析数据:
-
+
@@ -90,7 +90,7 @@
分析结果:
下载
-
+
@@ -282,6 +282,9 @@ import JSZip from "jszip";
import * as API from "@/api/AI.js";
import { getUserInfo } from "@/utils/auth";
import { onMounted, reactive } from "vue";
+const loading1=ref(false)
+const loading2=ref(false)
+const loading3=ref(false)
const runResultShow = ref(false);
const { proxy } = getCurrentInstance();
const dialogVisible = ref(false);
@@ -379,7 +382,7 @@ onMounted(() => {
{
type: "scatter",
encode: { tooltip: [0, 1] },
- symbolSize: 15,
+ symbolSize: 8,
itemStyle: {
borderColor: "#555",
},
@@ -393,6 +396,7 @@ onMounted(() => {
});
const optionData=()=>{
+ loading1.value=true
API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'聚类分析'}).then((res)=>{
tableData.value=[]
input3.value=''
@@ -401,6 +405,9 @@ onMounted(() => {
text:element
})
})
+ loading1.value=false
+ }).catch(()=>{
+ loading1.value=false
})
}
const selectedRows = ref([]);
@@ -491,11 +498,17 @@ const optionData2 = () => {
method: input3.value,
userId: JSON.parse(getUserInfo()).userId,
});
+ loading2.value=true
API.dataPreprocessing(sendData.value).then((res) => {
resTable2.value = res.data;
tableData2.value = [];
tableData2.value = res.data;
proxy.$modal.msgSuccess("预处理成功!");
+ setTimeout(() => {
+ loading1.value=false
+ },500)
+ }).catch(()=>{
+ loading2.value=false
});
}
};
@@ -509,6 +522,7 @@ const computation = () => {
return;
}
if (input5.value && input6.value && input4.value) {
+ loading3.value=true
const sendData = {
k: input5.value,
t: input6.value,
@@ -571,7 +585,12 @@ const computation = () => {
Object.keys(res.data.centroid).forEach((key) => {
addData(myChart2, res.data.centroid[key], "red");
});
+ setTimeout(() => {
+ loading1.value=false
+ },500)
});
+ }).catch(()=>{
+ loading3.value=false
});
nextTick(() => {
setTimeout(() => {
diff --git a/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue b/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue
index edd79e2..18bc42e 100644
--- a/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue
+++ b/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue
@@ -86,7 +86,7 @@
分析数据:
-
+
@@ -94,7 +94,7 @@
分析结果:
下载
-
+
@@ -331,6 +331,7 @@ const task=()=>{
dialogVisible.value = false
proxy.$modal.msgSuccess("提交完成!");
}
+const loading1=ref(false)
const dialogVisible2 = ref(false);
const flagColumn = ref(false);
const runResultShow = ref(false);
@@ -380,6 +381,7 @@ const handleSelectionChange = (selection) => {
};
const tableData2 = ref([]);
const tableData3 = ref([]);
+const scrollbar = ref(null);
const resTable2 = ref();
const taskZB = () => {
flag.value = true;
@@ -489,6 +491,7 @@ const computation = () => {
x: [],
userId: JSON.parse(getUserInfo()).userId,
};
+ loading1.value=true
if (input4.value === "线性回归") {
if (input5.value.length > 1) {
proxy.$modal.msgError("y变量数量有误!");
@@ -515,6 +518,7 @@ const computation = () => {
data.slopes = data.slopes.join(",");
tableData3.value = [data];
predictionResults.value = "";
+ loading1.value=false
});
} else {
if (input5.value.length > 1) {
@@ -550,11 +554,24 @@ const computation = () => {
data.slope = data.slope;
tableData3.value = [data];
predictionResults.value = "";
+ loading1.value=true
});
}
} else {
proxy.$modal.msgWarning("请模型参数进行设置!");
}
+ nextTick(() => {
+ setTimeout(() => {
+ loading1.value=false
+ const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap");
+ if (scrollContainer) {
+ scrollContainer.scrollTo({
+ top: scrollContainer.scrollHeight,
+ behavior: "smooth", // 平滑滚动
+ });
+ }
+ }, 500);
+ });
flagUP.value = true;
};
const nowData = ref([]);