智能标注服务管理页面和智能标注页面开发
This commit is contained in:
parent
7cca20599b
commit
f72eec2a32
|
|
@ -52,7 +52,8 @@ export function autoAnnotate(data) {
|
|||
return request({
|
||||
url: '/ai/intelligentAnnotation/annotate',
|
||||
method: 'post',
|
||||
data:data
|
||||
data:data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@ export default {
|
|||
},
|
||||
handleDimension(row) {
|
||||
this.aiOpen = true
|
||||
this.taskId = row.taskId
|
||||
},
|
||||
handleAnnotation(row) {
|
||||
this.$tab.openPage('数据标注', '/dataCenter/annotationTask/dataAnnotations/index/' + row.taskId)
|
||||
|
|
|
|||
|
|
@ -85,19 +85,24 @@ export default {
|
|||
visible: false,
|
||||
loading: false,
|
||||
form: {
|
||||
learningType: 'active',
|
||||
learningType: 'pre',
|
||||
algorithmType: 'fast',
|
||||
serviceList: ''
|
||||
serviceId: '' // Initialize serviceId
|
||||
},
|
||||
serviceList:[],
|
||||
showWarning: true,
|
||||
currentRow: null
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
isOpen(newVal) {
|
||||
if (newVal) {
|
||||
this.getServiceList()
|
||||
if (this.serviceList.length > 0) {
|
||||
console.log("this.form.serviceId = this.serviceList[0].serviceId")
|
||||
this.form.serviceId = this.serviceList[0].serviceId
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -111,19 +116,15 @@ export default {
|
|||
async handleSubmit() {
|
||||
try {
|
||||
this.loading = true
|
||||
autoAnnotate(this.taskId).then(response => {
|
||||
const data = {taskId:this.taskId, intelligentAnnotationServiceId:this.form.serviceId}
|
||||
autoAnnotate(data).then(response => {
|
||||
console.log("response" + response.data)
|
||||
this.serviceList = response.data
|
||||
this.$message.success('智能标注成功')
|
||||
})
|
||||
// 这里调用 vuex action 处理提交逻辑
|
||||
// await this.$store.dispatch('annotation/submitAnnotation', {
|
||||
// ...this.form,
|
||||
// row: this.currentRow
|
||||
// })
|
||||
this.$message.success('提交成功')
|
||||
this.cancel()
|
||||
} catch (error) {
|
||||
this.$message.error(error.message || '提交失败')
|
||||
this.$message.error(error.message || '智能标注失败')
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
|
@ -136,8 +137,29 @@ export default {
|
|||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {} // 清空表单
|
||||
}
|
||||
this.form = {
|
||||
learningType: 'pre',
|
||||
algorithmType: 'fast',
|
||||
serviceList: ''
|
||||
} // 清空表单
|
||||
},
|
||||
change(value) {
|
||||
// Implement any logic needed when the selection changes
|
||||
console.log('Selected service ID:', value)
|
||||
},
|
||||
fetchServiceList() {
|
||||
try {
|
||||
// Assuming you have an API call to get the service list
|
||||
this.getServiceList();
|
||||
if (this.serviceList.length > 0) {
|
||||
console.log("this.form.serviceId = this.serviceList[0].serviceId")
|
||||
this.form.serviceId = this.serviceList[0].serviceId
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching service list:', error)
|
||||
this.$message.error('获取服务列表失败')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue