改进
This commit is contained in:
parent
223b7d3c4c
commit
710c6ab2ce
@ -71,7 +71,7 @@
|
||||
<p>主页地址: {{ tool.data?.homepage_url }}</p>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" @click="bindTool(tool.id ?? 0)">绑定</v-btn>
|
||||
<v-btn color="primary" @click="bindTool(tool.id ?? '')">绑定</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
@ -157,8 +157,8 @@ function refresh() {
|
||||
getBindedTools();
|
||||
}
|
||||
|
||||
function bindTool(toolId: number) {
|
||||
api.Assistant.apiV1AssistantsIdToolsToolIdPost(assistantId, toolId)
|
||||
function bindTool(toolId: string) {
|
||||
api.Assistant.apiV1AssistantsIdToolsToolIdPost(assistantId, Number(toolId))
|
||||
.then(() => {
|
||||
refresh();
|
||||
})
|
||||
|
@ -22,14 +22,14 @@
|
||||
<p>Phone: {{ assistant.phone }}</p> -->
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" @click="showChats(assistant.id ?? 0)">
|
||||
<v-btn color="primary" @click="showChats(assistant.id ?? '')">
|
||||
对话
|
||||
</v-btn>
|
||||
|
||||
<v-btn color="primary" @click="editAssistant(assistant.id ?? 0)"
|
||||
<v-btn color="primary" @click="editAssistant(assistant.id ?? '')"
|
||||
>编辑</v-btn
|
||||
>
|
||||
<v-btn color="error" @click="deleteAssistant(assistant.id ?? 0)"
|
||||
<v-btn color="error" @click="deleteAssistant(assistant.id ?? '')"
|
||||
>删除</v-btn
|
||||
>
|
||||
</v-card-actions>
|
||||
@ -88,8 +88,8 @@ const deleteResult = ref({
|
||||
message: "",
|
||||
});
|
||||
|
||||
function deleteAssistant(assistantId: number) {
|
||||
selectedAssistantId.value = assistantId;
|
||||
function deleteAssistant(assistantId: string) {
|
||||
selectedAssistantId.value = Number(assistantId);
|
||||
dialog.value = true;
|
||||
}
|
||||
|
||||
@ -107,11 +107,11 @@ function deleteAssistantConfirmed() {
|
||||
refresh();
|
||||
}
|
||||
|
||||
function editAssistant(assistantId: number) {
|
||||
function editAssistant(assistantId: string) {
|
||||
router.push(`/assistants/${assistantId}/edit`);
|
||||
}
|
||||
|
||||
function showChats(assistantId: number) {
|
||||
function showChats(assistantId: string) {
|
||||
router.push(`/assistants/${assistantId}/chats`);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user