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

Commit bf1d3971 by 李严凡

一键打分和提交

parent ca7e43fd
......@@ -44,8 +44,8 @@
<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="submit()">提交</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-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth">
......@@ -921,7 +921,7 @@ export default {
},
addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -944,36 +944,58 @@ export default {
)
this.$message("得分应该在0~100范围内");
else {
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" });
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: "/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 () {
// let r1, r2
......
......@@ -51,8 +51,8 @@
<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" >退出</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="commentScore = true">打分并提交</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>
......@@ -803,7 +803,7 @@
addScore() {
// alert("inin");
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -826,37 +826,59 @@
)
this.$message("得分应该在0~100范围内");
else {
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" });
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.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>
......
......@@ -31,8 +31,8 @@
<!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"-->
<div class="button1">
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
<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">
......@@ -217,7 +217,7 @@ export default {
// alert("Inin")
// console.log(this.$route.params.executor.id)
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -240,31 +240,47 @@ export default {
)
this.$message("得分应该在0~100范围内");
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.$message("打分成功");
// this.$message("打分成功");
}
},
submit() {
// alert("打分成功");
// this.$router.push({ path: "/taskhall" });
// alert("inin");
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" });
}
});
},
// submit() {
// // alert("打分成功");
// // this.$router.push({ path: "/taskhall" });
// // alert("inin");
// 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" });
// }
// });
// },
},
mounted: function () {
this.insertDocument();
......
......@@ -71,8 +71,8 @@
<!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"-->
<div class="button1">
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
<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">
......@@ -273,7 +273,7 @@ export default {
// 打分
addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -296,31 +296,47 @@ export default {
)
this.$message("分数范围在0~100");
else {
this.commentScore = false;
this.$message("打分成功");
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.$message("打分成功");
}
},
submit() {
// alert("打分成功");
// this.$router.push({path: '/taskhall'});
// alert("inin");
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" });
}
});
},
// submit() {
// // alert("打分成功");
// // this.$router.push({path: '/taskhall'});
// // // alert("inin");
// // 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" });
// // }
// // });
// },
},
mounted: function () {
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