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

Commit bbb624d4 by 王腾

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

parents 3821ff80 cb241a83
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- 实体/属性模板 --> <!-- 实体/属性模板 -->
<div class="sidebar-box1"> <div class="sidebar-box1">
<div> <div>
<div class="img-list-title1">实体/属性模板</div> <div class="img-list-title1">标注:{{this.token.word}}</div>
<div class="img-title-list-box1"> <div class="img-title-list-box1">
<div style="overflow: auto; height: calc(100vh - 61px - 100px - 40px - 60px);"> <div style="overflow: auto; height: calc(100vh - 61px - 100px - 40px - 60px);">
<p v-html="'实体:'+ token.entityId" /> <p v-html="'实体:'+ token.entityId" />
...@@ -39,16 +39,9 @@ ...@@ -39,16 +39,9 @@
</div> </div>
</el-aside> </el-aside>
<!-- 文本界面 --> <!-- 文本界面 -->
<el-main <el-main class="filter-container1" style="background-color: #FFFFFF">
class="filter-container1"
style="background-color: #FFFFFF"
>
<div style="overflow-y:auto;height:100%;"> <div style="overflow-y:auto;height:100%;">
<div <div class="content1" @mouseup="select()" v-html="content"></div>
class="content1"
@mouseup="select()"
v-html="content"
></div>
<div class="content_left"> <div class="content_left">
<div <div
class="tokenList1" class="tokenList1"
...@@ -63,10 +56,7 @@ ...@@ -63,10 +56,7 @@
:disable-transitions="false" :disable-transitions="false"
@close="deleteToken(it)" @close="deleteToken(it)"
> >
<a <a class="token1" v-html="it.word"></a>
class="token1"
v-html="it.word"
></a>
</el-tag> </el-tag>
</div> </div>
</div> </div>
...@@ -101,7 +91,7 @@ export default { ...@@ -101,7 +91,7 @@ export default {
}, },
token: { token: {
tokenId: "", tokenId: "",
word: "", word: "未选择",
begin: 0, begin: 0,
end: 0, end: 0,
entityId: "", entityId: "",
...@@ -117,7 +107,7 @@ export default { ...@@ -117,7 +107,7 @@ export default {
children: "children", children: "children",
label: "label", label: "label",
}, },
treeToArray : [], treeToArray: [],
}; };
}, },
beforeMount() { beforeMount() {
...@@ -250,7 +240,10 @@ export default { ...@@ -250,7 +240,10 @@ export default {
// 属性 // 属性
this.treeData = res.result.entityList; this.treeData = res.result.entityList;
for (var i = 0; i < this.treeData.length; i++) { for (var i = 0; i < this.treeData.length; i++) {
this.treeToArray.push({ "id": this.treeData[i].id, "label": this.treeData[i].label }); // 属性 this.treeToArray.push({
id: this.treeData[i].id,
label: this.treeData[i].label,
}); // 属性
if (this.treeData[i].children != []) { if (this.treeData[i].children != []) {
this.transfer(this.treeData[i].children); this.transfer(this.treeData[i].children);
} }
...@@ -266,6 +259,15 @@ export default { ...@@ -266,6 +259,15 @@ export default {
// 定位原文token // 定位原文token
select() { select() {
if (window.getSelection().toString() != "") { if (window.getSelection().toString() != "") {
for (var i = 0; i < this.tokenList.length; i++) {
if (window.getSelection().toString() == this.tokenList[i].word) {
this.$message({
message: "“" + window.getSelection().toString() + "”已标注",
type: "info",
});
return;
}
}
//console.log(" token select" + JSON.stringify(this.token)); //console.log(" token select" + JSON.stringify(this.token));
this.token.tokenId = "0"; this.token.tokenId = "0";
this.token.word = window.getSelection().toString(); this.token.word = window.getSelection().toString();
...@@ -410,10 +412,9 @@ export default { ...@@ -410,10 +412,9 @@ export default {
this.$refs.tree.setCheckedNodes(res); this.$refs.tree.setCheckedNodes(res);
}, },
transfer(children) { transfer(children) {
if (children == []) if (children == []) return;
return;
for (var i = 0; i < children.length; i++) { for (var i = 0; i < children.length; i++) {
this.treeToArray.push({ "id": children[i].id, "label": children[i].label }); this.treeToArray.push({ id: children[i].id, label: children[i].label });
if (children[i] != []) { if (children[i] != []) {
this.transfer(children[i].children); this.transfer(children[i].children);
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- 实体/属性模板 --> <!-- 实体/属性模板 -->
<div class="sidebar-box1"> <div class="sidebar-box1">
<div> <div>
<div class="img-list-title1">实体/属性模板</div> <div class="img-list-title1">标注:{{this.token.word}}</div>
<div class="img-title-list-box1"> <div class="img-title-list-box1">
<div style="overflow: auto; height: calc(100vh - 61px - 100px - 40px - 60px);"> <div style="overflow: auto; height: calc(100vh - 61px - 100px - 40px - 60px);">
<p v-html="'实体:'+ token.entityId" /> <p v-html="'实体:'+ token.entityId" />
...@@ -39,16 +39,9 @@ ...@@ -39,16 +39,9 @@
</div> </div>
</el-aside> </el-aside>
<!-- 文本界面 --> <!-- 文本界面 -->
<el-main <el-main class="filter-container3" style="background-color: #FFFFFF">
class="filter-container3"
style="background-color: #FFFFFF"
>
<div style="overflow-y:auto;height:100%;"> <div style="overflow-y:auto;height:100%;">
<div <div class="content3" @mouseup="select()" v-html="content"></div>
class="content3"
@mouseup="select()"
v-html="content"
></div>
<div class="content_left1"> <div class="content_left1">
<div <div
...@@ -56,35 +49,22 @@ ...@@ -56,35 +49,22 @@
v-for="it in tokenList" v-for="it in tokenList"
:key="it" :key="it"
style="user-select:none; float: left;" style="user-select:none; float: left;"
@click="changeToken(it)"
:disable-transitions="false"
> >
<el-tag <el-checkbox>
size="small" <a style="font-size: 18px;" v-html="it.word"></a>
@click="changeToken(it)"
closable
:disable-transitions="false"
@close="deleteToken(it)"
>
<a
style="font-size: 18px;"
v-html="it.word"
></a>
<a style="font-size: 14px;">: 实体</a> <a style="font-size: 14px;">: 实体</a>
<a <a style="font-size: 14px;" v-html="it.entityId"></a>
style="font-size: 14px;"
v-html="it.entityId"
></a>
<a style="font-size: 14px;">属性</a> <a style="font-size: 14px;">属性</a>
<a <a style="font-size: 14px;" v-html="it.attribute"></a>
style="font-size: 14px;" <!--el-button
v-html="it.attribute"
></a>
<el-button
style="margin-left: auto;font-size: 12px" style="margin-left: auto;font-size: 12px"
@click="countScore()" @click="countScore()"
size="mini" size="mini"
type="text" type="text"
>标注正确</el-button> >O</el-button-->
</el-tag> </el-checkbox>
</div> </div>
</div> </div>
<div style="overflow:auto;font-size: 15px;float: right;"> <div style="overflow:auto;font-size: 15px;float: right;">
...@@ -121,7 +101,7 @@ export default { ...@@ -121,7 +101,7 @@ export default {
}, },
token: { token: {
tokenId: "", tokenId: "",
word: "", word: "未选择",
begin: 0, begin: 0,
end: 0, end: 0,
entityId: "", entityId: "",
...@@ -289,7 +269,10 @@ export default { ...@@ -289,7 +269,10 @@ export default {
// 属性 // 属性
this.treeData = res.result.entityList; this.treeData = res.result.entityList;
for (var i = 0; i < this.treeData.length; i++) { for (var i = 0; i < this.treeData.length; i++) {
this.treeToArray.push({ "id": this.treeData[i].id, "label": this.treeData[i].label }); // 属性 this.treeToArray.push({
id: this.treeData[i].id,
label: this.treeData[i].label,
}); // 属性
if (this.treeData[i].children != []) { if (this.treeData[i].children != []) {
this.transfer(this.treeData[i].children); this.transfer(this.treeData[i].children);
} }
...@@ -449,17 +432,44 @@ export default { ...@@ -449,17 +432,44 @@ export default {
this.$refs.tree.setCheckedNodes(res); this.$refs.tree.setCheckedNodes(res);
}, },
transfer(children) { transfer(children) {
if (children == []) if (children == []) return;
return;
for (var i = 0; i < children.length; i++) { for (var i = 0; i < children.length; i++) {
this.treeToArray.push({ "id": children[i].id, "label": children[i].label }); this.treeToArray.push({ id: children[i].id, label: children[i].label });
if (children[i] != []) { if (children[i] != []) {
this.transfer(children[i].children); this.transfer(children[i].children);
} }
} }
}, },
save() { save() {
alert("打分成功"); this.submit();
this.$router.push({ path: "/check" });
},
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,
score: this.computeScore,
},
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" });
}
});
}, },
// 打分 // 打分
addScore() { addScore() {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<el-main class="filter-container2" style="background-color: #FFFFFF"> <el-main class="filter-container2" style="background-color: #FFFFFF">
<div style="overflow-y:auto;height:100%;"> <div style="overflow-y:auto;height:100%;">
<!-- 表格界面 --> <!-- 表格界面 -->
<div class="content2"> <div class="content2" @mouseup="select2()">
<el-table <el-table
:data="nowContent.tableData" :data="nowContent.tableData"
:cell-style="cellStyle" :cell-style="cellStyle"
...@@ -290,7 +290,49 @@ export default { ...@@ -290,7 +290,49 @@ export default {
} }
}, },
// 定位原文token // 定位原文token
select2() {
if (window.getSelection().toString() != "") {
for (var i = 0; i < this.tokenList.length; i++) {
if (window.getSelection().toString() == this.tokenList[i].word) {
this.$message({
message: "“" + window.getSelection().toString() + "”已标注",
type: "info",
});
return;
}
}
//console.log(" token select" + JSON.stringify(this.token));
this.token.tokenId = "0";
this.token.word = window.getSelection().toString();
this.token.begin = window.getSelection().anchorOffset; //开始位置
this.token.end = window.getSelection().focusOffset; //结束位置
this.$refs.tree.setCheckedNodes([]);
//console.log(" token select" + JSON.stringify(this.token));
//console.log(" tokenList select" + JSON.stringify(this.tokenList));
}
},
// 定位原文token
select: function (row, column) { select: function (row, column) {
if (window.getSelection().toString() != "") {
for (var i = 0; i < this.tokenList.length; i++) {
if (window.getSelection().toString() == this.tokenList[i].word) {
this.$message({
message: "“" + window.getSelection().toString() + "”已标注",
type: "info",
});
return;
}
}
//console.log(" token select" + JSON.stringify(this.token));
this.token.tokenId = "0";
this.token.word = window.getSelection().toString();
this.token.begin = window.getSelection().anchorOffset; //开始位置
this.token.end = window.getSelection().focusOffset; //结束位置
this.$refs.tree.setCheckedNodes([]);
//console.log(" token select" + JSON.stringify(this.token));
//console.log(" tokenList select" + JSON.stringify(this.tokenList));
return;
}
this.row = row; this.row = row;
this.column = column; this.column = column;
this.token.tokenId = "0"; this.token.tokenId = "0";
......
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