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

This commit is contained in:
weiweiw 2024-12-18 12:59:37 +08:00
parent f72eec2a32
commit 7fb0c86f84
1 changed files with 4 additions and 22 deletions

View File

@ -25,7 +25,7 @@
<div class="form-section">
<h3>请选择智能标注服务节点</h3>
<el-select v-model="form.serviceId" placeholder="请选择服务" clearable style="width: 100%" @change="change">
<el-select v-model="form.serviceId" placeholder="请选择服务" clearable style="width: 100%">
<el-option v-for="dict in this.serviceList" :key="dict.serviceId" :label="dict.serviceName"
:value="dict.serviceId"
/>
@ -99,10 +99,6 @@ export default {
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,6 +107,9 @@ export default {
listWithNoPage().then(response => {
console.log("response" + response.data)
this.serviceList = response.data
if (this.serviceList.length > 0) {
this.form.serviceId = this.serviceList[0].serviceId
}
})
},
async handleSubmit() {
@ -143,23 +142,6 @@ export default {
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>