lsc 5 ay önce
ebeveyn
işleme
cace6a5157

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.89b1138861e72e927895f5ef3d3c4fa9.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.8db9a3f753f5644e3c5e.js></script><script type=text/javascript src=./static/js/app.507d5d71803ba41aa318.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.d52539832ae6de6b242753d7741b2ebd.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.8db9a3f753f5644e3c5e.js></script><script type=text/javascript src=./static/js/app.901f2d8c9f1e065383a3.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.d52539832ae6de6b242753d7741b2ebd.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.d52539832ae6de6b242753d7741b2ebd.css.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.901f2d8c9f1e065383a3.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.901f2d8c9f1e065383a3.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 1 - 1
src/components/pages/student/addCourse.vue

@@ -5494,7 +5494,7 @@ export default {
         }
       }
       let params = [{
-        uid: _user.join(","),
+        uid: array.join(","),
       }];
       this.ajax
         .post(this.$store.state.api + "getAllUserByIdP", params)

+ 1 - 1
src/components/pages/studio/addCourse.vue

@@ -6537,7 +6537,7 @@ export default {
         }
       }
       let params = [{
-        uid: _user.join(","),
+        uid: array.join(","),
       }];
       this.ajax
         .post(this.$store.state.api + "getAllUserByIdP", params)

+ 68 - 68
src/components/pages/test/check/aiBoxRight.vue

@@ -513,53 +513,6 @@ export default {
     }
   },
   methods: {
-    setJson(array){
-      const getAnswer = (j) => {
-        switch (j.type) {
-          case 1:
-            return j.json.array
-              .filter((_, idx) => j.json.answer2.includes(idx))
-              .map(item => `${item.img}${item.option}`)
-              .join(',');
-          case 3:
-          case 6:
-          case 7:
-          case 8:
-          case 11:
-            return j.json.answer2;
-          case 5:
-            if (!Array.isArray(j.json.file) || j.json.file.length === 0) {
-              return '无附件';
-            }
-            return j.json.file.map(file => `${file.name}(${file.url})`).join(',');
-          default:
-            return '';
-        }
-      };
-
-      this.answerArray = array.map(i => ({
-        "用户名": i.name,
-        "提交时间": i.time,
-        "表单内容": i.array.map((j, index) => ({
-          "序号": index + 1,
-          "题目": j.json.title,
-          "题目类型": this.options2[j.type],
-          "答案": getAnswer(j)
-        }))
-      }))
-      console.log(this.answerArray);
-
-      // 将JSON对象转换为字符串
-      const jsonString = JSON.stringify(this.answerArray, null, 2);
-
-      // 创建Blob对象
-      const blob = new Blob([jsonString], { type: "application/json" });
-      blob.lastModifiedDate = new Date();
-      blob.name = `表单数据.json`;
-
-      // 如果仍需要上传文件,可以保留这行
-      return this.uploadFile(blob);
-    },
     // setJson(array){
     //   const getAnswer = (j) => {
     //     switch (j.type) {
@@ -573,7 +526,7 @@ export default {
     //       case 7:
     //       case 8:
     //       case 11:
-    //         return j.json.answer2.replace(/\n/g, ' '); // 去除回车
+    //         return j.json.answer2;
     //       case 5:
     //         if (!Array.isArray(j.json.file) || j.json.file.length === 0) {
     //           return '无附件';
@@ -584,33 +537,80 @@ export default {
     //     }
     //   };
 
-    //   // 获取所有题目类型和题目
-    //   const questions = array[0].array.map((j, index) => ({
-    //     "序号": index + 1,
-    //     "题目类型": this.options2[j.type],
-    //     "题目": j.json.title
-    //   }));
-
-    //   // 构建CSV内容
-    //   let csvContent = "用户名,提交时间," + questions.map(q => `${q.序号}-${q.题目类型}-${q.题目}`).join(',') + "\n";
-
-    //   // 添加每个用户的答案
-    //   array.forEach(i => {
-    //     let row = [i.name, i.time];
-    //     i.array.forEach(j => {
-    //       row.push(getAnswer(j));
-    //     });
-    //     csvContent += row.join(',') + "\n";
-    //   });
+    //   this.answerArray = array.map(i => ({
+    //     "用户名": i.name,
+    //     "提交时间": i.time,
+    //     "表单内容": i.array.map((j, index) => ({
+    //       "序号": index + 1,
+    //       "题目": j.json.title,
+    //       "题目类型": this.options2[j.type],
+    //       "答案": getAnswer(j)
+    //     }))
+    //   }))
+    //   console.log(this.answerArray);
+
+    //   // 将JSON对象转换为字符串
+    //   const jsonString = JSON.stringify(this.answerArray, null, 2);
 
     //   // 创建Blob对象
-    //   const blob = new Blob([csvContent], { type: "text/csv" });
+    //   const blob = new Blob([jsonString], { type: "application/json" });
     //   blob.lastModifiedDate = new Date();
-    //   blob.name = `表单数据.csv`;
+    //   blob.name = `表单数据.json`;
 
     //   // 如果仍需要上传文件,可以保留这行
     //   return this.uploadFile(blob);
     // },
+    setJson(array){
+      const getAnswer = (j) => {
+        switch (j.type) {
+          case 1:
+            return j.json.array
+              .filter((_, idx) => j.json.answer2.includes(idx))
+              .map(item => `${item.img}${item.option}`)
+              .join(',');
+          case 3:
+          case 6:
+          case 7:
+          case 8:
+          case 11:
+            return j.json.answer2.replace(/\n/g, ' '); // 去除回车
+          case 5:
+            if (!Array.isArray(j.json.file) || j.json.file.length === 0) {
+              return '无附件';
+            }
+            return j.json.file.map(file => `${file.name}(${file.url})`).join(',');
+          default:
+            return '';
+        }
+      };
+
+      // 获取所有题目类型和题目
+      const questions = array[0].array.map((j, index) => ({
+        "序号": index + 1,
+        "题目类型": this.options2[j.type],
+        "题目": j.json.title
+      }));
+
+      // 构建CSV内容
+      let csvContent = "用户名 | 提交时间 | " + questions.map(q => `${q.序号}-${q.题目类型}-${q.题目}`).join(' | ') + "\n";
+
+      // 添加每个用户的答案
+      array.forEach(i => {
+        let row = [i.name, i.time];
+        i.array.forEach(j => {
+          row.push(getAnswer(j));
+        });
+        csvContent += row.join(' | ') + "\n";
+      });
+
+      // 创建Blob对象
+      const blob = new Blob([csvContent], { type: "text/plain;charset=utf-8" });
+      blob.lastModifiedDate = new Date();
+      blob.name = `表单数据.txt`;
+
+      // 如果仍需要上传文件,可以保留这行
+      return this.uploadFile(blob);
+    },
     uploadFile(file) {
       var credentials = {
         accessKeyId: "AKIATLPEDU37QV5CHLMH",

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor