智能标注服务管理页面和智能标注页面开发

This commit is contained in:
weiweiw 2024-12-17 14:39:15 +08:00
parent 476d11f23b
commit 7cca20599b
3 changed files with 45 additions and 26 deletions

View File

@ -8,7 +8,13 @@ export function list(query) {
params: query params: query
}) })
} }
export function listWithNoPage(query) {
return request({
url: '/ai/intelligentAnnotation/service/listWithNoPage',
method: 'get',
params: query
})
}
// 查询【请填写功能名称】详细 // 查询【请填写功能名称】详细
export function getService(id) { export function getService(id) {
return request({ return request({
@ -42,5 +48,13 @@ export function delService(id) {
}) })
} }
export function autoAnnotate(data) {
return request({
url: '/ai/intelligentAnnotation/annotate',
method: 'post',
data:data
})
}

View File

@ -104,8 +104,6 @@
v-hasPermi="['dataCenter:sample:edit']" v-hasPermi="['dataCenter:sample:edit']"
>发布 >发布
</el-button> </el-button>
<ai-label-dialog ref="aiLabelDialog"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -123,6 +121,7 @@
<release-version-dialog :get-list="getList" :dataset-id="datasetId" :open="releaseOpen" :task-id="taskId" <release-version-dialog :get-list="getList" :dataset-id="datasetId" :open="releaseOpen" :task-id="taskId"
:last-version-name="lastVersionName" @dialog-cancel="handleCancel" :last-version-name="lastVersionName" @dialog-cancel="handleCancel"
></release-version-dialog> ></release-version-dialog>
<ai-label-dialog :open="aiOpen" :get-list="getList" :task-id="taskId" @dialog-cancel="handleCancel"/> <ai-label-dialog :open="aiOpen" :get-list="getList" :task-id="taskId" @dialog-cancel="handleCancel"/>
</div> </div>

View File

@ -25,12 +25,9 @@
<div class="form-section"> <div class="form-section">
<h3>请选择智能标注服务节点</h3> <h3>请选择智能标注服务节点</h3>
<el-select v-model="form.computeNode" placeholder="请选择智能标注服务节点" class="full-width"> <el-select v-model="form.serviceId" placeholder="请选择服务" clearable style="width: 100%" @change="change">
<el-option <el-option v-for="dict in this.serviceList" :key="dict.serviceId" :label="dict.serviceName"
v-for="item in computeNodes" :value="dict.serviceId"
:key="item.value"
:label="item.label"
:value="item.value"
/> />
</el-select> </el-select>
</div> </div>
@ -44,14 +41,6 @@
启动自动标注时需数据中存在至少2个种标签且每种标签的图片不少于5张 启动自动标注时需数据中存在至少2个种标签且每种标签的图片不少于5张
</el-alert> </el-alert>
</div> </div>
<!-- <div v-if="showWarning" class="warning-message">-->
<!-- <i class="warning-icon"></i>-->
<!-- <span>启动自动标注时需数据中存在至少2个种标签且每种标签的图片不少于5张</span>-->
<!-- </div>-->
<!-- <div class="form-actions">-->
<!-- <button class="submit-button" @click="handleSubmit">提交</button>-->
<!-- </div>-->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
<el-button type="primary" @click="handleSubmit" :loading="loading"> </el-button> <el-button type="primary" @click="handleSubmit" :loading="loading"> </el-button>
@ -60,6 +49,9 @@
</template> </template>
<script> <script>
import {list, listWithNoPage} from '../../../../api/dataCenter/ailabelservice'
import { autoAnnotate } from '../../../../api/dataCenter/ailabelservice';
export default { export default {
props: { props: {
open: { open: {
@ -95,25 +87,39 @@ export default {
form: { form: {
learningType: 'active', learningType: 'active',
algorithmType: 'fast', algorithmType: 'fast',
computeNode: '' serviceList: ''
}, },
computeNodes: [ serviceList:[],
{ label: '计算节点1', value: 'node1' },
{ label: '计算节点2', value: 'node2' }
],
showWarning: true, showWarning: true,
currentRow: null currentRow: null
} }
}, },
watch: {
isOpen(newVal) {
if (newVal) {
this.getServiceList()
}
}
},
methods: { methods: {
getServiceList() {
listWithNoPage().then(response => {
console.log("response" + response.data)
this.serviceList = response.data
})
},
async handleSubmit() { async handleSubmit() {
try { try {
this.loading = true this.loading = true
// vuex action autoAnnotate(this.taskId).then(response => {
await this.$store.dispatch('annotation/submitAnnotation', { console.log("response" + response.data)
...this.form, this.serviceList = response.data
row: this.currentRow
}) })
// vuex action
// await this.$store.dispatch('annotation/submitAnnotation', {
// ...this.form,
// row: this.currentRow
// })
this.$message.success('提交成功') this.$message.success('提交成功')
this.cancel() this.cancel()
} catch (error) { } catch (error) {