lsc hace 2 años
padre
commit
6593d3099b

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.d0edb1e52c87df1074314cacf6da9e21.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.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.ba17db497dfd3a5b6b5e.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.5be16445fafb6ced5243da6f6e197be6.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.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.8d492b568bff3bdc8287.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/css/app.5be16445fafb6ced5243da6f6e197be6.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/css/app.5be16445fafb6ced5243da6f6e197be6.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/css/app.d0edb1e52c87df1074314cacf6da9e21.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/app.8d492b568bff3bdc8287.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/app.8d492b568bff3bdc8287.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/app.ba17db497dfd3a5b6b5e.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 70 - 11
src/components/pages/addCourse.vue

@@ -3576,7 +3576,7 @@
       :append-to-body="true"
       width="100%"
       :before-close="handleClose"
-      class="dialog_diy lineCss"
+      class="dialog_diy source_diy"
     >
       <div>
         <sourceDialog @update="updateSourceData"></sourceDialog>
@@ -3855,7 +3855,10 @@
           <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
         </div> -->
         <div class="a_addBox">
-          <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div>
+          <div style="font-size: 16px; color: #c7c7c7">
+            请输入题目内容
+            <el-button type="primary" size="small" @click="pasteOption" style="margin-left:10px">粘贴题目</el-button>
+          </div>
           <div
             class="a_add_box"
             v-for="(item1, index1) in testJson.testCount"
@@ -5881,18 +5884,22 @@ export default {
       this.sourceData = data
     },
     addSource(){
-      if(!this.sourceData.id){
+      if(!Object.keys(this.sourceData).length){
         this.$message.error("请选择要上传的资源")
         return;
       }
-      this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
-        this.lineCount
-      ].chapterData.push({
-        name: "链接",
-        title: this.sourceData.name,
-        url: this.sourceData.url,
-        type: 8,
-      });
+      let keys = Object.keys(this.sourceData)
+      for(var i = 0;i<keys.length;i++){
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.push({
+          name: "链接",
+          title: this.sourceData[keys[i]].name,
+          url: this.sourceData[keys[i]].url,
+          type: 8,
+        });
+      }
+      this.$forceUpdate();
       this.dialogVisibleSource = false;
     },
     deleteM(i, j) {
@@ -8068,6 +8075,47 @@ export default {
         this.addTools(45, this.taskCount, this.toolIndex);
       }
     },
+    //自动获取剪贴板
+    pasteOption() {
+      let copyData = top.document.querySelectorAll("#AIChat iframe")[0].contentWindow.copyData
+      if(!copyData || !copyData.selectData.length){
+        this.$message.error("请使用AI共创生成题目")
+        return;
+      }
+      let selectData = copyData.selectData;
+      for(var i = 0;i<selectData.length;i++){
+        let answer = 0
+        switch (selectData[i].answer[0]) {
+          case 'A':
+            answer = 0
+            break;
+          case 'B':
+            answer = 1
+            break;
+          case 'C':
+            answer = 2
+            break;
+          case 'D':
+            answer = 3
+            break;
+          case 'E':
+            answer = 4
+            break;
+          default:
+            break;
+        }
+        this.testJson.testJson.push({
+          teststitle: selectData[i].subject,
+          testItem: selectData[i].length,
+          checkList: selectData[i].options,
+          timuList: [],
+          answer: answer,
+          type: "1",
+        });
+        this.testJson.testCount++;
+      }
+      this.$forceUpdate();
+    },
     addAnswer() {
       if (this.answerQ == "") {
         this.$message.error("请输入您想要问的问题");
@@ -9339,6 +9387,16 @@ export default {
   padding: 20px 20px;
 }
 
+.source_diy >>> .el-dialog{
+  height: 100% !important;
+  margin: 0 auto !important;
+}
+
+.source_diy .el-dialog__body{
+  height: calc(100% - 185px);
+  overflow: auto;
+}
+
 .left {
   border-right: 1px solid rgb(60, 94, 143);
   display: flex;
@@ -10524,6 +10582,7 @@ ol {
   margin-top: 10px;
   display: flex;
   font-size: 16px;
+  align-items: center;
 }
 
 .a_add_checkType span {

+ 9 - 5
src/components/pages/teacherSource/dialog.vue

@@ -44,7 +44,7 @@
         <div class="pb_content_body">
             <div class="student_table" v-loading="loading">
                 <div class="source-box" v-for="(item, index) in res" :key="index">
-                    <img class="checkImg" src="../../../assets/icon/source/checka.png" @click="checka(item)" v-if="json.id == item.id"/>
+                    <img class="checkImg" src="../../../assets/icon/source/checka.png" @click="checka(item)" v-if="json[item.id]"/>
                     <img class="checkImg" src="../../../assets/icon/source/check.png" @click="checka(item)" v-else/>
                     <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
                     <div class="title"><span>{{ item.name }}</span></div>
@@ -149,11 +149,12 @@ export default {
     },
     methods: {
         checka(item){
-            if(this.json.id == item.id){
-                this.json = {}
+            if(this.json[item.id]){
+                delete this.json[item.id]
             }else{
-                this.json = item
+                this.json[item.id] = item
             }
+            this.$forceUpdate()
             this.$emit("update",this.json)
         },
         check(url){
@@ -605,12 +606,15 @@ export default {
 }
 
 .source-box {
-    width: 300px;
+    width: calc(100% / 4 - 15px);
     background: #fff;
     overflow: hidden;
     margin: 0 20px 20px 0;
     position: relative;
 }
+.source-box:nth-child(4n){
+    margin-right: 0;
+}
 .checkImg{
     position: absolute;
     top: 10px;

+ 4 - 1
src/components/pages/teacherSource/index.vue

@@ -600,11 +600,14 @@ export default {
 }
 
 .source-box {
-    width: 300px;
+    width: calc(100% / 4 - 15px);
     background: #fff;
     overflow: hidden;
     margin: 0 20px 20px 0;
 }
+.source-box:nth-child(4n){
+    margin-right: 0;
+}
 .source-box .iamge {
     width: 208px;
     height: 180px;

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio