lsc 1 year ago
parent
commit
f3c75b16f5

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       height: 100%;
       width: 100%;
       width: 100%;
       background: #e6eaf0;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.86137d31cce6bbfcbe50156560913c05.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b01159b52abeac4e6216.js></script><script type=text/javascript src=./static/js/app.2a339f70df75a328f1c8.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.d6d9c29f0f031a7196e903123b554348.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b01159b52abeac4e6216.js></script><script type=text/javascript src=./static/js/app.e99ea54e197cf65b3ed0.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


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


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


BIN
dist/static/img/englishVoice.802b608.png


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


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


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


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


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


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


+ 190 - 0
src/components/pages/EnglishVoice/component/component/gptImg.vue

@@ -0,0 +1,190 @@
+<template>
+    <el-dialog title="智能获取" :visible.sync="sysPicVisible" :append-to-body="true" width="710px" :before-close="handleClose"
+        class="dialog_diy">
+        <div>
+            <div class="people_top_right" style="display: flex;align-items: center;">
+                <div style="position: relative; width: 100%;">
+                    <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
+                        @keyup.enter.native="resetImage()"></el-input>
+                    <div class="search_img" @click="resetImage" style="right: 10px;">
+                        <img src="../../../../../assets/icon/search.png" alt />
+                    </div>
+                </div>
+                <el-button type="primary" size="default" style="margin-left: 10px;" @click="changePicture">换一组</el-button>
+            </div>
+            <div class="sysPicBox" v-loading="imageloading">
+                <div class="picNone" v-if="!imageList.length">请输入关键词搜索图片</div>
+                <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
+                    <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
+                </div>
+            </div>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+export default {
+    props: {
+        sysPicVisible: {
+            type: Boolean,
+        },
+        value: {
+            type: String
+        }
+    },
+    data() {
+        return {
+            searchImageValue: "",
+            imageloading: false,
+            imageList: [],
+            ppage: 1,
+        }
+    },
+    methods: {
+        handleClose(done) {
+            this.close();
+            done();
+        },
+        close() {
+            this.$emit("update:sysPicVisible", false);
+        },
+        resetImage() {
+            this.ppage = 1
+            this.searchImage()
+        },
+        changePicture() {
+            this.ppage++
+            this.searchImage()
+        },
+        searchImage() {
+            var _this = this;
+            _this.imageList = []
+            _this.imageloading = true
+            _this.ajax.post('https://gpt.cocorobo.cn/search_image', {
+                page: _this.ppage,
+                pagesize: 9,
+                query: _this.searchImageValue
+            }).then(function (response) {
+                // console.log(response.data.data);
+                var data = response.data.FunctionResponse.result;
+                for (var i = 0; i < data.length; i++) {
+                    _this.imageList.push({ url: data[i].thumbnail })
+                }
+                _this.imageloading = false
+            }).catch(function (error) {
+                console.log(error);
+            });
+        },
+    },
+    watch: {
+        sysPicVisible2(newValue, oldValue) {
+            if (newValue) {
+                this.searchImageValue = JSON.parse(JSON.stringify(this.value));
+            }
+        }
+    },
+    mounted() {
+        this.searchImageValue = JSON.parse(JSON.stringify(this.value));
+    },
+}
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog__header {
+    background: #3c3c3c !important;
+    padding: 15px 20px;
+}
+
+.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: #fafafa;
+}
+
+.dialog_diy3>>>.el-dialog__body,
+.dialog_diy3>>>.el-dialog__footer {
+    background: #eee !important;
+}
+
+.dialog_diy3>>>.el-dialog__body {
+    padding: 20px 20px;
+}
+
+.dialog_diyStage>>>.el-dialog__body {
+    padding: 10px;
+}
+
+.people_top_right {
+    height: 40px;
+    margin-bottom: 10px;
+}
+
+.search_img {
+    width: 20px;
+    height: 20px;
+    position: absolute;
+    right: 10px;
+    top: 50%;
+    transform: translateY(-50%);
+}
+
+.search_img>img {
+    width: 100%;
+    height: 100%;
+}
+
+.sysPicBox {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    align-content: flex-start;
+    height: 435px;
+    overflow: auto;
+    position: relative;
+}
+
+.picNone {
+    position: absolute;
+    left: 50%;
+    top: 45%;
+    transform: translate(-50%, -50%);
+    width: fit-content;
+    color: #9c9c9c;
+}
+
+.sysPic {
+    width: 200px;
+    height: 115px;
+    margin: 0 20px 20px 0;
+    cursor: pointer;
+}
+
+.sysPic>img,
+.isSysPic>img,
+.deletePic>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.isSysPic {
+    width: 200px;
+    height: 115px;
+    position: relative;
+}
+</style>

+ 149 - 0
src/components/pages/EnglishVoice/component/component/minxins/minxin.js

@@ -0,0 +1,149 @@
+import "../../../../../../common/aws-sdk-2.235.1.min.js";
+import gptImg from '../gptImg.vue'
+
+const minxin = {
+  components: {
+    gptImg,
+  },
+  data() {
+    return {
+      options2: {
+        word: "单词/词组",
+        sentence: "句子/短文",
+        QA: "题目",
+        createRole: "创建角色",
+        theme: "新建主题"
+      },
+      progress: 0,
+      isFinishSize: 0,
+      proVisible: false,
+      isAllSize: 0,
+      imgUrl: "",
+      sysPicVisible:false
+    };
+  },
+  directives: {
+    autoHeight: {
+      update(el, binding) {
+        const { value } = binding;
+        if (value && typeof value === "number") {
+          el.style.height = `${value}px`;
+        } else {
+          el.style.height = "auto";
+        }
+      },
+      componentUpdated(el) {
+        el.style.height = `${el.scrollHeight + 5}px`;
+      }
+    }
+  },
+  computed: {},
+  mounted() {},
+  activated() {},
+  methods: {
+    getImg(){
+      this.sysPicVisible = true
+    },
+    depthCopy(s) {
+      return s ? JSON.parse(JSON.stringify(s)) : "";
+    },
+    addImg(e) {
+        var el = e.currentTarget;
+        el.getElementsByTagName("input")[0].click();
+        e.target.value = "";
+    },
+    beforeUpload(event, type) {
+      // const loading = this.openLoading();
+      var file = event.target.files[0];
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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"
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+      var _this = this;
+      var imgA = [
+        "png",
+        "jpg",
+        "jpeg",
+        "bmp",
+        "gif",
+        "webp",
+        "psd",
+        "svg",
+        "tiff"
+      ];
+      if(imgA.indexOf(file.name.split(".")[file.name.split(".").length - 1]) == -1){
+        this.$message.error("请上传图片格式文件");
+        return
+      }
+      _this.progress = 0;
+      _this.proVisible = true;
+      _this.isFinishSize = 0;
+      _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+      _this.$forceUpdate();
+      if (file) {
+        var params = {
+          Key:
+            file.name.split(".")[0] +
+            new Date().getTime() +
+            "." +
+            file.name.split(".")[file.name.split(".").length - 1],
+          ContentType: file.type,
+          Body: file,
+          "Access-Control-Allow-Credentials": "*",
+          ACL: "public-read"
+        }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        var options = {
+          partSize: 2048 * 1024 * 1024,
+          queueSize: 2,
+          leavePartsOnError: true
+        };
+        bucket
+          .upload(params, options)
+          .on("httpUploadProgress", function(evt) {
+            //这里可以写进度条
+            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+            _this.progress = parseInt((evt.loaded / evt.total) * 100);
+            _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+            _this.$forceUpdate();
+          })
+          .send(function(err, data) {
+            _this.progress = 100;
+            _this.isFinishSize = _this.isAllSize;
+            _this.$forceUpdate();
+            setTimeout(() => {
+              _this.proVisible = false;
+              _this.$forceUpdate();
+            }, 1000);
+            // loading.close();
+            if (err) {
+              _this.$message.error("上传失败");
+            } else {
+              _this.imgUrl = data.Location;
+              console.log(data.Location);
+            }
+          });
+      }
+    },
+    checkImg(img){
+      this.$hevueImgPreview(img);
+    },
+    deleteImg(){
+      this.$confirm('确认删除该图片吗?', "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.checkJson.img = ''
+          this.$emit('setJson',this.checkJson)
+        })
+        .catch(() => { });
+    },
+  }
+};
+
+export default minxin;

+ 271 - 0
src/components/pages/EnglishVoice/component/component/qa2.vue

@@ -0,0 +1,271 @@
+<template>
+  <div class="o_box">
+    <div class="o_content">
+      <span>输入内容</span>
+      <textarea v-autoHeight="38" rows="1" class="binfo_input binfo_textarea" cols v-model="checkJson.content"
+        placeholder="输入...." @change="setJson"></textarea>
+    </div>
+    <div class="o_content">
+      <span>添加图片</span>
+      <div class="o_uploadbox_img" v-if="checkJson.img">
+        <div class="pic_mask">
+          <span @click="checkImg(checkJson.img)">查看</span>
+          <span @click="deleteImg()">删除</span>
+        </div>
+        <img :src="checkJson.img" alt="">
+      </div>
+      <div class="o_uploadbox" v-if="!checkJson.img" @click="getImg()">智能获取</div>
+      <div class="o_uploadbox" style="padding: 0 6px;" @click="addImg($event)" v-if="!checkJson.img">
+        <span class="icon_pic"></span>
+        <input type="file" accept="image/*" style="display: none" @change="beforeUpload($event)" />
+      </div>
+    </div>
+    <div v-if="proVisible" class="mask">
+      <div class="progressBox">
+        <div class="lbox">
+          <img src="../../../../../assets/loading.gif" />上传中,请稍后
+        </div>
+        <div style="margin-bottom: 10px">
+          <span>{{
+            isFinishSize
+          }}M</span>
+          /
+          <span>{{
+            isAllSize
+          }}M</span>
+        </div>
+        <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
+          ? progress
+          : 0
+          " style="width: 80%"></el-progress>
+      </div>
+    </div>
+    <gpt-img :sysPicVisible.sync="sysPicVisible" :value="checkJson.content"></gpt-img>
+  </div>
+</template>
+
+<script>
+import minxin from './minxins/minxin';
+export default {
+  mixins: [minxin],
+  props: {
+    cjson: {
+      type: Object,
+    },
+  },
+  data() {
+    return {
+      checkJson: {}
+    }
+  },
+  methods: {
+    setJson() {
+      this.$emit('setJson', this.checkJson)
+    }
+  },
+  watch: {
+    cjson: {
+      handler: function (newVal, oldVal) {
+        this.checkJson = this.depthCopy(newVal);
+      },
+      deep: true,
+    },
+    imgUrl: {
+      handler: function (newVal, oldVal) {
+        this.checkJson.img = newVal
+        this.$forceUpdate()
+        this.$emit('setJson', this.checkJson)
+      },
+      deep: true,
+    },
+  },
+  mounted() {
+    this.checkJson = this.depthCopy(this.cjson);
+  }
+}
+</script>
+
+<style scoped>
+.o_box {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 12px 16px 12px 48px;
+  background: #f5f6f7;
+  position: relative;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 8px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: 'Microsoft YaHei';
+  min-height: 38px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #CAD1DC;
+  font-size: 14px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+  border: 1.5px solid #3681FC !important;
+}
+
+.o_content {
+  display: flex;
+  color: #000;
+  font-size: 14px;
+}
+
+.o_content+.o_content {
+  margin-top: 10px;
+}
+
+.o_content>span {
+  min-width: fit-content;
+  margin-right: 12px;
+  line-height: 38px;
+}
+
+.o_uploadbox {
+  height: 32px;
+  padding: 0 8px;
+  background: #eee;
+  line-height: 32px;
+  margin-top: 3px;
+  font-size: 14px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+}
+
+.o_uploadbox+.o_uploadbox {
+  margin-left: 12px;
+}
+
+.icon_pic {
+  width: 20px;
+  height: 20px;
+  background-image: url('../../../../../assets/icon/englishVoice/icon_picture.png');
+  background-size: 100% 100%;
+  display: block;
+}
+
+.mask {
+  background-color: rgb(0 0 0 / 30%);
+  /* position: fixed; */
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 90;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.progressBox {
+  width: 300px;
+  height: 150px;
+  background: #fff;
+  border-radius: 10px;
+  box-shadow: 0 0 6px 1px #bfbfbf;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  position: relative;
+  color: #6c6c6c;
+}
+
+.progressBox>>>.el-progress-bar__outer {
+  background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+  height: 50px;
+  font-size: 19px;
+  display: flex;
+  align-items: center;
+  color: #747474;
+}
+
+.progressBox .lbox img {
+  width: 40px;
+  margin-right: 20px;
+}
+
+.closeCss {
+  position: absolute;
+  top: 8px;
+  right: 8px;
+  cursor: pointer;
+  width: 20px;
+  height: 20px;
+}
+
+.closeCss>img {
+  width: 100%;
+  height: 100%;
+}
+
+.o_uploadbox_img {
+  width: 100px;
+  height: 100px;
+  border-radius: 5px;
+  position: relative;
+  overflow: hidden;
+}
+
+.o_uploadbox_img>img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+.o_uploadbox_img:hover .pic_mask {
+  display: flex;
+}
+
+.pic_mask {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, .3);
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  top: 0;
+  left: 0;
+  color: #458dff;
+  display: none;
+  border-radius: 5px;
+}
+
+.pic_mask>span {
+  cursor: pointer;
+  font-size: 14px;
+  color: #fff;
+}
+
+.pic_mask>span+span {
+  margin-top: 10px;
+}
+</style>

+ 269 - 0
src/components/pages/EnglishVoice/component/component/sentence.vue

@@ -0,0 +1,269 @@
+<template>
+  <div class="o_box">
+    <div class="o_content">
+            <span>输入内容</span>
+            <textarea v-autoHeight="38" rows="1" class="binfo_input binfo_textarea" cols v-model="checkJson.content"
+                placeholder="输入...." @change="setJson"></textarea>
+        </div>
+        <div class="o_content">
+            <span>添加图片</span>
+            <div class="o_uploadbox_img" v-if="checkJson.img">
+              <div class="pic_mask">
+                <span @click="checkImg(checkJson.img)">查看</span>
+                <span @click="deleteImg()">删除</span>
+              </div>
+              <img :src="checkJson.img" alt="">
+            </div>
+            <div class="o_uploadbox" v-if="!checkJson.img" @click="getImg()">智能获取</div>
+            <div class="o_uploadbox" style="padding: 0 6px;" @click="addImg($event)" v-if="!checkJson.img">
+                <span class="icon_pic"></span>
+                <input type="file" accept="image/*" style="display: none" @change="beforeUpload($event)" />
+            </div>
+        </div>
+        <div v-if="proVisible" class="mask">
+            <div class="progressBox">
+                <div class="lbox">
+                    <img src="../../../../../assets/loading.gif" />上传中,请稍后
+                </div>
+                <div style="margin-bottom: 10px">
+                    <span>{{
+                        isFinishSize
+                    }}M</span>
+                    /
+                    <span>{{
+                        isAllSize
+                    }}M</span>
+                </div>
+                <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
+                    ? progress
+                    : 0
+                    " style="width: 80%"></el-progress>
+            </div>
+        </div>
+        <gpt-img :sysPicVisible.sync="sysPicVisible" :value="checkJson.content"></gpt-img>
+  </div>
+</template>
+
+<script>
+import minxin from './minxins/minxin';
+export default {
+    mixins: [minxin],
+    props: {
+        cjson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+          checkJson:{}
+        }
+    },
+    methods: {
+      setJson(){
+        this.$emit('setJson',this.checkJson)
+      }
+    },
+    watch: {
+        cjson: {
+            handler: function (newVal, oldVal) {
+                this.checkJson = this.depthCopy(newVal);
+            },
+            deep: true,
+        },
+        imgUrl: {
+            handler: function (newVal, oldVal) {
+                this.checkJson.img = newVal
+                this.$forceUpdate()
+                this.$emit('setJson',this.checkJson)
+            },
+            deep: true,
+        },
+    },
+    mounted(){
+        this.checkJson = this.depthCopy(this.cjson);
+    }
+}
+</script>
+
+<style scoped>
+.o_box {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 12px 16px 12px 48px;
+    background: #f5f6f7;
+    position: relative;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 8px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 38px;
+    /* border: 1px solid #3682fc00; */
+    border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1.5px solid #CAD1DC;
+    font-size: 14px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1.5px solid #3681FC !important;
+}
+
+.o_content {
+    display: flex;
+    color: #000;
+    font-size: 14px;
+}
+
+.o_content+.o_content {
+    margin-top: 10px;
+}
+
+.o_content>span {
+    min-width: fit-content;
+    margin-right: 12px;
+    line-height: 38px;
+}
+
+.o_uploadbox {
+    height: 32px;
+    padding: 0 8px;
+    background: #eee;
+    line-height: 32px;
+    margin-top: 3px;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+}
+
+.o_uploadbox+.o_uploadbox {
+    margin-left: 12px;
+}
+
+.icon_pic {
+    width: 20px;
+    height: 20px;
+    background-image: url('../../../../../assets/icon/englishVoice/icon_picture.png');
+    background-size: 100% 100%;
+    display: block;
+}
+
+.mask {
+    background-color: rgb(0 0 0 / 30%);
+    /* position: fixed; */
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 90;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.progressBox {
+    width: 300px;
+    height: 150px;
+    background: #fff;
+    border-radius: 10px;
+    box-shadow: 0 0 6px 1px #bfbfbf;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+    position: relative;
+    color: #6c6c6c;
+}
+
+.progressBox>>>.el-progress-bar__outer {
+    background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+    height: 50px;
+    font-size: 19px;
+    display: flex;
+    align-items: center;
+    color: #747474;
+}
+
+.progressBox .lbox img {
+    width: 40px;
+    margin-right: 20px;
+}
+
+.closeCss {
+    position: absolute;
+    top: 8px;
+    right: 8px;
+    cursor: pointer;
+    width: 20px;
+    height: 20px;
+}
+
+.closeCss>img {
+    width: 100%;
+    height: 100%;
+}
+
+
+.o_uploadbox_img {
+  width:100px;
+  height: 100px;
+  border-radius: 5px;
+  position: relative;
+  overflow: hidden;
+}
+.o_uploadbox_img > img{
+  width:100%;
+  height: 100%;
+  object-fit: cover;
+}
+.o_uploadbox_img:hover .pic_mask{
+  display: flex;
+}
+.pic_mask {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, .3);
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  top: 0;
+  left: 0;
+  color: #458dff;
+  display: none;
+  border-radius: 5px;
+}
+
+.pic_mask > span{
+  cursor: pointer;
+  font-size: 14px;
+  color: #fff;
+}
+
+.pic_mask > span + span{
+  margin-top: 10px;
+}
+</style>

+ 270 - 0
src/components/pages/EnglishVoice/component/component/word.vue

@@ -0,0 +1,270 @@
+<template>
+    <div class="o_box">
+        <div class="o_content">
+            <span>输入内容</span>
+            <textarea v-autoHeight="38" rows="1" class="binfo_input binfo_textarea" cols v-model="checkJson.content"
+                placeholder="输入...." @change="setJson"></textarea>
+        </div>
+        <div class="o_content">
+            <span>添加图片</span>
+            <div class="o_uploadbox_img" v-if="checkJson.img">
+                <div class="pic_mask">
+                    <span @click="checkImg(checkJson.img)">查看</span>
+                    <span @click="deleteImg()">删除</span>
+                </div>
+                <img :src="checkJson.img" alt="">
+            </div>
+            <div class="o_uploadbox" v-if="!checkJson.img" @click="getImg()">智能获取</div>
+            <div class="o_uploadbox" style="padding: 0 6px;" @click="addImg($event)" v-if="!checkJson.img">
+                <span class="icon_pic"></span>
+                <input type="file" accept="image/*" style="display: none" @change="beforeUpload($event)" />
+            </div>
+        </div>
+        <div v-if="proVisible" class="mask">
+            <div class="progressBox">
+                <div class="lbox">
+                    <img src="../../../../../assets/loading.gif" />上传中,请稍后
+                </div>
+                <div style="margin-bottom: 10px">
+                    <span>{{
+                        isFinishSize
+                    }}M</span>
+                    /
+                    <span>{{
+                        isAllSize
+                    }}M</span>
+                </div>
+                <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
+                    ? progress
+                    : 0
+                    " style="width: 80%"></el-progress>
+            </div>
+        </div>
+        <gpt-img :sysPicVisible.sync="sysPicVisible" :value="checkJson.content"></gpt-img>
+    </div>
+</template>
+
+<script>
+import minxin from './minxins/minxin';
+export default {
+    mixins: [minxin],
+    props: {
+        cjson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            checkJson: {},
+        }
+    },
+    methods: {
+        setJson() {
+            this.$emit('setJson', this.checkJson)
+        }
+    },
+    watch: {
+        cjson: {
+            handler: function (newVal, oldVal) {
+                this.checkJson = this.depthCopy(newVal);
+            },
+            deep: true,
+        },
+        imgUrl: {
+            handler: function (newVal, oldVal) {
+                this.checkJson.img = newVal
+                this.$forceUpdate()
+                this.$emit('setJson', this.checkJson)
+            },
+            deep: true,
+        },
+    },
+    mounted() {
+        this.checkJson = this.depthCopy(this.cjson);
+    }
+}
+</script>
+
+<style scoped>
+.o_box {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 12px 16px 12px 48px;
+    background: #f5f6f7;
+    position: relative;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 8px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 38px;
+    /* border: 1px solid #3682fc00; */
+    border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1.5px solid #CAD1DC;
+    font-size: 14px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1.5px solid #3681FC !important;
+}
+
+.o_content {
+    display: flex;
+    color: #000;
+    font-size: 14px;
+}
+
+.o_content+.o_content {
+    margin-top: 10px;
+}
+
+.o_content>span {
+    min-width: fit-content;
+    margin-right: 12px;
+    line-height: 38px;
+}
+
+.o_uploadbox {
+    height: 32px;
+    padding: 0 8px;
+    background: #eee;
+    line-height: 32px;
+    margin-top: 3px;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+}
+
+.o_uploadbox+.o_uploadbox {
+    margin-left: 12px;
+}
+
+.icon_pic {
+    width: 20px;
+    height: 20px;
+    background-image: url('../../../../../assets/icon/englishVoice/icon_picture.png');
+    background-size: 100% 100%;
+    display: block;
+}
+
+.mask {
+    background-color: rgb(0 0 0 / 30%);
+    /* position: fixed; */
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 90;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.progressBox {
+    width: 300px;
+    height: 150px;
+    background: #fff;
+    border-radius: 10px;
+    box-shadow: 0 0 6px 1px #bfbfbf;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+    position: relative;
+    color: #6c6c6c;
+}
+
+.progressBox>>>.el-progress-bar__outer {
+    background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+    height: 50px;
+    font-size: 19px;
+    display: flex;
+    align-items: center;
+    color: #747474;
+}
+
+.progressBox .lbox img {
+    width: 40px;
+    margin-right: 20px;
+}
+
+.closeCss {
+    position: absolute;
+    top: 8px;
+    right: 8px;
+    cursor: pointer;
+    width: 20px;
+    height: 20px;
+}
+
+.closeCss>img {
+    width: 100%;
+    height: 100%;
+}
+
+.o_uploadbox_img {
+    width: 100px;
+    height: 100px;
+    border-radius: 5px;
+    position: relative;
+    overflow: hidden;
+}
+
+.o_uploadbox_img>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.o_uploadbox_img:hover .pic_mask {
+    display: flex;
+}
+
+.pic_mask {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, .3);
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    top: 0;
+    left: 0;
+    color: #458dff;
+    display: none;
+    border-radius: 5px;
+}
+
+.pic_mask>span {
+    cursor: pointer;
+    font-size: 14px;
+    color: #fff;
+}
+
+.pic_mask>span+span {
+    margin-top: 10px;
+}</style>

+ 227 - 10
src/components/pages/EnglishVoice/component/order.vue

@@ -6,14 +6,28 @@
     </div>
     </div>
     <div class="o_check_box" v-else>
     <div class="o_check_box" v-else>
       <div class="o_child" v-for="(item, index) in checkArray" :key="index">
       <div class="o_child" v-for="(item, index) in checkArray" :key="index">
-        <div class="o_child_title">
-          <span class="drag"></span>
-          <span class="title">{{item.content}}</span>
+        <div class="o_child_title" :class="{ active: checkType == index }" @click.stop="setCheckType(index)">
+          <span class="drag" v-if="editType == 2"></span>
+          <span class="order" v-else>{{ index + 1 }}、</span>
+          <span class="icon"
+            :class="{ icon_word: item.type == 'word', icon_sentence: item.type == 'sentence', icon_QA: item.type == 'QA' }"></span>
+          <span class="title">{{ item.content }}</span>
           <div class="edit_btn">
           <div class="edit_btn">
-            <span class="edit"></span>
-            <span class="delete"></span>
+            <div class="pic" v-if="editType == 2 && item.img && checkType != index">
+              <div class="pic_mask">
+                <span class="delete" @click.stop="deleteImg(index)"></span>
+              </div>
+              <img :src="item.img" alt="">
+            </div>
+            <span class="edit" v-if="editType == 2 && checkType != index"></span>
+            <span :class="{ delete: editType == 2, delete2: editType == 1 }" @click.stop="deleteJ(index)"></span>
           </div>
           </div>
         </div>
         </div>
+        <div class="o_edit_box" v-if="checkType == index && editType == 2">
+          <qa :cjson="item" v-if="item.type == 'QA'" @setJson="setJson"></qa>
+          <sentence :cjson="item" v-if="item.type == 'sentence'" @setJson="setJson"></sentence>
+          <word :cjson="item" v-if="item.type == 'word'" @setJson="setJson"></word>
+        </div>
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>
@@ -21,15 +35,26 @@
 
 
 <script>
 <script>
 import minxin from '../minxins/minxin'
 import minxin from '../minxins/minxin'
+import qa from './component/qa2.vue'
+import sentence from './component/sentence.vue'
+import word from './component/word.vue'
 export default {
 export default {
   mixins: [minxin],
   mixins: [minxin],
+  components: {
+    qa,
+    sentence,
+    word,
+  },
   props: {
   props: {
     checkJson: {
     checkJson: {
       type: Array,
       type: Array,
     },
     },
-    editType:{
+    editType: {
       type: Number,
       type: Number,
       default: 1
       default: 1
+    },
+    checkType: {
+      type: Number
     }
     }
   },
   },
   data() {
   data() {
@@ -37,6 +62,23 @@ export default {
       checkArray: []
       checkArray: []
     }
     }
   },
   },
+  computed: {
+    // selectType() {
+    //   return function (item) {
+    //     if (item.ttype == 1) {
+    //       let className = "icon"
+    //       if (item.type == 'word') {
+    //         className += " icon_word"
+    //       } else if (item.type == 'sentence') {
+    //         className += " icon_sentence"
+    //       } else if (item.type == 'QA') {
+    //         className += " icon_QA"
+    //       }
+    //       return index + 1 + "、" + (this.editType != '2' ? `<span class='${className}'></span>` : `<span class='${className}'></span>` + item.content);
+    //     }
+    //   };
+    // },
+  },
   watch: {
   watch: {
     checkJson: {
     checkJson: {
       handler: function (newVal, oldVal) {
       handler: function (newVal, oldVal) {
@@ -45,7 +87,47 @@ export default {
       deep: true,
       deep: true,
     },
     },
   },
   },
-  mounted(){
+  methods: {
+    setCheckType(index) {
+      console.log(index);
+      let _index = index
+      if (this.checkType == index) {
+        _index = -1
+      }
+      this.$emit('update:checkType', _index);
+    },
+    setJson(val) {
+      this.checkArray[this.checkType] = val
+      this.$forceUpdate()
+      this.$emit('setJson', this.checkArray)
+    },
+    deleteJ(index) {
+      this.$confirm('确定删除该题目吗?', "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.checkArray.splice(index, 1)
+          this.$forceUpdate()
+          this.$emit('setJson', this.checkArray)
+        })
+        .catch(() => { });
+    },
+    deleteImg(index){
+      this.$confirm('确定删除该题目的图片吗?', "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.checkArray[index].img = ''
+          this.$forceUpdate()
+          this.$emit('setJson', this.checkArray)
+        })
+    }
+  },
+  mounted() {
     this.checkArray = this.depthCopy(this.checkJson);
     this.checkArray = this.depthCopy(this.checkJson);
   }
   }
 }
 }
@@ -57,7 +139,7 @@ export default {
   height: auto;
   height: auto;
 }
 }
 
 
-.o_none_box{
+.o_none_box {
   width: 100%;
   width: 100%;
   height: 500px;
   height: 500px;
   background: #fff;
   background: #fff;
@@ -67,16 +149,151 @@ export default {
   flex-direction: column;
   flex-direction: column;
 }
 }
 
 
-.o_none_box > img{
+.o_none_box>img {
   width: 120px;
   width: 120px;
   height: 120px;
   height: 120px;
   object-fit: contain;
   object-fit: contain;
 }
 }
 
 
-.o_none_box > span{
+.o_none_box>span {
   font-size: 12px;
   font-size: 12px;
   color: #00000066;
   color: #00000066;
   margin-top: 15px;
   margin-top: 15px;
 }
 }
 
 
+.o_check_box {
+  width: 100%;
+}
+
+.o_child {
+  width: 100%;
+}
+
+.o_child_title {
+  width: 100%;
+  display: flex;
+  height: 38px;
+  align-items: center;
+  padding: 0 16px;
+  box-sizing: border-box;
+  cursor: pointer;
+}
+
+.o_child_title.active {
+  background: #EFF0F1;
+}
+
+.o_child_title>.drag {
+  display: block;
+  background-image: url('../../../../assets/icon/test/drag_icon.png');
+  background-size: 100% 100%;
+  min-width: 16px;
+  min-height: 16px;
+  margin-right: 15px;
+  cursor: pointer;
+}
+
+.o_child_title.active>.drag {
+  background-image: url('../../../../assets/icon/test/drag_icon_active.png');
+}
+.o_child_title > .title{
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  max-width: 200px;
+}
+.o_child_title>.order {
+  line-height: 38px;
+}
+
+.o_child_title>.icon {
+  display: block;
+  background-size: 100% 100%;
+  min-width: 16px;
+  min-height: 16px;
+  margin-right: 8px;
+}
+
+.o_child_title>.icon.icon_word {
+  background-image: url('../../../../assets/icon/englishVoice/icon_check_word.png');
+}
+
+.o_child_title>.icon.icon_sentence {
+  background-image: url('../../../../assets/icon/englishVoice/icon_check_sentence.png');
+}
+
+.o_child_title>.icon.icon_QA {
+  background-image: url('../../../../assets/icon/englishVoice/icon_check_qa.png');
+}
+
+.o_child_title>.edit_btn {
+  margin-left: auto;
+  display: flex;
+  align-items: center;
+}
+
+.o_child_title>.edit_btn>.delete,
+.o_child_title>.edit_btn>.delete2,
+.o_child_title>.edit_btn>.edit {
+  display: block;
+  background-size: 100% 100%;
+  min-width: 16px;
+  min-height: 16px;
+  cursor: pointer;
+  /* margin-right: 8px; */
+}
+
+.o_child_title>.edit_btn>.edit {
+  background-image: url('../../../../assets/icon/test/add_edit_icon.png');
+  margin-right: 15px;
+}
+
+.o_child_title>.edit_btn>.delete {
+  background-image: url('../../../../assets/icon/englishVoice/icon_delete.png');
+}
+
+.o_child_title>.edit_btn>.delete2 {
+  background-image: url('../../../../assets/icon/test/delete_test_icon2.png');
+}
+.o_child_title>.edit_btn>.pic{
+  width: 50px;
+    overflow: hidden;
+    height: 32px;
+    margin-right: 15px;
+    border-radius: 5px;
+    cursor: pointer;
+    position: relative;
+}
+
+.o_child_title>.edit_btn>.pic > img{
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.o_child_title>.edit_btn>.pic > .pic_mask {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, .3);
+  justify-content: center;
+  align-items: center;
+  top: 0;
+  left: 0;
+  color: #458dff;
+  display: none;
+  border-radius: 5px;
+}
+.o_child_title>.edit_btn>.pic:hover > .pic_mask {
+  display: flex;
+}
+
+.o_child_title>.edit_btn>.pic > .pic_mask > .delete{
+  width: 15px;
+  height: 15px;
+  background-image: url('../../../../assets/icon/englishVoice/icon_delete2.png');
+  background-size: 100% 100%;
+  display: block;
+  cursor: pointer;
+}
 </style>
 </style>

+ 113 - 38
src/components/pages/EnglishVoice/index.vue

@@ -1,17 +1,17 @@
 <template>
 <template>
-      <el-dialog title="英语口语" :visible.sync="EnglishVoiceDialog" :append-to-body="true" width="100%"
+    <el-dialog title="英语口语" :visible.sync="EnglishVoiceDialog" :append-to-body="true" width="100%"
         :before-close="handleClose" class="dialog_diy">
         :before-close="handleClose" class="dialog_diy">
         <div class="ev_box">
         <div class="ev_box">
             <div class="ev_info_box">
             <div class="ev_info_box">
                 <div class="title">设置英语口语信息</div>
                 <div class="title">设置英语口语信息</div>
                 <div class="ev_info_input_box">
                 <div class="ev_info_input_box">
-                    <div class="box"> 
+                    <div class="box">
                         <span class="title bi">标题</span>
                         <span class="title bi">标题</span>
-                        <el-input v-model="title" placeholder="请输入标题" class="input"/>
+                        <el-input v-model="title" placeholder="请输入标题" class="input" />
                     </div>
                     </div>
-                    <div class="box"> 
+                    <div class="box">
                         <span class="title">说明</span>
                         <span class="title">说明</span>
-                        <el-input v-model="detail" placeholder="请输入对该问题的描述" class="input"/>
+                        <el-input v-model="detail" placeholder="请输入对该问题的描述" class="input" />
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
@@ -24,11 +24,11 @@
                     </div>
                     </div>
                     <div class="center">
                     <div class="center">
                         <div class="title">评测题目</div>
                         <div class="title">评测题目</div>
-                        <order :checkJson="checkJson" @setJson="setJson" :editType="2"></order>
+                        <order :checkJson="checkJson" @setJson="setJson" :editType="2" :checkType.sync="checkType"></order>
                     </div>
                     </div>
                     <div class="right">
                     <div class="right">
                         <div class="title">评测大纲</div>
                         <div class="title">评测大纲</div>
-                        <order :checkJson="checkJson" @setJson="setJson" :editType="1"></order>
+                        <order :checkJson="checkJson" @setJson="setJson" :editType="1" :checkType.sync="checkType"></order>
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
@@ -55,13 +55,18 @@ export default {
         },
         },
         oid: {
         oid: {
             type: String
             type: String
-        }
+        },
+        englishVoiceJson: {
+            type: Object
+        },
     },
     },
     data() {
     data() {
         return {
         return {
             checkJson: [],
             checkJson: [],
-            title:'',
-            detail:'',
+            checkJson2: {},
+            title: '',
+            detail: '',
+            checkType: -1,
         }
         }
     },
     },
     methods: {
     methods: {
@@ -70,17 +75,74 @@ export default {
             done();
             done();
         },
         },
         close() {
         close() {
+            let a = {
+                title: this.title,
+                detail: this.detail,
+                array: this.checkJson
+            }
+            if (JSON.stringify(a) == JSON.stringify(this.englishVoiceJson)) {
+                this.$emit("update:EnglishVoiceDialog", false);
+            } else {
+                this
+                    .$confirm("是否保存已编辑内容?", "提示", {
+                        confirmButtonText: "保存",
+                        cancelButtonText: "不保存",
+                        type: "warning",
+                    })
+                    .then(() => {
+                        this.confirm();
+                    })
+                    .catch(() => {
+                        this.$emit("update:EnglishVoiceDialog", false);
+                    });
+            }
+        },
+        close2() {
             this.$emit("update:EnglishVoiceDialog", false);
             this.$emit("update:EnglishVoiceDialog", false);
         },
         },
         confirm() {
         confirm() {
-            this.close();
+            if(!this.title){
+                this.$message.error("请输入标题");
+                return;
+            }
+            if(!this.checkJson.length){
+                this.$message.error("请至少添加一道口语题目");
+                return
+            }
+            let a = {
+                title: this.title,
+                detail: this.detail,
+                array: this.checkJson
+            }
+            this.$emit("setEnglishVoiceJson", JSON.parse(JSON.stringify(a)));
+            this.close2();
         },
         },
-        setJson(val){
-            debugger
+        setJson(val) {
             this.checkJson = val;
             this.checkJson = val;
             this.$forceUpdate()
             this.$forceUpdate()
+        },
+        setVoiceJson(val) {
+            let a = JSON.parse(JSON.stringify(val));
+            this.checkJson2 = JSON.parse(JSON.stringify(a));
+            this.title = a.title;
+            this.detail = a.detail;
+            this.checkJson = a.array
+            this.checkType = -1
         }
         }
     },
     },
+    watch: {
+        EnglishVoiceDialog: {
+            handler: function (newVal, oldVal) {
+                if (newVal) {
+                    this.setVoiceJson(this.englishVoiceJson);
+                }
+            },
+            deep: true,
+        },
+    },
+    mounted() {
+        this.setVoiceJson(this.englishVoiceJson);
+    },
 }
 }
 </script>
 </script>
 
 
@@ -123,7 +185,7 @@ export default {
     overflow: hidden;
     overflow: hidden;
 }
 }
 
 
-.ev_box{
+.ev_box {
     width: calc(100% - 20px);
     width: calc(100% - 20px);
     height: calc(100% - 20px);
     height: calc(100% - 20px);
     overflow: auto;
     overflow: auto;
@@ -132,13 +194,13 @@ export default {
     border-radius: 5px;
     border-radius: 5px;
 }
 }
 
 
-.ev_info_box{
-    
-}
-.ev_info_box + .ev_info_box{
+.ev_info_box {}
+
+.ev_info_box+.ev_info_box {
     margin-top: 14px;
     margin-top: 14px;
 }
 }
-.ev_info_box > .title {
+
+.ev_info_box>.title {
     padding: 15px 0 15px 0;
     padding: 15px 0 15px 0;
     font-size: 16px;
     font-size: 16px;
     font-weight: bold;
     font-weight: bold;
@@ -150,7 +212,7 @@ export default {
     color: #000;
     color: #000;
 }
 }
 
 
-.ev_info_box > .title::before {
+.ev_info_box>.title::before {
     content: '';
     content: '';
     display: block;
     display: block;
     width: 3px;
     width: 3px;
@@ -160,25 +222,29 @@ export default {
     margin: 0 5px 0 0;
     margin: 0 5px 0 0;
 }
 }
 
 
-.ev_info_input_box{
+.ev_info_input_box {
     width: 100%;
     width: 100%;
     box-sizing: border-box;
     box-sizing: border-box;
     padding: 0 20px;
     padding: 0 20px;
 }
 }
-.ev_info_input_box > .box{
+
+.ev_info_input_box>.box {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
 }
 }
-.ev_info_input_box > .box + .box{
+
+.ev_info_input_box>.box+.box {
     margin-top: 12px;
     margin-top: 12px;
 }
 }
-.ev_info_input_box > .box > .title{
+
+.ev_info_input_box>.box>.title {
     min-width: fit-content;
     min-width: fit-content;
     font-size: 14px;
     font-size: 14px;
-    margin:0 10px;
+    margin: 0 10px;
     position: relative;
     position: relative;
 }
 }
-.ev_info_input_box > .box > .title.bi::before{
+
+.ev_info_input_box>.box>.title.bi::before {
     content: '*';
     content: '*';
     color: rgb(238, 62, 62);
     color: rgb(238, 62, 62);
     display: block;
     display: block;
@@ -186,12 +252,13 @@ export default {
     position: absolute;
     position: absolute;
     left: -10px;
     left: -10px;
 }
 }
-.ev_info_input_box > .box > .input{
+
+.ev_info_input_box>.box>.input {
     width: 100%;
     width: 100%;
     max-width: 750px;
     max-width: 750px;
 }
 }
 
 
-.ev_create_box{
+.ev_create_box {
     width: 100%;
     width: 100%;
     width: calc(100% - 40px);
     width: calc(100% - 40px);
     border-radius: 5px;
     border-radius: 5px;
@@ -201,41 +268,49 @@ export default {
     justify-content: space-between;
     justify-content: space-between;
     min-height: 500px;
     min-height: 500px;
 }
 }
-.ev_create_box > .left{
+
+.ev_create_box>.left {
     width: 250px;
     width: 250px;
     border-right: 1px solid #e7e7e7;
     border-right: 1px solid #e7e7e7;
     box-sizing: border-box;
     box-sizing: border-box;
     padding: 0 16px;
     padding: 0 16px;
 }
 }
-.ev_create_box > .center{
+
+.ev_create_box>.center {
     width: calc(100% - 500px);
     width: calc(100% - 500px);
 }
 }
-.ev_create_box > .right{
+
+.ev_create_box>.right {
     width: 250px;
     width: 250px;
     border-left: 1px solid #e7e7e7;
     border-left: 1px solid #e7e7e7;
     box-sizing: border-box;
     box-sizing: border-box;
-    padding: 0 16px;
+    /* padding: 0 16px; */
 }
 }
 
 
-.ev_create_box > .left > .title{
+.ev_create_box>.left>.title {
     font-size: 16px;
     font-size: 16px;
     font-weight: 700;
     font-weight: 700;
     color: #000;
     color: #000;
     text-align: center;
     text-align: center;
-    margin: 20px 0;
+    height: 60px;
+    line-height: 60px;
 }
 }
-.ev_create_box > .center > .title{
+
+.ev_create_box>.center>.title {
     font-size: 24px;
     font-size: 24px;
     font-weight: 700;
     font-weight: 700;
     color: #000;
     color: #000;
     text-align: center;
     text-align: center;
-    margin: 16px 0;
+    height: 60px;
+    line-height: 60px;
 }
 }
-.ev_create_box > .right > .title{
+
+.ev_create_box>.right>.title {
     font-size: 16px;
     font-size: 16px;
     font-weight: 700;
     font-weight: 700;
     color: #000;
     color: #000;
     text-align: center;
     text-align: center;
-    margin: 20px 0;
+    height: 60px;
+    line-height: 60px;
 }
 }
 </style>
 </style>

+ 35 - 8
src/components/pages/addCourse.vue

@@ -2085,7 +2085,7 @@
                                       </div>
                                       </div>
                                     </div> -->
                                     </div> -->
                                   </div>
                                   </div>
-                                  <!-- <div class="tool" :class="{ isToolChoose: itemTool.tool.indexOf(70) != -1 }"
+                                  <div class="tool" :class="{ isToolChoose: itemTool.tool.indexOf(70) != -1 }"
                                     @click="addTools(70, itemTaskIndex, toolIndex)">
                                     @click="addTools(70, itemTaskIndex, toolIndex)">
                                     <div class="whiteBIcon" @click.stop="openTools(itemTaskIndex, 70, toolIndex)">
                                     <div class="whiteBIcon" @click.stop="openTools(itemTaskIndex, 70, toolIndex)">
                                       <img src="../../assets/icon/thirdToolList/englishVoice.png" alt />
                                       <img src="../../assets/icon/thirdToolList/englishVoice.png" alt />
@@ -2094,7 +2094,7 @@
                                     <div class="noCTool"><img src="../../assets/icon/new/isToolC.png" alt="" /></div>
                                     <div class="noCTool"><img src="../../assets/icon/new/isToolC.png" alt="" /></div>
                                     <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1"><img
                                     <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1"><img
                                         src="../../assets/icon/new/isToolC.png" alt="" /></div>
                                         src="../../assets/icon/new/isToolC.png" alt="" /></div>
-                                  </div> -->
+                                  </div>
                                   <!-- <div class="tool">
                                   <!-- <div class="tool">
                                   <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
                                   <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
                                     <img src="../../assets/icon/secondToolList/translation.png" alt />
                                     <img src="../../assets/icon/secondToolList/translation.png" alt />
@@ -3908,7 +3908,7 @@
       </span>
       </span>
     </el-dialog>
     </el-dialog>
     <evaBox :oid='oid' :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson"></evaBox>
     <evaBox :oid='oid' :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson"></evaBox>
-    <EnglishVoice :oid='oid' :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"></EnglishVoice>
+    <EnglishVoice :oid='oid' :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog" :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
 </div>
 </div>
 </template>
 </template>
 
 
@@ -4214,6 +4214,7 @@ export default {
         evatIndex: '',
         evatIndex: '',
         evaBoxDialog: false,
         evaBoxDialog: false,
         EnglishVoiceDialog: false,
         EnglishVoiceDialog: false,
+        englishVoiceJson:{}
     };
     };
   },
   },
   directives: {
   directives: {
@@ -7700,10 +7701,36 @@ export default {
         this.$forceUpdate();
         this.$forceUpdate();
         this.englishDialogVisible = true;
         this.englishDialogVisible = true;
       }else if(i == 70){
       }else if(i == 70){
+        this.englishVoiceJson = {};
+        this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          itemTaskIndex
+        ].toolChoose[toolIndex].englishVoiceJson
+          ? JSON.parse(
+            JSON.stringify(
+              this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+                itemTaskIndex
+              ].toolChoose[toolIndex].englishVoiceJson
+            )
+          )
+          : { 
+            title:'',
+            detail:'',
+            array:[]
+           };
         this.$forceUpdate();
         this.$forceUpdate();
         this.EnglishVoiceDialog = true;
         this.EnglishVoiceDialog = true;
       }
       }
     },
     },
+    setEnglishVoiceJson(val){
+      this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(JSON.stringify(val))
+      this.$forceUpdate();
+      if (
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
+          .toolChoose[this.toolIndex].tool != 70
+      ) {
+        this.addTools(70, this.taskCount, this.toolIndex);
+      }
+    },
     chapAddTools(i) {
     chapAddTools(i) {
       if (this.chapTools[0].tools.length == 0) {
       if (this.chapTools[0].tools.length == 0) {
         this.chapTools[0].tools.push(i);
         this.chapTools[0].tools.push(i);
@@ -7826,13 +7853,13 @@ export default {
         }
         }
       }
       }
       if(i == 70){
       if(i == 70){
-        // if (
-        //   !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
-        //     .toolChoose[toolIndex].englishList
-        // ) {
+        if (
+          !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
+            .toolChoose[toolIndex].englishVoiceJson
+        ) {
           this.openTools(itemTaskIndex, 70, toolIndex);
           this.openTools(itemTaskIndex, 70, toolIndex);
           return;
           return;
-        // }
+        }
       }
       }
       // if (i == 48) {
       // if (i == 48) {
       //   if (
       //   if (

+ 53 - 0
src/components/pages/easy/addCourse.vue

@@ -1614,6 +1614,16 @@
                                     </div>
                                     </div>
                                   </div> -->
                                   </div> -->
                                 </div>
                                 </div>
+                                <div class="tool" :class="{ isToolChoose: itemTool.tool.indexOf(70) != -1 }"
+                                    @click="addTools(70, itemTaskIndex, toolIndex)">
+                                    <div class="whiteBIcon" @click.stop="openTools(itemTaskIndex, 70, toolIndex)">
+                                      <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
+                                      <div style="margin: 5px 0">英语口语</div>
+                                    </div>
+                                    <div class="noCTool"><img src="../../../assets/icon/new/isToolC.png" alt="" /></div>
+                                    <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1"><img
+                                        src="../../../assets/icon/new/isToolC.png" alt="" /></div>
+                                  </div>
                               </div>
                               </div>
                               <div class="toolSort" v-if="itemTool.toolType == 7">
                               <div class="toolSort" v-if="itemTool.toolType == 7">
                                 <div class="tool" :class="{ isToolChoose: itemTool.tool.indexOf(40) != -1 }"
                                 <div class="tool" :class="{ isToolChoose: itemTool.tool.indexOf(40) != -1 }"
@@ -4617,6 +4627,7 @@
       </span>
       </span>
     </el-dialog>
     </el-dialog>
     <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
     <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
+    <EnglishVoice :oid='oid' :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog" :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -4634,6 +4645,7 @@ import weilaiData from "../components/weilai.js";
 import sourceDialog from "../teacherSource/dialog.vue";
 import sourceDialog from "../teacherSource/dialog.vue";
 import interVideo from "../interVideo/index.vue";
 import interVideo from "../interVideo/index.vue";
 import englishRight from "./commpont/englishRight.vue";
 import englishRight from "./commpont/englishRight.vue";
+import EnglishVoice from '../EnglishVoice/index.vue'
 
 
 export default {
 export default {
   components: {
   components: {
@@ -4646,6 +4658,7 @@ export default {
     sourceDialog,
     sourceDialog,
     interVideo,
     interVideo,
     englishRight,
     englishRight,
+    EnglishVoice
   },
   },
   data() {
   data() {
     return {
     return {
@@ -4875,6 +4888,8 @@ export default {
       newIndex: "",
       newIndex: "",
       typeIndex: "",
       typeIndex: "",
       isdrag: '',
       isdrag: '',
+      EnglishVoiceDialog: false,
+      englishVoiceJson:{}
     };
     };
   },
   },
   directives: {
   directives: {
@@ -7733,6 +7748,35 @@ export default {
           : {  };
           : {  };
         this.$forceUpdate();
         this.$forceUpdate();
         this.englishDialogVisible = true;
         this.englishDialogVisible = true;
+      }else if(i == 70){
+        this.englishVoiceJson = {};
+        this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          itemTaskIndex
+        ].toolChoose[toolIndex].englishVoiceJson
+          ? JSON.parse(
+            JSON.stringify(
+              this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+                itemTaskIndex
+              ].toolChoose[toolIndex].englishVoiceJson
+            )
+          )
+          : { 
+            title:'',
+            detail:'',
+            array:[]
+           };
+        this.$forceUpdate();
+        this.EnglishVoiceDialog = true;
+      }
+    },
+    setEnglishVoiceJson(val){
+      this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(JSON.stringify(val))
+      this.$forceUpdate();
+      if (
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
+          .toolChoose[this.toolIndex].tool != 70
+      ) {
+        this.addTools(70, this.taskCount, this.toolIndex);
       }
       }
     },
     },
     chapAddTools(i) {
     chapAddTools(i) {
@@ -7856,6 +7900,15 @@ export default {
           return;
           return;
         }
         }
       }
       }
+      if(i == 70){
+        if (
+          !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
+            .toolChoose[toolIndex].englishVoiceJson
+        ) {
+          this.openTools(itemTaskIndex, 70, toolIndex);
+          return;
+        }
+      }
       // if (i == 48) {
       // if (i == 48) {
       //   if (
       //   if (
       //     !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
       //     !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]

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