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

Commit 70e0e201 by 郭婉茹

fix bug: check the wrong person

parent 26f0cb43
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
score: "", score: "",
}, },
formLabelWidth: "120px", formLabelWidth: "120px",
executors: [],
}; };
}, },
beforeMount() { beforeMount() {
...@@ -105,21 +106,23 @@ export default { ...@@ -105,21 +106,23 @@ export default {
this.task = this.$route.params.task; this.task = this.$route.params.task;
this.relationId = this.$route.params.relationId; this.relationId = this.$route.params.relationId;
this.piece = this.$route.params.piece; this.piece = this.$route.params.piece;
this.executors = this.$route.params.executor;
}, },
methods: { methods: {
// 插入数据库 // 插入数据库
insertDocument() { insertDocument() {
// console.log("userId" + this.$store.state.userInfo.userId); // console.log("insertDocument");
// console.log("userId" + JSON.stringify(this.executors));
// console.log("file" + JSON.stringify(this.file)); // console.log("file" + JSON.stringify(this.file));
//console.log("task" + JSON.stringify(this.task)); // console.log("task" + JSON.stringify(this.task));
// console.log("relationId" + JSON.stringify(this.relationId)); // console.log("relationId" + JSON.stringify(this.relationId));
//console.log("piece" + JSON.stringify(this.piece)); // console.log("piece" + JSON.stringify(this.piece));
this.axios({ this.axios({
method: "post", method: "post",
url: "/textAnnotation/insertDocument", url: "/textAnnotation/insertDocument",
data: { data: {
templateId: this.piece.template, templateId: this.piece.template,
annotatorId: this.$store.state.userInfo.userId, annotatorId: this.executors.id,
creatorId: this.task.creator_id, creatorId: this.task.creator_id,
relationId: this.relationId, relationId: this.relationId,
textUrl: this.file.url, textUrl: this.file.url,
......
<template> <template>
<div class="select-container"> <div class="select-container">
<el-container> <el-container>
<el-aside <el-aside class="sidebar3">
class="sidebar3">
<!-- 实体列表 --> <!-- 实体列表 -->
<div class="sidebar-box3"> <div class="sidebar-box3">
<div> <div>
...@@ -93,7 +92,7 @@ ...@@ -93,7 +92,7 @@
</template> </template>
<script> <script>
import FileSaver from 'file-saver'; import FileSaver from "file-saver";
export default { export default {
data() { data() {
return { return {
...@@ -111,7 +110,7 @@ export default { ...@@ -111,7 +110,7 @@ export default {
begin: 0, begin: 0,
end: 0, end: 0,
entityId: "", entityId: "",
attribute: [] attribute: [],
}, },
token: { token: {
tokenId: "", // 编号 tokenId: "", // 编号
...@@ -119,7 +118,7 @@ export default { ...@@ -119,7 +118,7 @@ export default {
begin: 0, // row begin: 0, // row
end: 0, // 终止位置 end: 0, // 终止位置
entityId: "", // column entityId: "", // column
attribute: [] // 属性 attribute: [], // 属性
}, },
row: [], row: [],
column: {}, column: {},
...@@ -133,7 +132,7 @@ export default { ...@@ -133,7 +132,7 @@ export default {
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
}, },
//count: 1, //count: 1,
ifAlert: false, // 弹窗 ifAlert: false, // 弹窗
...@@ -143,16 +142,17 @@ export default { ...@@ -143,16 +142,17 @@ export default {
nowContent: { nowContent: {
tablename: "", tablename: "",
tableData: [], tableData: [],
name: [] name: [],
}, },
allContent: [], allContent: [],
numOfSheet: 0, numOfSheet: 0,
commentScore: false, commentScore: false,
scoreForm: { scoreForm: {
accuracy: "", accuracy: "",
score: "" score: "",
}, },
formLabelWidth: "120px", formLabelWidth: "120px",
executors: [],
}; };
}, },
beforeMount() { beforeMount() {
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
this.task = this.$route.params.task; this.task = this.$route.params.task;
this.relationId = this.$route.params.relationId; this.relationId = this.$route.params.relationId;
this.piece = this.$route.params.piece; this.piece = this.$route.params.piece;
this.executors = this.$route.params.executor;
}, },
methods: { methods: {
// 插入数据库 // 插入数据库
...@@ -171,15 +172,15 @@ export default { ...@@ -171,15 +172,15 @@ export default {
method: "post", method: "post",
url: "/textAnnotation/insertDocument", url: "/textAnnotation/insertDocument",
data: { data: {
templateId: this.piece.template, // TODO 模板id templateId: this.piece.template,
annotatorId: this.$store.state.userInfo.userId, annotatorId: this.executors.id,
creatorId: this.task.creator_id, creatorId: this.task.creator_id,
relationId: this.relationId, relationId: this.relationId,
textUrl: this.file.url, textUrl: this.file.url,
type: "xlsx", type: "xlsx",
fileId: this.file.id fileId: this.file.id,
} },
}).then(res => { }).then((res) => {
if (res.return_code == 200) { if (res.return_code == 200) {
this.documentId = res.result; this.documentId = res.result;
//console.log("this.documentId: " + this.documentId); //console.log("this.documentId: " + this.documentId);
...@@ -191,7 +192,7 @@ export default { ...@@ -191,7 +192,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error",
}); });
} }
}); });
...@@ -202,9 +203,9 @@ export default { ...@@ -202,9 +203,9 @@ export default {
method: "post", method: "post",
url: "/files/getExcelContent", url: "/files/getExcelContent",
data: { data: {
documentId: this.documentId documentId: this.documentId,
} },
}).then(res => { }).then((res) => {
if (res.return_code == 200) { if (res.return_code == 200) {
var i; var i;
var nowContent = {}; var nowContent = {};
...@@ -220,7 +221,7 @@ export default { ...@@ -220,7 +221,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error",
}); });
} }
}); });
...@@ -233,21 +234,20 @@ export default { ...@@ -233,21 +234,20 @@ export default {
method: "post", method: "post",
url: "/textAnnotation/getTokenList", url: "/textAnnotation/getTokenList",
data: { data: {
documentId: this.documentId documentId: this.documentId,
} },
}).then(res => { }).then((res) => {
if (res.return_code == 200) { if (res.return_code == 200) {
res.result.forEach(element => { res.result.forEach((element) => {
this.tokenInit = element; this.tokenInit = element;
console.log(" token: " + JSON.stringify(this.tokenInit)); console.log(" token: " + JSON.stringify(this.tokenInit));
this.tokenList.push(this.tokenInit); this.tokenList.push(this.tokenInit);
// TODO 初始渲染
}); });
console.log(" this.tokenList: " + JSON.stringify(this.tokenList)); console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error",
}); });
} }
}); });
...@@ -290,9 +290,9 @@ export default { ...@@ -290,9 +290,9 @@ export default {
parseInt(this.scoreForm.accuracy) < 0 parseInt(this.scoreForm.accuracy) < 0
) )
this.$message("准确度应在0~100范围内"); this.$message("准确度应在0~100范围内");
else if( else if (
parseInt(this.scoreForm.score) > 100 || parseInt(this.scoreForm.score) > 100 ||
parseInt(this.scoreForm.score) < 0 parseInt(this.scoreForm.score) < 0
) )
this.$message("分数范围在0~100"); this.$message("分数范围在0~100");
else { else {
...@@ -300,34 +300,31 @@ export default { ...@@ -300,34 +300,31 @@ export default {
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",
params: {
method:"get", userId: this.$route.params.executor.id,
params:{ fileId: this.file.id,
userId:this.$route.params.executor.id, scoreForm: this.scoreForm,
fileId:this.file.id, },
scoreForm:this.scoreForm url: "task/gradePieces",
}, }).then((res) => {
url:"task/gradePieces", if (res.code == 0) {
}).then(res=>{ alert("分数提交失败!");
if(res.code == 0){ } else if (res.code == 1) {
alert("分数提交失败!"); alert("打分成功");
} this.$router.push({ path: "/taskhall" });
else if(res.code == 1){ }
alert("打分成功"); });
this.$router.push({path: '/taskhall'}); },
}
})
}
}, },
mounted: function() { mounted: function () {
this.insertDocument(); this.insertDocument();
} },
}; };
</script> </script>
......
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