|
@@ -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>
|