合并分支解决测试bug

dev-QQq
qinzhenpen 2 years ago
commit 4f907e5ddc

@ -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" />
@ -344,11 +344,11 @@ 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)) {
errorNumber = 1; errorNumber = 1;
@ -475,13 +475,9 @@ const options3 = ref([
]); ]);
const input4 = ref(); const input4 = ref();
const options4 = ref([ const options4 = ref([
{
value: "线性回归",
label: "线性回归",
},
{ {
value: "Logistic逻辑回归", value: "Logistic逻辑回归",
label: "Logistic逻辑回归", label: "线性回归",
}, },
]); ]);
const input5 = ref(); const input5 = ref();
@ -563,7 +559,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;
} }
@ -619,19 +615,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,
@ -642,7 +638,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