refactor(性能测试): 添加监控表单必填校验
This commit is contained in:
parent
bbf6281627
commit
bc74933ffc
|
@ -20,7 +20,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="Port">
|
<el-form-item label="Port" prop="port">
|
||||||
<el-input-number v-model="form.port" :min="1" :max="65535"/>
|
<el-input-number v-model="form.port" :min="1" :max="65535"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -61,7 +61,11 @@ export default {
|
||||||
result: {},
|
result: {},
|
||||||
form: {},
|
form: {},
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
rule: {},
|
rule: {
|
||||||
|
name: {required: true, message: "名称必填", trigger: 'blur'},
|
||||||
|
ip: {required: true, message: "ip必填", trigger: 'blur'},
|
||||||
|
port: {required: true, message: "port必填", trigger: 'blur'},
|
||||||
|
},
|
||||||
index: '',
|
index: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -86,23 +90,23 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.list.splice(this.index, 1, this.form);
|
this.list.splice(this.index, 1, this.form);
|
||||||
this.$emit("update:list", this.list);
|
this.$emit("update:list", this.list);
|
||||||
|
this.dialogVisible = false;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.dialogVisible = false;
|
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
this.$refs.monitorForm.validate(valid => {
|
this.$refs.monitorForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.monitorStatus = CONFIG_TYPE.NOT;
|
// this.form.monitorStatus = CONFIG_TYPE.NOT;
|
||||||
this.list.push(this.form);
|
this.list.push(this.form);
|
||||||
this.$emit("update:list", this.list);
|
this.$emit("update:list", this.list);
|
||||||
|
this.dialogVisible = false;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.dialogVisible = false;
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -173,10 +173,19 @@
|
||||||
<!-- prop="authStatus"-->
|
<!-- prop="authStatus"-->
|
||||||
<!-- label="认证状态">-->
|
<!-- label="认证状态">-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
|
<!-- <el-table-column-->
|
||||||
|
<!-- align="center"-->
|
||||||
|
<!-- prop="monitorStatus"-->
|
||||||
|
<!-- label="监控状态">-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="monitorStatus"
|
prop="ip"
|
||||||
label="监控状态">
|
label="IP">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="port"
|
||||||
|
label="Port">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
|
|
Loading…
Reference in New Issue