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

Commit bf1d3971 by 李严凡

一键打分和提交

parent ca7e43fd
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<el-col span="14" v-if="this.$route.params.operationSign == 1"> <el-col span="14" v-if="this.$route.params.operationSign == 1">
<!-- 看注释,打分按钮和提交按钮是对审核结果提交--> <!-- 看注释,打分按钮和提交按钮是对审核结果提交-->
<el-button style="font-size: 12px;padding: 10px 20px;" @click="commentScore = true">打分</el-button> <el-button style="font-size: 12px;padding: 10px 20px;" @click="commentScore = true">打分并提交</el-button>
<el-button style="font-size: 12px;padding: 10px 20px;" @click="submit()">提交</el-button> <!-- <el-button style="font-size: 12px;padding: 10px 20px;" @click="submit()">提交</el-button>-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px"> <el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm"> <el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth"> <el-form-item label="标注准确率" :label-width="formLabelWidth">
...@@ -921,7 +921,7 @@ export default { ...@@ -921,7 +921,7 @@ export default {
}, },
addScore() { addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "") if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容"); this.$message("请输入标注准确度和得分");
else if ( else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
...@@ -944,36 +944,58 @@ export default { ...@@ -944,36 +944,58 @@ export default {
) )
this.$message("得分应该在0~100范围内"); this.$message("得分应该在0~100范围内");
else { else {
this.commentScore = false; if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
this.$message("打分成功"); alert("请打分和填写准确率");
} return;
},
submit() {
// alert("打分成功");
console.log(this.$route.params)
if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
alert("请打分和填写准确率");
return;
}
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.$route.params.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
// console.log(res);
// console.log("dafennjg");
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
} }
}); this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.$route.params.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
// console.log(res);
// console.log("dafennjg");
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/check" });
}
});
// this.commentScore = false;
// this.$message("打分成功");
}
}, },
// submit() {
// // alert("打分成功");
// console.log(this.$route.params)
// if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
// alert("请打分和填写准确率");
// return;
// }
// this.axios({
// method: "get",
// params: {
// userId: this.$route.params.executor.id,
// fileId: this.$route.params.file.id,
// scoreForm: this.scoreForm
// },
// url: "task/gradePieces"
// }).then(res => {
// // console.log(res);
// // console.log("dafennjg");
// 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
......
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
<div style="text-align:left;margin-left: 10px ; line-height: 30px;vertical-align: middle" id="start"> <div style="text-align:left;margin-left: 10px ; line-height: 30px;vertical-align: middle" id="start">
<!-- <el-button style="font-size: 12px;padding: 10px 20px;" class="tool-button" type="primary" @click="save()" >保存</el-button> --> <!-- <el-button style="font-size: 12px;padding: 10px 20px;" class="tool-button" type="primary" @click="save()" >保存</el-button> -->
<!-- <el-button style="font-size: 12px;padding: 10px 20px;" class="tool-button" type="primary" >退出</el-button> --> <!-- <el-button style="font-size: 12px;padding: 10px 20px;" class="tool-button" type="primary" >退出</el-button> -->
<el-button style="font-size: 12px;padding: 10px 20px;" v-if="this.$route.params.operationSign == 1" @click="commentScore = true">打分</el-button> <el-button style="font-size: 12px;padding: 10px 20px;" v-if="this.$route.params.operationSign == 1" @click="commentScore = true">打分并提交</el-button>
<el-button style="font-size: 12px;padding: 10px 20px;" v-if="this.$route.params.operationSign == 1" @click="submit()">提交</el-button> <!-- <el-button style="font-size: 12px;padding: 10px 20px;" v-if="this.$route.params.operationSign == 1" @click="submit()">提交</el-button>-->
</div> </div>
</div> </div>
</div> </div>
...@@ -803,7 +803,7 @@ ...@@ -803,7 +803,7 @@
addScore() { addScore() {
// alert("inin"); // alert("inin");
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "") if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容"); this.$message("请输入标注准确度和得分");
else if ( else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
...@@ -826,37 +826,59 @@ ...@@ -826,37 +826,59 @@
) )
this.$message("得分应该在0~100范围内"); this.$message("得分应该在0~100范围内");
else { else {
this.commentScore = false; if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
this.$message("打分成功"); alert("请打分和填写准确率");
} return;
},
submit() {
// alert("打分成功");
// console.log("route:")
// console.log(this.$route.params.executor.id)
if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
alert("请打分和填写准确率");
return;
}
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.$route.params.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
// console.log(res);
// console.log("dafennjg");
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
} }
}); this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.$route.params.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
// console.log(res);
// console.log("dafennjg");
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
// this.commentScore = false;
// this.$message("打分成功");
}
}, },
// submit() {
// // alert("打分成功");
// // console.log("route:")
// // console.log(this.$route.params.executor.id)
// if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
// alert("请打分和填写准确率");
// return;
// }
// this.axios({
// method: "get",
// params: {
// userId: this.$route.params.executor.id,
// fileId: this.$route.params.file.id,
// scoreForm: this.scoreForm
// },
// url: "task/gradePieces"
// }).then(res => {
// // console.log(res);
// // console.log("dafennjg");
// if (res.code == 0) {
// alert("分数提交失败!");
// } else if (res.code == 1) {
// alert("打分成功");
// this.$router.push({ path: "/taskhall" });
// }
// });
// },
}, },
}; };
</script> </script>
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<!-- 打分 --> <!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"--> <!--div v-if="this.$route.query.isCheck == '1'"-->
<div class="button1"> <div class="button1">
<el-button type="primary" @click="commentScore = true">打分</el-button> <el-button type="primary" @click="commentScore = true">打分并提交结果</el-button>
<el-button type="primary" @click="submit()">提交</el-button> <!-- <el-button type="primary" @click="submit()">提交</el-button>-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px"> <el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm"> <el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth"> <el-form-item label="标注准确率" :label-width="formLabelWidth">
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
// alert("Inin") // alert("Inin")
// console.log(this.$route.params.executor.id) // console.log(this.$route.params.executor.id)
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "") if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容"); this.$message("请输入标注准确度和得分");
else if ( else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
...@@ -240,31 +240,47 @@ export default { ...@@ -240,31 +240,47 @@ export default {
) )
this.$message("得分应该在0~100范围内"); this.$message("得分应该在0~100范围内");
else { else {
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
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" });
}
});
this.commentScore = false; this.commentScore = false;
this.$message("打分成功"); // this.$message("打分成功");
} }
}, },
submit() { // submit() {
// alert("打分成功"); // // alert("打分成功");
// this.$router.push({ path: "/taskhall" }); // // this.$router.push({ path: "/taskhall" });
// alert("inin"); // // alert("inin");
this.axios({ // this.axios({
method: "get", // method: "get",
params: { // params: {
userId: this.$route.params.executor.id, // userId: this.$route.params.executor.id,
fileId: this.file.id, // fileId: this.file.id,
scoreForm: this.scoreForm, // scoreForm: this.scoreForm,
}, // },
url: "task/gradePieces", // url: "task/gradePieces",
}).then((res) => { // }).then((res) => {
if (res.code == 0) { // if (res.code == 0) {
alert("分数提交失败!"); // alert("分数提交失败!");
} else if (res.code == 1) { // } else if (res.code == 1) {
alert("打分成功"); // alert("打分成功");
this.$router.push({ path: "/taskhall" }); // this.$router.push({ path: "/taskhall" });
} // }
}); // });
}, // },
}, },
mounted: function () { mounted: function () {
this.insertDocument(); this.insertDocument();
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
<!-- 打分 --> <!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"--> <!--div v-if="this.$route.query.isCheck == '1'"-->
<div class="button1"> <div class="button1">
<el-button type="primary" @click="commentScore = true">打分</el-button> <el-button type="primary" @click="commentScore = true">打分并提交</el-button>
<el-button type="primary" @click="submit()">提交</el-button> <!-- <el-button type="primary" @click="submit()">提交</el-button>-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px"> <el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm"> <el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth"> <el-form-item label="标注准确率" :label-width="formLabelWidth">
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
// 打分 // 打分
addScore() { addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "") if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容"); this.$message("请输入标注准确度和得分");
else if ( else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) && !/^[0-9]+$/.test(this.scoreForm.accuracy) &&
...@@ -296,31 +296,47 @@ export default { ...@@ -296,31 +296,47 @@ export default {
) )
this.$message("分数范围在0~100"); this.$message("分数范围在0~100");
else { else {
this.commentScore = false; this.axios({
this.$message("打分成功"); method: "get",
params: {
userId: this.$route.params.executor.id,
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" });
}
});
// this.commentScore = false;
// this.$message("打分成功");
} }
}, },
submit() { // submit() {
// alert("打分成功"); // // alert("打分成功");
// this.$router.push({path: '/taskhall'}); // // this.$router.push({path: '/taskhall'});
// alert("inin"); // // // alert("inin");
this.axios({ // // this.axios({
method: "get", // // method: "get",
params: { // // params: {
userId: this.$route.params.executor.id, // // userId: this.$route.params.executor.id,
fileId: this.file.id, // // fileId: this.file.id,
scoreForm: this.scoreForm, // // scoreForm: this.scoreForm,
}, // // },
url: "task/gradePieces", // // url: "task/gradePieces",
}).then((res) => { // // }).then((res) => {
if (res.code == 0) { // // if (res.code == 0) {
alert("分数提交失败!"); // // alert("分数提交失败!");
} else if (res.code == 1) { // // } else if (res.code == 1) {
alert("打分成功"); // // alert("打分成功");
this.$router.push({ path: "/taskhall" }); // // this.$router.push({ path: "/taskhall" });
} // // }
}); // // });
}, // },
}, },
mounted: function () { mounted: function () {
this.insertDocument(); this.insertDocument();
......
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