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

Commit a2ea92d3 by Wang Yuhang

Merge branch 'develop' of ssh://gitlab.redhtc.com:1422/Berlincen/DA-Platform into dev

parents 464f88ef 2f6eaa04
...@@ -33,6 +33,25 @@ ...@@ -33,6 +33,25 @@
<!-- <el-radio-button label="多边形标注"></el-radio-button>--> <!-- <el-radio-button label="多边形标注"></el-radio-button>-->
<!-- </el-radio-group>--> <!-- </el-radio-group>-->
<el-button @click="save()">保存</el-button> <el-button @click="save()">保存</el-button>
<!-- 看注释,打分按钮和提交按钮是对审核结果提交-->
<div style="overflow: auto">
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
<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>
</div>
<!-- -->
</div> </div>
</div> </div>
</el-aside> </el-aside>
...@@ -176,7 +195,12 @@ export default { ...@@ -176,7 +195,12 @@ export default {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
} },
commentScore: false,
scoreForm: {
accuracy: "",
score: ""
},
} }
}, },
async mounted () { async mounted () {
...@@ -863,7 +887,56 @@ export default { ...@@ -863,7 +887,56 @@ export default {
window.onmousemove = null window.onmousemove = null
console.log('鼠标松开了') console.log('鼠标松开了')
}, },
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 if (
parseInt(this.scoreForm.score) > 100 ||
parseInt(this.scoreForm.score) < 0
)
this.$message("得分应该在0~100范围内");
else {
this.commentScore = false;
this.$message("打分成功");
}
},
submit() {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
// alert("inin");
this.axios({
method: "get",
params: {
userId: this.$store.state.userInfo.userId,
fileId: this.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
},
// // 监听鼠标事件 // // 监听鼠标事件
// brush_Listener () { // brush_Listener () {
// let r1, r2 // let r1, r2
......
...@@ -39,6 +39,21 @@ ...@@ -39,6 +39,21 @@
<el-button @click="isInfo = false">取消</el-button> <el-button @click="isInfo = false">取消</el-button>
<el-button @click="deleteLabelInList()">删除</el-button> <el-button @click="deleteLabelInList()">删除</el-button>
</div> </div>
<div style="overflow: auto">
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
<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>
</div>
</div> </div>
</transition> </transition>
<transition name="fade"> <transition name="fade">
...@@ -682,7 +697,57 @@ ...@@ -682,7 +697,57 @@
message: '已取消删除' message: '已取消删除'
}); });
}); });
} },
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 if (
parseInt(this.scoreForm.score) > 100 ||
parseInt(this.scoreForm.score) < 0
)
this.$message("得分应该在0~100范围内");
else {
this.commentScore = false;
this.$message("打分成功");
}
},
submit() {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
// alert("inin");
this.axios({
method: "get",
params: {
userId: this.$store.state.userInfo.userId,
fileId: this.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
},
}, },
}; };
</script> </script>
......
...@@ -91,6 +91,7 @@ export default { ...@@ -91,6 +91,7 @@ export default {
children: "children", children: "children",
label: "label" label: "label"
}, },
// 这个地方是打分的数据结构
commentScore: false, commentScore: false,
scoreForm: { scoreForm: {
accuracy: "", accuracy: "",
...@@ -224,6 +225,11 @@ export default { ...@@ -224,6 +225,11 @@ export default {
parseInt(this.scoreForm.accuracy) < 0 parseInt(this.scoreForm.accuracy) < 0
) )
this.$message("准确度应在0~100范围内"); this.$message("准确度应在0~100范围内");
else if (
parseInt(this.scoreForm.score) > 100 ||
parseInt(this.scoreForm.score) < 0
)
this.$message("得分应该在0~100范围内");
else { else {
this.commentScore = false; this.commentScore = false;
this.$message("打分成功"); this.$message("打分成功");
......
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