智能标注服务管理页面和智能标注页面开发
This commit is contained in:
parent
7cca20599b
commit
f72eec2a32
|
|
@ -52,7 +52,8 @@ export function autoAnnotate(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ai/intelligentAnnotation/annotate',
|
url: '/ai/intelligentAnnotation/annotate',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data:data,
|
||||||
|
timeout: 60000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleDimension(row) {
|
handleDimension(row) {
|
||||||
this.aiOpen = true
|
this.aiOpen = true
|
||||||
|
this.taskId = row.taskId
|
||||||
},
|
},
|
||||||
handleAnnotation(row) {
|
handleAnnotation(row) {
|
||||||
this.$tab.openPage('数据标注', '/dataCenter/annotationTask/dataAnnotations/index/' + row.taskId)
|
this.$tab.openPage('数据标注', '/dataCenter/annotationTask/dataAnnotations/index/' + row.taskId)
|
||||||
|
|
|
||||||
|
|
@ -85,19 +85,24 @@ export default {
|
||||||
visible: false,
|
visible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
form: {
|
form: {
|
||||||
learningType: 'active',
|
learningType: 'pre',
|
||||||
algorithmType: 'fast',
|
algorithmType: 'fast',
|
||||||
serviceList: ''
|
serviceId: '' // Initialize serviceId
|
||||||
},
|
},
|
||||||
serviceList:[],
|
serviceList:[],
|
||||||
showWarning: true,
|
showWarning: true,
|
||||||
currentRow: null
|
currentRow: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
isOpen(newVal) {
|
isOpen(newVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.getServiceList()
|
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() {
|
async handleSubmit() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
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)
|
console.log("response" + response.data)
|
||||||
this.serviceList = 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()
|
this.cancel()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error(error.message || '提交失败')
|
this.$message.error(error.message || '智能标注失败')
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
|
@ -136,8 +137,29 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
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>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue