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

Commit 2b747371 by 郭婉茹

get text

parent 21d50a7b
......@@ -136,7 +136,6 @@ export default {
this.documentId = res.result;
//console.log("this.documentId: " + this.documentId);
this.getContent();
this.getTokenList();
this.getTemplate();
} else {
this.$message({
......@@ -162,6 +161,7 @@ export default {
// console.log(" getContent: " + res.result);
this.content = res.result;
this.contentWithoutColor = this.content;
this.getTokenList();
// console.log(
// " this.contentWithoutColor: " + this.contentWithoutColor
// );
......
......@@ -111,8 +111,9 @@ export default {
insertDocument() {
// console.log("userId" + this.$store.state.userInfo.userId);
// 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("piece" + JSON.stringify(this.piece));
this.axios({
method: "post",
url: "/textAnnotation/insertDocument",
......@@ -130,7 +131,6 @@ export default {
this.documentId = res.result;
//console.log("this.documentId: " + this.documentId);
this.getContent();
this.getTokenList();
} else {
this.$message({
message: res.return_info,
......@@ -141,9 +141,8 @@ export default {
},
//获取内容
getContent() {
console.log("getContent");
console.log(" this.file: " + JSON.stringify(this.file));
console.log(" this.documentId: " + this.documentId);
console.log("getContent this.file: " + JSON.stringify(this.file));
console.log("getContent this.documentId: " + this.documentId);
this.axios({
method: "post",
url: "/files/getFileContent",
......@@ -154,6 +153,8 @@ export default {
if (res.return_code == 200) {
// console.log(" getContent: " + res.result);
this.content = res.result;
console.log("getContent this.content: " + this.content);
this.getTokenList();
// console.log(
// " this.contentWithoutColor: " + this.contentWithoutColor
// );
......@@ -169,7 +170,7 @@ export default {
getTokenList() {
console.log("getTokenList");
console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
console.log(" this.content: " + JSON.stringify(this.content));
console.log(" this.content: " + this.content);
this.axios({
method: "post",
url: "/textAnnotation/getTokenList",
......@@ -197,7 +198,7 @@ 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));
console.log(" this.content: " + this.content);
} else {
this.$message({
message: res.return_info,
......@@ -299,4 +300,65 @@ export default {
margin-top: 3px;
margin-bottom: 3px;
}
@import "@/assets/scss/config.scss";
@import "@/assets/scss/mixin.scss";
.select-container {
height: calc(100vh - 61px);
display: flex;
background-color: #d9ecff;
.sidebar1 {
padding: 0 0 0 0;
margin-left: 50px;
margin-top: 40px;
width: 30%;
display: flex;
.img-list-title1 {
padding: 0 0 0 0;
width: 300px;
height: 40px;
line-height: 40px;
background: #409eff;
color: white;
box-shadow: 0px 0px 10px #dbdbdb;
}
.img-title-list-box1 {
padding: 0 0 0 0;
width: 300px;
height: calc(100vh - 61px - 100px - 40px);
overflow: auto;
background-color: white;
box-shadow: 0px 0px 10px #dbdbdb;
.tokenList1 {
margin: 9px;
}
.token1 {
font-size: 18px;
}
}
}
.filter-container1 {
margin-right: 40px;
margin-left: 20px;
margin-top: 40px;
height: calc(100vh - 61px - 100px);
width: 70%;
//float: center;
width: 100%;
padding: 25px 10px 20px 25px;
@include whiteBoard;
.content1 {
overflow: auto;
height: calc(100vh - 61px - 100px - 100px);
text-align: left;
font-size: 20px;
line-height: 30px;
}
.button1 {
overflow: auto;
float: right;
margin-right: 10px;
margin-top: 10px;
}
}
}
</style>
......@@ -96,8 +96,9 @@ export default {
insertDocument() {
// console.log("userId" + this.$store.state.userInfo.userId);
// 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("piece" + JSON.stringify(this.piece));
this.axios({
method: "post",
url: "/textAnnotation/insertDocument",
......@@ -108,18 +109,17 @@ export default {
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);
this.getContent();
this.getTokenList();
} else {
this.$message({
message: res.return_info,
type: "error"
type: "error",
});
}
});
......@@ -133,19 +133,20 @@ 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.getTokenList();
// console.log(
// " this.contentWithoutColor: " + this.contentWithoutColor
// );
} else {
this.$message({
message: res.return_info,
type: "error"
type: "error",
});
}
});
......@@ -154,16 +155,16 @@ export default {
getTokenList() {
console.log("getTokenList");
console.log(" this.tokenList: " + JSON.stringify(this.tokenList));
console.log(" this.content: " + JSON.stringify(this.content));
console.log(" this.content: " + 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);
......@@ -182,11 +183,10 @@ 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,
type: "error"
type: "error",
});
}
});
......
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