Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
a9ff8f43
Commit
a9ff8f43
authored
Jul 23, 2020
by
wyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文本导出
parent
d7c6ee91
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
9 deletions
+139
-9
SelectText.vue
...atform-front/src/components/textAnnotation/SelectText.vue
+27
-2
SelectedCheck.vue
...orm-front/src/components/textAnnotation/SelectedCheck.vue
+22
-1
SelectedText.vue
...form-front/src/components/textAnnotation/SelectedText.vue
+23
-1
Table.vue
DAPlatform-front/src/components/textAnnotation/Table.vue
+24
-3
Tabled.vue
DAPlatform-front/src/components/textAnnotation/Tabled.vue
+22
-1
TabledCheck.vue
...tform-front/src/components/textAnnotation/TabledCheck.vue
+21
-1
No files found.
DAPlatform-front/src/components/textAnnotation/SelectText.vue
View file @
a9ff8f43
...
...
@@ -40,6 +40,8 @@
<br
/>
<div>
<el-button
class=
"button1"
type=
"primary"
@
click=
"submit()"
>
提交
</el-button>
<el-button
class=
"button2"
type=
"primary"
@
click=
"exportContent()"
>
导出文本
</el-button>
<el-button
class=
"button3"
type=
"primary"
@
click=
"exportTokenList()"
>
导出标注
</el-button>
</div>
<!-- 弹窗-->
...
...
@@ -67,6 +69,9 @@
</
template
>
<
script
>
import
FileSaver
from
'file-saver'
;
export
default
{
data
()
{
return
{
...
...
@@ -112,6 +117,7 @@ export default {
this
.
file
=
this
.
$route
.
params
.
file
;
this
.
task
=
this
.
$route
.
params
.
task
;
this
.
relationId
=
this
.
$route
.
params
.
relationId
;
this
.
piece
=
this
.
$route
.
params
.
piece
;
},
methods
:
{
// 插入数据库
...
...
@@ -124,7 +130,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
1
,
// TODO 模板id
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
textUrl
:
this
.
file
.
url
,
...
...
@@ -220,7 +226,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/getOneTemplate"
,
data
:
{
templateId
:
1
,
// TODO 待沟通,通用那边没给这个接口,还有这个在后端用str包了,这里用int就行,后期改成写了实体再自己取属性列表吧
templateId
:
this
.
piece
.
template
,
// TODO 待沟通,通用那边没给这个接口,还有这个在后端用str包了,这里用int就行,后期改成写了实体再自己取属性列表吧
creatorId
:
this
.
task
.
creator_id
}
}).
then
(
res
=>
{
...
...
@@ -467,7 +473,26 @@ export default {
name
:
"ongoingtaskdetail"
,
params
:
{
task
:
encodeURIComponent
(
JSON
.
stringify
(
this
.
task
))
}
});
},
exportContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/downloadContent"
,
data
:
{
// documentId: "9aa2d69cc66411ea879e54e1ad87433a"
documentId
:
this
.
documentId
}
}).
then
(
res
=>
{
console
.
log
(
res
)
// let blob = new Blob([res], {type : 'application/octet-stream'});
let
blob
=
new
Blob
([
res
],
{
type
:
'text/plain'
});
FileSaver
.
saveAs
(
blob
);
});
},
exportTokenList
()
{
let
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
tokenList
)],
{
type
:
'application/json'
});
FileSaver
.
saveAs
(
blob
);
},
},
mounted
:
function
()
{
this
.
insertDocument
();
...
...
DAPlatform-front/src/components/textAnnotation/SelectedCheck.vue
View file @
a9ff8f43
...
...
@@ -34,6 +34,8 @@
<div
class=
"button1"
>
<el-button
type=
"primary"
@
click=
"commentScore = true"
>
打分
</el-button>
<el-button
type=
"primary"
@
click=
"submit()"
>
提交
</el-button>
<el-button
class=
"button2"
type=
"primary"
@
click=
"exportContent()"
>
导出文本
</el-button>
<el-button
class=
"button3"
type=
"primary"
@
click=
"exportTokenList()"
>
导出标注
</el-button>
<el-dialog
title=
"请打分"
:visible
.
sync=
"commentScore"
width=
"400px"
>
<el-form
:model=
"scoreForm"
>
<el-form-item
label=
"标注准确率"
:label-width=
"formLabelWidth"
>
...
...
@@ -105,6 +107,7 @@ export default {
this
.
file
=
this
.
$route
.
params
.
file
;
this
.
task
=
this
.
$route
.
params
.
task
;
this
.
relationId
=
this
.
$route
.
params
.
relationId
;
this
.
piece
=
this
.
$route
.
params
.
piece
;
},
methods
:
{
// 插入数据库
...
...
@@ -117,7 +120,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
1
,
// TODO 模板id
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
textUrl
:
this
.
file
.
url
,
...
...
@@ -235,6 +238,24 @@ export default {
this
.
$message
(
"打分成功"
);
}
},
exportContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/downloadContent"
,
data
:
{
documentId
:
this
.
documentId
}
}).
then
(
res
=>
{
console
.
log
(
res
)
// let blob = new Blob([res], {type : 'application/octet-stream'});
let
blob
=
new
Blob
([
res
],
{
type
:
'text/plain'
});
FileSaver
.
saveAs
(
blob
);
});
},
exportTokenList
()
{
let
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
tokenList
)],
{
type
:
'application/json'
});
FileSaver
.
saveAs
(
blob
);
},
submit
()
{
alert
(
"打分成功"
);
this
.
$router
.
push
({
path
:
"/taskhall"
});
...
...
DAPlatform-front/src/components/textAnnotation/SelectedText.vue
View file @
a9ff8f43
...
...
@@ -31,6 +31,8 @@
<br
/>
<div>
<el-button
class=
"button1"
type=
"primary"
@
click=
"submit()"
>
提交
</el-button>
<el-button
class=
"button2"
type=
"primary"
@
click=
"exportContent()"
>
导出文本
</el-button>
<el-button
class=
"button3"
type=
"primary"
@
click=
"exportTokenList()"
>
导出标注
</el-button>
</div>
</div>
</el-main>
...
...
@@ -39,6 +41,7 @@
</
template
>
<
script
>
import
FileSaver
from
'file-saver'
;
export
default
{
data
()
{
return
{
...
...
@@ -90,6 +93,7 @@ export default {
this
.
file
=
this
.
$route
.
params
.
file
;
this
.
task
=
this
.
$route
.
params
.
task
;
this
.
relationId
=
this
.
$route
.
params
.
relationId
;
this
.
piece
=
this
.
$route
.
params
.
piece
;
},
methods
:
{
// 插入数据库
...
...
@@ -102,7 +106,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
1
,
// TODO 模板id
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
textUrl
:
this
.
file
.
url
,
...
...
@@ -190,6 +194,24 @@ export default {
}
});
},
exportContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/downloadContent"
,
data
:
{
documentId
:
this
.
documentId
}
}).
then
(
res
=>
{
console
.
log
(
res
)
// let blob = new Blob([res], {type : 'application/octet-stream'});
let
blob
=
new
Blob
([
res
],
{
type
:
'text/plain'
});
FileSaver
.
saveAs
(
blob
);
});
},
exportTokenList
()
{
let
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
tokenList
)],
{
type
:
'application/json'
});
FileSaver
.
saveAs
(
blob
);
},
submit
()
{
this
.
$router
.
push
({
path
:
"/taskhall"
});
}
...
...
DAPlatform-front/src/components/textAnnotation/Table.vue
View file @
a9ff8f43
...
...
@@ -75,6 +75,8 @@
<br
/>
<div>
<el-button
type=
"primary"
@
click=
"submit()"
>
提交
</el-button>
<el-button
class=
"button2"
type=
"primary"
@
click=
"exportContent()"
>
导出文本
</el-button>
<el-button
class=
"button3"
type=
"primary"
@
click=
"exportTokenList()"
>
导出标注
</el-button>
</div>
<!-- 弹窗-->
...
...
@@ -103,6 +105,7 @@
</
template
>
<
script
>
import
FileSaver
from
'file-saver'
;
export
default
{
data
()
{
return
{
...
...
@@ -162,6 +165,7 @@ export default {
this
.
file
=
this
.
$route
.
params
.
file
;
this
.
task
=
this
.
$route
.
params
.
task
;
this
.
relationId
=
this
.
$route
.
params
.
relationId
;
this
.
piece
=
this
.
$route
.
params
.
piece
;
},
methods
:
{
// 插入数据库
...
...
@@ -173,7 +177,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
1
,
// TODO 模板id
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
textUrl
:
this
.
file
.
url
,
...
...
@@ -260,7 +264,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/getOneTemplate"
,
data
:
{
templateId
:
1
,
templateId
:
this
.
piece
.
template
,
creatorId
:
this
.
task
.
creator_id
}
}).
then
(
res
=>
{
...
...
@@ -515,7 +519,24 @@ export default {
name
:
"ongoingtaskdetail"
,
params
:
{
task
:
encodeURIComponent
(
JSON
.
stringify
(
this
.
task
))
}
});
}
},
exportContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/downloadContent"
,
data
:
{
documentId
:
this
.
documentId
},
responseType
:
"blob"
}).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel;charset=utf-8'
,});
FileSaver
.
saveAs
(
blob
,
"download.xlsx"
);
});
},
exportTokenList
()
{
let
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
tokenList
)],
{
type
:
'application/json'
});
FileSaver
.
saveAs
(
blob
);
},
},
mounted
:
function
()
{
this
.
insertDocument
();
...
...
DAPlatform-front/src/components/textAnnotation/Tabled.vue
View file @
a9ff8f43
...
...
@@ -77,6 +77,8 @@
<!--div v-if="this.$route.query.isCheck == '1'"-->
<div>
<el-button
type=
"primary"
@
click=
"submit()"
>
提交
</el-button>
<el-button
class=
"button2"
type=
"primary"
@
click=
"exportContent()"
>
导出文本
</el-button>
<el-button
class=
"button3"
type=
"primary"
@
click=
"exportTokenList()"
>
导出标注
</el-button>
</div>
</div>
</el-main>
...
...
@@ -85,6 +87,7 @@
</
template
>
<
script
>
import
FileSaver
from
'file-saver'
;
export
default
{
data
()
{
return
{
...
...
@@ -150,6 +153,7 @@ export default {
this
.
file
=
this
.
$route
.
params
.
file
;
this
.
task
=
this
.
$route
.
params
.
task
;
this
.
relationId
=
this
.
$route
.
params
.
relationId
;
this
.
piece
=
this
.
$route
.
params
.
piece
;
},
methods
:
{
// 插入数据库
...
...
@@ -161,7 +165,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
1
,
// TODO 模板id
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
textUrl
:
this
.
file
.
url
,
...
...
@@ -241,6 +245,23 @@ export default {
}
});
},
exportContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/downloadContent"
,
data
:
{
documentId
:
this
.
documentId
},
responseType
:
"blob"
}).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel;charset=utf-8'
,});
FileSaver
.
saveAs
(
blob
,
"download.xlsx"
);
});
},
exportTokenList
()
{
let
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
tokenList
)],
{
type
:
'application/json'
});
FileSaver
.
saveAs
(
blob
);
},
submit
()
{
this
.
$router
.
push
({
path
:
"/taskhall"
});
...
...
DAPlatform-front/src/components/textAnnotation/TabledCheck.vue
View file @
a9ff8f43
...
...
@@ -78,6 +78,8 @@
<div>
<el-button
type=
"primary"
@
click=
"commentScore = true"
>
打分
</el-button>
<el-button
type=
"primary"
@
click=
"submit()"
>
提交
</el-button>
<el-button
class=
"button2"
type=
"primary"
@
click=
"exportContent()"
>
导出文本
</el-button>
<el-button
class=
"button3"
type=
"primary"
@
click=
"exportTokenList()"
>
导出标注
</el-button>
<el-dialog
title=
"请打分"
:visible
.
sync=
"commentScore"
width=
"400px"
>
<el-form
:model=
"scoreForm"
>
<el-form-item
label=
"标注准确率"
:label-width=
"formLabelWidth"
>
...
...
@@ -162,6 +164,7 @@ export default {
this
.
file
=
this
.
$route
.
params
.
file
;
this
.
task
=
this
.
$route
.
params
.
task
;
this
.
relationId
=
this
.
$route
.
params
.
relationId
;
this
.
piece
=
this
.
$route
.
params
.
piece
;
},
methods
:
{
// 插入数据库
...
...
@@ -173,7 +176,7 @@ export default {
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
1
,
// TODO 模板id
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
textUrl
:
this
.
file
.
url
,
...
...
@@ -307,6 +310,23 @@ export default {
}
})
},
exportContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/downloadContent"
,
data
:
{
documentId
:
this
.
documentId
},
responseType
:
"blob"
}).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel;charset=utf-8'
,});
FileSaver
.
saveAs
(
blob
,
"download.xlsx"
);
});
},
exportTokenList
()
{
let
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
tokenList
)],
{
type
:
'application/json'
});
FileSaver
.
saveAs
(
blob
);
}
},
mounted
:
function
()
{
this
.
insertDocument
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment