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

Commit 21d50a7b by 郭婉茹

button位置

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