Ver Fonte

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin há 5 meses atrás
pai
commit
dec00313fa

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.90ad18b8c10831a4222d5c30f0a0c494.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.382e92fdebaf6164bf93.js></script><script type=text/javascript src=./static/js/app.ffde41ff93cea4786905.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.e4eac2f8fdd318a18eae453b59988bee.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.bba3ed5aca95350eeef8.js></script><script type=text/javascript src=./static/js/app.c4e3137db8d879546f0f.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.e4eac2f8fdd318a18eae453b59988bee.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.e4eac2f8fdd318a18eae453b59988bee.css.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.c4e3137db8d879546f0f.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.c4e3137db8d879546f0f.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/vendor.bba3ed5aca95350eeef8.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/vendor.bba3ed5aca95350eeef8.js.map


+ 17 - 0
package-lock.json

@@ -14,6 +14,7 @@
         "cacache": "^16.1.1",
         "clipboard": "^2.0.10",
         "cocoroboworkpc": "file:",
+        "convertapi-js": "~1.1",
         "dayjs": "^1.11.7",
         "docx-preview": "^0.3.2",
         "docxtemplater": "^3.50.0",
@@ -3316,6 +3317,11 @@
         "safe-buffer": "~5.1.1"
       }
     },
+    "node_modules/convertapi-js": {
+      "version": "1.1.9",
+      "resolved": "https://registry.npmmirror.com/convertapi-js/-/convertapi-js-1.1.9.tgz",
+      "integrity": "sha512-4Z6Zp7qm3j1V+u1EbH8U7d5jnPIAs1LAlzjlwgVB01bBW6bFJoMhHuzFVkhYVE28B+Bq0NGiNEEpB3JGnlOEbA=="
+    },
     "node_modules/cookie": {
       "version": "0.4.0",
       "resolved": "https://registry.npmmirror.com/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz",
@@ -21908,6 +21914,7 @@
         "chalk": "^2.0.1",
         "clipboard": "^2.0.10",
         "cocoroboworkpc": "file:",
+        "convertapi-js": "~1.1",
         "copy-webpack-plugin": "^4.0.1",
         "css-loader": "^0.28.0",
         "dayjs": "^1.11.7",
@@ -24737,6 +24744,11 @@
             "safe-buffer": "~5.1.1"
           }
         },
+        "convertapi-js": {
+          "version": "1.1.9",
+          "resolved": "https://registry.npmmirror.com/convertapi-js/-/convertapi-js-1.1.9.tgz",
+          "integrity": "sha512-4Z6Zp7qm3j1V+u1EbH8U7d5jnPIAs1LAlzjlwgVB01bBW6bFJoMhHuzFVkhYVE28B+Bq0NGiNEEpB3JGnlOEbA=="
+        },
         "cookie": {
           "version": "0.4.0",
           "resolved": "https://registry.npmmirror.com/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz",
@@ -38035,6 +38047,11 @@
         "safe-buffer": "~5.1.1"
       }
     },
+    "convertapi-js": {
+      "version": "1.1.9",
+      "resolved": "https://registry.npmmirror.com/convertapi-js/-/convertapi-js-1.1.9.tgz",
+      "integrity": "sha512-4Z6Zp7qm3j1V+u1EbH8U7d5jnPIAs1LAlzjlwgVB01bBW6bFJoMhHuzFVkhYVE28B+Bq0NGiNEEpB3JGnlOEbA=="
+    },
     "cookie": {
       "version": "0.4.0",
       "resolved": "https://registry.npmmirror.com/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz",

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "cacache": "^16.1.1",
     "clipboard": "^2.0.10",
     "cocoroboworkpc": "file:",
+    "convertapi-js": "~1.1",
     "dayjs": "^1.11.7",
     "docx-preview": "^0.3.2",
     "docxtemplater": "^3.50.0",

+ 23 - 12
src/components/pages/aiAddCourse/addCourse.vue

@@ -7179,6 +7179,8 @@ import TurndownService from 'turndown';
 import JSZip from "jszip";
 import evaList from "./evaList.vue";
 import MindTask from "./jsmind2";
+import ConvertApi from 'convertapi-js'
+let convertApi = ConvertApi.auth('secret_8jZzewWvAJluEjTR')
 
 var OpenCC = require("opencc-js");
 let converter = OpenCC.Converter({
@@ -10453,7 +10455,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         }
       }
     },
-    beforeUploadInfo2(event, type, tindex) {
+    async beforeUploadInfo2(event, type, tindex) {
       // const loading = this.openLoading();
       let file = "";
       let cfindex2 = 0;
@@ -10473,17 +10475,6 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
         var _this = this;
         var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
-        if (
-          ['DOC'].indexOf(
-              file.name
-                .split(".")
-              [file.name.split(".").length - 1].toLocaleUpperCase()
-            ) !== -1
-          ) {
-          this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
-          this.inputShow = true;
-          return;
-        }
         if (
           xianObj.indexOf(
               file.name
@@ -10593,6 +10584,26 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
           _this.infoisAllSize = event.target.files.length;
           // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
         }
+        if (
+          ['DOC'].indexOf(
+              file.name
+                .split(".")
+              [file.name.split(".").length - 1].toLocaleUpperCase()
+            ) !== -1
+          ) {
+          // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
+          // this.inputShow = true;
+          let params = convertApi.createParams()
+          params.add('file', file)
+          let result = await convertApi.convert('doc', 'docx', params)
+          // Get result file URL
+          file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
+            return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
+          });
+          console.log(result)
+          console.log(file)
+          // return;
+        }
 
         _this.$forceUpdate();
         if (file) {

+ 14 - 2
src/components/pages/aiAddCourse/aiBoxRight.vue

@@ -728,10 +728,22 @@ export default {
               moreDisplay2: true,
               moreArray: [],
               moreloading: false,
-              promptArray: promptJson[Object.keys(promptJson).find(item => addedData[0].string.includes(item))] || []
+              promptArray: promptJson[Object.keys(promptJson).find(item => {
+                if(addedData[0].string.includes('aiDetail1-')){
+                  return item != 'aiDetail' && addedData[0].string.includes(item)
+                }else {
+                  return addedData[0].string.includes(item)
+                }
+              })] || []
             });
             console.log('新增数据:', addedData);
-            console.log(Object.values(promptJson).find(arr => arr.some(item => addedData[0].string.includes(item.name))))
+            console.log(Object.values(promptJson).find(arr => arr.some(item => {
+              if(addedData[0].string.includes('aiDetail1-')){
+                return item.name != 'aiDetail' && addedData[0].string.includes(item.name)
+              }else {
+                return addedData[0].string.includes(item.name)
+              }
+            })))
             this.$nextTick(() => {
               this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
             });

+ 12 - 1
src/components/pages/aiAddCourse/record.vue

@@ -51,7 +51,7 @@
             </div>
         </div>
         <div class="text_box">
-            <textarea :disabled="recordedForm.status != 0" ref="videoTextTextarea" rows="2" class="binfo_input binfo_textarea" style="height: 100%;" cols v-model="videoText" placeholder="等待录音中..."></textarea>
+            <textarea :disabled="recordedForm.status == 1" ref="videoTextTextarea" rows="2" class="binfo_input binfo_textarea" style="height: 100%;" cols v-model="videoText" placeholder="等待录音中..."></textarea>
         </div>
         <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;"
             src="https://beta.cloud.cocorobo.cn/browser/public/index.html" ref="iiframe" v-show="false"></iframe>
@@ -776,4 +776,15 @@ export default {
   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
   background-color: rgba(0, 0, 0, 0.1);
 }
+
+.audio_class {
+  /* width: 100% !important; */
+  /* height: 100% !important; */
+  background: #ccc !important;
+  margin: 0 !important;
+}
+
+.audio_class >>> .slider .process {
+  background: #000;
+}
 </style>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff