Commit 93d34f44 authored by liwei's avatar liwei

修改了语音指令和语音指令部署位置的token

parent d195c095
<script setup>
import {reactive, ref} from "vue";
import {reactive, ref, watch} from "vue";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import axios from "axios";
import store from "../../store";
import {getVoiceCommandsLocationData,deleteVoiceCommandsLocation,addVoiceCommandsLocation,updateVoiceCommandsLocation,getVoiceCommandsLocationDetail} from "../../api/AIStation/VoiceCommandLocation";
import { ElMessage,ElMessageBox } from 'element-plus';
import {handleGetAIToken} from "./AItoken";
import {useRoute} from "vue-router";
// 查询条件
const queryParams = ref({
stationId: '',//换热站id
......@@ -56,7 +59,7 @@ let dialogFormVisible = ref(false)
const formTitle = ref('')
//加载列表数据
loadData()
// loadData()
function loadData(){
console.log('调用了LoadData')
const item = {
......@@ -310,6 +313,21 @@ function getSupplys(){
});
}
}
const route = useRoute()
watch(
() => route.path, // 只监听路径变化
() => {
if(route.path === '/AIStation/VoiceCommandLocation') {
// 路由变化,执行相应操作
handleGetAIToken();
loadData()
console.log('route.path',route.path)
}
},
{ immediate: true } // 只在路径变化时触发
)
getSupplys()
</script>
......
<script setup>
import {reactive, ref} from "vue";
import {reactive, ref, watch} from "vue";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import store from "../../store/index.js";
import {getVoiceCommandsData,deleteVoiceCommands,addVoiceCommands,updateVoiceCommands,exportVoiceCommands} from "../../api/AIStation/VoiceCommand";
import {useRoute} from "vue-router";
import {handleGetAIToken} from "./AItoken";
......@@ -64,7 +66,7 @@ function loadData(){
Page.total = res.total
})
}
loadData()
// loadData()
const handleExport = () => {
const item = {
......@@ -175,7 +177,19 @@ function handleDetail(row) {
singleDetails = row
detailOpen.value = true
}
const route = useRoute()
watch(
() => route.path, // 只监听路径变化
() => {
if(route.path === '/AIStation/VoiceCommand') {
// 路由变化,执行相应操作
handleGetAIToken();
loadData()
console.log('route.path',route.path)
}
},
{ immediate: true } // 只在路径变化时触发
)
</script>
<template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment