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

Commit 53cd5b0b by 郭婉茹

option那里templete的获取还有点问题

parent d93380d3
...@@ -20,39 +20,65 @@ ...@@ -20,39 +20,65 @@
</template> </template>
<script> <script>
import PiecesTable from './PiecesTable' import PiecesTable from "./PiecesTable"
export default { export default {
name: 'on-going-task-detail', name: "on-going-task-detail",
components: { components: {
PiecesTable PiecesTable
}, },
data () { data() {
return { return {
task: null task: null
} };
}, },
beforeMount () { beforeMount() {
this.task = JSON.parse(decodeURIComponent(this.$route.params.task)) this.task = JSON.parse(decodeURIComponent(this.$route.params.task))
}, },
methods: { methods: {
doOption (file, type) { doOption(file, type) {
//console.log("this.task"+JSON.stringify(this.task)); var params = {
//console.log("this.file"+JSON.stringify(file)); file: encodeURIComponent(JSON.stringify(file)),
var params = { file: encodeURIComponent(JSON.stringify(file)), task: encodeURIComponent(JSON.stringify(this.task)) } task: encodeURIComponent(JSON.stringify(this.task))
var self = this };
function goto (path) { var self = this;
function goto(path) {
self.$router.push({ name: path, params }) self.$router.push({ name: path, params })
} }
switch (type) { switch (type) {
case '文本': goto('SelectText'); break case "文本":
case '图片': goto('image'); break if (
case '图层': goto('layer'); break file.url
case '表格': goto('table') .split("")
.reverse()
.join("")
.substring(0, 4)
.split("")
.reverse()
.join("") == "xlsx"
)
goto("table")
else if (
file.url
.split("")
.reverse()
.join("")
.substring(0, 3)
.split("")
.reverse()
.join("") == "txt"
)
goto("SelectText")
break
case "图片":
goto("image");
break
case "图层":
goto("layer");
} }
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -50,10 +50,13 @@ ...@@ -50,10 +50,13 @@
<div style="overflow-y:auto;height:100%;"> <div style="overflow-y:auto;height:100%;">
<!-- 表格界面 --> <!-- 表格界面 -->
<div @click="highlight()"> <div @click="highlight()">
<el-table :data="tableData" border style="width: 100%"> <el-table :data="nowContent.tableData" border style="width: 100%,height:200px">
<el-table-column prop="date" label="日期" width="180"></el-table-column> <el-table-column
<el-table-column prop="name" label="姓名" width="180"></el-table-column> v-for="col in nowContent.name"
<el-table-column prop="address" label="地址"></el-table-column> :key="col"
:prop="col.value"
:label="col.value" >
</el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 表格界面 --> <!-- 表格界面 -->
...@@ -133,7 +136,12 @@ export default { ...@@ -133,7 +136,12 @@ export default {
options: [], options: [],
// table // table
tableData: [] nowContent:{
tablename:"",
tableData:[],
name:[]
},
allContent:[]
}; };
}, },
beforeMount() { beforeMount() {
...@@ -177,7 +185,31 @@ export default { ...@@ -177,7 +185,31 @@ export default {
}, },
//获取内容 //获取内容
getContent() { getContent() {
// TODO this.axios({
method: "post",
url: "/files/getExcelContent",
data: {
documentId: this.documentId
}
}).then(res => {
if (res.return_code == 200) {
var i;
var nowContent = {};
for(i = 0;i<res.result.numOfSheet;i++){
nowContent.tablename = res.result.content[i].sheetName;
nowContent.tableData = res.result.content[i].content;
nowContent.name = res.result.content[i].name;
this.allContent.push(nowContent);
nowContent = {};
}
this.nowContent = this.allContent[0];//默认打开第一个
} else {
this.$message({
message: res.return_info,
type: "error"
});
}
});
}, },
// 获得实体属性列表 // 获得实体属性列表
getTokenList() { getTokenList() {
...@@ -388,22 +420,20 @@ export default { ...@@ -388,22 +420,20 @@ export default {
return (this.content = this.content.replace(replaceReg, replaceString)); return (this.content = this.content.replace(replaceReg, replaceString));
}, },
// 提交已标注文档 // 提交已标注文档 // TODO 跳转到我的任务,已标注文档标注按钮消失,然后判定整个任务都标注完成后跳转到已完成任务界面,这个就交给通用的大佬们了
submit() { submit() {
// console.log("hello" + JSON.stringify(this.task)) // console.log("hello" + JSON.stringify(this.task))
this.axios this.axios({
.post({
method: "post", method: "post",
url: "/textAnnotation/revDocumentState", url: "/textAnnotation/revDocumentState",
data: { data: {
documentId: this.documentId documentId: this.documentId
} }
}) }).then(res => {
.then(res => {
if (res.return_code == 200) { if (res.return_code == 200) {
this.$message({ this.$message({
type: "success", message: "已保存",
message: "已提交" type: "success"
}); });
} else { } else {
this.$message({ this.$message({
......
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