提交代码

This commit is contained in:
jiang 2024-12-03 15:17:56 +08:00
parent 230066f1b9
commit 196c990f9c
5 changed files with 60839 additions and 21 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
<script>
import LabelStudio from 'label-studio';
import 'label-studio/build/static/css/main.css';
import '@/assets/styles/labelStudio.css';
import { manualAnnotate } from '../../../../api/dataCenter/annotationTask';
export default {
@ -86,7 +86,7 @@ export default {
this.labelStudio = new LabelStudio('label-studio', {
config: this.config,
interfaces: ["update", "submit", "controls"],
interfaces: ["panel","update", "submit", "controls"],
user: { pk: 1, firstName: '标注者', lastName: '用户' },
task,
onLabelStudioLoad: (LS) => {
@ -175,6 +175,8 @@ export default {
observer.observe(document.body, { childList: true, subtree: true });
updateButtonText(document.body);
},
// LabelStudio
resetLabelStudio() {
this.cleanupLabelStudio();
@ -195,20 +197,27 @@ export default {
};
</script>
<style scoped>
.label-studio-annotator {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
}
.annotation-container {
flex: 1;
display: flex;
flex-direction: column;
<style lang="scss">
.label-studio-annotator{
width: 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>

View File

@ -399,8 +399,7 @@ export default {
.bottom-content-center {
width: 80%;
padding: 5px;
div {
> div {
width: 100%;
height: 100%;
background-color: #f5f7fa;

View File

@ -1,8 +1,8 @@
<template>
<div class="label-studio-annotator">
<div class="button-container">
<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="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>
</div>
<div id="label-studio" class="annotation-container"></div>

View File

@ -410,11 +410,11 @@ export default {
}
}
.bottom-content-center {
.bottom-content-center {
width: 80%;
padding: 5px;
div {
> div {
width: 100%;
height: 100%;
background-color: #f5f7fa;