提交代码
This commit is contained in:
parent
230066f1b9
commit
196c990f9c
File diff suppressed because it is too large
Load Diff
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LabelStudio from 'label-studio';
|
import LabelStudio from 'label-studio';
|
||||||
import 'label-studio/build/static/css/main.css';
|
import '@/assets/styles/labelStudio.css';
|
||||||
import { manualAnnotate } from '../../../../api/dataCenter/annotationTask';
|
import { manualAnnotate } from '../../../../api/dataCenter/annotationTask';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -86,7 +86,7 @@ export default {
|
||||||
|
|
||||||
this.labelStudio = new LabelStudio('label-studio', {
|
this.labelStudio = new LabelStudio('label-studio', {
|
||||||
config: this.config,
|
config: this.config,
|
||||||
interfaces: ["update", "submit", "controls"],
|
interfaces: ["panel","update", "submit", "controls"],
|
||||||
user: { pk: 1, firstName: '标注者', lastName: '用户' },
|
user: { pk: 1, firstName: '标注者', lastName: '用户' },
|
||||||
task,
|
task,
|
||||||
onLabelStudioLoad: (LS) => {
|
onLabelStudioLoad: (LS) => {
|
||||||
|
|
@ -175,6 +175,8 @@ export default {
|
||||||
observer.observe(document.body, { childList: true, subtree: true });
|
observer.observe(document.body, { childList: true, subtree: true });
|
||||||
updateButtonText(document.body);
|
updateButtonText(document.body);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 重置 LabelStudio
|
// 重置 LabelStudio
|
||||||
resetLabelStudio() {
|
resetLabelStudio() {
|
||||||
this.cleanupLabelStudio();
|
this.cleanupLabelStudio();
|
||||||
|
|
@ -195,20 +197,27 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss">
|
||||||
.label-studio-annotator {
|
.label-studio-annotator{
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.annotation-container {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 500px; /* 设置最小高度 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.annotation-container{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
>div{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -399,8 +399,7 @@ export default {
|
||||||
.bottom-content-center {
|
.bottom-content-center {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
> div {
|
||||||
div {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="label-studio-annotator">
|
<div class="label-studio-annotator">
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<el-button type="success" plain size="small" :disabled="this.annotations === null" @click="agreement(1)">同意</el-button>
|
<el-button type="success" plain size="small" :disabled="this.annotations === null" @click="agreement(1)">通过</el-button>
|
||||||
<el-button type="danger" plain size="small" :disabled="this.annotations === null" @click="showDisagreement()">不同意</el-button>
|
<el-button type="danger" plain size="small" :disabled="this.annotations === null" @click="showDisagreement()">不通过</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div id="label-studio" class="annotation-container"></div>
|
<div id="label-studio" class="annotation-container"></div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -410,11 +410,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-content-center {
|
.bottom-content-center {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
div {
|
> div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue