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