合并分支解决测试bug

dev-QQq
qinzhenpen 2 years ago
commit 4f907e5ddc

@ -316,7 +316,7 @@ const task = () => {
if (formInline2.value2 !== input6.value) {
errorNumber = 1;
}
portraitModel
portraitModel
.submit({
userId: JSON.parse(getUserInfo()).userId,
taskName: "聚类分析",

@ -50,7 +50,7 @@
<span>模型参数设置</span>
</div>
<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">
<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" />
@ -343,12 +343,12 @@ const task = () => {
if (parseFloat(formInline3.value3) !== parseFloat(predictionResults.value)) {
errorNumber = 1;
}
} else if (input4.value === "Logistic逻辑回归") {
if (formInline3.value1 !== tableData3.value[0].intercept.toString()) {
errorNumber = 1;
}else if(input4.value==="Logistic逻辑回归"){
if(parseFloat(formInline3.value1)!==parseFloat(tableData3.value[0].intercept)){
errorNumber=1
}
if (formInline3.value2 !== tableData3.value[0].slope) {
errorNumber = 1;
if(parseFloat(formInline3.value2)!==parseFloat(tableData3.value[0].slope)){
errorNumber=1
}
if (parseFloat(formInline3.value3) !== parseFloat(predictionResults.value)) {
errorNumber = 1;
@ -475,13 +475,9 @@ const options3 = ref([
]);
const input4 = ref();
const options4 = ref([
{
value: "线性回归",
label: "线性回归",
},
{
value: "Logistic逻辑回归",
label: "Logistic逻辑回归",
label: "线性回归",
},
]);
const input5 = ref();
@ -563,7 +559,7 @@ const computation = () => {
proxy.$modal.msgError("y变量数量有误");
return;
}
if (input6.value.length > 2) {
if (input6.value.length > 1) {
proxy.$modal.msgError("x变量数量有误");
return;
}
@ -619,19 +615,19 @@ const handleClick = (item) => {
};
const predictionResults = ref("");
const Forecasting = () => {
if (nowData.value.type === "线性回归") {
const sendData = {
intercept: nowData.value.intercept,
type: nowData.value.type,
slopes: nowData.value.slopes.split(",").map(Number),
raX: formInline2.user.split(",").map(Number),
};
API.logisticRegressionPrediction(sendData).then((res) => {
dialogVisible2.value = false;
predictionResults.value = res.data;
});
}
if (nowData.value.type === "逻辑回归") {
// if (nowData.value.type === "线") {
// const sendData = {
// intercept: nowData.value.intercept,
// type: nowData.value.type,
// slopes: nowData.value.slopes.split(",").map(Number),
// raX: formInline2.user.split(",").map(Number),
// };
// API.logisticRegressionPrediction(sendData).then((res) => {
// dialogVisible2.value = false;
// predictionResults.value = res.data;
// });
// }
// if (nowData.value.type === "") {
const sendData = {
intercept: nowData.value.intercept,
type: nowData.value.type,
@ -642,7 +638,7 @@ const Forecasting = () => {
dialogVisible2.value = false;
predictionResults.value = res.data;
});
}
// }
};
const upLoad = () => {
const tableDom = exportTableRef.value?.$el;

Loading…
Cancel
Save