Browse Source

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

lsc 2 months ago
parent
commit
735ecb8854

+ 1 - 1
src/components/pages/classroomObservation/components/addNewAnalysisDialog.vue

@@ -653,7 +653,7 @@ export default {
   methods: {
     open(type) {
 			this.addTagIndex = type;
-      this.tagIndex = type;
+      this.tagIndex = type<=2?type:0;
       this.input2 = "";
       this.tagSubject = "";
       this.dialogVisible = true;

+ 37 - 2
src/components/pages/classroomObservation/components/analysis.vue

@@ -82,7 +82,16 @@
 
             添加模块
           </div>
-        </div>
+					<div @click="addNewAnalysisGroup(0)"><svg t="1727073223211" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3257" width="200" height="200"><path d="M546.901333 314.282667a46.805333 46.805333 0 0 0-69.802666 0l-296.021334 340.736c-24.32 28.032-3.328 70.314667 34.944 70.314666h591.957334c38.272 0 59.306667-42.282667 34.944-70.314666l-296.021334-340.736z" p-id="3258"></path></svg>添加分析</div>
+					<div @click="addNewAnalysisGroup(1)"><svg style="transform: rotate(180deg);" t="1727073223211" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3257" width="200" height="200"><path d="M546.901333 314.282667a46.805333 46.805333 0 0 0-69.802666 0l-296.021334 340.736c-24.32 28.032-3.328 70.314667 34.944 70.314666h591.957334c38.272 0 59.306667-42.282667 34.944-70.314666l-296.021334-340.736z" p-id="3258"></path></svg>添加分析</div>
+					<div @click="deleteAnalysisGroup()"><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M6.25 3.125C6.25 2.77982 6.52982 2.5 6.875 2.5H13.125C13.4702 2.5 13.75 2.77982 13.75 3.125C13.75 3.47018 13.4702 3.75 13.125 3.75H6.875C6.52982 3.75 6.25 3.47018 6.25 3.125Z" fill="black" fill-opacity="0.6"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 5.625C2.5 5.26481 2.77982 5 3.125 5H16.875C17.2202 5 17.5 5.26481 17.5 5.625C17.5 6.03952 17.2202 6.25 16.875 6.25L15.625 6.30435V17.5H4.375V6.25H3.125C2.77982 6.25 2.5 6.03952 2.5 5.625ZM5.625 6.25V16.1957L14.375 16.25V6.30435L5.625 6.25Z" fill="black" fill-opacity="0.6"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.125 8.06838C8.47018 8.06838 8.75 8.32276 8.75 8.63656V13.7502C8.75 14.064 8.47018 14.3184 8.125 14.3184C7.77982 14.3184 7.5 14.064 7.5 13.7502V8.63656C7.5 8.32276 7.77982 8.06838 8.125 8.06838Z" fill="black" fill-opacity="0.6"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.875 8.06838C12.2202 8.06838 12.5 8.32276 12.5 8.63656V13.7502C12.5 14.064 12.2202 14.3184 11.875 14.3184C11.5298 14.3184 11.25 14.064 11.25 13.7502V8.63656C11.25 8.32276 11.5298 8.06838 11.875 8.06838Z" fill="black" fill-opacity="0.6"/>
+</svg>
+删除分析</div>
+				</div>
         <!-- </el-popover> -->
         <!-- <div class="a-h-r-btn" @click.stop="addTemplate">
           <img src="@/assets/icon/classroomObservation/newcon.svg" alt="" />
@@ -312,7 +321,33 @@ export default {
     editNameSuccess(name) {
       this.$emit("changeAnalysisName", { name: name, type: this.type });
       // this.$refs.editNameDialogRef.close()
-    }
+    },
+		addNewAnalysisGroup(po=1){//0:上面   1:下面
+			if (!this.tid) return this.$message.error("请新建课堂,或选择历史课堂");
+			this.visible = false;
+			this.$confirm("确定添加新的分析分组吗?", "添加分析", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "waring",
+      })
+        .then(() => {
+					this.$emit("addNewAnalysisGroup",{type:this.type,po:po})
+			}).catch(()=>{})
+		},
+		deleteAnalysisGroup(){
+			if (!this.tid) return this.$message.error("请新建课堂,或选择历史课堂");
+			this.visible = false;
+			this.$confirm("删除后无法恢复,确定删除该分析吗?", "删除分析", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "waring",
+      })
+        .then((res) => {
+					let _groupId = this.analysisItemList.map(i=>i.id)
+					this.$emit("delAnalysisGroup",{type:this.type,groupId:_groupId})
+				}).catch(e=>{})
+			
+		}
   }
 };
 </script>

+ 421 - 199
src/components/pages/classroomObservation/components/messageArea.vue

@@ -48,6 +48,8 @@
         @editItem="editAnalysisItem"
         @saveItem="saveAnalysis"
         @changeAnalysisName="changeAnalysisName"
+        @addNewAnalysisGroup="addNewAnalysisGroup"
+        @delAnalysisGroup="delAnalysisGroup"
         :bmData="bmData.jsonData"
         :title="item.name"
         :dialogTagDataList="dialogTagDataList"
@@ -59,9 +61,11 @@
         :type="item.value"
         :tid="tid"
         :fileId="fileId"
-        v-loading="currencyLoading"
+        v-loading="item.loading"
       />
 
+      <!-- <div class="ma_m_addNewAnalysisBox"></div> -->
+
       <!-- <analysis
 				@updateMessage="updateMessage"
 				ref="analysis0"
@@ -561,217 +565,350 @@ export default {
           });
       });
     },
-    getCurrencyAndBaseMessageData() {
-      if (!this.tid) return;
-      return new Promise(resolve => {
-        let pram = {
-          tid: this.tid,
-          // tid:'02',
-          type: "0"
-        };
-        this.currencyLoading = true;
-        this.dialogTagList.find(i => i.value == 0).loading = true;
-        this.baseMessageLoading = true;
-        this.bmData = {
-          id: "",
-          tId: this.tid,
-          tIndex: 0,
-          jsonData: {
-            activity_methods: "",
-            activity_structure: "",
-            classroom_resources: "",
-            courseName: "",
-            name: "",
-            studentNum: 0,
-            subject: "",
-            textbook: ""
-          }
-        };
-        this.imageList = [];
-        this.dataList = [];
-        this.dialogTagList = [
-          { value: 0, name: "通用课堂分析", loading: false },
-          { value: 1, name: "学科课堂分析", loading: false },
-          { value: 2, name: "扩展分析", loading: false }
-        ];
-        this.ajax
-          .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
-          .then(res => {
-            let _data = res.data.FunctionResponse.result.length
-              ? JSON.parse(res.data.FunctionResponse.result)
-              : [];
-            if (_data.length == 0) {
-              return this.insertBaseMessage().then(_ => {
-                this.getCurrencyAndBaseMessageData();
-              });
-            }
-            let _bmData = _data.find(i => i.tIndex == 0);
-            let _dialogTagList = [];
-            // 基础信息
-            _bmData.jsonData = JSON.parse(_bmData.jsonData);
-            _dialogTagList = _bmData.jsonData.dialogTagList || [
-              { value: 0, name: "通用课堂分析", loading: false },
-              { value: 1, name: "学科课堂分析", loading: false },
-              { value: 2, name: "扩展分析", loading: false }
-            ];
-            // 图片
-            let _imageList = _data.find(i => i.tIndex == 1);
-            _imageList.jsonData = JSON.parse(_imageList.jsonData);
+    // getCurrencyAndBaseMessageData() {
+    //   if (!this.tid) return;
+    //   return new Promise(resolve => {
+    //     let pram = {
+    //       tid: this.tid,
+    //       // tid:'02',
+    //       type: "0"
+    //     };
+    //     this.currencyLoading = true;
+    //     this.dialogTagList.find(i => i.value == 0).loading = true;
+    //     this.baseMessageLoading = true;
+    //     this.bmData = {
+    //       id: "",
+    //       tId: this.tid,
+    //       tIndex: 0,
+    //       jsonData: {
+    //         activity_methods: "",
+    //         activity_structure: "",
+    //         classroom_resources: "",
+    //         courseName: "",
+    //         name: "",
+    //         studentNum: 0,
+    //         subject: "",
+    //         textbook: ""
+    //       }
+    //     };
+    //     this.imageList = [];
+    //     this.dataList = [];
+    //     this.dialogTagList = [
+    //       { value: 0, name: "通用课堂分析", loading: false },
+    //       { value: 1, name: "学科课堂分析", loading: false },
+    //       { value: 2, name: "扩展分析", loading: false }
+    //     ];
+    //     this.ajax
+    //       .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
+    //       .then(res => {
+    //         let _data = res.data.FunctionResponse.result.length
+    //           ? JSON.parse(res.data.FunctionResponse.result)
+    //           : [];
+    //         if (_data.length == 0) {
+    //           return this.insertBaseMessage().then(_ => {
+    //             this.getCurrencyAndBaseMessageData();
+    //           });
+    //         }
+    //         let _bmData = _data.find(i => i.tIndex == 0);
+    //         let _dialogTagList = [];
+    //         // 基础信息
+    //         _bmData.jsonData = JSON.parse(_bmData.jsonData);
+    //         _dialogTagList = _bmData.jsonData.dialogTagList || [
+    //           { value: 0, name: "通用课堂分析", loading: false },
+    //           { value: 1, name: "学科课堂分析", loading: false },
+    //           { value: 2, name: "扩展分析", loading: false }
+    //         ];
+    //         // 图片
+    //         let _imageList = _data.find(i => i.tIndex == 1);
+    //         _imageList.jsonData = JSON.parse(_imageList.jsonData);
 
-            if (!_imageList.jsonData.videoList) {
-              _imageList.jsonData.videoList = [];
-            }
-            if (!_imageList.jsonData.NephogramList) {
-              _imageList.jsonData.NephogramList = [];
-            }
-            //通用分析
-            let currency = [];
-            for (let i = 2; i < _data.length; i++) {
-              let _currency = _data[i];
-              _currency.jsonData = JSON.parse(_currency.jsonData);
-              currency.push(_currency);
-            }
+    //         if (!_imageList.jsonData.videoList) {
+    //           _imageList.jsonData.videoList = [];
+    //         }
+    //         if (!_imageList.jsonData.NephogramList) {
+    //           _imageList.jsonData.NephogramList = [];
+    //         }
+    //         //通用分析
+    //         let currency = [];
+    //         for (let i = 2; i < _data.length; i++) {
+    //           let _currency = _data[i];
+    //           _currency.jsonData = JSON.parse(_currency.jsonData);
+    //           currency.push(_currency);
+    //         }
 
-            this.dataList.push(...currency);
-            this.bmData = _bmData;
-            this.dialogTagList = _dialogTagList;
-            this.$emit("changeTranscription", {
-              transcriptionData: this.bmData.jsonData.transcriptionData
-                ? this.bmData.jsonData.transcriptionData
-                : "",
-              editorBarData: this.bmData.jsonData.editorBarData
-                ? this.bmData.jsonData.editorBarData
-                : { type: "0", content: "", url: "" }
-            });
-            this.imageList = _imageList;
-            if (this.imageList.jsonData.fileList.length > 0) {
-              this.$emit(
-                "changeChatAreaAudioUrl",
-                this.imageList.jsonData.fileList[0]
-              );
-            } else {
-              this.$emit("changeChatAreaAudioUrl", { name: "", url: "" });
-            }
-            this.$emit("updateTime", this.bmData.createtime);
-            this.baseMessageLoading = false;
-            this.dialogTagList.find(i => i.value == 0).loading = false;
-            this.currencyLoading = false;
-            resolve();
-          })
-          .catch(e => {
-            this.$message.error("获取通用分析失败");
-            console.log(e);
-            resolve();
-          });
-      });
-    },
-    getScienceData() {
+    //         this.dataList.push(...currency);
+    //         this.bmData = _bmData;
+    //         this.dialogTagList = _dialogTagList;
+    //         this.$emit("changeTranscription", {
+    //           transcriptionData: this.bmData.jsonData.transcriptionData
+    //             ? this.bmData.jsonData.transcriptionData
+    //             : "",
+    //           editorBarData: this.bmData.jsonData.editorBarData
+    //             ? this.bmData.jsonData.editorBarData
+    //             : { type: "0", content: "", url: "" }
+    //         });
+    //         this.imageList = _imageList;
+    //         if (this.imageList.jsonData.fileList.length > 0) {
+    //           this.$emit(
+    //             "changeChatAreaAudioUrl",
+    //             this.imageList.jsonData.fileList[0]
+    //           );
+    //         } else {
+    //           this.$emit("changeChatAreaAudioUrl", { name: "", url: "" });
+    //         }
+    //         this.$emit("updateTime", this.bmData.createtime);
+    //         this.baseMessageLoading = false;
+    //         this.dialogTagList.find(i => i.value == 0).loading = false;
+    //         this.currencyLoading = false;
+    //         resolve();
+    //       })
+    //       .catch(e => {
+    //         this.$message.error("获取通用分析失败");
+    //         console.log(e);
+    //         resolve();
+    //       });
+    //   });
+    // },
+    // getScienceData() {
+    //   if (!this.tid) return;
+    //   return new Promise(resolve => {
+    //     let pram = {
+    //       tid: this.tid,
+    //       // tid:'02',
+    //       type: "1"
+    //     };
+    //     this.scienceLoading = true;
+    //     this.dialogTagList.find(i => i.value == 1).loading = true;
+    //     this.ajax
+    //       .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
+    //       .then(res => {
+    //         let _data = res.data.FunctionResponse.result.length
+    //           ? JSON.parse(res.data.FunctionResponse.result)
+    //           : [];
+    //         if (_data.length == 0) {
+    //           this.dialogTagList.find(i => i.value == 1).loading = false;
+    //           return (this.scienceLoading = false);
+    //         }
+    //         let science = [];
+    //         for (let i = 0; i < _data.length; i++) {
+    //           let _science = _data[i];
+    //           _science.jsonData = JSON.parse(_science.jsonData);
+    //           science.push(_science);
+    //         }
+    //         this.dataList.push(...science);
+    //         this.dialogTagList.find(i => i.value == 1).loading = false;
+    //         this.scienceLoading = false;
+    //         resolve();
+    //       })
+    //       .catch(e => {
+    //         this.$message.error("获取科学分析失败");
+    //         resolve();
+    //         console.log(e);
+    //       });
+    //   });
+    // },
+    // getExtendData() {
+    //   if (!this.tid) return;
+    //   return new Promise(resolve => {
+    //     let pram = {
+    //       tid: this.tid,
+    //       // tid:'02',
+    //       type: "2"
+    //     };
+    //     this.extendLoading = true;
+    //     this.dialogTagList.find(i => i.value == 2).loading = true;
+    //     this.ajax
+    //       .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
+    //       .then(res => {
+    //         let _data = res.data.FunctionResponse.result.length
+    //           ? JSON.parse(res.data.FunctionResponse.result)
+    //           : [];
+    //         if (_data.length == 0) {
+    //           this.dialogTagList.find(i => i.value == 2).loading = false;
+    //           return (this.extendLoading = false);
+    //         }
+    //         let extent = [];
+    //         for (let i = 0; i < _data.length; i++) {
+    //           let _extent = _data[i];
+    //           _extent.jsonData = JSON.parse(_extent.jsonData);
+    //           extent.push(_extent);
+    //         }
+    //         this.dataList.push(...extent);
+    //         this.dialogTagList.find(i => i.value == 2).loading = false;
+    //         this.extendLoading = false;
+    //         resolve();
+    //       })
+    //       .catch(e => {
+    //         this.$message.error("获取扩展分析失败");
+    //         console.log(e);
+    //         resolve();
+    //       });
+    //   });
+    // },
+    getAnalysisData(type) {
       if (!this.tid) return;
       return new Promise(resolve => {
-        let pram = {
+        let params = {
           tid: this.tid,
-          // tid:'02',
-          type: "1"
+          type: type
         };
-        this.scienceLoading = true;
-        this.dialogTagList.find(i => i.value == 1).loading = true;
-        this.ajax
-          .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
-          .then(res => {
-            let _data = res.data.FunctionResponse.result.length
-              ? JSON.parse(res.data.FunctionResponse.result)
-              : [];
-            if (_data.length == 0) {
-              this.dialogTagList.find(i => i.value == 1).loading = false;
-              return (this.scienceLoading = false);
-            }
-            let science = [];
-            for (let i = 0; i < _data.length; i++) {
-              let _science = _data[i];
-              _science.jsonData = JSON.parse(_science.jsonData);
-              science.push(_science);
+
+        this.dialogTagList.find(i => i.value == type)
+          ? (this.dialogTagList.find(i => i.value == type).loading = true)
+          : "";
+        if (type == 0) {
+          this.baseMessageLoading = true;
+          this.bmData = {
+            id: "",
+            tId: this.tid,
+            tIndex: 0,
+            jsonData: {
+              activity_methods: "",
+              activity_structure: "",
+              classroom_resources: "",
+              courseName: "",
+              name: "",
+              studentNum: 0,
+              subject: "",
+              textbook: ""
             }
-            this.dataList.push(...science);
-            this.dialogTagList.find(i => i.value == 1).loading = false;
-            this.scienceLoading = false;
-            resolve();
-          })
-          .catch(e => {
-            this.$message.error("获取科学分析失败");
-            resolve();
-            console.log(e);
-          });
-      });
-    },
-    getExtendData() {
-      if (!this.tid) return;
-      return new Promise(resolve => {
-        let pram = {
-          tid: this.tid,
-          // tid:'02',
-          type: "2"
-        };
-        this.extendLoading = true;
-        this.dialogTagList.find(i => i.value == 2).loading = true;
+          };
+          this.imageList = [];
+          this.dataList = [];
+          this.dialogTagList = [
+            { value: 0, name: "通用课堂分析", loading: true },
+            { value: 1, name: "学科课堂分析", loading: true },
+            { value: 2, name: "扩展分析", loading: true }
+          ];
+        }
+
         this.ajax
-          .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
+          .post(
+            "https://gpt4.cocorobo.cn/get_classroom_observation_new",
+            params
+          )
           .then(res => {
             let _data = res.data.FunctionResponse.result.length
               ? JSON.parse(res.data.FunctionResponse.result)
               : [];
+
             if (_data.length == 0) {
-              this.dialogTagList.find(i => i.value == 2).loading = false;
-              return (this.extendLoading = false);
+              return (this.dialogTagList.find(
+                i => i.value == type
+              ).loading = false);
             }
-            let extent = [];
-            for (let i = 0; i < _data.length; i++) {
-              let _extent = _data[i];
-              _extent.jsonData = JSON.parse(_extent.jsonData);
-              extent.push(_extent);
+
+            if (type == 0) {
+              //第一个分析
+              let _bmData = _data.find(i => i.tIndex == 0);
+              let _dialogTagList = [];
+              // 基础信息
+              _bmData.jsonData = JSON.parse(_bmData.jsonData);
+              _dialogTagList = _bmData.jsonData.dialogTagList || [
+                { value: 0, name: "通用课堂分析", loading: false },
+                { value: 1, name: "学科课堂分析", loading: false },
+                { value: 2, name: "扩展分析", loading: false }
+              ];
+              // 图片
+              let _imageList = _data.find(i => i.tIndex == 1);
+              _imageList.jsonData = JSON.parse(_imageList.jsonData);
+
+              if (!_imageList.jsonData.videoList) {
+                _imageList.jsonData.videoList = [];
+              }
+              if (!_imageList.jsonData.NephogramList) {
+                _imageList.jsonData.NephogramList = [];
+              }
+              //通用分析
+              let currency = [];
+              for (let i = 2; i < _data.length; i++) {
+                let _currency = _data[i];
+                _currency.jsonData = JSON.parse(_currency.jsonData);
+                currency.push(_currency);
+              }
+              this.dataList.push(...currency);
+              this.bmData = _bmData;
+              this.dialogTagList = _dialogTagList;
+              this.$emit("changeTranscription", {
+                transcriptionData: this.bmData.jsonData.transcriptionData
+                  ? this.bmData.jsonData.transcriptionData
+                  : "",
+                editorBarData: this.bmData.jsonData.editorBarData
+                  ? this.bmData.jsonData.editorBarData
+                  : { type: "0", content: "", url: "" }
+              });
+              this.imageList = _imageList;
+              if (this.imageList.jsonData.fileList.length > 0) {
+                this.$emit(
+                  "changeChatAreaAudioUrl",
+                  this.imageList.jsonData.fileList[0]
+                );
+              } else {
+                this.$emit("changeChatAreaAudioUrl", { name: "", url: "" });
+              }
+              this.$emit("updateTime", this.bmData.createtime);
+              this.baseMessageLoading = false;
+              this.dialogTagList.find(i => i.value == type)
+                ? (this.dialogTagList.find(
+                    i => i.value == type
+                  ).loading = false)
+                : "";
+              resolve();
+            } else {
+              if (_data.length == 0) {
+                return (this.dialogTagList.find(
+                  i => i.value == type
+                ).loading = false);
+              }
+              let _analysisData = [];
+              for (let i = 0; i < _data.length; i++) {
+                let _analysis = _data[i];
+                _analysis.jsonData = JSON.parse(_analysis.jsonData);
+                _analysisData.push(_analysis);
+              }
+              this.dataList.push(..._analysisData);
+              this.dialogTagList.find(i => i.value == type).loading = false;
+              resolve();
             }
-            this.dataList.push(...extent);
-            this.dialogTagList.find(i => i.value == 2).loading = false;
-            this.extendLoading = false;
-            resolve();
           })
           .catch(e => {
-            this.$message.error("获取扩展分析失败");
             console.log(e);
+            this.$message.error("获取分析失败");
             resolve();
           });
       });
     },
-    getValueAddedData() {
-      if (!this.tid) return;
-      let pram = {
-        tid: this.tid,
-        // tid:'02',
-        type: "3"
-      };
-      this.valueAddedLoading = true;
-      this.ajax
-        .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
-        .then(res => {
-          let _data = res.data.FunctionResponse.result.length
-            ? JSON.parse(res.data.FunctionResponse.result)
-            : [];
-          if (_data.length == 0) {
-            return (this.valueAddedLoading = false);
-          }
-          let valueAdded = [];
-          for (let i = 0; i < _data.length; i++) {
-            let _valueAdded = _data[i];
-            _valueAdded.jsonData = JSON.parse(_valueAdded.jsonData);
-            valueAdded.push(_valueAdded);
-          }
-          this.dataList.push(...valueAdded);
-          this.valueAddedLoading = false;
-        })
-        .catch(e => {
-          this.$message.error("获取增值性分析失败");
-          console.log(e);
-        });
-    },
+    // getValueAddedData() {
+    //   if (!this.tid) return;
+    //   let pram = {
+    //     tid: this.tid,
+    //     // tid:'02',
+    //     type: "3"
+    //   };
+    //   this.valueAddedLoading = true;
+    //   this.ajax
+    //     .post("https://gpt4.cocorobo.cn/get_classroom_observation_new", pram)
+    //     .then(res => {
+    //       let _data = res.data.FunctionResponse.result.length
+    //         ? JSON.parse(res.data.FunctionResponse.result)
+    //         : [];
+    //       if (_data.length == 0) {
+    //         return (this.valueAddedLoading = false);
+    //       }
+    //       let valueAdded = [];
+    //       for (let i = 0; i < _data.length; i++) {
+    //         let _valueAdded = _data[i];
+    //         _valueAdded.jsonData = JSON.parse(_valueAdded.jsonData);
+    //         valueAdded.push(_valueAdded);
+    //       }
+    //       this.dataList.push(...valueAdded);
+    //       this.valueAddedLoading = false;
+    //     })
+    //     .catch(e => {
+    //       this.$message.error("获取增值性分析失败");
+    //       console.log(e);
+    //     });
+    // },
     saveAnalysis(id, _data) {
       let data = this.dataList.find(i => i.id == id);
       if (data) {
@@ -784,13 +921,25 @@ export default {
       return new Promise(resolve => {
         this.dataList = [];
         if (this.tid) {
-          Promise.all([
-            this.getCurrencyAndBaseMessageData(),
-            this.getScienceData(),
-            this.getExtendData()
-          ]).then(res => {
-            resolve();
+          this.getAnalysisData(0).then(res => {
+            this.$nextTick(() => {
+              let promises = [];
+              this.dialogTagList.forEach(i => {
+                if (i.value === 0) return;
+                promises.push(this.getAnalysisData(i.value));
+              });
+              Promise.all(promises).then(res => {
+                resolve();
+              });
+            });
           });
+          // Promise.all([
+          //   this.getCurrencyAndBaseMessageData(),
+          //   this.getScienceData(),
+          //   this.getExtendData()
+          // ]).then(res => {
+          //   resolve();
+          // });
         } else {
           this.getDefaultData();
         }
@@ -1127,6 +1276,71 @@ export default {
         // this.$message.success("修改名称成功");
       });
     },
+    addNewAnalysisGroup(data) {
+      let _index = this.dialogTagList.findIndex(i => i.value === data.type);
+      let _maxValue = Math.max(...this.dialogTagList.map(i => i.value)) + 1;
+      if ([10, 11].includes(_maxValue)) {
+        _maxValue = 12;
+      }
+      let newData = { value: _maxValue, name: "新建的分析", loading: true };
+      if (data.po == 0) {
+        this.dialogTagList.splice(_index, 0, newData);
+      } else if (data.po == 1) {
+        this.dialogTagList.splice(_index + 1, 0, newData);
+      }
+      this.saveData(this.bmData).then(res => {
+        this.getAnalysisData(newData.value);
+        this.$message.success("添加分析分组成功");
+      });
+    },
+    delAnalysisGroup(data) {
+      let _index = this.dialogTagList.findIndex(i => i.value === data.type);
+			this.dialogTagList[_index].loading = true
+      let promises = [];
+      data.groupId.forEach(i => {
+        promises.push(this.delAnalysisItem2(i));
+      });
+
+      if (promises.length > 0) {
+        return Promise.all(promises).then(res => {
+					this.dialogTagList.splice(_index,1);
+					this.$message.success("删除分析分组成功");
+          this.saveData(this.bmData)
+        });
+      } else {
+				this.dialogTagList.splice(_index,1);
+				this.$message.success("删除分析分组成功");
+        return this.saveData(this.bmData)
+      }
+    },
+    delAnalysisItem2(id) {
+      return new Promise(resolve => {
+        let _index = this.dataList.findIndex(i => i.id == id);
+        if (_index > -1) {
+          let _data = this.dataList[_index];
+          let params = {
+            id: _data.id,
+            type: _data.Type,
+            tid: this.tid
+          };
+          this.ajax
+            .post(
+              "https://gpt4.cocorobo.cn/delete_classroom_observation",
+              params
+            )
+            .then(res => {
+              this.dataList.splice(_index, 1);
+              resolve();
+            })
+            .catch(e => {
+              console.log(e);
+              resolve();
+            });
+        } else {
+          resolve();
+        }
+      });
+    },
     init() {
       console.log("初始化");
       this.bmData = {};
@@ -1135,9 +1349,9 @@ export default {
       this.loading = false;
       this.baseMessageLoading = false;
       this.currencyLoading = false;
-      this.dialogTagList.find(i => i.value == 0).loading = false;
-      this.dialogTagList.find(i => i.value == 1).loading = false;
-      this.dialogTagList.find(i => i.value == 2).loading = false;
+      // this.dialogTagList.find(i => i.value == 0).loading = false;
+      // this.dialogTagList.find(i => i.value == 1).loading = false;
+      // this.dialogTagList.find(i => i.value == 2).loading = false;
       this.scienceLoading = false;
       this.extendLoading = false;
       this.valueAddedLoading = false;
@@ -1472,4 +1686,12 @@ export default {
   background-color: rgba(54, 129, 252, 1);
   color: #fff;
 }
+
+/* .ma_m_addNewAnalysisBox{
+	width: calc(100% - 10px);
+	height: 60px;
+	background-color: red;
+	border-radius: 8px;
+	margin: 10px 0px 20px 0;
+} */
 </style>