文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 0af53ad2 by 李严凡

add addScore place

parent eb8b2bfd
......@@ -42,7 +42,7 @@ export default {
name: 'login',
data () {
return {
username: '',
userName: '',
password: '',
confirm: '',
email: '',
......
......@@ -16,8 +16,21 @@
</div>
<div>
<el-button type="primary" @click="save()">保存</el-button>
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
</div>
<!-- 这部分是打分弹窗-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth" >
<el-input v-model="scoreForm.accuracy" autocomplete="off" clearable></el-input>
</el-form-item>
<el-form-item label="标注得分" :label-width="formLabelWidth">
<el-input v-model="scoreForm.score" autocomplete="off" clearable></el-input>
</el-form-item>
<el-button type="primary" @click="addScore()">确认</el-button>
</el-form>
</el-dialog>
<!-- 弹窗-->
<el-dialog title="请标注" :visible.sync="ifAlert">
<div style="overflow: auto;height: 50vh">
......@@ -163,7 +176,13 @@ export default {
label: "5.最后一个滑坡"
}
],
value: ""
value: "",
commentScore:false,
scoreForm:{
accuracy:'',
score:'',
} ,
formLabelWidth:'120px',
};
},
methods: {
......@@ -207,7 +226,23 @@ export default {
type: 'success'
});
this.$router.replace("/completed");
}
},
addScore(){
if(this.scoreForm.accuracy == '' || this.scoreForm.score == '')
this.$message("请输入内容");
else if(!(/^[0-9]+$/.test(this.scoreForm.accuracy))
&& !(/^[0-9]+$/.test(this.scoreForm.accuracy))
&& !(/^((([^0][0-9]+|0)\.([0-9]{1,2}))$)|^(([1-9]+)\.([0-9]{1,2})$)/.test(this.scoreForm.score))
&& !(/^((([^0][0-9]+|0)\.([0-9]{1,2}))$)|^(([1-9]+)\.([0-9]{1,2})$)/.test(this.scoreForm.accuracy))
)
this.$message("输入非法字符");
else if(parseInt(this.scoreForm.accuracy) > 100 || parseInt(this.scoreForm.accuracy) < 0)
this.$message("准确度应在0~100范围内");
else{
this.commentScore = false;
this.$message("打分成功") ;
}
}
}
};
</script>
......@@ -274,4 +309,4 @@ export default {
left: 250px;
top: 180px;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment