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