dev-QQq
方佳 博 2 years ago
parent 057330692a
commit 1e67bf1923

@ -16,8 +16,8 @@ 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.14:9868/', baseURL:'http://192.168.2.14:9868/',
// 超时 // 超时
timeout: 100000, timeout: 100000,
}); });

@ -50,7 +50,7 @@
<span>模型参数设置</span> <span>模型参数设置</span>
</div> </div>
<div class="metrics-table" style="margin-top: 10px"> <div class="metrics-table" style="margin-top: 10px">
<span style="font-weight: 400; font-size: 12px; color: #ffffff">聚类方法</span> <span style="font-weight: 400; font-size: 12px; color: #ffffff">回归模型</span>
<div class="metrics" style="margin-top: 10px"> <div class="metrics" style="margin-top: 10px">
<el-select v-model="input4" placeholder="请选择" style="width: 180px"> <el-select v-model="input4" placeholder="请选择" style="width: 180px">
<el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value" />
@ -343,10 +343,10 @@ const task = () => {
errorNumber=1 errorNumber=1
} }
}else if(input4.value==="Logistic逻辑回归"){ }else if(input4.value==="Logistic逻辑回归"){
if(formInline3.value1!==tableData3.value[0].intercept.toString()){ if(parseFloat(formInline3.value1)!==parseFloat(tableData3.value[0].intercept)){
errorNumber=1 errorNumber=1
} }
if(formInline3.value2!==tableData3.value[0].slope){ if(parseFloat(formInline3.value2)!==parseFloat(tableData3.value[0].slope)){
errorNumber=1 errorNumber=1
} }
if(parseFloat(formInline3.value3)!==parseFloat(predictionResults.value)){ if(parseFloat(formInline3.value3)!==parseFloat(predictionResults.value)){
@ -557,7 +557,7 @@ const computation = () => {
proxy.$modal.msgError("y变量数量有误"); proxy.$modal.msgError("y变量数量有误");
return; return;
} }
if (input6.value.length > 2) { if (input6.value.length > 1) {
proxy.$modal.msgError("x变量数量有误"); proxy.$modal.msgError("x变量数量有误");
return; return;
} }
@ -613,19 +613,19 @@ const handleClick = (item) => {
}; };
const predictionResults = ref(""); const predictionResults = ref("");
const Forecasting = () => { const Forecasting = () => {
if (nowData.value.type === "线性回归") { // if (nowData.value.type === "线") {
const sendData = { // const sendData = {
intercept: nowData.value.intercept, // intercept: nowData.value.intercept,
type: nowData.value.type, // type: nowData.value.type,
slopes: nowData.value.slopes.split(",").map(Number), // slopes: nowData.value.slopes.split(",").map(Number),
raX: formInline2.user.split(",").map(Number), // raX: formInline2.user.split(",").map(Number),
}; // };
API.logisticRegressionPrediction(sendData).then((res) => { // API.logisticRegressionPrediction(sendData).then((res) => {
dialogVisible2.value = false; // dialogVisible2.value = false;
predictionResults.value = res.data; // predictionResults.value = res.data;
}); // });
} // }
if (nowData.value.type === "逻辑回归") { // if (nowData.value.type === "") {
const sendData = { const sendData = {
intercept: nowData.value.intercept, intercept: nowData.value.intercept,
type: nowData.value.type, type: nowData.value.type,
@ -636,7 +636,7 @@ const Forecasting = () => {
dialogVisible2.value = false; dialogVisible2.value = false;
predictionResults.value = res.data; predictionResults.value = res.data;
}); });
} // }
}; };
const upLoad = () => { const upLoad = () => {
const tableDom = exportTableRef.value?.$el; const tableDom = exportTableRef.value?.$el;

Loading…
Cancel
Save