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
2e17db84
Commit
2e17db84
authored
Sep 28, 2020
by
王腾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image
parent
97bd2c8e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
594 deletions
+77
-594
imageAnnotiation.vue
...front/src/components/imageAnnotation/imageAnnotiation.vue
+1
-0
imageCheck.vue
...tform-front/src/components/imageAnnotation/imageCheck.vue
+18
-5
layerAnnotation.vue
...-front/src/components/imageAnnotation/layerAnnotation.vue
+3
-0
layerCheck.vue
...tform-front/src/components/imageAnnotation/layerCheck.vue
+52
-13
Table-before.vue
...form-front/src/components/textAnnotation/Table-before.vue
+0
-575
app.py
DAPlatform/app.py
+1
-1
nano.save
nano.save
+2
-0
No files found.
DAPlatform-front/src/components/imageAnnotation/imageAnnotiation.vue
View file @
2e17db84
...
...
@@ -868,6 +868,7 @@ export default {
const
newLabel
=
{
labelId
:
currentLabelId
,
labelName
:
labelName
,
correct
:
0
,
pointList
:
pointList
}
this
.
data
[
currentImageId
].
children
.
push
(
newLabel
)
...
...
DAPlatform-front/src/components/imageAnnotation/imageCheck.vue
View file @
2e17db84
...
...
@@ -204,7 +204,7 @@ export default {
let
baseURL
=
this
.
baseURL
// 获取图片列表并转换格式
let
imageList
=
await
this
.
getLabelList
()
//
console.log(imageList)
console
.
log
(
imageList
)
this
.
imageList
=
imageList
.
imageList
// 加载第一张图片
...
...
@@ -276,6 +276,7 @@ export default {
// 还原数据库里的标注记录
let
id
=
_this
.
pictureId
// console.log('id = ' + id)
// console.log(_this.data)
_this
.
data
.
forEach
(
function
(
element
,
index
)
{
var
indexPic
=
index
...
...
@@ -286,8 +287,13 @@ export default {
num
.
push
(
element1
.
Y
)
})
_this
.
canvasAll
[
indexPic
].
push
(
num
)
_this
.
canvasAllCheck
.
push
(
0
)
_this
.
canvasAllCheck
.
push
(
element
.
correct
)
if
(
element
.
correct
==
0
){
_this
.
value
.
push
(
false
)
}
else
{
_this
.
value
.
push
(
true
)
}
})
})
// 还原标注
...
...
@@ -332,14 +338,19 @@ export default {
watch
:
{
value
:
function
fn
()
{
var
tmp
=
this
.
canvasAllCheck
;
let
_this
=
this
this
.
value
.
forEach
((
e
,
index
)
=>
{
if
(
tmp
[
index
]
==
0
)
{
if
(
e
==
true
)
{
_this
.
data
[
0
].
children
[
index
].
correct
=
2
;
tmp
[
index
]
=
2
;
console
.
log
(
_this
.
data
)
}
}
else
if
(
tmp
[
index
]
==
2
)
{
if
(
e
==
false
)
{
_this
.
data
[
0
].
children
[
index
].
correct
=
0
;
tmp
[
index
]
=
0
;
console
.
log
(
_this
.
data
)
}
}
})
...
...
@@ -882,6 +893,7 @@ export default {
}
// pointList完成
const
newLabel
=
{
correct
:
1
,
labelId
:
currentLabelId
,
labelName
:
labelName
,
pointList
:
pointList
...
...
@@ -1053,6 +1065,7 @@ export default {
// _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height)
_this
.
canvasAll
[
id
].
push
(
num
)
_this
.
canvasAllCheck
.
push
(
1
)
_this
.
value
.
push
(
false
)
_this
.
restoreCanvas
()
...
...
@@ -1153,9 +1166,9 @@ export default {
var
tmp
=
[]
for
(
var
i
=
0
;
i
<
element
.
children
.
length
;
i
++
)
{
// console.log(this.canvasAllCheck[i])
if
(
this
.
canvasAllCheck
[
i
]
==
1
||
this
.
canvasAllCheck
[
i
]
==
2
)
{
//
if (this.canvasAllCheck[i] == 1 || this.canvasAllCheck[i] == 2) {
tmp
.
push
(
element
.
children
[
i
])
}
//
}
}
// console.log(element.children)
// console.log(tmp)
...
...
@@ -1168,7 +1181,7 @@ export default {
})
// console.log('outputdata')
//
console.log(outputData)
console
.
log
(
outputData
)
this
.
submit
()
...
...
DAPlatform-front/src/components/imageAnnotation/layerAnnotation.vue
View file @
2e17db84
...
...
@@ -601,6 +601,7 @@ export default {
X
:
position
.
X
,
Y
:
position
.
Y
,
landmarkId
:
currentId
,
correct
:
0
,
landmarkName
:
landmarkName
}
this
.
landmarkData
.
push
(
newlandmark
)
...
...
@@ -688,6 +689,7 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
correct
:
0
,
pointList
:
pointList
}
this
.
layerData
.
push
(
newLabel
)
...
...
@@ -751,6 +753,7 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
correct
:
0
,
pointList
:
pointList
}
this
.
layerData
.
push
(
newLabel
)
...
...
DAPlatform-front/src/components/imageAnnotation/layerCheck.vue
View file @
2e17db84
...
...
@@ -209,8 +209,12 @@ export default {
data
()
{
return
{
computeScore
:
0
,
value
:
[],
value2
:
[],
value
:
[],
// 地标checkbox
value2
:
[],
// 区域标注checkbox
checkLayer
:
[],
// 区域标注审核结果
checkLand
:
[],
// 地标标注审核结果
layerData
:
null
,
// layerdata存放标注数据
landmarkData
:
null
,
// 存放地标数据
activeName
:
'first'
,
isPoint
:
true
,
centerX
:
0
,
...
...
@@ -226,10 +230,7 @@ export default {
radio1
:
'地标'
,
activeIndex1
:
1
,
hasSaved
:
1
,
// 保存标志
checkLayer
:
[],
checkLand
:
[],
layerData
:
null
,
// layerdata存放标注数据
landmarkData
:
null
,
// 存放地标数据
relationId
:
null
,
// 当前任务的relationID
clickedPosition
:
null
,
// 保存最新一次点击的结果,没有使用
map
:
null
,
...
...
@@ -258,19 +259,34 @@ export default {
// 避免第一次标注时数据库中没有内容的情况
if
(
res
.
layerInfo
!=
null
)
{
this
.
layerData
=
res
.
layerInfo
.
labelList
;
console
.
log
(
'this.layerData'
)
console
.
log
(
this
.
layerData
)
for
(
let
i
=
0
;
i
<
this
.
layerData
.
length
;
i
++
)
{
this
.
checkLayer
.
push
(
0
)
let
tmpCorrect
=
this
.
layerData
[
i
].
correct
this
.
checkLayer
.
push
(
tmpCorrect
)
if
(
tmpCorrect
!=
0
)
{
this
.
value2
.
push
(
true
)
}
else
{
this
.
value2
.
push
(
false
)
}
}
}
else
{
this
.
layerData
=
[]
}
// console.log(this.layerData)
if
(
res
.
landmarkList
!=
null
)
{
this
.
landmarkData
=
res
.
landmarkList
.
landmarkEntityList
;
console
.
log
(
'this.landmarkData'
)
console
.
log
(
this
.
landmarkData
)
for
(
let
i
=
0
;
i
<
this
.
landmarkData
.
length
;
i
++
)
{
this
.
checkLand
.
push
(
0
)
let
tmpCorrect
=
this
.
landmarkData
[
i
].
correct
// alert(tmpCorrect)
this
.
checkLand
.
push
(
tmpCorrect
)
if
(
tmpCorrect
!=
0
)
{
this
.
value
.
push
(
true
)
}
else
{
this
.
value
.
push
(
false
)
}
}
}
else
{
this
.
landmarkData
=
[]
}
// console.log(this.landmarkData)
...
...
@@ -312,14 +328,26 @@ export default {
watch
:
{
value
:
function
fn
()
{
var
tmp
=
this
.
checkLand
;
this
.
value
.
forEach
((
e
,
index
)
=>
{
console
.
log
(
'tmp'
)
console
.
log
(
tmp
[
index
])
console
.
log
(
e
)
if
(
tmp
[
index
]
==
0
)
{
if
(
e
==
true
)
{
tmp
[
index
]
=
2
;
this
.
landmarkData
[
index
].
correct
=
2
;
console
.
log
(
'this.landmarkData[index]'
)
console
.
log
(
this
.
landmarkData
[
index
])
}
}
else
if
(
tmp
[
index
]
==
2
)
{
if
(
e
==
false
)
{
tmp
[
index
]
=
0
;
this
.
landmarkData
[
index
].
correct
=
0
;
console
.
log
(
'this.landmarkData[index]'
)
console
.
log
(
this
.
landmarkData
[
index
])
}
}
})
...
...
@@ -332,10 +360,17 @@ export default {
if
(
tmp
[
index
]
==
0
)
{
if
(
e
==
true
)
{
tmp
[
index
]
=
2
;
this
.
layerData
[
index
].
correct
=
2
;
console
.
log
(
'this.layerData[index]'
)
console
.
log
(
this
.
layerData
[
index
])
}
}
else
if
(
tmp
[
index
]
==
2
)
{
if
(
e
==
false
)
{
tmp
[
index
]
=
0
;
this
.
layerData
[
index
].
correct
=
0
;
console
.
log
(
'this.layerData[index]'
)
console
.
log
(
this
.
layerData
[
index
])
}
}
})
...
...
@@ -632,7 +667,8 @@ export default {
if
(
res
.
code
===
1
)
{
let
layerInfo
=
res
.
data
.
layerInfo
let
landmarkList
=
res
.
data
.
landmarkList
// console.log(res.data)
console
.
log
(
res
.
data
)
// 0是标注者标注错误的,1是标注者标注正确的,2是审核者自己添加的
return
{
layerInfo
:
layerInfo
,
landmarkList
:
landmarkList
...
...
@@ -680,6 +716,7 @@ export default {
let
newlandmark
=
{
X
:
position
.
X
,
Y
:
position
.
Y
,
correct
:
1
,
landmarkId
:
currentId
,
landmarkName
:
landmarkName
}
...
...
@@ -770,7 +807,8 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
pointList
:
pointList
pointList
:
pointList
,
correct
:
1
}
this
.
layerData
.
push
(
newLabel
)
this
.
checkLayer
.
push
(
1
)
...
...
@@ -835,7 +873,8 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
pointList
:
pointList
pointList
:
pointList
,
correct
:
1
}
this
.
layerData
.
push
(
newLabel
)
this
.
checkLayer
.
push
(
1
)
...
...
@@ -917,7 +956,7 @@ export default {
// console.log(this.checkLayer)
var
tmpLabel
=
[]
for
(
var
i
=
0
;
i
<
this
.
layerData
.
length
;
i
++
)
{
if
(
this
.
checkLayer
[
i
]
==
2
||
this
.
checkLayer
[
i
]
==
1
)
//
if(this.checkLayer[i] == 2 || this.checkLayer[i] == 1)
tmpLabel
.
push
(
this
.
layerData
[
i
])
}
let
outputLayerInfo
=
{
...
...
@@ -928,7 +967,7 @@ export default {
// 拿出正确的地标信息
var
tmpLandmark
=
[]
for
(
var
i
=
0
;
i
<
this
.
landmarkData
.
length
;
i
++
)
{
if
(
this
.
checkLand
[
i
]
==
2
||
this
.
checkLand
[
i
]
==
1
)
//
if(this.checkLand[i] == 2 || this.checkLand[i] == 1)
tmpLandmark
.
push
(
this
.
landmarkData
[
i
])
}
let
outputlandmarkInfo
=
{
...
...
DAPlatform-front/src/components/textAnnotation/Table-before.vue
deleted
100644 → 0
View file @
97bd2c8e
<
template
>
<div
class=
"select-container"
>
<el-container>
<el-aside
class=
"sidebar3"
>
<!-- 表单列表 -->
<div
class=
"sidebar-box3"
>
<div>
<div
class=
"img-list-title3"
>
表单列表
</div>
<div
class=
"img-title-list-box3"
>
<div
style=
"user-select:none; float:left; padding: 5px;"
>
<div
v-for=
"item in allContent"
:key=
"item.tablename"
@
click=
"changeSheet(item.tablename)"
>
<el-link
icon=
"el-icon-edit"
type=
"primary"
>
{{
item
.
tablename
}}
</el-link>
</div>
</div>
</div>
</div>
</div>
<!-- 实体列表 -->
<div
class=
"sidebar-box3"
>
<div>
<div
class=
"img-list-title3"
>
实体/属性模板
</div>
<div
class=
"img-title-list-box4"
>
<div>
<div
style=
"overflow: auto;height: calc(100vh - 61px - 100px - 180px - 50px);"
>
<p
v-html=
"'实体:'+ value"
/>
<el-tree
:data=
"treeData"
show-checkbox
default-expand-all
node-key=
"id"
ref=
"tree"
highlight-current
:props=
"defaultProps"
></el-tree>
</div>
<el-button
type=
"primary"
style=
"margin-top: 9px;margin-right: 20px;float:right"
@
click=
"submit()"
size=
"small"
plain
>
提交
</el-button>
<el-button
type=
"primary"
style=
"margin-top: 9px;margin-right: 20px;float:right"
@
click=
"uploadToken"
size=
"small"
plain
>
保存
</el-button>
</div>
</div>
</div>
</div>
</el-aside>
<!-- 文件界面 -->
<el-main
class=
"filter-container2"
style=
"background-color: #FFFFFF"
>
<div
style=
"overflow-y:auto;height:100%;"
>
<!-- 表格界面 -->
<div
class=
"content2"
>
<el-table
:data=
"nowContent.tableData"
:cell-style=
"cellStyle"
border
style=
"width: 100%,height:200px"
@
cell-click=
"select"
:cell-class-name=
"getCellIndex"
>
<el-table-column
v-for=
"col in nowContent.name"
:key=
"col"
:prop=
"col.value"
:label=
"col.value"
></el-table-column>
</el-table>
</div>
<!-- 表格界面 -->
<div
class=
"content_left"
>
<div
class=
"tokenList3"
v-for=
"it in tokenList"
:key=
"it"
style=
"user-select:none; float: left;"
>
<el-tag
size=
"small"
@
click=
"changeToken(it)"
closable
:disable-transitions=
"false"
@
close=
"deleteToken(it)"
>
<a
class=
"token3"
v-html=
"it.word"
></a>
</el-tag>
</div>
</div>
</div>
</el-main>
</el-container>
</div>
</
template
>
<
script
>
import
FileSaver
from
"file-saver"
;
export
default
{
data
()
{
return
{
documentId
:
""
,
// 文章
file
:
null
,
// 任务
task
:
null
,
// 文章内容
content
:
""
,
//实体属性
tokenInit
:
{
tokenId
:
""
,
word
:
""
,
begin
:
0
,
end
:
0
,
entityId
:
""
,
attribute
:
[],
},
token
:
{
tokenId
:
""
,
// 编号
word
:
""
,
// 标注
begin
:
0
,
// row
end
:
0
,
// 终止位置
entityId
:
""
,
// column
attribute
:
[],
// 属性
},
row
:
[],
column
:
{},
// 实体属性列表
tokenList
:
[],
// 文章列表
textData
:
[],
// templete
treeData
:
[],
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
//count: 1,
ifAlert
:
false
,
// 弹窗
// 实体
value
:
""
,
// table
nowContent
:
{
tablename
:
""
,
tableData
:
[],
name
:
[],
},
allContent
:
[],
numOfSheet
:
0
,
};
},
beforeMount
()
{
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
:
{
// 插入数据库
insertDocument
()
{
// console.log("userId" + this.$store.state.userInfo.userId);
//console.log("file" + JSON.stringify(this.file));
//console.log("task" + JSON.stringify(this.task));
this
.
axios
({
method
:
"post"
,
url
:
"/textAnnotation/insertDocument"
,
data
:
{
templateId
:
this
.
piece
.
template
,
// TODO 模板id
annotatorId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorId
:
this
.
task
.
creator_id
,
relationId
:
this
.
relationId
,
textUrl
:
this
.
file
.
url
,
type
:
"xlsx"
,
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
();
// 获得标注模板
this
.
getTemplate
();
}
else
{
this
.
$message
({
message
:
res
.
return_info
,
type
:
"error"
,
});
}
});
},
//获取内容
getContent
()
{
this
.
axios
({
method
:
"post"
,
url
:
"/files/getExcelContent"
,
data
:
{
documentId
:
this
.
documentId
,
},
}).
then
((
res
)
=>
{
if
(
res
.
return_code
==
200
)
{
var
i
;
var
nowContent
=
{};
this
.
numOfSheet
=
res
.
result
.
numOfSheet
;
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
()
{
console
.
log
(
"getTokenList"
);
console
.
log
(
" this.tokenList: "
+
JSON
.
stringify
(
this
.
tokenList
));
this
.
axios
({
method
:
"post"
,
url
:
"/textAnnotation/getTokenList"
,
data
:
{
documentId
:
this
.
documentId
,
},
}).
then
((
res
)
=>
{
if
(
res
.
return_code
==
200
)
{
res
.
result
.
forEach
((
element
)
=>
{
this
.
tokenInit
=
element
;
console
.
log
(
" token: "
+
JSON
.
stringify
(
this
.
tokenInit
));
this
.
tokenList
.
push
(
this
.
tokenInit
);
});
console
.
log
(
" this.tokenList: "
+
JSON
.
stringify
(
this
.
tokenList
));
}
else
{
this
.
$message
({
message
:
res
.
return_info
,
type
:
"error"
,
});
}
});
},
//获取模板
getTemplate
()
{
//console.log("getTemplate");
this
.
axios
({
method
:
"post"
,
url
:
"/textAnnotation/getOneTemplate"
,
data
:
{
templateId
:
parseInt
(
this
.
piece
.
template
),
},
}).
then
((
res
)
=>
{
if
(
res
.
return_code
==
200
)
{
//console.log(res.result)
// 实体
this
.
value
=
res
.
result
.
templateName
;
// 现在的实体与模板相近,所以就先固定了
// 属性
this
.
treeData
=
res
.
result
.
entityList
;
}
else
{
this
.
$message
({
message
:
res
.
return_info
,
type
:
"error"
,
});
}
});
},
// 更改表单
changeSheet
(
name
)
{
for
(
var
i
=
0
;
i
<
this
.
numOfSheet
;
i
++
)
{
// console.log("in " + name + " " + this.nowContent.tablename)
if
(
name
==
this
.
allContent
[
i
].
tablename
)
{
// console.log("match " + JSON.stringify(this.allContent[i]))
this
.
nowContent
=
this
.
allContent
[
i
];
}
}
},
// 定位原文token
select
:
function
(
row
,
column
)
{
this
.
row
=
row
;
this
.
column
=
column
;
this
.
token
.
tokenId
=
"0"
;
this
.
token
.
word
=
row
[
column
.
property
];
this
.
token
.
begin
=
row
.
index
;
this
.
token
.
end
=
column
.
index
;
for
(
var
i
=
0
;
i
<
this
.
tokenList
.
length
;
i
++
)
{
if
(
this
.
token
.
begin
==
this
.
tokenList
[
i
].
begin
&&
this
.
token
.
end
==
this
.
tokenList
[
i
].
end
)
{
this
.
$message
({
message
:
"选中单元格已标记"
,
type
:
"info"
,
});
return
;
}
}
console
.
log
(
" token select"
+
JSON
.
stringify
(
this
.
token
));
console
.
log
(
" tokenList select"
+
JSON
.
stringify
(
this
.
tokenList
));
},
getCellIndex
:
function
({
row
,
column
,
rowIndex
,
columnIndex
})
{
row
.
index
=
rowIndex
;
column
.
index
=
columnIndex
;
},
// 表格标注颜色
cellStyle
:
function
(
row
,
column
,
rowIndex
,
columnIndex
)
{
for
(
var
i
=
0
;
i
<
this
.
tokenList
.
length
;
i
++
)
{
// console.log("draw token" + JSON.stringify(this.tokenList[i]));
// console.log("draw rowindex" + JSON.stringify(this.tokenList[i].begin));
// console.log("draw columnindex" + JSON.stringify(this.tokenList[i].end));
// console.log("draw rowindex" + JSON.stringify(row.rowIndex));
// console.log("draw columnindex" + JSON.stringify(row.columnIndex));
if
(
row
.
rowIndex
===
this
.
tokenList
[
i
].
begin
&&
row
.
columnIndex
===
this
.
tokenList
[
i
].
end
)
{
// console.log("draw token" + JSON.stringify(this.token));
return
"background: #d9ecff;"
;
}
}
return
""
;
},
// 添加标注
uploadToken
()
{
let
res
=
this
.
$refs
.
tree
.
getCheckedNodes
();
let
arr
=
[];
res
.
forEach
((
item
)
=>
{
arr
.
push
(
item
.
label
);
// 属性
});
if
(
arr
.
length
==
0
)
{
this
.
$message
({
message
:
"未选择属性"
,
type
:
"info"
,
});
}
else
{
// 删除原有
console
.
log
(
"deleteToken"
);
this
.
axios
({
method
:
"post"
,
url
:
"/textAnnotation/deleteToken"
,
data
:
{
documentId
:
this
.
documentId
,
tokenId
:
this
.
token
.
tokenId
,
},
}).
then
((
res
)
=>
{
if
(
res
.
return_code
==
200
)
{
this
.
tokenList
.
splice
(
this
.
tokenList
.
indexOf
(
this
.
token
),
1
);
}
});
// 保存token
this
.
axios
({
method
:
"post"
,
url
:
"/textAnnotation/addToken"
,
data
:
{
documentId
:
this
.
documentId
,
token
:
{
word
:
this
.
token
.
word
,
begin
:
this
.
token
.
begin
,
end
:
this
.
token
.
end
,
entityId
:
this
.
token
.
entityId
,
attribute
:
arr
,
},
},
}).
then
((
res
)
=>
{
if
(
res
.
return_code
==
200
)
{
this
.
tokenList
=
[];
this
.
getTokenList
();
this
.
cellStyle
(
this
.
row
,
this
.
column
);
this
.
$message
({
message
:
"已保存"
,
type
:
"success"
,
});
}
else
{
this
.
$message
({
message
:
res
.
return_info
,
type
:
"error"
,
});
}
});
}
return
;
},
// 删除实体属性
deleteToken
(
tag
)
{
console
.
log
(
"deleteToken"
);
this
.
axios
({
method
:
"post"
,
url
:
"/textAnnotation/deleteToken"
,
data
:
{
documentId
:
this
.
documentId
,
tokenId
:
tag
.
tokenId
,
},
}).
then
((
res
)
=>
{
if
(
res
.
return_code
==
200
)
{
this
.
$message
({
type
:
"info"
,
message
:
"已删除"
,
});
this
.
tokenList
.
splice
(
this
.
tokenList
.
indexOf
(
tag
),
1
);
this
.
content
=
this
.
contentWithoutColor
;
console
.
log
(
" this.tokenList: "
+
JSON
.
stringify
(
this
.
tokenList
));
console
.
log
(
" this.content: "
+
this
.
content
);
}
else
{
this
.
$message
({
message
:
res
.
return_info
,
type
:
"error"
,
});
}
});
},
// 修改实体属性=删除+添加(如果选择属性弹窗没有点提交直接关掉的话会删除,也就是双击直接删除,也许这里后期需要改)
changeToken
(
tag
)
{
this
.
token
.
tokenId
=
tag
.
tokenId
;
this
.
token
.
word
=
tag
.
word
;
this
.
token
.
begin
=
tag
.
begin
;
this
.
token
.
end
=
tag
.
end
;
this
.
token
.
entityId
=
tag
.
entityId
;
},
// 提交已标注文档
submit
()
{
// console.log("hello" + JSON.stringify(this.task))
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
))
},
});
},
},
mounted
:
function
()
{
this
.
insertDocument
();
},
};
</
script
>
<
style
lang=
'scss'
>
@import
"@/assets/scss/config.scss"
;
@import
"@/assets/scss/mixin.scss"
;
.sidebar3
{
padding
:
0
0
0
0
;
margin-left
:
50px
;
margin-top
:
40px
;
width
:
30%
;
.img-list-title3
{
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-box3
{
padding
:
0
0
0
0
;
width
:
300px
;
height
:
100px
;
overflow
:
auto
;
background-color
:
white
;
box-shadow
:
0px
0px
10px
#dbdbdb
;
}
.img-title-list-box4
{
padding
:
0
0
0
0
;
width
:
300px
;
height
:
calc
(
100vh
-
61px
-
100px
-
180px
);
overflow
:
auto
;
background-color
:
white
;
box-shadow
:
0px
0px
10px
#dbdbdb
;
}
}
.filter-container2
{
margin-right
:
40px
;
margin-left
:
20px
;
margin-top
:
40px
;
height
:
calc
(
100vh
-
61px
-
100px
);
//
float
:
center
;
width
:
100%
;
@include
whiteBoard;
.content2
{
overflow
:
auto
;
height
:
calc
(
100vh
-
61px
-
100px
-
110px
);
text-align
:
left
;
font-size
:
20px
;
line-height
:
30px
;
}
.content_left
{
overflow
:
auto
;
height
:
60px
;
margin-top
:
1px
;
.tokenList3
{
margin
:
3px
;
}
.token3
{
font-size
:
16px
;
}
}
.button1
{
overflow
:
auto
;
float
:
right
;
margin-right
:
10px
;
margin-top
:
10px
;
}
}
.el-table
.warning-row
{
background
:
oldlace
;
}
.el-table
.success-row
{
background
:
#f0f9eb
;
}
.highlights-text
{
color
:
#ff5134
;
text-decoration
:
underline
;
//
background-color
:
rgb
(
255
,
255
,
0
);
}
.mark
{
font-size
:
14px
;
color
:
rgb
(
128
,
138
,
135
);
text-decoration
:
none
;
//
background-color
:
rgb
(
255
,
227
,
132
);
}
.addTag
{
width
:
30%
;
height
:
500px
;
background-color
:
#ffffff
;
position
:
fixed
;
top
:
50%
;
margin-top
:
-250px
;
left
:
55%
;
margin-left
:
-25%
;
border
:
1px
solid
darkgrey
;
border-radius
:
10px
;
padding
:
10px
;
}
.addTagTitle
{
margin-top
:
15px
;
margin-bottom
:
10px
;
}
.add-file-btn-group
>>>
button
{
margin-top
:
3px
;
margin-bottom
:
3px
;
}
</
style
>
\ No newline at end of file
DAPlatform/app.py
View file @
2e17db84
...
...
@@ -28,7 +28,7 @@ app.register_blueprint(data)
app
.
register_blueprint
(
image
)
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
,
host
=
'
127.0.0.1
'
,
port
=
9100
)
app
.
run
(
debug
=
True
,
host
=
'
47.92.1.107
'
,
port
=
9100
)
@app.route
(
'/'
)
...
...
nano.save
0 → 100644
View file @
2e17db84
cel
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