zjs_project 2 هفته پیش
والد
کامیت
10fd44c783

+ 1 - 1
src/components/newQCCom/viewShell/viewShell.html

@@ -25,7 +25,7 @@
 		<div class="signscoll-block"></div>
 	</div>
 	<!-- 精细化视图 -->
-	<viewCareful ref="viewCareful" v-show="styleType==2" @curSpaceChange="curSpaceChange" 
+	<viewCareful ref="viewCareful" v-show="styleType==2 && showCareful" @curSpaceChange="curSpaceChange" 
 	:overChange="overChange" :curHouseObj="houseObj"></viewCareful>
 	<!-- 布局选择 -->
 	<viewPlot ref="viewPlot" v-show="styleType==3" @curSpaceChange="curSpaceChange"

+ 1 - 0
src/components/newQCCom/viewShell/viewShell.vue

@@ -38,6 +38,7 @@
 				selectSpace:null,//用户选择的空间
 				lastStyleType:null,
 				connectUsImg:'',
+                showCareful:true,
 			}
 		},
 		props:{

+ 17 - 5
src/components/newQCCom/viewlayout/viewlayout.vue

@@ -8,6 +8,7 @@
     import {
         Toast,Indicator
     } from 'mint-ui';
+    import { Loading } from 'element-ui';
     import spaceTypes from '@/static/spaceTypesIE.js';
 	// import Bus from '@/common/bus';
 	// import commonMethod from '@/common/commonMethod.js';
@@ -53,6 +54,7 @@
                 recording: false, //语音识别是否开始
                 touching:false,
                 audioAuth:false, //录音权限
+                loadingInstance:null,
 			}
 		},
 		props: {
@@ -468,9 +470,15 @@
                         // word_info: 2
                     }
                     webAudioSpeechRecognizer = new WebAudioSpeechRecognizer(params);
-                    Indicator.open({
+                    // Indicator.open({
+                    //     text: '正在链接...',
+                    //     spinnerType: 'fading-circle'
+                    // });
+                    this.loadingInstance = Loading.service({
+                        lock: true,
                         text: '正在链接...',
-                        spinnerType: 'fading-circle'
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(0, 0, 0, 0.7)'
                     });
                     // 开始识别
                     webAudioSpeechRecognizer.OnRecognitionStart = (res) => {
@@ -483,8 +491,9 @@
                             return false;
                         }else{//正常开始识别语句了
                             this.speechText = "";
-                            Indicator.close();
+                            this.loadingInstance.close();
                             this.recording = true;//显示正在录音视图
+                            this.$parent.showCareful = false;//隐藏
                         }
                         
                     };
@@ -505,12 +514,14 @@
                     webAudioSpeechRecognizer.OnRecognitionComplete = (res) => {
                         console.log('识别结束', res);
                         this.recording = false; //录音结束
+                        this.$parent.showCareful = true;//显示
                     };
                     // 识别错误
                     webAudioSpeechRecognizer.OnError = (res) => {
                         console.log('识别失败', res)
                         this.recording = false; //录音结束
-                        Indicator.close();
+                        this.$parent.showCareful = true;//显示
+                        this.loadingInstance.close();
                     };
                     // webAudioSpeechRecognizer = webAudioSpeechRecognizer;
                 // }
@@ -524,7 +535,8 @@
                     webAudioSpeechRecognizer.stop();//关闭
                 }
                 // webAudioSpeechRecognizer = null;
-                Indicator.close();
+                this.loadingInstance.close();
+                this.$parent.showCareful = true;//显示
             },
             callBack(type){
                 console.warn("***viewlayout-callBack***",type)