فهرست منبع

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

lsc 5 ماه پیش
والد
کامیت
d764e2efd9
28فایلهای تغییر یافته به همراه742 افزوده شده و 689 حذف شده
  1. 1 1
      dist/index.html
  2. 0 0
      dist/static/css/app.18624f47782de933e1d97dc8f7bbc42e.css
  3. 0 0
      dist/static/css/app.18624f47782de933e1d97dc8f7bbc42e.css.map
  4. 0 0
      dist/static/css/app.5826b412055a62f688ca9cfa8c70a2c9.css
  5. BIN
      dist/static/img/KekeLoading.5a4818f.gif
  6. 0 0
      dist/static/js/app.c94cf366e915df6e85ff.js
  7. 0 0
      dist/static/js/app.c94cf366e915df6e85ff.js.map
  8. 0 0
      dist/static/js/manifest.161e82026ac2ae03ab6f.js.map
  9. BIN
      src/assets/KekeLoading.gif
  10. 4 4
      src/components/pages/appStore/dialog/addAppDialog.vue
  11. 6 0
      src/components/pages/appStore/dialog/saveCard.vue
  12. 2 2
      src/components/pages/appStore/index.vue
  13. 129 23
      src/components/pages/appStore/views/appManagement.vue
  14. 29 55
      src/components/pages/appStore/views/workSpace.vue
  15. 444 381
      src/components/pages/components/report.vue
  16. 2 2
      src/components/pages/components/worksDetail2.vue
  17. 6 5
      src/components/pages/test/add/components/GapFilling/gap.vue
  18. 39 25
      src/components/pages/test/add/components/checkOrder.vue
  19. 1 0
      src/components/pages/test/add/components/choice/choice.vue
  20. 3 3
      src/components/pages/test/add/components/file/file.vue
  21. 1 1
      src/components/pages/test/add/components/sweep/index.vue
  22. 11 3
      src/components/pages/test/add/edit/edit/index.vue
  23. 23 10
      src/components/pages/test/add/edit/index.vue
  24. 4 0
      src/components/pages/test/add/global_styles.css
  25. 6 6
      src/components/pages/test/add/minxins/minxin.js
  26. 3 3
      src/components/pages/test/check/index.vue
  27. 18 156
      src/components/pages/test/checkAi/aiLeader.vue
  28. 10 9
      src/components/pages/test/smarter.vue

+ 1 - 1
dist/index.html

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

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.18624f47782de933e1d97dc8f7bbc42e.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.18624f47782de933e1d97dc8f7bbc42e.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.5826b412055a62f688ca9cfa8c70a2c9.css


BIN
dist/static/img/KekeLoading.5a4818f.gif


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.c94cf366e915df6e85ff.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.c94cf366e915df6e85ff.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


BIN
src/assets/KekeLoading.gif


+ 4 - 4
src/components/pages/appStore/dialog/addAppDialog.vue

@@ -131,12 +131,12 @@
           </el-form-item>
 
 
-					<!-- <el-form-item label="权限设置"  style="display: flex;flex-direction: column;align-items: flex-start;">
+					<el-form-item label="权限设置"  style="display: flex;flex-direction: column;align-items: flex-start;">
 						<el-radio-group v-model="form.json.copy" style="display: flex;flex-direction: column;">
               <el-radio label="0" class="radioItem">仅体验(用户仅能使用,不可查看设置内容)</el-radio>
               <el-radio label="1" class="radioItem">允许其他用户复制并进行二次创作</el-radio>
             </el-radio-group>
-          </el-form-item> -->
+          </el-form-item>
         </el-form>
       </div>
       <div class="bfd_bottom">
@@ -367,8 +367,8 @@ export default {
 .addNewAppDialog >>> .el-dialog {
   min-width: 700px;
 
-  /* height: 900px; */
-	height: 780px;
+  height: 900px;
+	/* height: 780px; */
   box-shadow: 0px 0 8px 0px #555555;
   border-radius: 8px;
   background-color: #fff;

+ 6 - 0
src/components/pages/appStore/dialog/saveCard.vue

@@ -133,6 +133,12 @@ export default {
 	height: 100%;
 }
 
+.s_box>div>div>span>>>svg{
+	width: 100%;
+	height: 100%;
+}
+
+
 .s_box>div>span{
 	max-width: calc(100% - 30px);
 	overflow: hidden;

+ 2 - 2
src/components/pages/appStore/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="appCenter">
-    <appManagement v-if="showCard === 0" ref="appManagementRef" @changeShowCard="changeShowCard"/>
-		<workSpace v-if="showCard === 1" ref="workSpaceRef" @changeShowCard="changeShowCard"/>
+    <appManagement v-show="showCard === 0" ref="appManagementRef" @changeShowCard="changeShowCard"/>
+		<workSpace v-show="showCard === 1" ref="workSpaceRef" @changeShowCard="changeShowCard"/>
   </div>
 </template>
 

+ 129 - 23
src/components/pages/appStore/views/appManagement.vue

@@ -9,8 +9,9 @@
     <div class="ac_right">
       <div class="ac_header">
         <div class="ac_h_top">
-          <span>应用管理</span>
-          <!-- <span>知识库</span> -->
+					<span>应用管理</span>
+          <!-- <span class="ac_h_t_active">应用管理</span>
+          <span @click="changeShowPage(1)">工作空间</span> -->
           <el-button
             type="primary"
             size="small"
@@ -20,11 +21,28 @@
             >添加应用</el-button
           >
         </div>
+				<!-- <div class="ac_h_banner">
+					<img src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2Fae42534d-ee90-4bb1-8ef9-d344ee27b8241733733277828.jpg" alt="banner图">
+				</div> -->
         <div class="ac_h_bottom">
-          <div class="ac_h_b_selectList">
+          <div class="ac_h_b_typeList">
+            <span
+              :class="{ ac_h_b_typeList_active: showType === '' }"
+              @click="changeType('')"
+              >全部</span
+            >
+            <span
+              v-for="item in typeList"
+              :key="item.id"
+              :class="{ ac_h_b_typeList_active: showType === item.id }"
+              @click="changeType(item.id)"
+              >{{ item.name }}</span
+            >
+          </div>
+					<div class="ac_h_b_selectList">
             <el-input
               v-model="searchText"
-              style="width: 200px;"
+              style="width: 200px;margin-right: 10px;"
               placeholder="请输入应用名称"
               @keyup.enter.native="getData"
             />
@@ -48,21 +66,6 @@
             ></el-button>
             <el-button type="primary" @click="resetData">重置</el-button>
           </div>
-
-          <div class="ac_h_b_typeList">
-            <span
-              :class="{ ac_h_b_typeList_active: showType === '' }"
-              @click="changeType('')"
-              >全部</span
-            >
-            <span
-              v-for="item in typeList"
-              :key="item.id"
-              :class="{ ac_h_b_typeList_active: showType === item.id }"
-              @click="changeType(item.id)"
-              >{{ item.name }}</span
-            >
-          </div>
         </div>
       </div>
 
@@ -121,7 +124,9 @@
                 
 								<div @click.stop="cancelCollectApp(item)"  v-if="collect.map(i=>i.id).includes(item.id)">取消收藏</div>
                 <div @click.stop="collectApp(item)" v-else>收藏</div>
-								<div @click.stop="updateApp(item)" v-if="item.userid == userId">修改</div>
+								<div @click.stop="copyApp(item)" v-if="item.json && item.json.copy==='1'">复制</div>
+								<div @click.stop="updateApp(item)" v-if="item.userid === userId">修改</div>
+								<div @click.stop="delApp(item)" v-if="item.userid === userId">删除</div>
               </div>
               <svg
                 t="1732786015570"
@@ -301,6 +306,44 @@ export default {
 			this.editAppCard = null;
 			this.insertSave(item,0)
 		},
+		//复制app
+		copyApp(item){
+			this.$confirm(`确定复制《${item.name}》这个应用吗?`,"复制",{
+				confirmButtonText:"确定",
+				cancelButtonText:"取消",
+				type:"warning"
+			}).then(()=>{
+				let params = [
+          {
+            name: `${item.name}_copy`, //app名称
+            userid: this.userId, //创建的用户ID
+            label: item.label, //app标签
+            detail: item.detail, //app简介
+            url: item.url, //app链接
+            type: item.type, //app类型
+            juri: "1", //app权限 1:我的 2:组织 3:所有人
+            stand: "cn", //语言
+            json: JSON.stringify(item.json) //其他信息
+          }
+        ];
+				this.ajax
+          .post(this.$store.state.api + "insert_appStore", params)
+          .then(res => {
+            if (res.data == 1) {
+              this.$message.success("复制成功");
+              this.getData();
+            } else {
+              this.$message.error("复制失败");
+            }
+          })
+          .catch(err => {
+            console.log(err);
+            this.$message.error("复制失败");
+          });
+			}).catch(_=>{
+				console.log("取消复制")
+			})
+		},
 		// 取消收藏
 		cancelCollectApp(item){
 			this.editAppCard = null;
@@ -502,6 +545,34 @@ export default {
 				if(type===0)this.$message.error("收藏失败")
 			})
 
+		},
+		delApp(item){
+			this.$confirm(`确定要删除《${item.name}》这个应用吗,删除后无法找回!`, `确定删除应用`, {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				let params = [{
+					uid: this.userId,
+					aid: item.id
+				}];
+				this.ajax.post(this.$store.state.api + "delete_appStore", params).then(res => {
+					if (res.data) {
+						this.$message.success("删除成功");
+						this.getData();
+					} else {
+						this.$message.error("删除失败");
+					}
+				}).catch(err => {
+					console.log(err);
+					this.$message.error("删除失败");
+				});
+			}).catch(() => {
+				console.log("取消删除");
+			});
+		},
+		changeShowPage(newPage){
+			this.$emit("changeShowCard",newPage)
 		}
   },
   mounted() {
@@ -569,21 +640,54 @@ export default {
 
 .ac_h_top > span {
   font-size: 26px;
+	position: relative;
+	margin-right: 25px;
+	cursor: pointer;
+}
+
+.ac_h_t_active::after{
+	content: "";
+	position: absolute;
+	width: 100%;
+	height: 3px;
+	border-radius: 4px;
+	background-color: #409EFF;
+	left: 0;
+	bottom: -5px;
+}
+
+.ac_h_banner{
+	width: 100%;
+	height: 200px;
+	border-radius: 5px;
+	overflow: hidden;
+	box-sizing: border-box;
+	padding: 10px;
+}
+
+.ac_h_banner>img{
+	width: 100%;
+	height: 100%;
+	object-fit:cover;
+	border-radius: 5px;
 }
 
 .ac_h_bottom {
   width: 100%;
   height: auto;
-  padding: 10px 0 20px 0;
+  padding: 10px 15px 10px 15px;
+	box-sizing: border-box;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
 }
 
 .ac_h_b_typeList {
-  width: 100%;
+  width: calc(100% - 400px);
   height: auto;
   display: flex;
   flex-wrap: wrap;
   box-sizing: border-box;
-  padding: 0 15px;
 }
 
 .ac_h_b_typeList > span {
@@ -601,6 +705,8 @@ export default {
 .ac_h_b_selectList {
   margin-left: 15px;
   margin-bottom: 10px;
+	display: flex;
+	align-items: center;
 }
 
 .ac_content {

+ 29 - 55
src/components/pages/appStore/views/workSpace.vue

@@ -2,61 +2,9 @@
   <div class="workSpace">
     <div class="ac_header">
       <div class="ac_h_top">
-        <span>应用管理</span>
-        <!-- <span>知识库</span> -->
-        <!-- <el-button
-          type="primary"
-          size="small"
-          icon="el-icon-plus"
-          style="position: absolute;right: 15px;"
-          @click="addApp"
-          >添加应用</el-button
-        > -->
+        <span @click="changeShowPage(0)">应用管理</span>
+				<span class="ac_h_t_active">工作空间</span>
       </div>
-      <!-- <div class="ac_h_bottom">
-        <div class="ac_h_b_selectList">
-          <el-input
-            v-model="searchText"
-            style="width: 200px;"
-            placeholder="请输入应用名称"
-            @keyup.enter.native="getData"
-          />
-          <el-select
-            v-model="selectJuri"
-            placeholder="请选择"
-            @change="changeSelectType"
-          >
-            <el-option
-              v-for="item in selectList"
-              :key="item.index"
-              :label="item.label"
-              :value="item.index"
-            ></el-option>
-          </el-select>
-          <el-button
-            type="primary"
-            style="margin-left: 10px;"
-            icon="el-icon-search"
-            @click="getData"
-          ></el-button>
-          <el-button type="primary" @click="resetData">重置</el-button>
-        </div>
-
-        <div class="ac_h_b_typeList">
-          <span
-            :class="{ ac_h_b_typeList_active: showType === '' }"
-            @click="changeType('')"
-            >全部</span
-          >
-          <span
-            v-for="item in typeList"
-            :key="item.id"
-            :class="{ ac_h_b_typeList_active: showType === item.id }"
-            @click="changeType(item.id)"
-            >{{ item.name }}</span
-          >
-        </div>
-      </div> -->
     </div>
 		<div class="ac_content">
 
@@ -65,7 +13,18 @@
 </template>
 
 <script>
-export default {};
+export default {
+	data(){
+		return{
+
+		}
+	},
+	methods:{
+		changeShowPage(newPage){
+			this.$emit("changeShowCard",newPage)
+		}
+	}
+};
 </script>
 
 <style scoped>
@@ -97,10 +56,25 @@ export default {};
   padding: 0 15px;
   border-bottom: 1px solid #eeeeee;
   position: relative;
+	padding-left: 315px;
 }
 
 .ac_h_top > span {
   font-size: 26px;
+	position: relative;
+	margin-right: 25px;
+	cursor: pointer;
+}
+
+.ac_h_t_active::after{
+	content: "";
+	position: absolute;
+	width: 100%;
+	height: 3px;
+	border-radius: 4px;
+	background-color: #409EFF;
+	left: 0;
+	bottom: -5px;
 }
 
 .ac_h_bottom {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 444 - 381
src/components/pages/components/report.vue


+ 2 - 2
src/components/pages/components/worksDetail2.vue

@@ -34,7 +34,7 @@
         <el-button @click="customizeExport" 
           type="primary" 
           size="small"
-          >{{ DState == 5 ? '按任务导出' : '自定义导出' }}</el-button
+          >{{ (DState == 5 || DState == 6) ? '按任务导出' : '自定义导出' }}</el-button
         >
         <el-button style="margin-left: 20px;" @click="retPage" type="primary" size="small">返回</el-button>
       </div>
@@ -1586,7 +1586,7 @@
 
 <!-- 自定义导出作业筛选弹框 -->
     <el-dialog
-      :title="dataJson.state == 5 ? '按任务导出作业' : '自定义导出作业'"
+      :title="(dataJson.state == 5 || dataJson.state == 6) ? '按任务导出作业' : '自定义导出作业'"
       :visible.sync="dialogVisibleBao"
       :append-to-body="true"
       width="550px"

+ 6 - 5
src/components/pages/test/add/components/GapFilling/gap.vue

@@ -8,12 +8,13 @@
       <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
       <div class="title">
         <div style="display: flex;">
-          <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+          <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
             `(${option[cJson.type].name})`
-          }}</span>
+          }}</span> -->
           <span v-if="!updateList.title" @click.stop="updateTitle()">{{
-            cJson.title
+            cJson.title ? cJson.title : "请填写标题"
           }}</span>
+					<!-- <span v-if="!cJson.title && !updateList.title" class="t_empty" @click.stop="updateTitle()">请填写标题</span> -->
           <input
             v-if="updateList.title"
             ref="titleRef"
@@ -30,7 +31,7 @@
         <span
           style="color: #efa030;display: flex;margin-top: 5px;line-height: 18px;"
         >
-          <span
+          <!-- <span
             style="min-width: fit-content;"
             @click.stop="updateAnswer()"
             v-if="!cJson.answer && !updateList.answer"
@@ -43,7 +44,7 @@
             <span v-if="!updateList.answer" @click.stop="updateAnswer()">{{
               cJson.answer
             }}</span>
-          </span>
+          </span> -->
 
           <input
             v-if="updateList.answer"

+ 39 - 25
src/components/pages/test/add/components/checkOrder.vue

@@ -79,49 +79,49 @@
                             <div v-if="item3.ttype == 1 && canEdit.indexOf(item3.type) !== -1 && etype == 'edit'"
                                 class="edit_box">
                                 <div v-if="item3.type == 1">
-                                    <choiceX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 1 && checkC === `x${index1}-${index2}-${index3}`"></choiceX>
+                                    <choiceX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 1 && checkC === `x${index1}-${index2}-${index3}`"></choiceX>
                                     <!-- <choiceDialog v-if="item3.type == 1 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </choiceDialog> -->
                                 </div>
                                 <div v-if="item3.type == 3">
-                                    <gapX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 3 && checkC === `x${index1}-${index2}-${index3}`"></gapX>
+                                    <gapX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 3 && checkC === `x${index1}-${index2}-${index3}`"></gapX>
                                     <!-- <gapDialog v-if="item3.type == 3 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </gapDialog> -->
                                 </div>
                                 <div v-if="item3.type == 5">
-                                    <fileX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 5 && checkC === `x${index1}-${index2}-${index3}`"></fileX>
+                                    <fileX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 5 && checkC === `x${index1}-${index2}-${index3}`"></fileX>
                                     <!-- <fileDialog v-if="item3.type == 5 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </fileDialog> -->
                                 </div>
                                 <div v-if="item3.type == 6">
-                                    <courseX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 6 && checkC === `x${index1}-${index2}-${index3}`"></courseX>
+                                    <courseX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 6 && checkC === `x${index1}-${index2}-${index3}`"></courseX>
                                     <!-- <courseDialog v-if="item3.type == 6 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </courseDialog> -->
                                 </div>
                                 <div v-if="item3.type == 7">
-                                    <evaX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 7 && checkC === `x${index1}-${index2}-${index3}`"></evaX>
+                                    <evaX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 7 && checkC === `x${index1}-${index2}-${index3}`"></evaX>
                                     <!-- <evaDialog v-if="item3.type == 7 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </evaDialog> -->
                                 </div>
                                 <div v-if="item3.type == 8">
-                                    <timeX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 8 && checkC === `x${index1}-${index2}-${index3}`"></timeX>
+                                    <timeX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 8 && checkC === `x${index1}-${index2}-${index3}`"></timeX>
                                     <!-- <timeDialog v-if="item3.type == 8 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </timeDialog> -->
                                 </div>
                                 <div v-if="item3.type == 11">
-                                    <courseX2 :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 11 && checkC === `x${index1}-${index2}-${index3}`"></courseX2>
+                                    <courseX2 :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 11 && checkC === `x${index1}-${index2}-${index3}`"></courseX2>
                                     <!-- <courseDialog2 v-if="item3.type == 11 && checkC === `x${index1}-${index2}-${index3}`"
                                         :cJson="cJson" @setJson="setJson">
                                     </courseDialog2>-->
                                 </div>
 																<div v-if="item3.type == 12">
-																	<sweep :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 12 && checkC === `x${index1}-${index2}-${index3}`"/>
+																	<sweep :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}-${index3}`" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 12 && checkC === `x${index1}-${index2}-${index3}`"/>
 																</div>
                             </div>
 														<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}-${index3}` && etype==='edit'" @click.stop="">
@@ -132,42 +132,42 @@
                     <div v-else-if="item2.ttype == 1 && canEdit.indexOf(item2.type) !== -1 && etype == 'edit'"
                         class="edit_box">
                         <div v-if="item2.type == 1">
-                            <choiceX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 1 && checkC === `x${index1}-${index2}`"></choiceX>
+                            <choiceX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 1 && checkC === `x${index1}-${index2}`"></choiceX>
                             <!-- <choiceDialog v-if="item2.type == 1 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></choiceDialog> -->
                         </div>
                         <div v-else-if="item2.type == 3">
-                            <gapX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 3 && checkC === `x${index1}-${index2}`"></gapX>
+                            <gapX :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 3 && checkC === `x${index1}-${index2}`"></gapX>
                             <!-- <gapDialog v-if="item2.type == 3 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></gapDialog> -->
                         </div>
                         <div v-else-if="item2.type == 5">
-                            <fileX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 5 && checkC === `x${index1}-${index2}`"></fileX>
+                            <fileX :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 5 && checkC === `x${index1}-${index2}`"></fileX>
                             <!-- <fileDialog v-if="item2.type == 5 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></fileDialog> -->
                         </div>
                         <div v-else-if="item2.type == 6">
-                            <courseX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 6 && checkC === `x${index1}-${index2}`"></courseX>
+                            <courseX :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 6 && checkC === `x${index1}-${index2}`"></courseX>
                             <!-- <courseDialog v-if="item2.type == 6 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></courseDialog> -->
                         </div>
                         <div v-else-if="item2.type == 7">
-                            <evaX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 7 && checkC === `x${index1}-${index2}`"></evaX>
+                            <evaX :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 7 && checkC === `x${index1}-${index2}`"></evaX>
                             <!-- <evaDialog v-if="item2.type == 7 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></evaDialog> -->
                         </div>
                         <div v-else-if="item2.type == 8">
-                            <timeX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 8 && checkC === `x${index1}-${index2}`"></timeX>
+                            <timeX :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 8 && checkC === `x${index1}-${index2}`"></timeX>
                             <!-- <timeDialog v-if="item2.type == 8 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></timeDialog> -->
                         </div>
                         <div v-else-if="item2.type == 11">
-                            <courseX2 :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 11 && checkC === `x${index1}-${index2}`"></courseX2>
+                            <courseX2 :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 11 && checkC === `x${index1}-${index2}`"></courseX2>
                             <!-- <courseDialog2 v-if="item2.type == 11 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></courseDialog2> -->
                         </div>
 												<div v-else-if="item2.type == 12">
-													<sweep :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 12 && checkC === `x${index1}-${index2}`"/>
+													<sweep :cJson="item2.json" :cJson2="cJson" @setJson="setJson"  :ref="`x${index1}-${index2}`" :index="`x${index1}-${index2}`" :isOpen="item2.type == 12 && checkC === `x${index1}-${index2}`"/>
 												</div>
                     </div>
 										<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}` && etype==='edit'" @click.stop="">
@@ -177,43 +177,43 @@
             </div>
             <div v-else-if="item1.ttype == 1 && canEdit.indexOf(item1.type) !== -1 && etype == 'edit'" class="edit_box">
                 <div v-if="item1.type == 1">
-                    <choiceX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 1 && checkC === `x${index1}`"></choiceX>
+                    <choiceX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 1 && checkC === `x${index1}`"></choiceX>
 										
                     <!-- <choiceDialog v-if="item1.type == 1 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </choiceDialog> -->
                 </div>
                 <div v-else-if="item1.type == 3">
-                    <gapX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 3 && checkC === `x${index1}`"></gapX>
+                    <gapX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 3 && checkC === `x${index1}`"></gapX>
                     <!-- <gapDialog v-if="item1.type == 3 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </gapDialog> -->
                 </div>
                 <div v-else-if="item1.type == 5">
-                    <fileX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 5 && checkC === `x${index1}`"></fileX>
+                    <fileX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 5 && checkC === `x${index1}`"></fileX>
                     <!-- <fileDialog v-if="item1.type == 5 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </fileDialog> -->
                 </div>
                 <div v-else-if="item1.type == 6">
-                    <courseX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 6 && checkC === `x${index1}`"></courseX>
+                    <courseX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 6 && checkC === `x${index1}`"></courseX>
                     <!-- <courseDialog v-if="item1.type == 6 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </courseDialog> -->
                 </div>
                 <div v-else-if="item1.type == 7">
-                    <evaX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 7 && checkC === `x${index1}`"></evaX>
+                    <evaX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 7 && checkC === `x${index1}`"></evaX>
                     <!-- <evaDialog v-if="item1.type == 7 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </evaDialog> -->
                 </div>
                 <div v-else-if="item1.type == 8">
-                    <timeX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 8 && checkC === `x${index1}`"></timeX>
+                    <timeX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 8 && checkC === `x${index1}`"></timeX>
                     <!-- <timeDialog v-if="item1.type == 8 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </timeDialog> -->
                 </div>
                 <div v-else-if="item1.type == 11">
-                    <courseX2 :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 11 && checkC === `x${index1}`"></courseX2>
+                    <courseX2 :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 11 && checkC === `x${index1}`"></courseX2>
                     <!-- <courseDialog2 v-if="item1.type == 11 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </courseDialog2> -->
                 </div>
 								<div v-else-if="item1.type == 12">
-									<sweep :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 12 && checkC === `x${index1}`"/>
+									<sweep :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :ref="`x${index1}`" :index="`x${index1}`" :isOpen="item1.type == 12 && checkC === `x${index1}`"/>
 								</div>
             </div>
 						<div class="addCheckBox" v-if="checkC === `x${index1}` && etype==='edit'" @click.stop="">
@@ -408,7 +408,10 @@ export default {
                 this.$emit("update:checkC", "")
             } else {
                 this.$emit("update:checkC", 'x' + index)
-            }
+								if(this.etype==='order'){
+									this.$emit("scrollPage",'x' + index)
+								}
+							}
             this.$forceUpdate();
             // console.log(this.cJson);
             this.$emit("update:cJson", cJson)
@@ -701,6 +704,17 @@ export default {
 				},
 				addQtype(type){
 					this.$emit('addQtype',type)
+				},
+				scrollPage(index){
+					return;
+					let scrollEl = this.$parent.$refs['eContentRef']
+					let moveEl = this.$refs[index]
+					if(scrollEl && moveEl){
+						scrollEl.scrollTo({
+							top:moveEl[0].$el.offsetTop - 150,
+							behavior:"smooth"
+						})
+					}
 				}
     },
     mounted() {

+ 1 - 0
src/components/pages/test/add/components/choice/choice.vue

@@ -184,6 +184,7 @@ export default {
       }
     },
     updateAnswer(index) {
+			return;
       if (this.cJson.type == 1) {
         if (this.checkJson.answer.indexOf(index) == -1) {
           this.checkJson.answer = [index];

+ 3 - 3
src/components/pages/test/add/components/file/file.vue

@@ -10,11 +10,11 @@
     <div v-else class="choice_box">
       <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
       <div class="title" style="display: flex;">
-        <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+        <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
           `(${option[cJson.type].name})`
-        }}</span>
+        }}</span> -->
         <span @click.stop="updateTitle()" v-if="!updateList.title">{{
-          cJson.title
+          cJson.title ? cJson.title : "请填写标题"
         }}</span>
         <input
           v-if="updateList.title"

+ 1 - 1
src/components/pages/test/add/components/sweep/index.vue

@@ -4,7 +4,7 @@
     <!-- <div v-if="!cJson">暂未设置题目</div> -->
     <div class="choice_box">
       <div class="title" style="display: flex;">
-        <span v-if="!updateList.title" @click.stop="updateTitle()">{{ cJson.title?cJson.title:"暂无标题" }}</span>
+        <span v-if="!updateList.title" @click.stop="updateTitle()">{{ cJson.title?cJson.title:"请填写标题" }}</span>
 				<input
             v-if="updateList.title"
             ref="titleRef"

+ 11 - 3
src/components/pages/test/add/edit/edit/index.vue

@@ -131,6 +131,7 @@
           showLeftMenu ? '20px' : '0'
         };`
       "
+			ref="eContentRef"
     >
       <div v-if="!isEditing" class="title" @click="editTitle">
         {{ title ? title : "请填写表单标题" }}
@@ -158,6 +159,7 @@
       />
       <div class="e_order_box">
         <checkOrder
+					ref="checkOrderEditRef"
           :checkC.sync="checkC"
           :checkJson="manualJson"
           @changeJson="changeJson"
@@ -176,7 +178,7 @@
     </div>
     <div class="e_order" v-show="showRightMenu">
       <div class="title">
-        题目排序
+        大纲
         <span style="font-size: 14px; color: #373737">总分:{{ score }}分</span>
       </div>
       <span
@@ -206,6 +208,7 @@
           :checkJson="manualJson"
           @changeJson="changeJson"
           etype="order"
+					@scrollPage="scrollPage"
           :cJson.sync="cJson"
         >
         </checkOrder>
@@ -264,6 +267,7 @@
 import checkOrder from "../../components/checkOrder.vue";
 import minxinVue from "../../minxins/minxin";
 import addCheckPopover from "../../../add/components/addCheckPopover.vue";
+import { ref } from "vue-demi";
 export default {
   components: {
     checkOrder,
@@ -718,7 +722,10 @@ export default {
         }
       }
       this.$emit("changeJson", this.manualJson);
-    }
+    },
+		scrollPage(index){
+			this.$refs.checkOrderEditRef.scrollPage(index)
+		}
   },
   mounted() {
     this.manualJson = this.depthCopy(this.checkJson);
@@ -813,7 +820,8 @@ export default {
 
 .e_add > .title,
 .e_order > .title {
-  text-align: center;
+  /* text-align: center; */
+	text-indent: 1.1em;
   font-size: 20px;
 }
 

+ 23 - 10
src/components/pages/test/add/edit/index.vue

@@ -6,12 +6,12 @@
     <div class="edit_top">
       <div class="e_t_left">
         <el-button type="primary" size="small" @click="useAiBtn()"
-          >按文档创建</el-button
+          >按文档创建</el-button
         >
 
-				<el-button :type="viewFile?'primary':''" size="small" v-if="fileData" @click="viewUploadFile()"
+				<!-- <el-button :type="viewFile?'primary':''" size="small" v-if="fileData" @click="viewUploadFile()"
           >预览</el-button
-        >
+        > -->
       </div>
       <div class="edit_btn">
         <span class="edit" :class="{ active: type == 1 }" @click="type = 1"
@@ -43,8 +43,10 @@
       ></editBox>
       <checkBox v-if="type == 2" :cJson="checkJson" :title="title"></checkBox>
     </div>
-		<div class="ajaxCancel" v-if="loading && ajaxCancelToken">
-			 <el-button type="primary" @click.stop="cancelAjax">停止生成</el-button>
+		<div class="ajaxCancel" v-if="loading">
+				<img src="../../../../../assets/KekeLoading.gif">
+				<span>小可正在努力生成中...</span>
+			 <el-button type="primary" @click.stop="cancelAjax" size="small" v-if="ajaxCancelToken">停止生成</el-button>
 		</div>
   </div>
 </template>
@@ -298,9 +300,9 @@ Instruction: Based on the context, follow "Format example", write content
 说明:文档中的总标题下的说明性文字
 
 ##题目格式
-问答题:{"ttype":1,"type":3,"json":{"title":"标题","type":1,"answer":""}}
-单选:{"ttype":1,"type":1,"json":{"title":"标题","type":1,"array":[{"option":"选项1","img":""}, {"option":"选项2","img":""}],"answer":""}}
-多选:{"ttype":1,"type":1,"json":{"title":"标题","type":2,"array":[{"option":"选项1","img":""},{"option":"选项2","img":""}],"answer":""}}
+文本:{"ttype":1,"type":3,"json":{"title":"标题","type":1,"answer":""}}
+单选:{"ttype":1,"type":1,"json":{"title":"标题","type":1,"array":[{"option":"选项1","img":""}, {"option":"选项2","img":""}],"answer":""}}
+多选:{"ttype":1,"type":1,"json":{"title":"标题","type":2,"array":[{"option":"选项1","img":""},{"option":"选项2","img":""}],"answer":""}}
 
 标题和说明:{"formName":"标题","illustrate":"说明"}
 
@@ -502,17 +504,28 @@ Instruction: Based on the context, follow "Format example", write content
 
 .ajaxCancel{
 	position: fixed;
-	top: calc(50vh + 100px);
+	top: calc(50vh + 20px);
 	left: 50vw;
 	transform: translate(-50%,-50%);
 	z-index: 9999;
 	width: 150px;
 	height: 80px;
-	background: #fff;
 	border-radius: 5px;
 	display: flex;
 	flex-direction: column;
 	align-items: center;
 	justify-content: center;
 }
+
+.ajaxCancel>span{
+	margin-bottom: 10px;
+	color: #3681FC;
+	white-space: nowrap;
+}
+
+.ajaxCancel>img{
+	width: 200px;
+	height: 200px;
+	margin-bottom: -50px;
+}
 </style>

+ 4 - 0
src/components/pages/test/add/global_styles.css

@@ -100,3 +100,7 @@
 	border: 1px solid #409EFF !important;
 	color: #fff !important;
 }
+
+.t_empty{
+	color: #757575;
+}

+ 6 - 6
src/components/pages/test/add/minxins/minxin.js

@@ -19,7 +19,7 @@ const minxin = {
         // },
         {
           value: 3,
-          label: "问答题"
+          label: "文本"
         },
         // {
         //   value: 4,
@@ -43,11 +43,11 @@ const minxin = {
         },
         {
           value: 9,
-          label: "单选"
+          label: "单选"
         },
         {
           value: 10,
-          label: "多选"
+          label: "多选"
         },
 				{
 					value:12,
@@ -67,14 +67,14 @@ const minxin = {
       options2: JSON.parse(converter(JSON.stringify({
         1: "选择题",
         // 2: "问答题",
-        3: "问答题",
+        3: "文本",
         4: "添加文档",
         5: "附件",
         6: "课程",
         7: "评分",
         8: "日期",
-        9: "单选",
-        10: "多选",
+        9: "单选",
+        10: "多选",
         11: "课程",
 				12:"扫一扫"
       }))),

+ 3 - 3
src/components/pages/test/check/index.vue

@@ -633,12 +633,12 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="操作" width="370px" fixed="right" v-if="isN!=1">
+              <el-table-column label="操作" width="200px" fixed="right" v-if="isN!=1">
 
                 <template slot-scope="scope">
                   <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
-                  <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
-									<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button>
+                  <!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
+									<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
                   <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
                 </template>
               </el-table-column>

+ 18 - 156
src/components/pages/test/checkAi/aiLeader.vue

@@ -324,6 +324,9 @@ export default {
       type: String,
       default: ""
     },
+    formList:{
+      type:Array
+    }
 
   },
   data() {
@@ -491,53 +494,7 @@ export default {
     delFileList(index) {
       this.fileList.splice(index, 1)
     },
-    // 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);
-    // },
+    
     selectable(row, index) {
       return row.worksCount > 0
     },
@@ -586,20 +543,22 @@ export default {
       }
     },
     async addChat(names) {
+      
       let _uid = uuidv4();
       let cid = `${_uid}-testSmarter`; // 生成的 cid
       this.cid = cid
       let params = [{
         uid: this.userid,
         name: names,
-        cid: cid
+        cid: cid,
+        j:this.localFormList
       }];
 
       try {
         const res = await this.ajax.post(this.$store.state.api + "addChat", params);
-        // 不需要从响应中获取 cid,因为已经在请求中传递
-        // 直接将生成的 cid 传递给 getChatList
-        // await this.getChatList(cid);
+        
+        
+       
       } catch (err) {
         console.error(err);
       }
@@ -966,90 +925,7 @@ export default {
       this.getCourse();
 
     },
-    // setJson(obj) {
-    //   let array = obj.worksArray;
-    //   let name = obj.name;
-    //   if (array.length == 0) {
-    //     console.log("没人提交1111")
-    //     return this.$emit("pushFileData", {
-    //       fileId: "",
-    //       name: name,
-    //       url: ""
-    //     });
-    //   } else {
-    //     console.log(data.Location);
-    //     console.log("提交11111")
-    //     _this.fileList.push(data.Location);
-    //     _this.$emit("pushFileData", {
-    //       fileId: "",
-    //       name: name,
-    //       url: data.Location
-    //     });
-    //   }
-    //   const getAnswer = j => {
-    //     if (j.type === 1) {
-    //       return j.json.array
-    //         .filter((_, idx) => j.json.answer2.includes(idx))
-    //         .map(item => `${item.img}${item.option}`)
-    //         .join(",");
-    //     } else if (
-    //       j.type === 3 ||
-    //       j.type === 6 ||
-    //       j.type === 7 ||
-    //       j.type === 8 ||
-    //       j.type === 11
-    //     ) {
-    //       return typeof j.json.answer2 === "string"
-    //         ? j.json.answer2.replace(/\n/g, " ")
-    //         : j.json.answer2;
-    //     } else if (j.type === 5) {
-    //       if (!Array.isArray(j.json.file) || j.json.file.length === 0) {
-    //         return "无附件";
-    //       }
-    //       return j.json.file
-    //         .map(file => `${file.name}(${file.url})`)
-    //         .join(",");
-    //     } else {
-    //       return "";
-    //     }
-    //   };
-
-    //   // 获取所有题目类型和题目
-    //   const questions = array[0].array.map((j, index) => ({
-    //     序号: index + 1,
-    //     题目类型: this.options2[j.type],
-    //     题目: j.json.title
-    //   }));
-
-    //   console.log(questions);
-    //   // let csvContent = "data:text/csv;charset=utf-8,"
-    //   // 构建CSV内容
-    //   // let csvContent = "用户名 | 提交时间 | " + questions.map(q => `${q.序号}-${q.题目类型}-${q.题目}`).join(' | ') + "\n";
-    //   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";
-    //     csvContent += row.join(",") + "\n";
-    //   });
-
-    //   // 创建Blob对象
-    //   // const blob = new Blob([csvContent], { type: "text/plain;charset=utf-8" });
-    //   // blob.lastModifiedDate = new Date();
-    //   // blob.name = `${name}_表单数据.txt`;
-
-    //   // 创建Blob对象
-    //   const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8" });
-    //   blob.lastModifiedDate = new Date();
-    //   blob.name = `${name}_表单数据.csv`;
-
-    //   // 如果仍需要上传文件,可以保留这行
-    //   return this.uploadFile({ file: blob, name: name });
-    // },
+    
     uploadFile({ file, name }) {
       var credentials = {
         accessKeyId: "AKIATLPEDU37QV5CHLMH",
@@ -1099,27 +975,7 @@ export default {
                 name: name,
                 url: data.Location
               });
-              // _this.ajax
-              //   .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
-              //     url: data.Location
-              //   })
-              //   .then(res => {
-              //     let _data = res.data.FunctionResponse;
-              //     if (_data.result && _data.result.id) {
-              //       _this.fileId.push(_data.result.id);
-              //       _this.$emit("pushFileData", { fileId: _data.result.id, name: name, url: data.Location })
-              //     } else {
-              //       console.error("获取fileId失败");
-              //     }
-
-              //   })
-              //   .catch(e => {
-              //     console.log(e);
-              //     console.error("获取fileId失败");
-              //   });
-              // }
-
-              // console.log(data.Location)
+             
             }
           });
       }
@@ -1914,6 +1770,12 @@ export default {
     },
   },
   computed: {
+    localFormList() {
+      // 在 computed 属性中返回一个新的数组,而不是直接修改 prop
+      let localFormList =  [...this.formList];
+      return JSON.stringify(localFormList);
+
+    },
     pan() {
       return content => {
         try {

+ 10 - 9
src/components/pages/test/smarter.vue

@@ -75,10 +75,10 @@
                     <span class="more_icon"></span>
                 </div>
             </div>
-            <div v-if="activeMenu == 1" style="width:100%;display: flex;">
+            <div v-show="activeMenu == 1" style="width:100%;display: flex;">
                 <div class="cc_b_middle">
                     <div style="width:100%;height: 100%;">
-                        <aiLeader :courseId="aiBoxRightCid" :worksArray="courseInfoList" ref="aiChat"
+                        <aiLeader :courseId="aiBoxRightCid" :worksArray="courseInfoList" :formList="menuList" ref="aiChat"
                             @pushFileData="pushFileData" @clearFileData="clearFileData"></aiLeader>
                     </div>
                 </div>
@@ -136,7 +136,7 @@
                     </div>
                 </div>
             </div>
-            <div v-if="activeMenu == 2" style="width:100%;">
+            <div v-show="activeMenu == 2" style="width:100%;">
                 <div class="history_talk">
                     <div class="h_t_head">
                         <div class="t_h_left">
@@ -265,12 +265,15 @@ export default {
     methods: {
         handleRowClick(row, column, event) {
             this.activeMenu = 1;
-            // console.log(JSON.stringify(row))
+            console.log(JSON.stringify(row))
             this.$nextTick(() => {
                 // 调试输出
                 console.log(this.$refs.aiChat);
                 if (this.$refs.aiChat) {
                     this.$refs.aiChat.getChatList(row.chatid);
+                    let obj = JSON.parse(row.json)
+                    this.menuList = obj;
+                    this.$refs.aiChat.fileList = obj.map(i=>i.url)
                 } else {
                     console.error('aiChat ref is not available');
                 }
@@ -282,9 +285,11 @@ export default {
             this.dialogVisibleUpdate = true;
         },
         UpdateTalkName() {
+            const j = this.menuList.map(i => i.url).join(",")
             let params = [{
                 id: this.chatId,
                 name: this.talkName1,
+                j:j
             }];
             this.ajax
                 .post(this.$store.state.api + "updateChat", params)
@@ -523,11 +528,7 @@ export default {
     },
     computed: {
         showFileUrl() {
-            if(this.activeMenu == 2){
-                this.menuList = ''
-                return ""
-            }
-            else if (this.menuList.length) {
+            if (this.menuList.length) {
                 return this.menuList[this.menuIndex].url
             } else {
                 return "";

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است