lsc 1 year ago
parent
commit
00b7d75733

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.20482527c51a4e3e0612813972ef54d2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ea62301d5bc18e5b15b.js></script><script type=text/javascript src=./static/js/app.86e3282079da988f9846.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.568cf2bd0cfbc7945d02d4cbc9f9545b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2ea62301d5bc18e5b15b.js></script><script type=text/javascript src=./static/js/app.ce1fa6eb270b55ba64ff.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.20482527c51a4e3e0612813972ef54d2.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.568cf2bd0cfbc7945d02d4cbc9f9545b.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.568cf2bd0cfbc7945d02d4cbc9f9545b.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.86e3282079da988f9846.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.ce1fa6eb270b55ba64ff.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.ce1fa6eb270b55ba64ff.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 1 - 0
package.json

@@ -43,6 +43,7 @@
     "vue-video-player": "^5.0.2",
     "vuex": "^3.6.2",
     "wangeditor": "^4.7.15",
+    "wav-encoder": "^1.3.0",
     "worker-loader": "^2.0.0"
   },
   "devDependencies": {

BIN
src/assets/icon/englishVoice/icon_portal.png


BIN
src/assets/icon/englishVoice/star-no.png


BIN
src/assets/icon/englishVoice/star.png


+ 1 - 1
src/common/axios.config.js

@@ -15,7 +15,7 @@ axios.interceptors.request.use((config) => {
             'Content-Type': 'application/x-www-form-urlencoded'
         }
     }
-    if (config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/imageAnalyse') {
+    if (config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/imageAnalyse' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
         config.data = config.data //序列化post 参数
     } else if (config.data && config.data[0].post == '1' && config.method === 'post') {
         config.data = 'mode=' + (Object.values(config.data[0]).join(',')) //序列化post 参数

+ 1 - 0
src/common/tools.js

@@ -32,6 +32,7 @@ export const tools = {
     67: { name: "分子结构" },
     68: { name: "时间轴" },
     69: { name: "英语写作" },
+    69: { name: "英语口语" },
     25: { name: "目标管理" },
     26: { name: "课程设计" },
     62: { name: "交互视频" }

+ 1 - 1
src/components/EnglishVoice2/component/left.vue

@@ -76,7 +76,7 @@ export default {
     align-items: center;
     color: #000;
     border-radius: 5px;
-    border: 2px solid #3681FC;
+    border: 1px solid #3681FC;
     margin-bottom: 10px;
     width: 100%;
     padding: 0 10px;

+ 291 - 48
src/components/EnglishVoice2/component/right.vue

@@ -4,11 +4,11 @@
 
     </div>
     <div class="o_content">
-      <div class="type_box" :style="{width: oWidth}">
+      <div class="type_box" :style="{ width: oWidth }" v-if="cjson.type !== 'createRole'">
         {{ getType(cjson) }}
       </div>
       <div class="word_box" v-if="cjson.type == 'word' || cjson.type == 'QA'" ref="wb">
-        <div class="word_bbox" :style="{maxHeight: oheight}">
+        <div class="word_bbox" :style="{ maxHeight: oheight }">
           <img class="word_img" :src="cjson.img" alt="" v-if="cjson.img" @click="previewImg(cjson.img)">
           <div class="word_content" v-html="cjson.content">
           </div>
@@ -16,9 +16,12 @@
       </div>
       <div class="sentence_box" v-if="cjson.type == 'sentence'" ref="wb">
         <span v-html="cjson.content"></span>
+        <div v-if="cjson.img" class="sentence_div">
+          <img :src="cjson.img" alt="" @click="previewImg(cjson.img)">
+        </div>
       </div>
       <div class="word_box" v-if="cjson.type == 'theme'" ref="wb" style="max-height: calc(100% - 95px);">
-        <div class="word_bbox" :style="{maxHeight: oheight}">
+        <div class="word_bbox" :style="{ maxHeight: oheight }">
           <div class="word_content" v-html="cjson.content"></div>
           <div class="word_content2" v-html="cjson.content2" v-if="cjson.content2"></div>
         </div>
@@ -28,6 +31,7 @@
         <span>倒计时</span>
         <span>{{ Times.min }}:{{ Times.secode }}</span>
       </div>
+      <testRole v-if="cjson.type == 'createRole'" :checkJson="answerArray"></testRole>
     </div>
     <div class="o_bottom" v-loading="isloading">
       <div class="audio" v-if="!LuAudioUrl">
@@ -61,6 +65,8 @@
         <span>正在录音...</span>
       </div>
     </div>
+    <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;"
+      src="https://beta.cloud.cocorobo.cn/browser/public/index.html" ref="iiframe"></iframe>
   </div>
 </template>
 
@@ -84,7 +90,11 @@ recorder.onprogress = function (params) {
   // console.log('当前录音的总数据([DataView, DataView...])', params.data);
   // console.log('--------------END---------------')
 };
+import testRole from "./testRole.vue";
 export default {
+  components: {
+    testRole,
+  },
   props: {
     checkJson: {
       type: Array,
@@ -107,6 +117,7 @@ export default {
       oWidth: '500px',
       calcTimer: null,
       totalSeconds: 0,
+      answerArray: []
     }
   },
   computed: {
@@ -119,14 +130,14 @@ export default {
     //   return parentHeight + 'px'
     // }
     getType() {
-      return function(json) {
-        if(json.type == 'word'){
+      return function (json) {
+        if (json.type == 'word') {
           return '单词/词组'
-        }else if(json.type == 'QA'){
+        } else if (json.type == 'QA') {
           return '问答题目'
-        }else if(json.type == 'sentence'){
+        } else if (json.type == 'sentence') {
           return '句子/短文'
-        }else if(json.type == 'theme'){
+        } else if (json.type == 'theme') {
           return '主题陈述'
         }
       };
@@ -144,8 +155,48 @@ export default {
   watch: {
     checkType: {
       handler: function (newVal, oldVal) {
+        this.isloading = false
         this.cjson = JSON.parse(JSON.stringify(this.checkJson[newVal]));
-        this.LuAudioUrl = this.work[newVal] ? JSON.parse(JSON.stringify(this.work[newVal])) : ''
+        this.LuAudioUrl = ''
+        if (typeof this.work[newVal] == 'string') {
+          this.LuAudioUrl = this.work[newVal] ? JSON.parse(JSON.stringify(this.work[newVal])) : ''
+        } else if (typeof this.work[newVal] == 'object' && this.cjson.type != 'createRole') {
+          this.LuAudioUrl = this.work[newVal].audio ? JSON.parse(JSON.stringify(this.work[newVal].audio)) : ''
+        } else if (typeof this.work[newVal] == 'object' && this.cjson.type == 'createRole') {
+          var a = Array.isArray(this.work[newVal])
+          if (a) {
+            this.answerArray = JSON.parse(JSON.stringify(this.work[newVal]))
+          } else {
+            this.answerArray = []
+            this.answerArray.push(
+              {
+                isY: false,
+                content: this.cjson.content3,
+                name: this.cjson.content,
+                img: this.cjson.img
+              }
+            )
+          }
+          this.$emit('setWork', this.answerArray, this.checkType)
+        }
+        if (!this.work[newVal] && this.cjson.type == 'createRole') {
+          var a = Array.isArray(this.work[newVal])
+          if (a) {
+            this.answerArray = JSON.parse(JSON.stringify(this.work[newVal]))
+          } else {
+            this.answerArray = []
+            this.answerArray.push(
+              {
+                isY: false,
+                content: this.cjson.content3,
+                name: this.cjson.content,
+                img: this.cjson.img
+              }
+            )
+          }
+          this.$emit('setWork', this.answerArray, this.checkType)
+        }
+
         this.oheight = 'auto'
         this.oWidth = '500px'
         const images = this.$refs['obox'].querySelectorAll('img');
@@ -162,7 +213,12 @@ export default {
         //     });
         //   });
         // }else{
+        if (this.cjson.type != "createRole") {
           this.calculateParentHeight()
+        }
+        if (this.cjson.type == "createRole") {
+          this.createRole(this.cjson.content2, this.cjson.content)
+        }
         // }
 
       },
@@ -174,10 +230,19 @@ export default {
       this.$hevueImgPreview(url);
     },
     restart() {
-      this.LuAudioUrl = ""
-      setTimeout(() => {
-        this.startRecorder()
-      }, 500);
+      let _this = this
+      _this.$confirm("确定重新录音么?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          _this.LuAudioUrl = ""
+          setTimeout(() => {
+            _this.startRecorder()
+          }, 500);
+        })
+        .catch(() => { });
     },
     checkIndex(type) {
       if (type == '1') {
@@ -198,7 +263,7 @@ export default {
       if (!_this.isRecord) {
         recorder.destroy(); // 销毁录音
         _this.isRecord = true;
-        if(this.cjson.type == 'theme'){
+        if (this.cjson.type == 'theme') {
           this.setSecodes()
         }
         recorder.start().then(
@@ -209,15 +274,14 @@ export default {
             _this.$message.error(`没有找到可使用的麦克风,或者您没有允许此网页使用麦克风`);
             // 出错了
             console.log(`${error.name} : ${error.message}`);
-            if(_this.calcTimer){
+            if (_this.calcTimer) {
               clearInterval(_this.calcTimer)
               _this.calcTimer = null;
             }
           }
         );
-
       } else {
-        if(_this.calcTimer){
+        if (_this.calcTimer) {
           clearInterval(_this.calcTimer)
           _this.calcTimer = null;
         }
@@ -253,10 +317,49 @@ export default {
         this.$message.error("请录音后在上传语音");
         return;
       }
-      const mp3Blob = this.convertToMp3(recorder.getWAV());
-      let audioFile = this.dataURLtoAudio(mp3Blob, "mp3");
+
+      const mp3Blob = recorder.getWAVBlob();
+      // const mp3Blob = this.convertToMp3(recorder.getWAV());
+      let audioFile = this.dataURLtoAudio(mp3Blob, "wav");
       console.log(audioFile);
-      this.beforeUpload1(audioFile, 3);
+      let iiframe = this.$refs['iiframe']
+
+       
+
+      // this.isloading = true
+      //   this.beforeUpload1(audioFile, 3);
+      //   return;
+      if (this.cjson.type == 'theme') {
+         this.isloading = true
+         this.beforeUpload1(audioFile, 3);
+      } else if (this.cjson.type == 'createRole') {
+        // this.isloading = true
+        // this.beforeUpload1(audioFile, 3);
+        this.isloading = true
+        let _this = this
+        iiframe.contentWindow.onRecognizedResult = function (e) {
+          console.log('onRecognizedResult', e);
+          let privText = e.privText
+          _this.beforeUpload1(audioFile, 3, privText);
+        }
+
+        iiframe.contentWindow.doPronunciationAssessmentOnceAsync('', { files: [audioFile] })
+      } else {
+        this.isloading = true
+        let _this = this
+        iiframe.contentWindow.onRecognizedResult = function (e) {
+          console.log('onRecognizedResult', e);
+          let privText = e.privText
+          let star = JSON.parse(e.privJson).NBest[0].PronunciationAssessment
+          console.log('star', star)
+          // e.privText 
+          // JSON.parse(e.privJson).NBest[0].PronunciationAssessment
+
+          _this.beforeUpload1(audioFile, 3, privText, star);
+        }
+        iiframe.contentWindow.doPronunciationAssessmentOnceAsync(this.cjson.content, { files: [audioFile] })
+      }
+
       // recorder.download(mp3Blob, "recorder", "mp3");
     },
     convertToMp3(wavDataView) {
@@ -294,13 +397,12 @@ export default {
       if (enc.length > 0) {
         buffer.push(enc);
       }
-      return new Blob(buffer, { type: "audio/mp3" });
+      return new Blob(buffer, { type: "audio/wav" });
     },
     dataURLtoAudio(blob, filename) {
-      return new File([blob], filename, { type: "audio/mp3" });
+      return new File([blob], filename, { type: "audio/wav" });
     },
-    beforeUpload1(event, type) {
-      this.isloading = true
+    beforeUpload1(event, type, text, star) {
       var file;
       if (type == 3) {
         file = event;
@@ -342,7 +444,9 @@ export default {
             // _this.progress = parseInt((evt.loaded * 80) / evt.total);
           })
           .send(function (err, data) {
-            _this.isloading = false
+            if (_this.cjson.type != 'createRole') {
+              _this.isloading = false
+            }
             // _this.progress = 100;
             if (err) {
               var a = _this.$refs.upload1.uploadFiles;
@@ -350,8 +454,23 @@ export default {
               _this.$message.error("上传失败");
             } else {
               if (type == 3) {
-                _this.LuAudioUrl = data.Location;
-                _this.$emit('setWork', _this.LuAudioUrl, _this.checkType)
+                if (_this.cjson.type == 'createRole') {
+                  _this.answerArray.push(
+                    {
+                      isY: true,
+                      content: text,
+                      voice: data.Location,
+                      name: '',
+                      img: ''
+                    }
+                  )
+                  _this.answerCode(text)
+                } else {
+                  _this.LuAudioUrl = data.Location;
+                  _this.$emit('setWork', _this.LuAudioUrl, _this.checkType, text, star)
+                }
+
+
               }
               console.log(data.Location);
             }
@@ -360,19 +479,19 @@ export default {
     },
     calculateParentHeight() {
       this.$nextTick(() => {
-         setTimeout(() => {
-           // 获取父元素
-           var parentElement = this.$refs['wb'];
+        setTimeout(() => {
+          // 获取父元素
+          var parentElement = this.$refs['wb'];
 
           // 计算父元素的高度
           // var parentHeight = parentElement.offsetHeight + 1;
           var parentWidth = parentElement.offsetWidth;
           // this.oheight = parentHeight + 'px'
           this.oWidth = parentWidth + 'px'
-         }, 50);
+        }, 50);
       });
     },
-    setSecodes(){
+    setSecodes() {
       this.totalSeconds = this.checkJson[this.checkType].oTime * 60
       // this.totalSeconds = 10
       this.calcTimer = setInterval(() => {
@@ -385,11 +504,115 @@ export default {
           console.log("倒计时结束"); // 输出日志
         }
       }, 1000);
+    },
+    answerCode(msg) {
+      var _this = this;
+      _this.ajax.post('https://gpt4.cocorobo.cn/assistants_completion_response', {
+        uid: _this.guid(),
+        message: msg,
+      }).then(function (response) {
+        console.log(response);
+        _this.answerArray.push(
+          {
+            isY: false,
+            content: response.FunctionResponse,
+            name: _this.answerArray[0].name,
+            img: _this.answerArray[0].img
+          }
+        )
+        _this.isloading = false
+      }).catch(function (error) {
+        _this.isloading = false
+        console.log(error);
+      });
+    },
+    guid() {
+      var _num,
+        i,
+        _guid = "";
+      for (i = 0; i < 32; i++) {
+        _guid += Math.floor(Math.random() * 16).toString(16); //随机0  - 16 的数字 转变为16进制的字符串
+        _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
+        if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
+          //会使guid中间加 "-"   形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+          _guid += "-";
+        }
+      }
+      return _guid;
+    },
+    createRole(content, name) {
+      var _this = this;
+      _this.ajax.post('https://gpt4.cocorobo.cn/create_free_assistants', {
+        filename: [],
+        url: [],
+        uid: _this.guid(),
+        instructions: content,
+        assistantName: name
+      }).then(function (response) {
+        console.log(response);
+      }).catch(function (error) {
+        console.log(error);
+      });
+    }
+  },
+  beforeDestroy() {
+    if (!this.isRecord) {
+    } else {
+      if (this.calcTimer) {
+        clearInterval(this.calcTimer)
+        this.calcTimer = null;
+      }
+      recorder.stop(); // 结束录音
     }
   },
   mounted() {
+
     this.cjson = JSON.parse(JSON.stringify(this.checkJson[this.checkType]));
-    this.LuAudioUrl = this.work[this.checkType] ? JSON.parse(JSON.stringify(this.work[this.checkType])) : ''
+    this.LuAudioUrl = ''
+    if (typeof this.work[this.checkType] == 'string') {
+      this.LuAudioUrl = this.work[this.checkType] ? JSON.parse(JSON.stringify(this.work[this.checkType])) : ''
+    } else if (typeof this.work[this.checkType] == 'object' && this.cjson.type != 'createRole') {
+      this.LuAudioUrl = this.work[this.checkType].audio ? JSON.parse(JSON.stringify(this.work[this.checkType].audio)) : ''
+    } else if (typeof this.work[this.checkType] == 'object' && this.cjson.type == 'createRole') {
+      var a = Array.isArray(this.work[this.checkType])
+      if (a) {
+        this.answerArray = JSON.parse(JSON.stringify(this.work[this.checkType]))
+      } else {
+        this.answerArray = []
+        this.answerArray.push(
+          {
+            isY: false,
+            content: this.cjson.content3,
+            name: this.cjson.content,
+            img: this.cjson.img
+          }
+        )
+      }
+      this.$emit('setWork', this.answerArray, this.checkType)
+    }
+    if (!this.work[this.checkType] && this.cjson.type == 'createRole') {
+      var a = Array.isArray(this.work[this.checkType])
+      if (a) {
+        this.answerArray = JSON.parse(JSON.stringify(this.work[this.checkType]))
+      } else {
+        this.answerArray = []
+        this.answerArray.push(
+          {
+            isY: false,
+            content: this.cjson.content3,
+            name: this.cjson.content,
+            img: this.cjson.img
+          }
+        )
+      }
+      this.$emit('setWork', this.answerArray, this.checkType)
+    }
+    if (this.cjson.type != "createRole") {
+      this.calculateParentHeight()
+    }
+    if (this.cjson.type == "createRole") {
+      this.createRole(this.cjson.content2, this.cjson.content)
+    }
   },
 }
 </script>
@@ -434,11 +657,13 @@ export default {
   max-height: calc(100% - 70px);
   /* overflow: auto; */
 }
-.tips_box{
+
+.tips_box {
   margin-top: 30px;
   color: #727272;
 }
-.word_box > .word_bbox {
+
+.word_box>.word_bbox {
   width: 100%;
   position: relative;
   z-index: 999;
@@ -488,7 +713,7 @@ export default {
   left: 15px;
 }
 
-.word_box > .word_bbox>.word_img {
+.word_box>.word_bbox>.word_img {
   width: calc(100% - 30px);
   max-height: 300px;
   z-index: 999;
@@ -501,7 +726,7 @@ export default {
 }
 
 
-.word_box > .word_bbox>.word_content {
+.word_box>.word_bbox>.word_content {
   position: relative;
   z-index: 999;
   text-align: center;
@@ -514,7 +739,7 @@ export default {
   white-space: pre-line;
 }
 
-.word_box > .word_bbox>.word_content2 {
+.word_box>.word_bbox>.word_content2 {
   position: relative;
   z-index: 999;
   text-align: left;
@@ -645,18 +870,19 @@ export default {
   margin: 0 !important;
 }
 
-.audio_b >>> .vueAudioBetter span:before{
+.audio_b>>>.vueAudioBetter span:before {
   color: #fff;
 }
 
 .audio_class>>>.slider .process {
   background: #000;
 }
-.audio_b >>> .vueAudioBetter .iconfont:active{
+
+.audio_b>>>.vueAudioBetter .iconfont:active {
   position: unset !important;
 }
 
-.time_box{
+.time_box {
   display: flex;
   flex-direction: column;
   align-items: center;
@@ -664,21 +890,38 @@ export default {
   margin-top: 25px;
 }
 
-.time_box > span:nth-child(1){
+.time_box>span:nth-child(1) {
   color: #727272;
   font-size: 16px;
 }
-.time_box > span:nth-child(2){
+
+.time_box>span:nth-child(2) {
   /* margin-top: 10px; */
   font-size: 32px;
   color: #3581FC;
 }
 
-.type_box{
+.type_box {
   min-width: 500px;
-    width: 70%;
-    text-align: right;
-    color: #a5a5a5;
-    margin-bottom: 10px;
+  width: 70%;
+  text-align: right;
+  color: #a5a5a5;
+  margin-bottom: 10px;
+}
+
+.sentence_div {
+  width: 100%;
+  overflow: hidden;
+  margin-top: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+
+.sentence_div>img {
+  width: 60px;
+  height: 60px;
+  object-fit: cover;
+  cursor: pointer;
+  border-radius: 4px
 }
 </style>

+ 206 - 0
src/components/EnglishVoice2/component/testRole.vue

@@ -0,0 +1,206 @@
+<template>
+    <div class="d_box" v-loading="isloading">
+        <div class="dialog" v-for="(item, index) in answerArray" :key="index" :class="{ dialog_right: item.isY }">
+            <div class="d_img">
+                <img :src="item.img ? item.img : require('../../../assets/icon/englishVoice/icon_portal.png')" alt="">
+            </div>
+            <div class="d_content">
+                <div class="d_name" v-if="item.name">{{ item.name }}</div>
+                <div class="d_voice" v-if="item.voice">
+                    <mini-audio :audio-source="item.voice" class="audio_class"></mini-audio>
+                </div>
+                <div :class="{d_log: !item.isY, d_log2: item.isY}" v-if="item.content">{{ item.content }}</div>
+            </div>
+        </div>
+        <!-- <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;"
+                src="https://beta.cloud.cocorobo.cn/browser/public/index.html" ref="iiframe"></iframe> -->
+    </div>
+</template>
+    
+<script>
+export default {
+    components: {
+    },
+    props: {
+        checkJson: {
+            type: Object,
+        }
+    },
+    data() {
+        return {
+            json: [],
+            answerArray: [],
+            isRecord: false,
+            isPlayerRecord: false,
+            isloading: false,
+        };
+    },
+    methods: {
+        setVoiceJson(val) {
+            let a = JSON.parse(JSON.stringify(val));
+            // this.json = a;
+            this.answerArray = a
+            // this.answerArray.push(
+            //     {
+            //         isY: false,
+            //         content: a.content3,
+            //         name: a.content,
+            //         img: a.img
+            //     }
+            // )
+
+        },
+    },
+    watch: {
+        checkJson: {
+            handler: function (newVal, oldVal) {
+                if (newVal) {
+                    this.setVoiceJson(this.checkJson);
+                }
+            },
+            deep: true
+        }
+    },
+
+    mounted() {
+        this.setVoiceJson(this.checkJson);
+    }
+};
+</script>
+    
+<style scoped>
+.d_box {
+    width: 100%;
+    height: 100%;
+    /* background: #000; */
+    padding: 25px 50px;
+    box-sizing: border-box;
+    overflow: auto;
+}
+
+.dialog_answer>img {
+    height: 100%;
+    margin-left: auto;
+    cursor: pointer;
+}
+
+
+.dialog {
+    display: flex;
+}
+
+.dialog+.dialog {
+    margin-top: 15px;
+}
+
+.dialog_right {
+    flex-direction: row-reverse;
+}
+
+.dialog>.d_img {
+    width: 64px;
+    height: 64px;
+    min-width: 64px;
+    overflow: hidden;
+    border-radius: 50%;
+    margin-right: 5px;
+}
+
+.dialog>.d_img>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.dialog_right>.d_img {
+    margin-right: 0;
+    margin-left: 5px;
+}
+
+.dialog>.d_content {
+    width: 100%;
+}
+.dialog_right>.d_content{
+    display: flex;
+    flex-direction: column;
+    align-items: flex-end;
+}
+
+
+.dialog>.d_content>.d_name {
+    color: #7C7C7C;
+    font-size: 12px;
+    margin-bottom: 5px;
+}
+
+.dialog_right>.d_content>.d_name {
+    text-align: right;
+}
+
+.dialog>.d_content>.d_log {
+    color: #000;
+    font-size: 16px;
+    background: #fff;
+    width: 100%;
+    max-width: 800px;
+    border: 2px solid #e05d63;
+    border-radius: 40px;
+    line-height: 26px;
+    padding: 20px 35px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.dialog>.d_content>.d_log::before{
+    content: '';
+    width: calc(100% - 20px);
+    height: calc(100% - 20px);
+    position: absolute;
+    border: 1px dashed #e05d63;
+    box-sizing: border-box;
+    top: 50%;
+    left: 50%;
+    border-radius: 30px;
+    transform: translate(-50%, -50%);
+}
+
+.dialog>.d_content>.d_log2 {
+    color: #000;
+    font-size: 14px;
+    background: #fff;
+    width: 100%;
+    max-width: 800px;
+    border: 1px dashed #0f94ce;
+    border-radius: 5px;
+    line-height: 26px;
+    padding: 10px;
+    box-sizing: border-box;
+    position: relative;
+    margin-top:10px;
+}
+
+.dialog>.d_content>.d_voice {
+    width: 100%;
+    max-width: 600px;
+}
+
+.audio_class {
+    background: #3680fb !important;
+    margin: 0 !important;
+    width: 100% !important;
+    box-sizing: border-box !important;
+}
+
+.d_voice>>>.vueAudioBetter span:before {
+    color: #fff;
+}
+
+.audio_class>>>.slider .process {
+    background: #000;
+}
+
+.d_voice>>>.vueAudioBetter .iconfont:active {
+    position: unset !important;
+}
+</style>
+    

+ 13 - 3
src/components/EnglishVoice2/index.vue

@@ -1,7 +1,7 @@
 <template>
     <el-dialog title="英语口语" :visible.sync="EnglishVoiceDialog" :append-to-body="true" width="100%"
         :before-close="handleClose" class="dialog_diy">
-        <div class="ev_box">
+        <div class="ev_box" v-if="EnglishVoiceDialog">
             <div class="ev_box_left">
                 <left :title="title" :detail="detail" :checkJson="checkJson" :checkType="checkType" @setType="setType">
                 </left>
@@ -110,8 +110,18 @@ export default {
         setType(index) {
             this.checkType = index
         },
-        setWork(url, index) {
-            this.work[index] = url
+        setWork(url, index, text, star) {
+            if(this.checkJson[index].type == 'createRole'){
+                this.work[index] = jSON.parse(JSON.stringify(url))
+            }else{
+                if(star){
+                
+                }
+                this.work[index] = {
+                    audio:url,
+                    text:text
+                }
+            }
         },
         addEnglishWork() {
             let params = [

+ 93 - 9
src/components/checkEnglishVoice/component/right.vue

@@ -10,11 +10,13 @@
         <div class="sentence_box" v-if="cjson.type == 'sentence'">
           <div class="word_content" v-html="cjson.content">
           </div>
+          <img class="word_img" :src="cjson.img" alt="" v-if="cjson.img" @click="previewImg(cjson.img)" />
         </div>
         <div class="word_box2" v-if="cjson.type == 'theme'" style="flex-direction: column;">
           <div class="word_content" v-html="cjson.content"></div>
           <div class="word_content2" v-html="cjson.content2"></div>
         </div>
+        <testRole v-if="cjson.type == 'createRole'" :checkJson="answerArray"></testRole>
       </div>
     </div>
     <div class="o_bottom" v-loading="isloading">
@@ -75,7 +77,11 @@ recorder.onprogress = function (params) {
   // console.log('当前录音的总数据([DataView, DataView...])', params.data);
   // console.log('--------------END---------------')
 };
+import testRole from "./testRole.vue";
 export default {
+  components: {
+    testRole,
+  },
   props: {
     checkJson: {
       type: Array
@@ -93,16 +99,55 @@ export default {
       LuAudioUrl: "",
       isRecord: false,
       isPlayerRecord: false,
-      isloading: false
+      isloading: false,
+      answerArray: []
     };
   },
   watch: {
     checkType: {
       handler: function (newVal, oldVal) {
         this.cjson = JSON.parse(JSON.stringify(this.checkJson[newVal]));
-        this.LuAudioUrl = this.work[newVal]
-          ? JSON.parse(JSON.stringify(this.work[newVal]))
-          : "";
+        // this.LuAudioUrl = this.work[newVal]
+        //   ? JSON.parse(JSON.stringify(this.work[newVal]))
+        //   : "";
+        this.LuAudioUrl = ''
+        if (typeof this.work[this.checkType] == 'string') {
+          this.LuAudioUrl = this.work[this.checkType] ? JSON.parse(JSON.stringify(this.work[this.checkType])) : ''
+        } else if (typeof this.work[this.checkType] == 'object' && this.cjson.type != 'createRole') {
+          this.LuAudioUrl = this.work[this.checkType].audio ? JSON.parse(JSON.stringify(this.work[this.checkType].audio)) : ''
+        } else if (typeof this.work[newVal] == 'object' && this.cjson.type == 'createRole') {
+          var a = Array.isArray(this.work[newVal])
+          if (a) {
+            this.answerArray = JSON.parse(JSON.stringify(this.work[newVal]))
+          } else {
+            this.answerArray = []
+            this.answerArray.push(
+              {
+                isY: false,
+                content: this.cjson.content3,
+                name: this.cjson.content,
+                img: this.cjson.img
+              }
+            )
+          }
+          this.$emit('setWork', this.answerArray, this.checkType)
+        }
+        if (!this.work[newVal] && this.cjson.type == 'createRole') {
+          var a = Array.isArray(this.work[newVal])
+          if (a) {
+            this.answerArray = JSON.parse(JSON.stringify(this.work[newVal]))
+          } else {
+            this.answerArray = []
+            this.answerArray.push(
+              {
+                isY: false,
+                content: this.cjson.content3,
+                name: this.cjson.content,
+                img: this.cjson.img
+              }
+            )
+          }
+        }
       },
       deep: true
     }
@@ -289,9 +334,47 @@ export default {
   },
   mounted() {
     this.cjson = JSON.parse(JSON.stringify(this.checkJson[this.checkType]));
-    this.LuAudioUrl = this.work[this.checkType]
-      ? JSON.parse(JSON.stringify(this.work[this.checkType]))
-      : "";
+    this.LuAudioUrl = ''
+    if (typeof this.work[this.checkType] == 'string') {
+      this.LuAudioUrl = this.work[this.checkType] ? JSON.parse(JSON.stringify(this.work[this.checkType])) : ''
+    } else if (typeof this.work[this.checkType] == 'object' && this.cjson.type != 'createRole') {
+      this.LuAudioUrl = this.work[this.checkType].audio ? JSON.parse(JSON.stringify(this.work[this.checkType].audio)) : ''
+    } else if (typeof this.work[newVal] == 'object' && this.cjson.type == 'createRole') {
+          var a = Array.isArray(this.work[newVal])
+          if (a) {
+            this.answerArray = JSON.parse(JSON.stringify(this.work[newVal]))
+          } else {
+            this.answerArray = []
+            this.answerArray.push(
+              {
+                isY: false,
+                content: this.cjson.content3,
+                name: this.cjson.content,
+                img: this.cjson.img
+              }
+            )
+          }
+          this.$emit('setWork', this.answerArray, this.checkType)
+        }
+        if (!this.work[newVal] && this.cjson.type == 'createRole') {
+          var a = Array.isArray(this.work[newVal])
+          if (a) {
+            this.answerArray = JSON.parse(JSON.stringify(this.work[newVal]))
+          } else {
+            this.answerArray = []
+            this.answerArray.push(
+              {
+                isY: false,
+                content: this.cjson.content3,
+                name: this.cjson.content,
+                img: this.cjson.img
+              }
+            )
+          }
+        }
+    // this.LuAudioUrl = this.work[this.checkType]
+    //   ? JSON.parse(JSON.stringify(this.work[this.checkType]))
+    //   : "";
   }
 };
 </script>
@@ -379,18 +462,19 @@ export default {
   white-space: pre-line;
 }
 
-
+.sentence_box>.word_img,
 .word_box2>.word_img {
   min-width: 100px;
   width: 100px;
   height: 50px;
   z-index: 999;
-  position: relative;
+  position: sticky;
   margin: 0 0 0 10px;
   display: block;
   border-radius: 10px;
   cursor: pointer;
   object-fit: cover;
+  top: calc(50% - 25px);
 }
 
 .word_box2>.word_content {

+ 206 - 0
src/components/checkEnglishVoice/component/testRole.vue

@@ -0,0 +1,206 @@
+<template>
+    <div class="d_box" v-loading="isloading">
+        <div class="dialog" v-for="(item, index) in answerArray" :key="index" :class="{ dialog_right: item.isY }">
+            <div class="d_img">
+                <img :src="item.img ? item.img : require('../../../assets/icon/englishVoice/icon_portal.png')" alt="">
+            </div>
+            <div class="d_content">
+                <div class="d_name" v-if="item.name">{{ item.name }}</div>
+                <div class="d_voice" v-if="item.voice">
+                    <mini-audio :audio-source="item.voice" class="audio_class"></mini-audio>
+                </div>
+                <div :class="{d_log: !item.isY, d_log2: item.isY}" v-if="item.content">{{ item.content }}</div>
+            </div>
+        </div>
+        <!-- <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;"
+                src="https://beta.cloud.cocorobo.cn/browser/public/index.html" ref="iiframe"></iframe> -->
+    </div>
+</template>
+    
+<script>
+export default {
+    components: {
+    },
+    props: {
+        checkJson: {
+            type: Object,
+        }
+    },
+    data() {
+        return {
+            json: [],
+            answerArray: [],
+            isRecord: false,
+            isPlayerRecord: false,
+            isloading: false,
+        };
+    },
+    methods: {
+        setVoiceJson(val) {
+            let a = JSON.parse(JSON.stringify(val));
+            // this.json = a;
+            this.answerArray = a
+            // this.answerArray.push(
+            //     {
+            //         isY: false,
+            //         content: a.content3,
+            //         name: a.content,
+            //         img: a.img
+            //     }
+            // )
+
+        },
+    },
+    watch: {
+        checkJson: {
+            handler: function (newVal, oldVal) {
+                if (newVal) {
+                    this.setVoiceJson(this.checkJson);
+                }
+            },
+            deep: true
+        }
+    },
+
+    mounted() {
+        this.setVoiceJson(this.checkJson);
+    }
+};
+</script>
+    
+<style scoped>
+.d_box {
+    width: 100%;
+    height: 100%;
+    /* background: #000; */
+    padding: 10px;
+    box-sizing: border-box;
+    overflow: auto;
+}
+
+.dialog_answer>img {
+    height: 100%;
+    margin-left: auto;
+    cursor: pointer;
+}
+
+
+.dialog {
+    display: flex;
+}
+
+.dialog+.dialog {
+    margin-top: 15px;
+}
+
+.dialog_right {
+    flex-direction: row-reverse;
+}
+
+.dialog>.d_img {
+    width: 50px;
+    height: 50px;
+    min-width: 50px;
+    overflow: hidden;
+    border-radius: 50%;
+    margin-right: 5px;
+}
+
+.dialog>.d_img>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.dialog_right>.d_img {
+    margin-right: 0;
+    margin-left: 5px;
+}
+
+.dialog>.d_content {
+    width: 100%;
+}
+.dialog_right>.d_content{
+    display: flex;
+    flex-direction: column;
+    align-items: flex-end;
+}
+
+
+.dialog>.d_content>.d_name {
+    color: #7C7C7C;
+    font-size: 12px;
+    margin-bottom: 5px;
+}
+
+.dialog_right>.d_content>.d_name {
+    text-align: right;
+}
+
+.dialog>.d_content>.d_log {
+    color: #000;
+    font-size: 16px;
+    background: #fff;
+    width: 100%;
+    max-width: 800px;
+    border: 2px solid #e05d63;
+    border-radius: 40px;
+    line-height: 26px;
+    padding: 20px 35px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.dialog>.d_content>.d_log::before{
+    content: '';
+    width: calc(100% - 20px);
+    height: calc(100% - 20px);
+    position: absolute;
+    border: 1px dashed #e05d63;
+    box-sizing: border-box;
+    top: 50%;
+    left: 50%;
+    border-radius: 30px;
+    transform: translate(-50%, -50%);
+}
+
+.dialog>.d_content>.d_log2 {
+    color: #000;
+    font-size: 14px;
+    background: #fff;
+    width: 100%;
+    max-width: 800px;
+    border: 1px dashed #0f94ce;
+    border-radius: 5px;
+    line-height: 26px;
+    padding: 10px;
+    box-sizing: border-box;
+    position: relative;
+    margin-top:10px;
+}
+
+.dialog>.d_content>.d_voice {
+    width: 100%;
+    max-width: 600px;
+}
+
+.audio_class {
+    background: #3680fb !important;
+    margin: 0 !important;
+    width: 100% !important;
+    box-sizing: border-box !important;
+}
+
+.d_voice>>>.vueAudioBetter span:before {
+    color: #fff;
+}
+
+.audio_class>>>.slider .process {
+    background: #000;
+}
+
+.d_voice>>>.vueAudioBetter .iconfont:active {
+    position: unset !important;
+}
+</style>
+    

+ 363 - 0
src/components/checkEnglishVoice/data/index.vue

@@ -0,0 +1,363 @@
+<template>
+  <el-dialog title="学生报告" :visible.sync="dataDialog" :append-to-body="true" :before-close="handleClose"
+    class="dialog_diy">
+    <div>
+      <div class="whiteBox">
+        <div>{{ title }}</div>
+        <div class="data_progress">
+          <div class="depth">
+              <div>
+                <el-progress :width="80" type="circle" :percentage="95" :stroke-width="15" :format="format" color="#40b640"></el-progress>
+              </div>
+              <span>Pronunciation score</span>
+          </div>
+          <div class="depth">
+              <div>
+                <el-progress :width="80" type="circle" :percentage="95" :stroke-width="15" :format="format" color="#bc66c3"></el-progress>
+              </div>
+              <span>Accuracy score</span>
+          </div>
+          <div class="depth">
+              <div>
+                <el-progress :width="80" type="circle" :percentage="95" :stroke-width="15" :format="format" color="#e871bc"></el-progress>
+              </div>
+              <span>Fluency score</span>
+          </div>
+          <div class="depth">
+              <div>
+                <el-progress :width="80" type="circle" :percentage="95" :stroke-width="15" :format="format" color="#697bda"></el-progress>
+              </div>
+              <span>Completeness score</span>
+          </div>
+        </div>
+      </div>
+      <div class="whiteBox" v-if="wordArray.length">
+        <div class="word_box" v-for="(item, index) in wordArray" :key="index">
+          <div class="word"><span>{{ index + 1 }}.</span><span>{{ item.content }}</span></div>
+          <div class="star_box">
+            <div class="star" v-for="index2 in 5" :key="'star' + index2" :class="{ starA: 3 >= (index2) }">
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="whiteBox" v-if="sentenceArray.length">
+        <div class="setenceBox" v-for="(item, index) in sentenceArray" :key="index">
+          <div class="setence">
+            <div class="title">{{ index+1 }}.原文:</div>
+            <div class="content">{{ item.content }}</div>
+          </div>
+          <div class="star_box" style="margin: 10px 0;">
+            <div class="star" v-for="index2 in 5" :key="'star' + index2" :class="{ starA: 3 >= (index2) }">
+            </div>
+          </div>
+          <div class="setence">
+            <div class="title">录音译文:</div>
+            <div class="content">{{ item.content }}</div>
+          </div>
+        </div>
+      </div>
+      <div class="whiteBox" v-if="QAArray.length">
+        <div class="setenceBox" v-for="(item, index) in QAArray" :key="index">
+          <div class="setence">
+            <div class="title">{{ index+1 }}.问题:</div>
+            <div class="content">{{ item.content }}</div>
+          </div>
+          <div class="star_box" style="margin: 10px 0;">
+            <div class="star" v-for="index2 in 5" :key="'star' + index2" :class="{ starA: 3 >= (index2) }">
+            </div>
+          </div>
+          <div class="setence">
+            <div class="title">录音回答译文:</div>
+            <div class="content">{{ item.content }}</div>
+          </div>
+        </div>
+      </div>
+      <div class="whiteBox" v-if="themeArray.length">
+        <div class="setenceBox" v-for="(item, index) in themeArray" :key="index">
+          <div class="setence">
+            <div class="title">{{ index+1 }}.要点:</div>
+            <div class="content2">
+              <span>{{ item.content }}</span>
+              <span>{{ item.content2 }}</span>
+            </div>
+          </div>
+          <div class="star_box" style="margin: 10px 0;">
+            <div class="star" v-for="index2 in 5" :key="'star' + index2" :class="{ starA: 3 >= (index2) }">
+            </div>
+          </div>
+          <div class="setence">
+            <div class="title">录音回答译文:</div>
+            <div class="content2">
+              <span>{{ item.content }}</span>
+              <span>{{ item.content2 }}</span>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="whiteBox" v-if="createRoleArray.length">
+      </div>
+    </div>
+  </el-dialog>
+</template>
+  
+<script>
+
+export default {
+  components: {
+  },
+  props: {
+    dataDialog: {
+      type: Boolean,
+      default: false
+    },
+    englishVoiceJson: {
+      type: Object,
+      default: () => { }
+    },
+    commentDetail: {
+      type: Object,
+      default: () => { }
+    }
+  },
+  data() {
+    return {
+      checkJson: [],
+      title: "",
+      detail: "",
+      checkType: 0,
+      work: [],
+      wScore2: 0,
+      scoreDetail2: "",
+      wordArray: [],
+      sentenceArray: [],
+      QAArray: [],
+      themeArray: [],
+      createRoleArray: []
+    };
+  },
+  methods: {
+    handleClose(done) {
+      this.close();
+      done();
+    },
+    close() {
+      this.$emit("update:dataDialog", false);
+    },
+    close2() {
+      this.$emit("update:dataDialog", false);
+    },
+    confirm() {
+      this.close2();
+    },
+    setVoiceJson(val) {
+      let a = JSON.parse(JSON.stringify(val));
+      this.title = a.title;
+      this.detail = a.detail;
+      this.checkJson = a.array;
+      this.checkType = 0;
+      this.work.length = a.array.length;
+      let works = JSON.parse(
+        JSON.parse(JSON.stringify(this.commentDetail.works))
+      );
+      for (var i = 0; i < this.checkJson.length; i++) {
+        this.checkJson[i].work = ''
+        if (i > (works.length - 1)) {
+          break
+        }
+        this.checkJson[i].work = works[i];
+      }
+
+      let wordArray = []
+      let sentenceArray = []
+      let QAArray = []
+      let themeArray = []
+      let createRoleArray = []
+
+      for (var i = 0; i < this.checkJson.length; i++) {
+        if (this.checkJson[i].type == 'word') {
+          wordArray.push(this.checkJson[i])
+        } else if (this.checkJson[i].type == 'sentence') {
+          sentenceArray.push(this.checkJson[i])
+        } else if (this.checkJson[i].type == 'QA') {
+          QAArray.push(this.checkJson[i])
+        } else if (this.checkJson[i].type == 'theme') {
+          themeArray.push(this.checkJson[i])
+        } else if (this.checkJson[i].type == 'createRole') {
+          createRoleArray.push(this.checkJson[i])
+        }
+      }
+
+      this.wordArray = wordArray
+      this.sentenceArray = sentenceArray
+      this.QAArray = QAArray
+      this.themeArray = themeArray
+      this.createRoleArray = createRoleArray
+    },
+    format(percentage) {
+      return percentage;
+    },
+  },
+  watch: {
+    dataDialog: {
+      handler: function (newVal, oldVal) {
+        if (newVal) {
+          this.setVoiceJson(this.englishVoiceJson);
+        }
+      },
+      deep: true
+    }
+  },
+  mounted() {
+    this.setVoiceJson(this.englishVoiceJson);
+  }
+};
+</script>
+  
+<style scoped>
+.dialog_diy>>>.el-dialog {
+  width: 100%;
+  max-width: 1000px;
+  height: 100%;
+  margin: 0vh auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+  background: #454545 !important;
+  padding: 15px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+  height: calc(100% - 54px);
+  box-sizing: border-box;
+  padding: 15px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+  background: #f0f4fa;
+  overflow: auto;
+}
+
+.whiteBox {
+  background: #fff;
+  /* margin-bottom: 15px; */
+  padding: 15px 30px;
+  border-radius: 5px;
+  width: 100%;
+  box-sizing: border-box;
+}
+.whiteBox +.whiteBox {
+  margin-top: 15px;
+}
+.word_box {
+  font-size: 14px;
+  font-weight: bold;
+  display: flex;
+  color: #000;
+}
+
+.word_box+.word_box {
+  margin-top: 10px;
+}
+
+.word_box>.word {
+  width: 250px;
+}
+
+.star_box {
+  display: flex;
+  align-items: center;
+}
+
+.star_box>.star {
+  width: 20px;
+  height: 20px;
+  display: block;
+  background-image: url('../../../assets/icon/englishVoice/star-no.png');
+  background-size: 100% 100%;
+}
+
+.star_box>.star+.star {
+  margin-left: 5px;
+}
+
+.star_box>.starA {
+  background-image: url('../../../assets/icon/englishVoice/star.png');
+}
+
+
+.setenceBox{}
+.setenceBox + .setenceBox{
+  margin-top: 15px;
+}
+.setenceBox > .setence{
+  color: #000;
+}
+.setenceBox > .setence > .title{
+  font-size: 16px;
+  margin-bottom: 10px;
+  font-weight: bold;
+}
+.setenceBox > .setence > .content{
+  word-break: break-word;
+  white-space: pre-line;
+  font-size: 14px;
+}
+
+.setenceBox > .setence > .content2{
+  font-size: 14px;
+}
+.setenceBox > .setence > .content2 > span{
+  display: block;
+}
+.setenceBox > .setence > .content2 > span:nth-child(1){
+  font-size: 14px;
+}
+
+.setenceBox > .setence > .content2 > span:nth-child(2){
+  word-break: break-word;
+  white-space: pre-line;
+  font-size: 14px;
+  margin-top: 10px;
+}
+
+.data_progress{
+  margin-top: 10px;
+  display: flex;
+  justify-content: space-between;
+}
+.data_progress > .depth{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  width: calc(100% / 4);
+}
+.data_progress > .depth > div{
+  display: flex;
+  justify-content: center;
+}
+.data_progress > .depth > span{
+  font-size: 14px;
+  font-weight: bold;
+  color: #000;
+  margin-top: 5px;
+}
+</style>
+  

+ 21 - 2
src/components/checkEnglishVoice/index.vue

@@ -14,6 +14,11 @@
           <div style="margin-bottom: 5px">{{ commentDetail.sName }}</div>
           <div>{{ commentDetail.time }}</div>
         </div>
+        <div class="btn_box">
+          <el-button type="primary" size="small" @click="opanData">
+            学生报告
+          </el-button>
+        </div>
       </div>
       <div class="en_box">
         <div class="ev_box_left">
@@ -69,16 +74,19 @@
         >确 定
       </el-button>
     </span>
+    <dataBoard :dataDialog.sync="dataDialog" :englishVoiceJson="englishVoiceJson" :commentDetail="commentDetail"></dataBoard>
   </el-dialog>
 </template>
 
 <script>
 import right from "./component/right.vue";
 import left from "./component/left.vue";
+import dataBoard from "./data/index.vue";
 export default {
   components: {
     right,
-    left
+    left,
+    dataBoard
   },
   props: {
     dialogVisibleENScore: {
@@ -113,7 +121,8 @@ export default {
       checkType: 0,
       work: [],
       wScore2: 0,
-      scoreDetail2: ""
+      scoreDetail2: "",
+      dataDialog: false 
     };
   },
   methods: {
@@ -191,6 +200,9 @@ export default {
           this.$message.error("评分失败");
           console.error(err);
         });
+    },
+    opanData(){
+      this.dataDialog = true
     }
   },
   watch: {
@@ -332,4 +344,11 @@ export default {
   height: 100%;
   overflow: auto;
 }
+
+.btn_box{
+  display: flex;
+  align-items: center;
+  height: 50px;
+  margin-left: auto;
+}
 </style>

Some files were not shown because too many files changed in this diff