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

Commit 21d50a7b by 郭婉茹

button位置

parent a501383c
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
<el-main class="filter-container1" style="background-color: #FFFFFF"> <el-main class="filter-container1" style="background-color: #FFFFFF">
<div style="overflow-y:auto;height:100%;"> <div style="overflow-y:auto;height:100%;">
<div class="content1" @mouseup="select()" v-html="content"></div> <div class="content1" @mouseup="select()" v-html="content"></div>
<br />
<div> <div>
<el-button class="button1" type="primary" @click="submit()">提交</el-button> <el-button class="button1" type="primary" @click="submit()">提交</el-button>
</div> </div>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</template> </template>
<script> <script>
import FileSaver from 'file-saver'; import FileSaver from "file-saver";
export default { export default {
data() { data() {
return { return {
...@@ -62,7 +62,6 @@ export default { ...@@ -62,7 +62,6 @@ export default {
// 任务 // 任务
task: null, task: null,
// 文章内容 // 文章内容
contentWithoutColor: "",
content: "", content: "",
//实体属性 //实体属性
tokenInit: { tokenInit: {
...@@ -71,7 +70,7 @@ export default { ...@@ -71,7 +70,7 @@ export default {
begin: 0, begin: 0,
end: 0, end: 0,
entityId: "", entityId: "",
attribute: [] attribute: [],
}, },
token: { token: {
tokenId: "", tokenId: "",
...@@ -79,7 +78,7 @@ export default { ...@@ -79,7 +78,7 @@ export default {
begin: 0, begin: 0,
end: 0, end: 0,
entityId: "", entityId: "",
attribute: [] attribute: [],
}, },
// 实体属性列表 // 实体属性列表
tokenList: [], tokenList: [],
...@@ -89,15 +88,15 @@ export default { ...@@ -89,15 +88,15 @@ export default {
treeData: [], treeData: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
}, },
// 这个地方是打分的数据结构 // 这个地方是打分的数据结构
commentScore: false, commentScore: false,
scoreForm: { scoreForm: {
accuracy: "", accuracy: "",
score: "" score: "",
}, },
formLabelWidth: "120px" formLabelWidth: "120px",
}; };
}, },
beforeMount() { beforeMount() {
...@@ -118,15 +117,15 @@ export default { ...@@ -118,15 +117,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.$store.state.userInfo.userId,
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: "text", type: "text",
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);
...@@ -135,7 +134,7 @@ export default { ...@@ -135,7 +134,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error",
}); });
} }
}); });
...@@ -149,20 +148,19 @@ export default { ...@@ -149,20 +148,19 @@ export default {
method: "post", method: "post",
url: "/files/getFileContent", url: "/files/getFileContent",
data: { data: {
documentId: this.documentId documentId: this.documentId,
} },
}).then(res => { }).then((res) => {
if (res.return_code == 200) { if (res.return_code == 200) {
// console.log(" getContent: " + res.result); // console.log(" getContent: " + res.result);
this.content = res.result; this.content = res.result;
this.contentWithoutColor = this.content;
// console.log( // console.log(
// " this.contentWithoutColor: " + this.contentWithoutColor // " this.contentWithoutColor: " + this.contentWithoutColor
// ); // );
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error",
}); });
} }
}); });
...@@ -171,16 +169,16 @@ export default { ...@@ -171,16 +169,16 @@ export default {
getTokenList() { getTokenList() {
console.log("getTokenList"); console.log("getTokenList");
console.log(" this.tokenList: " + JSON.stringify(this.tokenList)); console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
console.log(" this.content: " + this.content); console.log(" this.content: " + JSON.stringify(this.content));
this.axios({ this.axios({
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);
...@@ -199,18 +197,19 @@ export default { ...@@ -199,18 +197,19 @@ export default {
this.content = this.content.replace(replaceReg, replaceString); this.content = this.content.replace(replaceReg, replaceString);
}); });
console.log(" this.tokenList: " + JSON.stringify(this.tokenList)); console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
console.log(" this.content: " + JSON.stringify(this.content));
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error",
}); });
} }
}); });
}, },
// 打分 // 打分
addScore() { addScore() {
// 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 (
...@@ -230,10 +229,10 @@ export default { ...@@ -230,10 +229,10 @@ export default {
) )
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 {
this.commentScore = false; this.commentScore = false;
this.$message("打分成功"); this.$message("打分成功");
...@@ -248,10 +247,10 @@ export default { ...@@ -248,10 +247,10 @@ export default {
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) {
...@@ -259,11 +258,11 @@ export default { ...@@ -259,11 +258,11 @@ export default {
this.$router.push({ path: "/taskhall" }); this.$router.push({ path: "/taskhall" });
} }
}); });
} },
}, },
mounted: function() { mounted: function () {
this.insertDocument(); this.insertDocument();
} },
}; };
</script> </script>
......
...@@ -48,7 +48,6 @@ export default { ...@@ -48,7 +48,6 @@ export default {
// 任务 // 任务
task: null, task: null,
// 文章内容 // 文章内容
contentWithoutColor: "",
content: "", content: "",
//实体属性 //实体属性
tokenInit: { tokenInit: {
...@@ -103,7 +102,7 @@ export default { ...@@ -103,7 +102,7 @@ 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.$store.state.userInfo.userId,
creatorId: this.task.creator_id, creatorId: this.task.creator_id,
relationId: this.relationId, relationId: this.relationId,
...@@ -140,7 +139,6 @@ export default { ...@@ -140,7 +139,6 @@ export default {
if (res.return_code == 200) { if (res.return_code == 200) {
// console.log(" getContent: " + res.result); // console.log(" getContent: " + res.result);
this.content = res.result; this.content = res.result;
this.contentWithoutColor = this.content;
// console.log( // console.log(
// " this.contentWithoutColor: " + this.contentWithoutColor // " this.contentWithoutColor: " + this.contentWithoutColor
// ); // );
...@@ -156,7 +154,7 @@ export default { ...@@ -156,7 +154,7 @@ export default {
getTokenList() { getTokenList() {
console.log("getTokenList"); console.log("getTokenList");
console.log(" this.tokenList: " + JSON.stringify(this.tokenList)); console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
console.log(" this.content: " + this.content); console.log(" this.content: " + JSON.stringify(this.content));
this.axios({ this.axios({
method: "post", method: "post",
url: "/textAnnotation/getTokenList", url: "/textAnnotation/getTokenList",
...@@ -184,6 +182,7 @@ export default { ...@@ -184,6 +182,7 @@ export default {
this.content = this.content.replace(replaceReg, replaceString); this.content = this.content.replace(replaceReg, replaceString);
}); });
console.log(" this.tokenList: " + JSON.stringify(this.tokenList)); console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
console.log(" this.contentNew: " + JSON.stringify(this.content));
} else { } else {
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
......
...@@ -69,9 +69,8 @@ ...@@ -69,9 +69,8 @@
</el-table> </el-table>
</div> </div>
<!-- 表格界面 --> <!-- 表格界面 -->
<br />
<div> <div>
<el-button type="primary" @click="submit()">提交</el-button> <el-button class="button1" type="primary" @click="submit()">提交</el-button>
</div> </div>
<!-- 弹窗--> <!-- 弹窗-->
......
...@@ -71,11 +71,10 @@ ...@@ -71,11 +71,10 @@
</el-table> </el-table>
</div> </div>
<!-- 表格界面 --> <!-- 表格界面 -->
<br />
<!-- 打分 --> <!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"--> <!--div v-if="this.$route.query.isCheck == '1'"-->
<div> <div>
<el-button type="primary" @click="submit()">提交</el-button> <el-button class="button1" type="primary" @click="submit()">提交</el-button>
</div> </div>
</div> </div>
</el-main> </el-main>
......
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
</el-table> </el-table>
</div> </div>
<!-- 表格界面 --> <!-- 表格界面 -->
<br />
<!-- 打分 --> <!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"--> <!--div v-if="this.$route.query.isCheck == '1'"-->
<div> <div>
...@@ -85,7 +84,7 @@ ...@@ -85,7 +84,7 @@
<el-form-item label="标注得分" :label-width="formLabelWidth"> <el-form-item label="标注得分" :label-width="formLabelWidth">
<el-input v-model="scoreForm.score" autocomplete="off" clearable></el-input> <el-input v-model="scoreForm.score" autocomplete="off" clearable></el-input>
</el-form-item> </el-form-item>
<el-button type="primary" @click="addScore()">确认</el-button> <el-button class="button1" type="primary" @click="addScore()">确认</el-button>
</el-form> </el-form>
</el-dialog> </el-dialog>
</div> </div>
......
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