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

Commit 040c8f33 by wyy

template

parents 6a3a1aee 56c202af
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.19.2",
"default-passive-events": "^2.0.0",
"element-ui": "^2.13.1", "element-ui": "^2.13.1",
"mathjs": "^7.0.2", "mathjs": "^7.0.2",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
......
...@@ -6,8 +6,13 @@ ...@@ -6,8 +6,13 @@
<p>发布时间:{{task.date|formatDate}}</p> <p>发布时间:{{task.date|formatDate}}</p>
<el-divider></el-divider> <el-divider></el-divider>
<pieces-table :task-id="task.id" showProgress> <pieces-table :task-id="task.id" showProgress>
<template v-slot:option='slotProps'> <template v-slot:option="slotProps">
<el-button type="primary" size="mini" plain @click='doOption(slotProps.file,slotProps.type)'>审核</el-button> <el-button
type="primary"
size="mini"
plain
@click="doOption(slotProps.file,slotProps.type)"
>审核</el-button>
</template> </template>
</pieces-table> </pieces-table>
</div> </div>
...@@ -15,52 +20,55 @@ ...@@ -15,52 +20,55 @@
</template> </template>
<script> <script>
import PiecesTable from './PiecesTable' import PiecesTable from "./PiecesTable";
export default { export default {
name: 'check-detail', name: "check-detail",
components: { components: {
PiecesTable PiecesTable
}, },
data () { data() {
return { return {
task: null, task: null,
isCheck: '1' isCheck: "1"
} };
}, },
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) {
var params = {file: encodeURIComponent(JSON.stringify(file))} var params = { file: encodeURIComponent(JSON.stringify(file)) };
var self = this var self = this;
function goto (path) { function goto(path) {
self.$router.push({ name: path, params }) self.$router.push({ name: path, params });
} }
switch (type) { switch (type) {
case '文本': case "文本":
goto('SelectedText') self.$router.push({ name: 'SelectedText', path: '/selected', params: {documentId: documentId} });
break break;
case '图片': case "表格":
goto('image') self.$router.push({ name: 'Tabled', path: '/tabled', params: {documentId: documentId} });
break break;
case '图层': case "图片":
goto('layer') goto("image");
break;
case "图层":
goto("layer");
} }
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../assets/scss/config.scss'; @import "../assets/scss/config.scss";
@import '../assets/scss/mixin.scss'; @import "../assets/scss/mixin.scss";
.task-container{ .task-container {
@include container; @include container;
.task-panel{ .task-panel {
@include whiteBoard; @include whiteBoard;
text-align: left; text-align: left;
padding: 30px 20px 30px 20px; padding: 30px 20px 30px 20px;
} }
} }
</style> </style>
...@@ -6,8 +6,13 @@ ...@@ -6,8 +6,13 @@
<p>发布时间:{{task.date|formatDate}}</p> <p>发布时间:{{task.date|formatDate}}</p>
<el-divider></el-divider> <el-divider></el-divider>
<pieces-table :task-id="task.id" :userId="$store.state.userInfo.userId"> <pieces-table :task-id="task.id" :userId="$store.state.userInfo.userId">
<template v-slot:option='slotProps'> <template v-slot:option="slotProps">
<el-button type="primary" size="mini" plain @click='doOption(slotProps.file,slotProps.type)'>详情</el-button> <el-button
type="primary"
size="mini"
plain
@click="doOption(slotProps.file,slotProps.type)"
>详情</el-button>
</template> </template>
</pieces-table> </pieces-table>
</div> </div>
...@@ -15,42 +20,45 @@ ...@@ -15,42 +20,45 @@
</template> </template>
<script> <script>
import PiecesTable from './PiecesTable' import PiecesTable from "./PiecesTable";
export default { export default {
name: 'task', name: "task",
components: { components: {
PiecesTable PiecesTable
}, },
data () { data() {
return { return {
task: null, task: null,
isCheck: '0' isCheck: "0"
} };
}, },
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) {
var params = {file: encodeURIComponent(JSON.stringify(file))} var params = { file: encodeURIComponent(JSON.stringify(file)) };
var self = this var self = this;
function goto (path) { function goto(path) {
self.$router.push({ name: path, params }) self.$router.push({ name: path, params });
} }
switch (type) { switch (type) {
case '文本': case "文本":
goto('SelectedText') self.$router.push({ name: 'SelectedText', path: '/selected', params: {documentId: documentId} });
break break;
case '图片': case "表格":
goto('image') self.$router.push({ name: 'Tabled', path: '/tabled', params: {documentId: documentId} });
break break;
case '图层': case "图片":
goto('layer') goto("image");
break;
case "图层":
goto("layer");
} }
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -6,8 +6,13 @@ ...@@ -6,8 +6,13 @@
<p>发布时间:{{task.date|formatDate}}</p> <p>发布时间:{{task.date|formatDate}}</p>
<el-divider></el-divider> <el-divider></el-divider>
<pieces-table :task-id="task.id" :userId="$store.state.userInfo.userId" showProgress> <pieces-table :task-id="task.id" :userId="$store.state.userInfo.userId" showProgress>
<template v-slot:option='slotProps'> <template v-slot:option="slotProps">
<el-button type="primary" size="mini" plain @click='doOption(slotProps.file,slotProps.type)'>标注</el-button> <el-button
type="primary"
size="mini"
plain
@click="doOption(slotProps.file,slotProps.type)"
>标注</el-button>
</template> </template>
</pieces-table> </pieces-table>
</div> </div>
...@@ -15,41 +20,44 @@ ...@@ -15,41 +20,44 @@
</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) {
var params = {file: encodeURIComponent(JSON.stringify(file))} var params = { file: encodeURIComponent(JSON.stringify(file)) };
var self = this var self = this;
function goto (path) { function goto(path) {
self.$router.push({ name: path, params }) self.$router.push({ name: path, params });
} }
switch (type) { switch (type) {
case '文本': case "文本":
goto('SelectText') self.$router.push({ name: 'SelectText', path: '/select', params: {documentId: documentId} });
break break;
case '图片': case "表格":
goto('image') self.$router.push({ name: 'Table', path: '/table', params: {documentId: documentId} });
break break;
case '图层': case "图片":
goto('layer') goto("image");
break;
case "图层":
goto("layer");
} }
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -64,9 +64,67 @@ ...@@ -64,9 +64,67 @@
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图像分片" name="second"> <el-tab-pane label="表格分片" name="second">
<el-row :gutter="20" style="margin-bottom: 15px"> <el-row :gutter="20" style="margin-bottom: 15px">
<el-col span="2"><el-button @click="addDomain(2)" type="primary" plain>添加图像分片</el-button></el-col> <el-col span="2"><el-button @click="addDomain(2)" type="primary" plain>添加表格分片</el-button></el-col>
</el-row>
<el-row :gutter="20">
<el-form-item>
<!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" accordion>
<el-form-item v-for="(tableDomain, index) in dynamicValidateForm.tableDomains"
:key="tableDomain.key"
:prop="'tableDomains.' + index + '.value'">
<el-collapse-item
:title="'表格任务分片'+(1+index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px">
<!-- 上传图片-->
<el-row :gutter="20" >
<el-col span="8">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreviewT"
:on-remove="handleRemoveT"
:on-success="uploadSuccessT"
multiple
:http-request="uploadFileT"
:limit="7"
:data="'3:'+(index)"
:on-exceed="handleExceed"
:file-list="dynamicValidateForm.tableDomains[index].fileList">
<el-button size="small" type="primary" @click="setIndex(index)">点击上传</el-button>
</el-upload>
</el-col>
<el-col span="6">
<el-select v-model="tableDomain.piecesOptions" placeholder="模板选择" >
<el-option
v-for="i in pOptions"
:key="i.templateId"
:label="i.templateName"
:value="i.templateId">
</el-option>
<el-option>
<el-button type="text" @click="dialogFormVisible = true">自定义模板</el-button>
</el-option>
</el-select>
<!-- 创建表格模板-->
</el-col>
<el-col span="2" offset="2">
<el-button type="primary" plain @click.prevent="removeDomain(1,tableDomain)">删除分片</el-button>
</el-col>
</el-row>
</el-collapse-item>
</el-form-item>
</el-collapse>
</el-form-item>
</el-row>
</el-tab-pane>
<el-tab-pane label="图像分片" name="third">
<el-row :gutter="20" style="margin-bottom: 15px">
<el-col span="2"><el-button @click="addDomain(3)" type="primary" plain>添加图像分片</el-button></el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-form-item> <el-form-item>
...@@ -74,7 +132,7 @@ ...@@ -74,7 +132,7 @@
<el-collapse v-model="activeName" accordion> <el-collapse v-model="activeName" accordion>
<el-form-item v-for="(domain, index) in dynamicValidateForm.pictureDomains" <el-form-item v-for="(domain, index) in dynamicValidateForm.pictureDomains"
:key="domain.key" :key="domain.key"
:prop="'domains.' + index + '.value'"> :prop="'pictureDomains.' + index + '.value'">
<el-collapse-item <el-collapse-item
:title="'图片任务分片'+(1+index)" :title="'图片任务分片'+(1+index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px"> :name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px">
...@@ -113,9 +171,9 @@ ...@@ -113,9 +171,9 @@
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图层分片" name="third"> <el-tab-pane label="图层分片" name="forth">
<el-row :gutter="20" style="margin-bottom: 15px"> <el-row :gutter="20" style="margin-bottom: 15px">
<el-col span="2"><el-button @click="addDomain(3)" type="primary" plain>添加图层分片</el-button></el-col> <el-col span="2"><el-button @click="addDomain(4)" type="primary" plain>添加图层分片</el-button></el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-form-item> <el-form-item>
...@@ -123,7 +181,7 @@ ...@@ -123,7 +181,7 @@
<el-collapse v-model="activeName" accordion> <el-collapse v-model="activeName" accordion>
<el-form-item v-for="(domain, index) in dynamicValidateForm.layerDomains" <el-form-item v-for="(domain, index) in dynamicValidateForm.layerDomains"
:key="domain.key" :key="domain.key"
:prop="'domains.' + index + '.value'"> :prop="'layerDomains.' + index + '.value'">
<el-collapse-item <el-collapse-item
:title="'图层任务分片'+(1+index)" :title="'图层任务分片'+(1+index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px;"> :name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px;">
...@@ -306,7 +364,14 @@ ...@@ -306,7 +364,14 @@
//domains--文本信息 //domains--文本信息
domains: [{ domains: [{
fileList:new Array(), fileList:new Array(),
piecesOptions:'',//模板ID templateId:'',//模板ID
pname:'',
createMode:false
}],
//domains--表格信息
tableDomains: [{
fileList:new Array(),
templateId:'',//模板ID
pname:'', pname:'',
createMode:false createMode:false
}], }],
...@@ -335,6 +400,22 @@ ...@@ -335,6 +400,22 @@
setTimeout(()=>{ setTimeout(()=>{
this.ins = this.$route.params.ins; this.ins = this.$route.params.ins;
//console.log(this.$route.params.taskId); //console.log(this.$route.params.taskId);
console.log(this.$store.state.userInfo.userId)
this.axios({
method:"POST",
url:'/textAnnotation/getTemplated',
data:{
creatorId:this.$store.state.userInfo.userId
}
}).then(res=>{
console.log(res);
if(res.code == 1){
this.pOptions = res.message;
}
else{
alert("加载错误!!!");
}
})
if(this.ins == '1'){ if(this.ins == '1'){
//设置 //设置
} }
...@@ -352,6 +433,8 @@ ...@@ -352,6 +433,8 @@
} }
else{ else{
this.dynamicValidateForm.domains = res.data.domains; this.dynamicValidateForm.domains = res.data.domains;
this.dynamicValidateForm.tableDomains = res.data.tableDomains;
// console.log(res.data.domains);
// this.dynamicValidateForm.domains[0].pvalue = '1'; // this.dynamicValidateForm.domains[0].pvalue = '1';
this.dynamicValidateForm.pictureDomains = res.data.pictureDomains; this.dynamicValidateForm.pictureDomains = res.data.pictureDomains;
this.dynamicValidateForm.layerDomains = res.data.layerDomains; this.dynamicValidateForm.layerDomains = res.data.layerDomains;
...@@ -361,20 +444,7 @@ ...@@ -361,20 +444,7 @@
} }
}) })
} }
// this.axios({
// method:"GET",
// url:'/textAnnotation/getTemplated',
// params:{
// creatorId:this.uesrInfo.userId;
// }
// }).then(res=>{
// if(res.code == 1){
// this.pOptions = res.message;
// }
// else{
// alert("加载错误!!!");
// }
// })
},200); },200);
}, },
computed:{ computed:{
...@@ -406,6 +476,24 @@ ...@@ -406,6 +476,24 @@
} }
}) })
}, },
uploadFileT(fileObj){
let formData = new window.FormData();
formData.set("file",fileObj.file);
var file = formData.getAll("file");
this.axios.post("/files/upload",formData,{
headers:{
"Content-type":"multipart/form-data"
}
}).then(res=>{
if(res.code == 0)
alert("文件上传失败,请重新上传");
else{
this.url = res.data;
this.dynamicValidateForm.tableDomains[this.Index ].fileList.push({name:file[0].name,url:this.url,size:file[0].size});
// console.log(this.dynamicValidateForm.domains);
}
})
},
uploadFileP(fileObj){ uploadFileP(fileObj){
let formData = new window.FormData(); let formData = new window.FormData();
formData.set("file",fileObj.file); formData.set("file",fileObj.file);
...@@ -494,6 +582,35 @@ ...@@ -494,6 +582,35 @@
} }
}) })
}, },
handleRemoveT(file,fileList){
var flag = 0;
// console.log(this.dynamicValidateForm.tableDomains);
for(var i = 0 ; i < this.dynamicValidateForm.tableDomains.length && flag ==0;i++){
// alert("Inin");
for(var j = 0 ; j < this.dynamicValidateForm.tableDomains[i].fileList.length ; j++){
// alert(file.name);
// alert(this.dynamicValidateForm.pictureDomains[i].fileList[j].name);
if(file.name == this.dynamicValidateForm.tableDomains[i].fileList[j].name){
this.url = this.dynamicValidateForm.tableDomains[i].fileList[j].url;
this.dynamicValidateForm.tableDomains[i].fileList.splice(j,1);
flag = 1;
break;
}
}
}
// alert(this.url);
this.axios({
method:'post',
data:{
url : this.url,
},
url:'/files/delFile',
}).then(res=>{
if(res.code == 0){
alert("文件删除失败");
}
})
},
handleRemoveP(file,fileList){ handleRemoveP(file,fileList){
var flag = 0; var flag = 0;
for(var i = 0 ; i < this.dynamicValidateForm.pictureDomains.length && flag ==0;i++){ for(var i = 0 ; i < this.dynamicValidateForm.pictureDomains.length && flag ==0;i++){
...@@ -598,12 +715,18 @@ ...@@ -598,12 +715,18 @@
} }
} }
else if(n == 2){ else if(n == 2){
var index = this.dynamicValidateForm.tableDomains.indexOf(item)
if (index !== -1) {
this.dynamicValidateForm.tableDomains.splice(index, 1)
}
}
else if(n == 3){
var index = this.dynamicValidateForm.pictureDomains.indexOf(item) var index = this.dynamicValidateForm.pictureDomains.indexOf(item)
if (index !== -1) { if (index !== -1) {
this.dynamicValidateForm.pictureDomains.splice(index, 1) this.dynamicValidateForm.pictureDomains.splice(index, 1)
} }
} }
else if(n == 3){ else if(n == 4){
var index = this.dynamicValidateForm.layerDomains.indexOf(item) var index = this.dynamicValidateForm.layerDomains.indexOf(item)
if (index !== -1) { if (index !== -1) {
this.dynamicValidateForm.layerDomains.splice(index, 1) this.dynamicValidateForm.layerDomains.splice(index, 1)
...@@ -621,8 +744,18 @@ ...@@ -621,8 +744,18 @@
key: Date.now() key: Date.now()
}); });
} }
//添加表格分片
if(ptype == 2){
this.dynamicValidateForm.tableDomains.push({
fileList:new Array(),
templateId:'',
pname:'',
createMode:false,
key: Date.now()
});
}
//添加图像分片 //添加图像分片
else if(ptype == 2){ else if(ptype == 3){
this.dynamicValidateForm.pictureDomains.push({ this.dynamicValidateForm.pictureDomains.push({
fileList:new Array(), fileList:new Array(),
description:'', description:'',
...@@ -630,7 +763,7 @@ ...@@ -630,7 +763,7 @@
}); });
} }
//添加图层分片 //添加图层分片
else if(ptype == 3){ else if(ptype == 4){
this.dynamicValidateForm.layerDomains.push({ this.dynamicValidateForm.layerDomains.push({
fileList:new Array(), fileList:new Array(),
description:'', description:'',
...@@ -648,7 +781,7 @@ ...@@ -648,7 +781,7 @@
this.$forceUpdate(); this.$forceUpdate();
}, },
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); // console.log(tab, event);
}, },
createModle(m){ createModle(m){
alert('111'); alert('111');
...@@ -687,7 +820,6 @@ ...@@ -687,7 +820,6 @@
entityList:this.entityList, entityList:this.entityList,
}, },
}).then(res=>{ }).then(res=>{
console.log(res);
if(res.code == 1){ if(res.code == 1){
this.pOptions = res.message; this.pOptions = res.message;
} }
...@@ -697,7 +829,7 @@ ...@@ -697,7 +829,7 @@
this.dialogFormVisible = false; this.dialogFormVisible = false;
}) })
} }
console(this.pOptions); // console(this.pOptions);
// // alert("111"); // // alert("111");
//location.reload(); //location.reload();
}, },
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
</div> </div>
</div> </div>
</el-aside> </el-aside>
<!-- 文本界面 -->
<el-main class="filter-container" style="background-color: #FFFFFF"> <el-main class="filter-container" style="background-color: #FFFFFF">
<div style="overflow-y:auto;height:100%;"> <div style="overflow-y:auto;height:100%;">
<div @mouseup="highlight()"> <div @mouseup="highlight()">
...@@ -96,15 +98,31 @@ export default { ...@@ -96,15 +98,31 @@ export default {
address: "那是我心中最美的“第三极”——第二次青藏科考青年说" address: "那是我心中最美的“第三极”——第二次青藏科考青年说"
}; };
return { return {
// 文章id
documentId: '',
// 文章内容
content: [],
//实体属性
token: {
entityId: "",
word: "",
begin: 0,
end: 0,
attribute: "",
tokenId: ""
},
// 实体属性列表
tokenList: [],
// 文章列表
textData: [ textData: [
{ {
label: "那是我心中最美的“第三极”", label: this.documentId,
children: [ children: [
{ {
label: "那是我心中最美的“第三极”——第一次青藏科考青年说" label: this.documentId
}, },
{ {
label: "那是我心中最美的“第三极”——第二次青藏科考青年说" label: "暂无数据"
} }
] ]
} }
...@@ -270,24 +288,6 @@ export default { ...@@ -270,24 +288,6 @@ export default {
}, },
count: 1, count: 1,
tableData: Array(20).fill(item), tableData: Array(20).fill(item),
msg: [
"那是我心中最美的“第三极”——第二次青藏科考青年说<br/> \
2020-05-06 11:08 来源:新华网 编辑:矿材网<br/> \
“看到国家自主研发的‘极目一号’浮空器从纳木错科考站升起,她宛若白鲸,越升越高,融入了星海。古老的‘第三极’与前沿的科技,在星空中融为一体,那就是我心中最美的‘第三极’风情。”中国科学院空天信息创新研究院的屈维说。<br/> \
2019年5月23日,中国科学院空天信息创新研究院研制的“极目一号”浮空器在第二次青藏高原综合科学考察研究中,在纳木错升空达到海拔7003米的高度,创造了迄今已知同类型、同量级浮空器驻空高度的世界纪录。<br/> \
第二次青藏高原综合科考从2017年8月全面启动,在之后5到10年内,大批科研工作者将对青藏高原的水、生态、人类活动等环境问题进行考察研究。我国首次青藏高原综合科学考察研究是20世纪70年代,这次综合科考研究积累了大量科学资料,为青藏高原生态保护和社会经济发展提供了科学依据。<br/> \
相对于南极和北极,人们把青藏高原称为世界“第三极”。<br/> \
中国科学家认同“第三极”的称号,除了因为青藏高原和南极、北极有表面上的相似,还因为青藏高原的“一举一动”都对地球的整体环境有着重要影响。<br/> \
“当科考车翻过山头,映入眼帘的便是海拔4700米的纳木错与远处的雪山,碧蓝的湖水倒映着树木、雪山,一相逢便割舍不下。”2018年参加工作的屈维说,能参与第二次青藏科考,能看到“第三极”的多样风情,是他的幸运。<br/> \
作为地球“第三极”的核心区,西藏有着极致的美丽。顶着身体不适,扛着各种仪器,做样方、采标本、打土钻和入户调研是科考队员户外作业最平常的事情。<br/> \
“高原上的天气极不稳定,狂风、冰雹、大雨会在同一天多次造访,我们必须趁着天气略有好转时,见缝插针,尽可能多地赶任务。一日行车数百公里都是‘家常便饭’,调研途中为了‘救出’陷入泥坑的车辆,经常折腾到灰头土脸。”36岁的西藏农牧学院副教授王向涛说。<br/> \
2019年7月,第二次青藏科考雅鲁藏布大峡谷水汽通道考察分队在墨脱县的一次“陷车”,至今让科考队员李璐含记忆深刻。当时,墨脱因为多日暴雨和泥石流,已封锁半个月之久,科考队员采集数据的当天仍在下暴雨。傍晚,车子到了一处山体坍塌严重的路段。<br/> \
“当车子陷入泥泞的时候,我心想,今晚或许就要睡在这里了。”李璐含说,“知道我们是科考队后,前后方车辆的司机和路旁维修道路的人都帮我们推车。原本在黑暗中的车子,被车灯和探照灯照亮,使我能看清这些人的面庞,他们用不同的方言喊口号、用力推车的场景让我难忘。”<br/> \
躺在草地上观看云团变幻出各种造型;科考间隙引逗草原上东张西望的鼠兔或旱獭;科考途中和赶着牛群、羊群的牧民依靠手势交流,致以微笑……这些是科考队员在科考途中不多的乐趣。<br/> \
作为第二次青藏科考的参与人员,王向涛多次深入藏北地区考察。“有时候,我随手拍的风景照发到朋友圈,会引来朋友的羡慕。或许这是很多人眼里的‘诗和远方’,但对于我们来说,这一次次‘旅程’不是‘游山玩水’,而是科研工作者的负重前行。”王向涛感慨说。<br/> \
2019年以来,第二次青藏高原综合科学考察研究队在西藏共采集大气、水文、土壤等环境要素样品1.2万余份,采集动植物、微生物样本4.4万余份,收集经济社会发展资料超2200套,在“亚洲水塔”变化与影响及应对等方面取得突破。<br/> \
“我们在西藏进行科学考察,必须了解当地群众生产、生活需求和意愿,为保护好这里的一草一木尽一份绵薄之力。肆虐的风雪阻挡不住前进的路,选择了科考,选择了拥抱这片广袤的土地,就是青春的荣耀。”王向涛说。"
],
ifAlert: false, ifAlert: false,
options: [ options: [
{ {
...@@ -306,42 +306,41 @@ export default { ...@@ -306,42 +306,41 @@ export default {
value: "选项4", value: "选项4",
label: "时间" label: "时间"
} }
], ]
token:{
entityId: "",
word: "",
begin: 0,
end: 0,
attribute:"",
tokenId: ""
},
tokenList: []
}; };
}, },
created() {
this.getParams();
},
methods: { methods: {
// 获取文本id
getParams() {
var routerParams = this.$route.params.documentId;
this.documentId = routerParams;
},
handleNodeClick(data) { handleNodeClick(data) {
console.log(data); console.log(data);
}, },
//获取文本 // 获取文本
    getContent(){ getContent() {
      this.axios({ this.axios({
          method: "post", method: "post",
          url: "http://127.0.0.1:9100/uploadDownload/getFileContent", url: "http://127.0.0.1:9100/uploadDownload/getFileContent",
          data: { data: {
            documentId: "a55a28d4a25811ea93c354e1ad87433a"//改成通用跳转传过来的documentId documentId: this.documentId
          } }
        }).then(res => { }).then(res => {
          if(res.return_code == 200) if (res.return_code == 200) {
            console.log("123" + res.result); console.log("123" + res.result);
            //res.result就是文本的内容 content = res.result;
          else{ } else {
            this.$message({ this.$message({
              message: res.return_info, message: res.return_info,
              type: "error" type: "error"
            }); });
          } }
        }); });
    }, },
// 暂时没用 // 暂时没用
handleOption() { handleOption() {
console.log(this.token.entityId); console.log(this.token.entityId);
...@@ -352,6 +351,17 @@ export default { ...@@ -352,6 +351,17 @@ export default {
}); });
} }
}, },
// 定位原文token
highlight() {
if (window.getSelection().toString() != "") {
//console.log("1111"+window.getSelection().toString());
this.ifAlert = true;
//var word;
this.token.word = window.getSelection().toString();
this.token.begin = window.getSelection().anchorOffset; //开始位置
this.token.end = window.getSelection().focusOffset; //结束位置
}
},
// 标注 // 标注
handleCheckChange() { handleCheckChange() {
console.log(this.$refs.tree.getCheckedNodes()); console.log(this.$refs.tree.getCheckedNodes());
...@@ -364,7 +374,7 @@ export default { ...@@ -364,7 +374,7 @@ export default {
}); });
console.log("111" + arr); console.log("111" + arr);
this.token.attribute = arr[0]; this.token.attribute = arr[0];
this.msg = this.msg.map(item => { this.content = this.content.map(item => {
let replaceReg = new RegExp(this.token.word, "g"); // 匹配关键字正则 let replaceReg = new RegExp(this.token.word, "g"); // 匹配关键字正则
let replaceString = let replaceString =
'<span class="highlights-text">' + '<span class="highlights-text">' +
...@@ -385,23 +395,22 @@ export default { ...@@ -385,23 +395,22 @@ export default {
method: "post", method: "post",
url: "http://127.0.0.1:9100/textAnnotation/addToken", url: "http://127.0.0.1:9100/textAnnotation/addToken",
data: { data: {
documentId: "a55a28d4a25811ea93c354e1ad87433a",//改成通用跳转传过来的documentId documentId: this.documentId,
token:{ token: {
entityId: this.token.entityId, // 这里类型似乎是string entityId: this.token.entityId, // TODO:这里类型似乎是string
word: this.token.word, word: this.token.word,
begin: this.token.begin, begin: this.token.begin,
end: this.token.end, end: this.token.end,
attribute: arr[0], attribute: arr[0]
} }
} }
}).then(res=>{ }).then(res => {
if(res.return_code == 200){ if (res.return_code == 200) {
this.token.tokenId = res.result this.token.tokenId = res.result;
token = this.token token = this.token;
this.token = {}; this.token = {};
this.tokenList.push(token); this.tokenList.push(token);
} } else {
else{
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error"
...@@ -425,23 +434,7 @@ export default { ...@@ -425,23 +434,7 @@ export default {
this.ifAlert = true; this.ifAlert = true;
this.token = tag; this.token = tag;
this.tokenList.splice(this.tokenList.indexOf(tag), 1); this.tokenList.splice(this.tokenList.indexOf(tag), 1);
this.axios({ this.$options.methods.handleTokenClose(tag);
method: "post",
url: "http://127.0.0.1:9100/textAnnotation/deleteToken",//改成通用跳转传过来的documentId
data: {
documentId: "a55a28d4a25811ea93c354e1ad87433a",
tokenId: this.token.tokenId
}
}).then(res => {
if(res.return_code == 200)
console.log("123" + res.return_info);
else{
this.$message({
message: res.return_info,
type: "error"
});
}
});
}, },
// 直接调用修改接口(因为选择属性弹窗的提交会触发保存标注操作所以会再次产生一个标注,修改也不会成功) // 直接调用修改接口(因为选择属性弹窗的提交会触发保存标注操作所以会再次产生一个标注,修改也不会成功)
// handleTokenChange(tag) { // handleTokenChange(tag) {
...@@ -478,7 +471,7 @@ export default { ...@@ -478,7 +471,7 @@ export default {
handleTokenClose(tag) { handleTokenClose(tag) {
this.tokenList.splice(this.tokenList.indexOf(tag), 1); this.tokenList.splice(this.tokenList.indexOf(tag), 1);
this.token = tag; this.token = tag;
this.msg = this.msg.map(item => { this.content = this.content.map(item => {
let replaceReg = new RegExp( let replaceReg = new RegExp(
'<span class="highlights-text">' + this.token.word + "</span>", '<span class="highlights-text">' + this.token.word + "</span>",
"g" "g"
...@@ -492,13 +485,12 @@ export default { ...@@ -492,13 +485,12 @@ export default {
method: "post", method: "post",
url: "http://127.0.0.1:9100/textAnnotation/deleteToken", url: "http://127.0.0.1:9100/textAnnotation/deleteToken",
data: { data: {
documentId: "a55a28d4a25811ea93c354e1ad87433a",//改成通用跳转传过来的documentId documentId: this.documentId,
tokenId: this.token.tokenId tokenId: this.token.tokenId
} }
}).then(res => { }).then(res => {
if(res.return_code == 200) if (res.return_code == 200) console.log("123" + res.return_info);
console.log("123" + res.return_info); else {
else{
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error"
...@@ -517,34 +509,13 @@ export default { ...@@ -517,34 +509,13 @@ export default {
message: "已删除" message: "已删除"
}); });
}, },
setCheckedNodes() {
this.$refs.tree.setCheckedNodes([
{
id: 5,
label: "二级 2-1"
},
{
id: 9,
label: "三级 1-1-1"
}
]);
},
highlight() {
if (window.getSelection().toString() != "") {
//console.log("1111"+window.getSelection().toString());
this.ifAlert = true;
//var word;
this.token.word = window.getSelection().toString();
this.token.begin = window.getSelection().anchorOffset; //开始位置
this.token.end = window.getSelection().focusOffset; //结束位置
}
},
// 提交本次标注 // 提交本次标注
submit() { submit() {
this.$message({ // this.$message({
message: "保存成功!", // message: "保存成功!",
type: "success" // type: "success"
}); // });
this.$router.replace("/completed"); this.$router.replace("/completed");
}, },
// 放到边栏的token边栏 // 放到边栏的token边栏
...@@ -553,15 +524,14 @@ export default { ...@@ -553,15 +524,14 @@ export default {
method: "post", method: "post",
url: "http://127.0.0.1:9100/textAnnotation/getTokenList", url: "http://127.0.0.1:9100/textAnnotation/getTokenList",
data: { data: {
documentId: "a55a28d4a25811ea93c354e1ad87433a" documentId: this.documentId
} }
}).then(res => { }).then(res => {
if(res.return_code == 200){ if (res.return_code == 200) {
res.result.forEach(element => { res.result.forEach(element => {
this.tokenList.push(element) this.tokenList.push(element);
}); });
} } else {
else{
this.$message({ this.$message({
message: res.return_info, message: res.return_info,
type: "error" type: "error"
...@@ -570,6 +540,9 @@ export default { ...@@ -570,6 +540,9 @@ export default {
}); });
} }
}, },
watch: {
$route: "getParams"
},
mounted: function() { mounted: function() {
this.getTokenList(); //需要触发的函数 this.getTokenList(); //需要触发的函数
} }
...@@ -593,7 +566,7 @@ export default { ...@@ -593,7 +566,7 @@ export default {
@include whiteBoard; @include whiteBoard;
} }
} }
.msg { .content {
text-align: left; text-align: left;
font-size: 20px; font-size: 20px;
line-height: 30px; line-height: 30px;
......
...@@ -80,15 +80,31 @@ export default { ...@@ -80,15 +80,31 @@ export default {
address: "那是我心中最美的“第三极”——第二次青藏科考青年说" address: "那是我心中最美的“第三极”——第二次青藏科考青年说"
}; };
return { return {
// 文章id
documentId: '',
// 文章内容
content: [],
//实体属性
token: {
entityId: "",
word: "",
begin: 0,
end: 0,
attribute: "",
tokenId: ""
},
// 实体属性列表
tokenList: [],
// 文章列表
textData: [ textData: [
{ {
label: "那是我心中最美的“第三极”", label: this.documentId,
children: [ children: [
{ {
label: "那是我心中最美的“第三极”——第一次青藏科考青年说" label: this.documentId
}, },
{ {
label: "那是我心中最美的“第三极”——第二次青藏科考青年说" label: "暂无数据"
} }
] ]
} }
...@@ -97,24 +113,6 @@ export default { ...@@ -97,24 +113,6 @@ export default {
children: "children", children: "children",
label: "label" label: "label"
}, },
msg: [
'那是我心中最美的“第三极”——第二次青藏科考青年说<br/> \
"<span class="highlights-text">2020-05-06</span><span class="mark">(实体:时间;属性:yyyy-MM-dd)</span>" 11:08 来源:新华网 编辑:矿材网<br/> \
“看到国家自主研发的‘极目一号’浮空器从纳木错科考站升起,她宛若白鲸,越升越高,融入了星海。古老的‘第三极’与前沿的科技,在星空中融为一体,那就是我心中最美的‘第三极’风情。”中国科学院空天信息创新研究院的屈维说。<br/> \
2019年5月23日,中国科学院空天信息创新研究院研制的“极目一号”浮空器在第二次青藏高原综合科学考察研究中,在纳木错升空达到海拔7003米的高度,创造了迄今已知同类型、同量级浮空器驻空高度的世界纪录。<br/> \
第二次青藏高原综合科考从2017年8月全面启动,在之后5到10年内,大批科研工作者将对青藏高原的水、生态、人类活动等环境问题进行考察研究。我国首次青藏高原综合科学考察研究是20世纪70年代,这次综合科考研究积累了大量科学资料,为青藏高原生态保护和社会经济发展提供了科学依据。<br/> \
相对于南极和北极,人们把青藏高原称为世界“第三极”。<br/> \
中国科学家认同“第三极”的称号,除了因为青藏高原和南极、北极有表面上的相似,还因为青藏高原的“一举一动”都对地球的整体环境有着重要影响。<br/> \
“当科考车翻过山头,映入眼帘的便是海拔4700米的纳木错与远处的 "<span class="highlights-text">雪山</span><span class="mark">(实体:山体;属性:岩质)</span>",碧蓝的湖水倒映着树木、"<span class="highlights-text">雪山</span><span class="mark">(实体:山体;属性:岩质)</span>",一相逢便割舍不下。”2018年参加工作的屈维说,能参与第二次青藏科考,能看到“第三极”的多样风情,是他的幸运。<br/> \
作为地球“第三极”的核心区,西藏有着极致的美丽。顶着身体不适,扛着各种仪器,做样方、采标本、打土钻和入户调研是科考队员户外作业最平常的事情。<br/> \
“高原上的天气极不稳定,狂风、冰雹、大雨会在同一天多次造访,我们必须趁着天气略有好转时,见缝插针,尽可能多地赶任务。一日行车数百公里都是‘家常便饭’,调研途中为了‘救出’陷入泥坑的车辆,经常折腾到灰头土脸。”36岁的西藏农牧学院副教授王向涛说。<br/> \
"<span class="highlights-text">2019年7月</span><span class="mark">(实体:时间;属性:yyyy-MM-dd)</span>",第二次青藏科考雅鲁藏布大峡谷水汽通道考察分队在墨脱县的一次“陷车”,至今让科考队员李璐含记忆深刻。当时,墨脱因为多日暴雨和泥石流,已封锁半个月之久,科考队员采集数据的当天仍在下暴雨。傍晚,车子到了一处山体坍塌严重的路段。<br/> \
“当车子陷入泥泞的时候,我心想,今晚或许就要睡在这里了。”李璐含说,“知道我们是科考队后,前后方车辆的司机和路旁维修道路的人都帮我们推车。原本在黑暗中的车子,被车灯和探照灯照亮,使我能看清这些人的面庞,他们用不同的方言喊口号、用力推车的场景让我难忘。”<br/> \
躺在草地上观看云团变幻出各种造型;科考间隙引逗草原上东张西望的鼠兔或旱獭;科考途中和赶着牛群、羊群的牧民依靠手势交流,致以微笑……这些是科考队员在科考途中不多的乐趣。<br/> \
作为第二次青藏科考的参与人员,王向涛多次深入藏北地区考察。“有时候,我随手拍的风景照发到朋友圈,会引来朋友的羡慕。或许这是很多人眼里的‘诗和远方’,但对于我们来说,这一次次‘旅程’不是‘游山玩水’,而是科研工作者的负重前行。”王向涛感慨说。<br/> \
2019年以来,第二次青藏高原综合科学考察研究队在西藏共采集大气、水文、土壤等环境要素样品1.2万余份,采集动植物、微生物样本4.4万余份,收集经济社会发展资料超2200套,在“亚洲水塔”变化与影响及应对等方面取得突破。<br/> \
“我们在西藏进行科学考察,必须了解当地群众生产、生活需求和意愿,为保护好这里的一草一木尽一份绵薄之力。肆虐的风雪阻挡不住前进的路,选择了科考,选择了拥抱这片广袤的土地,就是青春的荣耀。”王向涛说。'
],
commentScore: false, commentScore: false,
scoreForm: { scoreForm: {
accuracy: "", accuracy: "",
...@@ -125,22 +123,50 @@ export default { ...@@ -125,22 +123,50 @@ export default {
tokenList: [] tokenList: []
}; };
}, },
created() {
this.getParams();
},
methods: { methods: {
// 获取文本id
getParams() {
var routerParams = this.$route.params.documentId;
this.documentId = routerParams;
},
handleNodeClick(data) { handleNodeClick(data) {
console.log(data); console.log(data);
}, },
getArticle() { // 获取文本
axios.get("/textAnnotation?textid=10").then(function(response) { getContent() {
console.log(response); this.axios({
method: "post",
url: "http://127.0.0.1:9100/uploadDownload/getFileContent",
data: {
documentId: this.documentId
}
}).then(res => {
if (res.return_code == 200) {
console.log("123" + res.result);
content = res.result;
} else {
this.$message({
message: res.return_info,
type: "error"
});
}
}); });
}, },
//getArticle() {
// axios.get("/textAnnotation?textid=10").then(function(response) {
// console.log(response);
// });
//},
// 放到边栏的token边栏 // 放到边栏的token边栏
getTokenList() { getTokenList() {
this.axios({ this.axios({
method: "post", method: "post",
url: "http://127.0.0.1:9100/textAnnotation/getTokenList", url: "http://127.0.0.1:9100/textAnnotation/getTokenList",
data: { data: {
documentId: "a55a28d4a25811ea93c354e1ad87433a" documentId: this.documentId
} }
}).then(res => { }).then(res => {
if(res.return_code == 200){ if(res.return_code == 200){
...@@ -154,6 +180,7 @@ export default { ...@@ -154,6 +180,7 @@ export default {
} }
}); });
}, },
// 打分
addScore() { addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "") if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容"); this.$message("请输入内容");
......
...@@ -9,6 +9,8 @@ import 'element-ui/lib/theme-chalk/index.css' ...@@ -9,6 +9,8 @@ import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios' import axios from 'axios'
import VueAxios from 'vue-axios' import VueAxios from 'vue-axios'
import * as math from 'mathjs' import * as math from 'mathjs'
// cnpm i default-passive-events -S
import 'default-passive-events'
Vue.prototype.$math = math Vue.prototype.$math = math
......
...@@ -39,8 +39,18 @@ def create_text_slice(task_id, model_id): ...@@ -39,8 +39,18 @@ def create_text_slice(task_id, model_id):
else: else:
return Result(1, "create success", slice.slice_id) return Result(1, "create success", slice.slice_id)
# 创建表格分片 表格分片类型值为1
def create_text_slice(task_id, model_id):
try:
Task.add_slice(task_id)
slice = Slice(task_id=task_id, model_id=model_id, type=0)
slice.save()
except:
return Result(0, "create failed", {})
else:
return Result(1, "create success", slice.slice_id)
# 创建图片分片 图片分片类型值为1 # 创建图片分片 图片分片类型值为2
def create_pic_slice(task_id, description): def create_pic_slice(task_id, description):
try: try:
Task.add_slice(task_id) Task.add_slice(task_id)
...@@ -52,7 +62,7 @@ def create_pic_slice(task_id, description): ...@@ -52,7 +62,7 @@ def create_pic_slice(task_id, description):
return Result(1, "create success", slice.slice_id) return Result(1, "create success", slice.slice_id)
# 创建图层分片 图层分片类型值为2 # 创建图层分片 图层分片类型值为3
def create_layer_slice(task_id, description): def create_layer_slice(task_id, description):
try: try:
Task.add_slice(task_id) Task.add_slice(task_id)
...@@ -86,6 +96,9 @@ def find_slice_by_task(task_id): ...@@ -86,6 +96,9 @@ def find_slice_by_task(task_id):
t = "文本" t = "文本"
template = find[index].model_id template = find[index].model_id
elif find[index].type == '1': elif find[index].type == '1':
t = "表格"
template = find[index].model_id
elif find[index].type == '2':
t = "图片" t = "图片"
template = find[index].illustration template = find[index].illustration
else: else:
...@@ -121,6 +134,9 @@ def find_slice_by_task_user(task_id, user_id): ...@@ -121,6 +134,9 @@ def find_slice_by_task_user(task_id, user_id):
t = "文本" t = "文本"
template = find[index].model_id template = find[index].model_id
elif find[index].type == '1': elif find[index].type == '1':
t = "表格"
template = find[index].model_id
elif find[index].type == '2':
t = "图片" t = "图片"
template = find[index].illustration template = find[index].illustration
else: else:
...@@ -178,6 +194,8 @@ def find_slice_annotation_by_task(task_id, type): ...@@ -178,6 +194,8 @@ def find_slice_annotation_by_task(task_id, type):
if find[index].type == '0': if find[index].type == '0':
template = find[index].model_id template = find[index].model_id
elif find[index].type == '1': elif find[index].type == '1':
template = find[index].model_id
elif find[index].type == '2':
template = find[index].illustration template = find[index].illustration
else: else:
template = find[index].illustration template = find[index].illustration
......
参加过一次软院心理讲座,但是未录入
有博雅记录的一共4次
总共5次博雅
\ No newline at end of file
home = C:\Users\77942\AppData\Local\Programs\Python\Python37 home = D:\Python\Python37
include-system-site-packages = false include-system-site-packages = false
version = 3.7.3 version = 3.7.3
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