diff --git a/src/utils/fixDict.js b/src/utils/fixDict.js
index 3195d1e..2079b53 100644
--- a/src/utils/fixDict.js
+++ b/src/utils/fixDict.js
@@ -209,4 +209,28 @@
value: '4',
},
],
+// factorEchartsColor:[//对应的监测因子echarts颜色
+
+// {
+// label: 'z',
+// value: '#99FF55',
+// },
+// {
+// label: 'va',
+// value: '#B14DE5',
+// },
+// {
+// label: 'cond',
+// value: '#FFC155',
+// },
+// {
+// label: 'sbl1',
+// value: '#19D5FF',
+// },
+// {
+// label: 'pn05',
+// value: '#19D5FF',
+// },
+
+// ],
};
diff --git a/src/utils/fixDict.js b/src/utils/fixDict.js
index 3195d1e..2079b53 100644
--- a/src/utils/fixDict.js
+++ b/src/utils/fixDict.js
@@ -209,4 +209,28 @@
value: '4',
},
],
+// factorEchartsColor:[//对应的监测因子echarts颜色
+
+// {
+// label: 'z',
+// value: '#99FF55',
+// },
+// {
+// label: 'va',
+// value: '#B14DE5',
+// },
+// {
+// label: 'cond',
+// value: '#FFC155',
+// },
+// {
+// label: 'sbl1',
+// value: '#19D5FF',
+// },
+// {
+// label: 'pn05',
+// value: '#19D5FF',
+// },
+
+// ],
};
diff --git a/src/views/voice/recordPage/index.vue b/src/views/voice/recordPage/index.vue
index fa9997d..0461230 100644
--- a/src/views/voice/recordPage/index.vue
+++ b/src/views/voice/recordPage/index.vue
@@ -15,6 +15,13 @@
重置
确定
+
+
猜您想找:
+
+
{{item.hotWordName}}
+
+
+
@@ -25,7 +32,7 @@
import Recorder from 'js-audio-recorder';
import useUserStore from '@/store/modules/user';
const appStore = useUserStore();
-import { nextTick } from 'vue';
+import { nextTick, ref } from 'vue';
const userStore = useUserStore();
const lockReconnect = ref(null);
const timeoutnum = ref(null);
@@ -53,6 +60,8 @@
miao: 0,
recognizeWs: null,
});
+const isGuess=ref(false)
+const guessArr=ref({})
onMounted(() => {
// 绑定事件-打印的是当前录音数据
@@ -76,9 +85,9 @@
if (window.location.protocol.includes('https')) {
wsuri = `wss://${window.location.host}/voiceWebsocket`;
} else {
- // wsuri = `ws://192.168.20.43:8102/voiceWebsocket`;
+ wsuri = `ws://192.168.20.43:8102/voiceWebsocket`;
// wsuri = `ws://139.155.49.237:8201/voiceWebsocket`;
- wsuri = `ws://${window.location.host}/voiceWebsocket`;
+ // wsuri = `ws://${window.location.host}/voiceWebsocket`;
}
data.recognizeWs = new WebSocket(wsuri);
@@ -104,11 +113,17 @@
if (uploadbusinessSourceCode.value == data.type) {
// 将返回的type数据与语音指令的业务code进行精准匹配 如果匹配上了 才说明是发送的这条数据
nowword.value = params.recognitionResult;
- if (params.recognitionActionCode == 'error') {
+ if (params.recognitionActionCode == 'error'||params.recognitionDataSourceCode=='error') {
// nowword.value = `指令未识别,请您再说一遍`;
+ isGuess.value=true
+ guessArr.value=params
+ console.log('guessArr.value',guessArr.value);
+
} else {
- // 匹配业务来源编号去区分相关的操作
+ // 匹配业务来源编号去区分相关的操作
switchRecognitionActionCode(params);
+
+
}
}
}
@@ -141,6 +156,18 @@
break;
}
}
+function resultClick(item){
+ console.log('item',item);
+ let at=guessArr.value
+ let data={
+ recognitionDataId:item.businessDataId,
+ recognitionActionCode: at.recognitionActionCode == 'error'?at.actionList[0].businessSourceCode:at.recognitionActionCode,
+ recognitionDataSourceCode:at.recognitionDataSourceCode,
+ recognitionResult:at.recognitionResult,
+ }
+ switchRecognitionActionCode(data)
+
+}
async function dynamicPopUp(params) {
console.log('params111', params);
let allData = [];
@@ -234,6 +261,7 @@
// 机器人所用方法
function STARTVOICE() {
console.log('process.value', process.value);
+ isGuess.value=false
clearInterval(timEnd.value);
if (process.value == 1) {
startRecorder('begin');
@@ -435,6 +463,33 @@
}
}
}
+ .searchResult {
+ width: 100%;
+ height: 200px;
+ position: absolute;
+ left: 0;
+ bottom: -200px;
+ background: url('@/assets/images/pictureOnMap/contentBgc.png') no-repeat center;
+ background-size: 100% 100%;
+ .searchtext {
+ padding:5px ;
+ }
+ .Resultlist {
+ height: 170px;
+ overflow-y: auto;
+ padding: 0 10px;
+
+ .eachMay {
+ margin-bottom: 5px;
+ cursor: pointer;
+ line-height: 22px;
+ padding-left: 5px;
+ }
+ .eachMay:hover{
+ background: rgba(255,255,255,.2);
+ }
+ }
+ }
}
}
diff --git a/src/utils/fixDict.js b/src/utils/fixDict.js
index 3195d1e..2079b53 100644
--- a/src/utils/fixDict.js
+++ b/src/utils/fixDict.js
@@ -209,4 +209,28 @@
value: '4',
},
],
+// factorEchartsColor:[//对应的监测因子echarts颜色
+
+// {
+// label: 'z',
+// value: '#99FF55',
+// },
+// {
+// label: 'va',
+// value: '#B14DE5',
+// },
+// {
+// label: 'cond',
+// value: '#FFC155',
+// },
+// {
+// label: 'sbl1',
+// value: '#19D5FF',
+// },
+// {
+// label: 'pn05',
+// value: '#19D5FF',
+// },
+
+// ],
};
diff --git a/src/views/voice/recordPage/index.vue b/src/views/voice/recordPage/index.vue
index fa9997d..0461230 100644
--- a/src/views/voice/recordPage/index.vue
+++ b/src/views/voice/recordPage/index.vue
@@ -15,6 +15,13 @@
重置
确定
+
+
猜您想找:
+
+
{{item.hotWordName}}
+
+
+
@@ -25,7 +32,7 @@
import Recorder from 'js-audio-recorder';
import useUserStore from '@/store/modules/user';
const appStore = useUserStore();
-import { nextTick } from 'vue';
+import { nextTick, ref } from 'vue';
const userStore = useUserStore();
const lockReconnect = ref(null);
const timeoutnum = ref(null);
@@ -53,6 +60,8 @@
miao: 0,
recognizeWs: null,
});
+const isGuess=ref(false)
+const guessArr=ref({})
onMounted(() => {
// 绑定事件-打印的是当前录音数据
@@ -76,9 +85,9 @@
if (window.location.protocol.includes('https')) {
wsuri = `wss://${window.location.host}/voiceWebsocket`;
} else {
- // wsuri = `ws://192.168.20.43:8102/voiceWebsocket`;
+ wsuri = `ws://192.168.20.43:8102/voiceWebsocket`;
// wsuri = `ws://139.155.49.237:8201/voiceWebsocket`;
- wsuri = `ws://${window.location.host}/voiceWebsocket`;
+ // wsuri = `ws://${window.location.host}/voiceWebsocket`;
}
data.recognizeWs = new WebSocket(wsuri);
@@ -104,11 +113,17 @@
if (uploadbusinessSourceCode.value == data.type) {
// 将返回的type数据与语音指令的业务code进行精准匹配 如果匹配上了 才说明是发送的这条数据
nowword.value = params.recognitionResult;
- if (params.recognitionActionCode == 'error') {
+ if (params.recognitionActionCode == 'error'||params.recognitionDataSourceCode=='error') {
// nowword.value = `指令未识别,请您再说一遍`;
+ isGuess.value=true
+ guessArr.value=params
+ console.log('guessArr.value',guessArr.value);
+
} else {
- // 匹配业务来源编号去区分相关的操作
+ // 匹配业务来源编号去区分相关的操作
switchRecognitionActionCode(params);
+
+
}
}
}
@@ -141,6 +156,18 @@
break;
}
}
+function resultClick(item){
+ console.log('item',item);
+ let at=guessArr.value
+ let data={
+ recognitionDataId:item.businessDataId,
+ recognitionActionCode: at.recognitionActionCode == 'error'?at.actionList[0].businessSourceCode:at.recognitionActionCode,
+ recognitionDataSourceCode:at.recognitionDataSourceCode,
+ recognitionResult:at.recognitionResult,
+ }
+ switchRecognitionActionCode(data)
+
+}
async function dynamicPopUp(params) {
console.log('params111', params);
let allData = [];
@@ -234,6 +261,7 @@
// 机器人所用方法
function STARTVOICE() {
console.log('process.value', process.value);
+ isGuess.value=false
clearInterval(timEnd.value);
if (process.value == 1) {
startRecorder('begin');
@@ -435,6 +463,33 @@
}
}
}
+ .searchResult {
+ width: 100%;
+ height: 200px;
+ position: absolute;
+ left: 0;
+ bottom: -200px;
+ background: url('@/assets/images/pictureOnMap/contentBgc.png') no-repeat center;
+ background-size: 100% 100%;
+ .searchtext {
+ padding:5px ;
+ }
+ .Resultlist {
+ height: 170px;
+ overflow-y: auto;
+ padding: 0 10px;
+
+ .eachMay {
+ margin-bottom: 5px;
+ cursor: pointer;
+ line-height: 22px;
+ padding-left: 5px;
+ }
+ .eachMay:hover{
+ background: rgba(255,255,255,.2);
+ }
+ }
+ }
}
}
diff --git a/vite.config.js b/vite.config.js
index 6db1546..ca8d2ce 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -5,10 +5,10 @@
import autoprefixer from 'autoprefixer';
const Timestamp = new Date().getTime(); //随机时间戳
-let ipLink = 'https://server1.wh-nf.cn:8201/prod-api';
+// let ipLink = 'https://server1.wh-nf.cn:8201/prod-api';
// let ipLink = 'http://192.168.16.135:9100';
// let ipLink = 'http://192.168.16.124:9100';
-// let ipLink = 'http://192.168.20.43:9100'; // 谢杨
+let ipLink = 'http://192.168.20.43:9100'; // 刘总
/* */
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {