SanHQin 3 月之前
父節點
當前提交
c286a42638

+ 1 - 1
dist/index.html

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

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


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


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


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


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


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

@@ -3450,6 +3450,11 @@
                                     </div>
                                     <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
                                     </div>
+                                    <div
+                                    v-if="item1.type == 15"
+                                    class="chapter_upload_l_i15"
+                                    style="margin-left: 1px"
+                                  ></div>
                                   </div>
                                   <div class="chapter_upload_n">
                                     <input readonly="true" v-if="
@@ -3508,6 +3513,22 @@
                                       " readonly="true" @click="
                                         openUpdateSource(itemTaskIndex, index1)
                                       " />
+                                       <input
+                                    :placeholder="
+                                      item1.title ? item1.title : 'Ai应用'
+                                    "
+                                    v-if="item1.type == 15"
+                                    style="
+                                  border: none;
+                                  outline: none;
+                                  width: 80%;
+                                  white-space: nowrap;
+                                  overflow: hidden;
+                                  text-overflow: ellipsis;
+                                "
+                                    readonly="true"
+                                    @click="selectLine(0, index1)"
+                                  />
                                   </div>
                                   <div class="chapter_upload_ic">
                                     <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
@@ -3557,7 +3578,7 @@
                                       ">
                                       <div></div>
                                     </div>
-                                    <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
+                                    <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type==15"
                                       @click="selectLine(itemTaskIndex, index1)">
                                       <div></div>
                                     </div>
@@ -3744,6 +3765,11 @@
                                     </div>
                                     <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
                                     </div>
+                                    <div
+                                    v-if="item1.type == 15"
+                                    class="chapter_upload_l_i15"
+                                    style="margin-left: 1px"
+                                  ></div>
                                   </div>
                                   <div class="chapter_upload_n">
                                     <span style="
@@ -3797,6 +3823,22 @@
                                         overflow: hidden;
                                         text-overflow: ellipsis;
                                       " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
+                                      <input
+                                    :placeholder="
+                                      item1.title ? item1.title : 'Ai应用'
+                                    "
+                                    v-if="item1.type == 15"
+                                    style="
+                                  border: none;
+                                  outline: none;
+                                  width: 80%;
+                                  white-space: nowrap;
+                                  overflow: hidden;
+                                  text-overflow: ellipsis;
+                                "
+                                    readonly="true"
+                                    @click="selectLine(0, index1)"
+                                  />
                                   </div>
                                   <div class="chapter_upload_ic">
                                     <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
@@ -3841,7 +3883,7 @@
                                       ">
                                       <div></div>
                                     </div>
-                                    <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
+                                    <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type == 15"
                                       @click="selectLine(itemTaskIndex, index1)">
                                       <div></div>
                                     </div>
@@ -26054,21 +26096,49 @@ ${msg}
     },
     openAddApp(i) {
       this.lineCount = i;
-      this.$refs.appDialog.openG("", "", "", "", 1);
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+
+      let _obj = {}
+
+      if (_index != -1) {
+        _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData[_index]
+      }
+
+      this.$refs.appDialog.openG(_obj, "", "", "", 2);
     },
     selectAppSuccess({ data, type }) {
-      console.log(data);
-      data.forEach(i => {
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+      if (_index != -1) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.splice(_index, 1);
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
           this.lineCount
         ].chapterData.push({
-          name: i.name,
-          title: i.name,
-          url: i.url,
-          type: 8
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
         });
-        this.imgChange1(null, null, 8, this.lineCount);
-      });
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.push({
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
+        });
+      }
+      this.imgChange1(null, null, 8, this.lineCount);
       this.dialogVisible7 = false;
     }
   },
@@ -27501,7 +27571,7 @@ ${msg}
 .chapter_upload_l_i6,
 .chapter_upload_l_i12,
 .chapter_upload_l_i14,
-.chapter_upload_l_i13 {
+.chapter_upload_l_i15 {
   width: 15px;
   height: 15px;
   background-size: 100% 100%;
@@ -27523,6 +27593,11 @@ ${msg}
   background-image: url("../../../assets/icon/new/u_source.png");
 }
 
+.chapter_upload_l_i15 {
+  background-image: url("../../../assets/icon/new/appStore.png");
+}
+
+
 .chapter_upload_l_i6 {
   background-image: url("../../../assets/icon/new/u_picture.png");
 }

+ 73 - 12
src/components/pages/aiEasy/addCourse.vue

@@ -468,6 +468,9 @@
                                 </div>
                                 <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
                                 </div>
+
+                                <div v-if="item1.type == 15" class="chapter_upload_l_i15" style="margin-left: 1px">
+                                </div>
                               </div>
                               <div class="chapter_upload_n" :class="{dataTips: !item1.fileid}">
                                 <div v-if="
@@ -491,6 +494,9 @@
                                 <div v-if="item1.type == 14" class="chapter_upload_box" @click="
                                         openUpdateSource(0, index1)
                                         " >{{ item1.title ? item1.title : '链接' }}</div>
+                                   <div v-if="item1.type == 15" class="chapter_upload_box" @click="
+                                        openUpdateSource(0, index1)
+                                        " >{{ item1.title ? item1.title : 'Ai应用' }}</div>
                               </div>
                               <div class="chapter_upload_ic">
                                 <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
@@ -540,7 +546,7 @@
                                   ">
                                   <div></div>
                                 </div>
-                                <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
+                                <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type == 15"
                                   @click="selectLine(0, index1)">
                                   <div></div>
                                 </div>
@@ -2938,6 +2944,11 @@
                                       class="chapter_upload_l_i13"
                                       style="margin-left: 1px"
                                     ></div>
+                                    <div
+                                    v-if="item1.type == 15"
+                                    class="chapter_upload_l_i15"
+                                    style="margin-left: 1px"
+                                  ></div>
                                   </div>
                                   <div class="chapter_upload_n">
                                     <input
@@ -3020,6 +3031,22 @@
                                         openUpdateSource(itemTaskIndex, index1)
                                       "
                                     />
+                                    <input
+                                    :placeholder="
+                                      item1.title ? item1.title : 'Ai应用'
+                                    "
+                                    v-if="item1.type == 15"
+                                    style="
+                                  border: none;
+                                  outline: none;
+                                  width: 80%;
+                                  white-space: nowrap;
+                                  overflow: hidden;
+                                  text-overflow: ellipsis;
+                                "
+                                    readonly="true"
+                                    @click="selectLine(0, index1)"
+                                  />
                                   </div>
                                   <div class="chapter_upload_ic">
                                     <div
@@ -3091,7 +3118,7 @@
                                     </div>
                                     <div
                                       class="chapter_upload_ic_edit"
-                                      v-if="item1.type == 8"
+                                      v-if="item1.type == 8 || item1.type == 15"
                                       @click="selectLine(itemTaskIndex, index1)"
                                     >
                                       <div></div>
@@ -25404,21 +25431,49 @@ ${msg}
     },
     openAddApp(i) {
       this.lineCount = i;
-      this.$refs.appDialog.openG("", "", "", "", 1);
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+
+      let _obj = {}
+
+      if (_index != -1) {
+        _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData[_index]
+      }
+
+      this.$refs.appDialog.openG(_obj, "", "", "", 2);
     },
     selectAppSuccess({ data, type }) {
-      console.log(data);
-      data.forEach(i => {
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+      if (_index != -1) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.splice(_index, 1);
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
           this.lineCount
         ].chapterData.push({
-          name: i.name,
-          title: i.name,
-          url: i.url,
-          type: 8
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
         });
-        this.imgChange1(null, null, 8, this.lineCount);
-      });
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.push({
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
+        });
+      }
+      this.imgChange1(null, null, 8, this.lineCount);
       this.dialogVisible7 = false;
     }
   },
@@ -26828,7 +26883,8 @@ ${msg}
 .chapter_upload_l_i6,
 .chapter_upload_l_i12,
 .chapter_upload_l_i14,
-.chapter_upload_l_i13 {
+.chapter_upload_l_i13,
+.chapter_upload_l_i15 {
   width: 15px;
   height: 15px;
   background-size: 100% 100%;
@@ -26850,6 +26906,11 @@ ${msg}
   background-image: url("../../../assets/icon/new/u_source.png");
 }
 
+.chapter_upload_l_i15 {
+  background-image: url("../../../assets/icon/new/appStore.png");
+}
+
+
 .chapter_upload_l_i6 {
   background-image: url("../../../assets/icon/new/u_picture.png");
 }

+ 17 - 5
src/components/pages/classroomObservation/components/analysisSpecialItem.vue

@@ -921,14 +921,15 @@ CH:${_CH}
           let _tableData = res;
 
 					let _delIndex = _tableData.findIndex(i=>i.includes(this.converter("时间点")))
-
+          console.log("👉===",_dataList,_tableData)
 					_tableData = _tableData.slice(_delIndex+1)
-
+          console.log()
           let _result = [];
           let identity = "老师"; //0:老师 1:学生
           let startTime = "";
           let endTime = "";
           let sumTime = 0;
+          let upTime = '00:00:00';
 
           _dataList.forEach((item, index) => {
             if (index == 0) {
@@ -936,13 +937,17 @@ CH:${_CH}
               identity = item.role;
               startTime = item.startTime;
               endTime = item.endTime;
-              sumTime = this.convertToSeconds(item.time);
+              sumTime = (this.convertToSeconds(item.endTime) - this.convertToSeconds(upTime));
+              upTime = item.endTime
+              // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
               return;
             }
             if (item.role == identity) {
               //没更换角色
-              sumTime += this.convertToSeconds(item.time);
+              sumTime += (this.convertToSeconds(item.endTime) - this.convertToSeconds(upTime));
               endTime = item.endTime;
+              upTime = item.endTime
+              // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
             } else {
               //更换角色了
               _result.push({
@@ -954,10 +959,17 @@ CH:${_CH}
               identity = item.role;
               startTime = item.startTime;
               endTime = item.endTime;
-              sumTime = this.convertToSeconds(item.time);
+              sumTime = (this.convertToSeconds(item.endTime) - this.convertToSeconds(upTime));
+              upTime = item.endTime
+              // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
+            }
+            if(index==_dataList.length-1){
+              console.log("👉???",this.convertToSeconds(item.endTime))
             }
           });
 
+           console.log(_result.reduce((pre,cur)=>{return pre+=cur.sumTime},0))
+          console.log("→xxx",_result)
           let breakpoint = [];
 
 					breakpoint = _tableData.map(i=>this.convertToSeconds(i[0]))

+ 55 - 36
src/components/pages/classroomObservation/components/echartsSpectrogram.vue

@@ -31,7 +31,7 @@ export default {
       ctx.scale(1, 1);
 
       let canvasWidth = this.canvas.width;
-			let canvasWidth2 = canvasWidth - 20
+      let canvasWidth2 = canvasWidth - 20;
       let canvasHeight = this.canvas.height;
       ctx.imageSmoothingEnabled = false;
       ctx.lineWidth = 1;
@@ -55,7 +55,7 @@ export default {
       ctx.font = `${fontSize}px serif`;
       ctx.fillText("学生", 128, canvasHeight - 7);
       let sum = this.data.data.reduce((pre, cur) => (pre += cur.value), 0);
-			console.log(sum)
+      console.log(sum);
       // 当前x位置的起始点
       let currentX = 10;
       // 计算并绘制每个区域
@@ -83,30 +83,43 @@ export default {
       // });
 
       let interval = parseFloat((this.step / (sum / canvasWidth2)).toFixed(2));
+      let _lastI = 0;
       //绘制竖线
       for (let i = 0; i < canvasWidth2; i += interval) {
         ctx.beginPath();
-				ctx.strokeStyle = '#BFBFBF'
-        ctx.moveTo(i==0?10:i, canvasHeight - 70);
-        ctx.lineTo(i==0?10:i, canvasHeight - 55);
+        ctx.strokeStyle = "#BFBFBF";
+        ctx.moveTo(i == 0 ? 10 : i, canvasHeight - 70);
+        ctx.lineTo(i == 0 ? 10 : i, canvasHeight - 55);
         ctx.stroke();
-				ctx.fillStyle = "#868686";
-        let timeLabel = (((i / canvasWidth2) * sum)/60).toFixed(0); // 时间标识计算
-				ctx.font = `${fontSize}px serif`;
-				if(i==0){
-					ctx.fillText(`${timeLabel}min`, i+10, canvasHeight - 40);
-				}else if((i+interval)> canvasWidth2){
-					ctx.fillText(`${timeLabel}min`, i - 20, canvasHeight - 40);
-				}else{
-					ctx.fillText(`${timeLabel}min`, i-15, canvasHeight - 40);
-				}
+        ctx.fillStyle = "#868686";
+        let timeLabel = (((i / canvasWidth2) * sum) / 60).toFixed(0); // 时间标识计算
+        ctx.font = `${fontSize}px serif`;
+        if (i == 0) {
+          ctx.fillText(`${timeLabel}min`, i + 10, canvasHeight - 40);
+        } else if (i + interval >= canvasWidth2) {
+          ctx.fillText(`${timeLabel}min`, i - 20, canvasHeight - 40);
+        } else {
+          ctx.fillText(`${timeLabel}min`, i - 15, canvasHeight - 40);
+        }
+        _lastI = i;
+      }
+      if (canvasWidth2 - _lastI >60) {
+        ctx.beginPath();
+        ctx.strokeStyle = "#BFBFBF";
+        ctx.moveTo(canvasWidth2 + 10, canvasHeight - 70);
+        ctx.lineTo(canvasWidth2 + 10, canvasHeight - 55);
+        ctx.stroke();
+        ctx.fillStyle = "#868686";
+        let timeLabel = (sum / 60).toFixed(0); // 时间标识计算
+        ctx.font = `${fontSize}px serif`;
+        ctx.fillText(`${timeLabel}min`, canvasWidth2 - 20, canvasHeight - 40);
       }
 
-			ctx.beginPath();
-			ctx.strokeStyle = '#BFBFBF'
-			ctx.moveTo(10, canvasHeight - 55);
-			ctx.lineTo(canvasWidth2+10, canvasHeight - 55);
-			ctx.stroke();
+      ctx.beginPath();
+      ctx.strokeStyle = "#BFBFBF";
+      ctx.moveTo(10, canvasHeight - 55);
+      ctx.lineTo(canvasWidth2 + 10, canvasHeight - 55);
+      ctx.stroke();
     },
     drawRoundedRect(ctx, x, y, width, height, radius) {
       // 限制 radius 的最大值,防止它超过矩形的宽度或高度的一半
@@ -130,22 +143,28 @@ export default {
       ctx.closePath();
       ctx.fill(); // 填充颜色
     },
-		formatTime(seconds) {
-  let h = Math.floor(seconds / 3600); // 小时
-  let m = Math.floor((seconds % 3600) / 60); // 分钟
-  let s = Math.floor(seconds % 60); // 秒数
-  
-  // 格式化为两位数
-  let formattedTime;
-  if (h > 0) {
-    // 如果有小时部分,格式化为 hh:mm:ss
-    formattedTime = `${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
-  } else {
-    // 否则,格式化为 mm:ss
-    formattedTime = `${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
-  }
-  return formattedTime;
-}
+    formatTime(seconds) {
+      let h = Math.floor(seconds / 3600); // 小时
+      let m = Math.floor((seconds % 3600) / 60); // 分钟
+      let s = Math.floor(seconds % 60); // 秒数
+
+      // 格式化为两位数
+      let formattedTime;
+      if (h > 0) {
+        // 如果有小时部分,格式化为 hh:mm:ss
+        formattedTime = `${h
+          .toString()
+          .padStart(2, "0")}:${m
+          .toString()
+          .padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
+      } else {
+        // 否则,格式化为 mm:ss
+        formattedTime = `${m
+          .toString()
+          .padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
+      }
+      return formattedTime;
+    }
   },
   mounted() {
     this.init();

+ 16 - 2
src/components/pages/components/appDialog.vue

@@ -92,7 +92,7 @@
           v-if="showType !== '' && !getDataLoading"
           v-for="(item, index) in dataList"
           :key="item.id"
-          :class="{checkActive: appJson.id == item.id || selectAppList.map(i=>i.id).includes(item.id)}"
+          :class="{checkActive: appJson.id == item.id || selectAppObj.id==item.id || selectAppList.map(i=>i.id).includes(item.id)}"
           @click="checkApp(item)"
         >
           <div class="ac_c_i_top">
@@ -245,7 +245,7 @@
                   i => i.type == item2.id
                 )"
                 :key="item.id"
-                 @click="checkApp(item)" :class="{checkActive: appJson.id == item.id || selectAppList.map(i=>i.id).includes(item.id)}"
+                 @click="checkApp(item)" :class="{checkActive: appJson.id == item.id  || selectAppObj.id == item.id|| selectAppList.map(i=>i.id).includes(item.id)}"
               >
                 <div class="ac_c_i_top">
                   <div class="ac_c_i_t_left">
@@ -454,6 +454,7 @@ export default {
       region: "cn",
       type:0,//0 工具  1学习内容添加
       selectAppList:[],
+      selectAppObj:{},
     };
   },
   watch: {
@@ -489,11 +490,14 @@ export default {
     async openG(appJson, unitIndex, itemTaskIndex, toolIndex,type = 0) {
       this.selectAppList = [];
       this.appJson = {};
+      this.selectAppObj = {};
       if(type == 0){
         this.appJson = appJson;
         this.itemTaskIndex = itemTaskIndex;
         this.toolIndex = toolIndex;
         this.unitIndex = unitIndex;
+      }else if(type==2){
+        this.selectAppObj = appJson;
       }
       console.log(type)
       this.type = type;
@@ -523,6 +527,10 @@ export default {
         this.$emit("success",{data:JSON.parse(JSON.stringify(this.selectAppList)),type:this.type})
         this.dialogVisible = false
         this.selectAppList = [];
+      }else if(this.type==2){
+        this.$emit("success",{data:JSON.parse(JSON.stringify(this.selectAppObj)),type:this.type})
+        this.dialogVisible = false
+        this.selectAppObj = {};
       }
     },
     changeType(newIndex) {
@@ -557,6 +565,12 @@ export default {
         }else{
           this.selectAppList.push(item)
         }
+      }else if(this.type==2){
+        if(this.selectAppObj.id == item.id){
+          this.selectAppObj = {}
+      }else {
+        this.selectAppObj = item
+      }
       }
 
     },

+ 69 - 12
src/components/pages/easy/addCourse.vue

@@ -511,6 +511,11 @@
                                     class="chapter_upload_l_i13"
                                     style="margin-left: 1px"
                                   ></div>
+                                  <div
+                                    v-if="item1.type == 15"
+                                    class="chapter_upload_l_i15"
+                                    style="margin-left: 1px"
+                                  ></div>
                                 </div>
                                 <div class="chapter_upload_n">
                                   <input
@@ -568,6 +573,24 @@
                                     readonly="true"
                                     @click="selectLine(0, index1)"
                                   />
+
+                                  <input
+                                    :placeholder="
+                                      item1.title ? item1.title : 'Ai应用'
+                                    "
+                                    v-if="item1.type == 15"
+                                    style="
+                                  border: none;
+                                  outline: none;
+                                  width: 80%;
+                                  white-space: nowrap;
+                                  overflow: hidden;
+                                  text-overflow: ellipsis;
+                                "
+                                    readonly="true"
+                                    @click="selectLine(0, index1)"
+                                  />
+
                                   <input
                                     :placeholder="
                                       item1.title ? item1.title : '链接'
@@ -643,7 +666,7 @@
                                   </div>
                                   <div
                                     class="chapter_upload_ic_edit"
-                                    v-if="item1.type == 8"
+                                    v-if="item1.type == 8 || item1.type == 15"
                                     @click="selectLine(0, index1)"
                                   >
                                     <div></div>
@@ -13896,22 +13919,51 @@ export default {
           });
       });
     },
-    openAddApp() {
-      this.$refs.appDialog.openG("", "", "", "", 1);
+    openAddApp(i) {
+      this.lineCount = i;
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+
+      let _obj = {}
+
+      if (_index != -1) {
+        _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData[_index]
+      }
+
+      this.$refs.appDialog.openG(_obj, "", "", "", 2);
     },
     selectAppSuccess({ data, type }) {
-      console.log(data);
-      data.forEach(i => {
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+      if (_index != -1) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.splice(_index, 1);
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
           this.lineCount
         ].chapterData.push({
-          name: i.name,
-          title: i.name,
-          url: i.url,
-          type: 8
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
         });
-        this.imgChange1(null, null, 8, this.lineCount);
-      });
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.push({
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
+        });
+      }
+      this.imgChange1(null, null, 8, this.lineCount);
       this.dialogVisible7 = false;
     }
   },
@@ -15089,7 +15141,8 @@ export default {
 .chapter_upload_l_i6,
 .chapter_upload_l_i12,
 .chapter_upload_l_i14,
-.chapter_upload_l_i13 {
+.chapter_upload_l_i13,
+.chapter_upload_l_i15 {
   width: 15px;
   height: 15px;
   background-size: 100% 100%;
@@ -15111,6 +15164,10 @@ export default {
   background-image: url("../../../assets/icon/new/u_source.png");
 }
 
+.chapter_upload_l_i15 {
+  background-image: url("../../../assets/icon/new/appStore.png");
+}
+
 .chapter_upload_l_i6 {
   background-image: url("../../../assets/icon/new/u_picture.png");
 }

+ 91 - 12
src/components/pages/newCourse/addCourse.vue

@@ -1202,6 +1202,12 @@
                                       class="chapter_upload_l_i13"
                                       style="margin-left: 1px"
                                     ></div>
+
+                                    <div
+                                    v-if="item1.type == 15"
+                                    class="chapter_upload_l_i15"
+                                    style="margin-left: 1px"
+                                  ></div>
                                   </div>
                                   <div class="chapter_upload_n">
                                     <input
@@ -1284,6 +1290,23 @@
                                         openUpdateSource(itemTaskIndex, index1)
                                       "
                                     />
+
+                                    <input
+                                    :placeholder="
+                                      item1.title ? item1.title : 'Ai应用'
+                                    "
+                                    v-if="item1.type == 15"
+                                    style="
+                                  border: none;
+                                  outline: none;
+                                  width: 80%;
+                                  white-space: nowrap;
+                                  overflow: hidden;
+                                  text-overflow: ellipsis;
+                                "
+                                    readonly="true"
+                                    @click="selectLine(0, index1)"
+                                  />
                                   </div>
                                   <div class="chapter_upload_ic">
                                     <div
@@ -1350,7 +1373,7 @@
                                     </div>
                                     <div
                                       class="chapter_upload_ic_edit"
-                                      v-if="item1.type == 8"
+                                      v-if="item1.type == 8 || item1.type == 15"
                                       @click="selectLine(itemTaskIndex, index1)"
                                     >
                                       <div></div>
@@ -1614,6 +1637,12 @@
                                       class="chapter_upload_l_i13"
                                       style="margin-left: 1px"
                                     ></div>
+
+                                    <div
+                                    v-if="item1.type == 15"
+                                    class="chapter_upload_l_i15"
+                                    style="margin-left: 1px"
+                                  ></div>
                                   </div>
                                   <div class="chapter_upload_n">
                                     <span
@@ -1690,6 +1719,23 @@
                                       readonly="true"
                                       @click="selectLine(itemTaskIndex, index1)"
                                     />
+
+                                    <input
+                                    :placeholder="
+                                      item1.title ? item1.title : 'Ai应用'
+                                    "
+                                    v-if="item1.type == 15"
+                                    style="
+                                  border: none;
+                                  outline: none;
+                                  width: 80%;
+                                  white-space: nowrap;
+                                  overflow: hidden;
+                                  text-overflow: ellipsis;
+                                "
+                                    readonly="true"
+                                    @click="selectLine(0, index1)"
+                                  />
                                   </div>
                                   <div class="chapter_upload_ic">
                                     <div
@@ -1756,7 +1802,7 @@
                                     </div>
                                     <div
                                       class="chapter_upload_ic_edit"
-                                      v-if="item1.type == 8"
+                                      v-if="item1.type == 8 || item1.type == 15"
                                       @click="selectLine(itemTaskIndex, index1)"
                                     >
                                       <div></div>
@@ -14481,21 +14527,49 @@ export default {
     },
     openAddApp(i) {
       this.lineCount = i;
-      this.$refs.appDialog.openG("", "", "", "", 1);
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+
+      let _obj = {}
+
+      if (_index != -1) {
+        _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData[_index]
+      }
+
+      this.$refs.appDialog.openG(_obj, "", "", "", 2);
     },
     selectAppSuccess({ data, type }) {
-      console.log(data);
-      data.forEach(i => {
+      let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+        this.lineCount
+      ].chapterData.findIndex(i => i.type == 15);
+      if (_index != -1) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.splice(_index, 1);
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
           this.lineCount
         ].chapterData.push({
-          name: i.name,
-          title: i.name,
-          url: i.url,
-          type: 8
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
         });
-        this.imgChange1(null, null, 8, this.lineCount);
-      });
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.push({
+          name: data.name,
+          title: data.name,
+          id:data.id,
+          url: data.url,
+          type: 15
+        });
+      }
+      this.imgChange1(null, null, 8, this.lineCount);
       this.dialogVisible7 = false;
     }
   },
@@ -15725,7 +15799,8 @@ export default {
 .chapter_upload_l_i6,
 .chapter_upload_l_i12,
 .chapter_upload_l_i14,
-.chapter_upload_l_i13 {
+.chapter_upload_l_i13,
+.chapter_upload_l_i15 {
   width: 15px;
   height: 15px;
   background-size: 100% 100%;
@@ -15747,6 +15822,10 @@ export default {
   background-image: url("../../../assets/icon/new/u_source.png");
 }
 
+.chapter_upload_l_i15 {
+  background-image: url("../../../assets/icon/new/appStore.png");
+}
+
 .chapter_upload_l_i6 {
   background-image: url("../../../assets/icon/new/u_picture.png");
 }

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