智能标注服务管理页面和智能标注页面开发
This commit is contained in:
parent
f72eec2a32
commit
7fb0c86f84
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<h3>请选择智能标注服务节点</h3>
|
<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"
|
<el-option v-for="dict in this.serviceList" :key="dict.serviceId" :label="dict.serviceName"
|
||||||
:value="dict.serviceId"
|
:value="dict.serviceId"
|
||||||
/>
|
/>
|
||||||
|
|
@ -99,10 +99,6 @@ export default {
|
||||||
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,6 +107,9 @@ export default {
|
||||||
listWithNoPage().then(response => {
|
listWithNoPage().then(response => {
|
||||||
console.log("response" + response.data)
|
console.log("response" + response.data)
|
||||||
this.serviceList = response.data
|
this.serviceList = response.data
|
||||||
|
if (this.serviceList.length > 0) {
|
||||||
|
this.form.serviceId = this.serviceList[0].serviceId
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async handleSubmit() {
|
async handleSubmit() {
|
||||||
|
|
@ -143,23 +142,6 @@ export default {
|
||||||
serviceList: ''
|
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