|
@@ -0,0 +1,758 @@
|
|
|
+<template>
|
|
|
+ <div class="analysisItem">
|
|
|
+ <div class="ai-header" v-show="data.jsonData.name != '词频词汇分析'">
|
|
|
+ <div class="ai-h-left" @click.stop="changeOpenItem(!openItem)">
|
|
|
+ <span
|
|
|
+ :class="['ai-h-l-icon', openItem ? 'ai-h-l-iconActive' : '']"
|
|
|
+ ></span>
|
|
|
+ <span class="ai-h-l-text">{{ data.jsonData.name }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="ai-h-right">
|
|
|
+ <span style="width: 100px" class="generateError" v-if="loadNum == 2"
|
|
|
+ >优化失败
|
|
|
+ </span>
|
|
|
+ <span style="width: 100px" v-if="loadNum == 1">
|
|
|
+ <span v-if="loading" class="generate">
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require('../../../../assets/icon/classroomObservation/generate.svg')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ 生成中...
|
|
|
+ </span>
|
|
|
+ <span v-else class="generateSuccess">
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require('../../../../assets/icon/classroomObservation/success.svg')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ 生成完成
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ v-if="loadNum == 0 && !openItem && tid"
|
|
|
+ class="ai-h-r-icon4"
|
|
|
+ @click.stop="delBtn()"
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="light"
|
|
|
+ content="删除"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require('../../../../assets/icon/classroomObservation/del.svg')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span
|
|
|
+ v-if="loadNum == 0 && openItem"
|
|
|
+ :class="['ai-h-r-icon1', showIndex <= 0 ? 'ai_h_r_iconOpacity' : '']"
|
|
|
+ @click.stop="changeShowIndex(-1)"
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="light"
|
|
|
+ content="上一个"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require('../../../../assets/icon/classroomObservation/back.svg')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span
|
|
|
+ v-if="loadNum != 1 && openItem"
|
|
|
+ :class="[
|
|
|
+ showIndex >= historyResult.length - 1 ? 'ai_h_r_iconOpacity' : '',
|
|
|
+ ]"
|
|
|
+ @click.stop="changeShowIndex(1)"
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="light"
|
|
|
+ content="下一个"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require('../../../../assets/icon/classroomObservation/back.svg')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span
|
|
|
+ v-if="loadNum != 1 && openItem && tid"
|
|
|
+ @click.stop="editBtn(true)"
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="light"
|
|
|
+ content="优化"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require('../../../../assets/icon/classroomObservation/edit.svg')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <!-- <span class="ai-h-r-icon4" @click.stop="delBtn()"></span> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ai-main" v-if="openItem">
|
|
|
+ <div class="a-m-brief" v-if="showBrief">
|
|
|
+ {{ data.jsonData.result }}
|
|
|
+ </div>
|
|
|
+ <!-- 图 -->
|
|
|
+ <eChartTemplate
|
|
|
+ style="width: 100%; height: 400px"
|
|
|
+ :data="data.jsonData.eChartData"
|
|
|
+ v-if="data.jsonData.eChartData"
|
|
|
+ />
|
|
|
+ <div class="rtCh" v-if="data.jsonData.RT && data.jsonData.CH">
|
|
|
+ <img :src="require('../../../../assets/icon/classroomObservation/rt-ch.png')">
|
|
|
+ <div>
|
|
|
+ <span>RT={{ data.jsonData.RT }}</span>
|
|
|
+ <span>CH={{ data.jsonData.CH }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <mdView :text="data.jsonData.content" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import mdView from "./mdView.vue";
|
|
|
+import eChartTemplate from "./eChartTemplate";
|
|
|
+import { v4 as uuidv4 } from "uuid";
|
|
|
+export default {
|
|
|
+ emits: ["delItem", "editItem", "saveItem"],
|
|
|
+ components: {
|
|
|
+ mdView,
|
|
|
+ eChartTemplate,
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ data: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ },
|
|
|
+ bmData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ },
|
|
|
+ dialogTagDataList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => {
|
|
|
+ return [];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ index: {
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
+ tid: {
|
|
|
+ type: String,
|
|
|
+ require: true,
|
|
|
+ },
|
|
|
+ fileId: {
|
|
|
+ type: String,
|
|
|
+ require: true,
|
|
|
+ },
|
|
|
+ showBrief: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ openItem: false,
|
|
|
+ loading: false,
|
|
|
+ loadNum: 0,
|
|
|
+ userId: this.$route.query["userid"],
|
|
|
+ showIndex: 0,
|
|
|
+ historyResult: [],
|
|
|
+ tableData: [],
|
|
|
+ imgTypeList: [
|
|
|
+ "png",
|
|
|
+ "jpg",
|
|
|
+ "jpeg",
|
|
|
+ "bmp",
|
|
|
+ "gif",
|
|
|
+ "webp",
|
|
|
+ "psd",
|
|
|
+ "svg",
|
|
|
+ "tiff",
|
|
|
+ ],
|
|
|
+ oldData: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ checkFileType() {
|
|
|
+ return (url) => {
|
|
|
+ return url.split(".").pop();
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ // showIndex(){
|
|
|
+ // let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ // _copyData.jsonData = this.historyResult[this.showIndex];
|
|
|
+ // _copyData.json_data = JSON.stringify(_copyData.jsonData);
|
|
|
+ // this.$emit("editItem", this.data.id, _copyData);
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeOpenItem(newValue) {
|
|
|
+ if (this.loading == true && this.loadNum != 0)
|
|
|
+ return this.$message("请稍后...");
|
|
|
+ this.loadNum = 0;
|
|
|
+ this.openItem = newValue;
|
|
|
+ },
|
|
|
+ editBtn(flag = false) {
|
|
|
+ if (!flag) return console.log("不执行获取");
|
|
|
+ this.loadNum = 1;
|
|
|
+ this.getData();
|
|
|
+
|
|
|
+ // this.ajax
|
|
|
+ // .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
|
+ // .then((res) => {
|
|
|
+ // let _data = res.data.FunctionResponse;
|
|
|
+ // if (
|
|
|
+ // !_data.message ||
|
|
|
+ // _data.message.indexOf("由于我无法直接访问您上传的文件内容") > -1
|
|
|
+ // ) {
|
|
|
+ // this.loading = false;
|
|
|
+ // this.loadNum = 2;
|
|
|
+ // return this.$message.error("AI无法识别优化");
|
|
|
+ // }
|
|
|
+ // let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ // // _copyData.jsonData.result = "";
|
|
|
+ // _copyData.jsonData.content = _data.message;
|
|
|
+ // _copyData.jsonData.dataFileList = [];
|
|
|
+ // _copyData.jsonData.fileList = [];
|
|
|
+ // _copyData.json_data = JSON.stringify(_copyData.jsonData);
|
|
|
+ // if (this.historyResult.length == 0) {
|
|
|
+ // this.historyResult.push(_copyData.jsonData);
|
|
|
+ // } else {
|
|
|
+ // this.historyResult.splice(
|
|
|
+ // this.showIndex + 1,
|
|
|
+ // 0,
|
|
|
+ // _copyData.jsonData
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+ // this.changeShowIndex(1);
|
|
|
+ // this.loading = false;
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // this.loadNum = 2;
|
|
|
+ // this.$message.error("AI无法识别优化");
|
|
|
+ // this.loading = false;
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ getAtAuContent(_uid, _text, _headUrl, _assistantName) {
|
|
|
+ let _source = new EventSource(
|
|
|
+ `https://gpt4.cocorobo.cn/question/${_uid}`
|
|
|
+ ); //http://gpt4.cocorobo.cn:8011/question/ https://gpt4.cocorobo.cn/question/
|
|
|
+ let _allText = "";
|
|
|
+ let _mdText = "";
|
|
|
+ let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ // _copyData.jsonData.result = "";
|
|
|
+ _copyData.jsonData.content = "";
|
|
|
+ _copyData.jsonData.dataFileList = [];
|
|
|
+ _copyData.jsonData.fileList = [];
|
|
|
+ if (this.historyResult.length == 0) {
|
|
|
+ this.historyResult.push(_copyData.jsonData);
|
|
|
+ } else {
|
|
|
+ this.historyResult.splice(this.showIndex + 1, 0, _copyData.jsonData);
|
|
|
+ }
|
|
|
+ this.showIndex++;
|
|
|
+ this.$emit("editItem", this.data.id, _copyData);
|
|
|
+ // const md = new MarkdownIt();
|
|
|
+ _source.onmessage = (_e) => {
|
|
|
+ let _eData = JSON.parse(_e.data);
|
|
|
+ if (_eData.content.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
+ let _result = [];
|
|
|
+ if ("result" in _eData) {
|
|
|
+ _result = _eData.result;
|
|
|
+ for (let i = 0; i < _result.length; i++) {
|
|
|
+ _mdText = _mdText.replace(_result[i].text, _result[i].fileName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _mdText = _mdText.replace("_", "");
|
|
|
+ _copyData.jsonData.content = _mdText;
|
|
|
+ this.loading = false;
|
|
|
+ this.loadNum = 0;
|
|
|
+ this.$emit("editItem", this.data.id, _copyData);
|
|
|
+ this.$emit("saveItem", this.data.id, _copyData);
|
|
|
+ _source.close();
|
|
|
+ } else {
|
|
|
+ let _text = _eData.content.replace("'", "").replace("'", "");
|
|
|
+ if (_allText == "") {
|
|
|
+ _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
|
|
|
+ } else {
|
|
|
+ _allText += _text;
|
|
|
+ }
|
|
|
+ _mdText = _allText + "_";
|
|
|
+ _mdText = _mdText.replace(/\\n/g, "\n");
|
|
|
+ _mdText = _mdText.replace(/\\/g, "");
|
|
|
+ if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
+ //转化返回的回复流数据
|
|
|
+ // _mdText = md.render(_mdText);
|
|
|
+ _copyData.jsonData.content = _mdText;
|
|
|
+ this.$emit("editItem", this.data.id, _copyData);
|
|
|
+ // 处理流数据
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ getData() {
|
|
|
+ if (this.bmData.editorBarData.type != 0) {
|
|
|
+ return this.$message.info("请上传表格形式的转录文稿");
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ let _result = [];
|
|
|
+ let _data = this.bmData.editorBarData.content;
|
|
|
+ let _div = document.createElement("div");
|
|
|
+ _div.innerHTML = _data;
|
|
|
+ let _tableRows = _div.querySelectorAll(`table tbody tr`);
|
|
|
+ _tableRows.forEach((i, index) => {
|
|
|
+ if (index == 0) return;
|
|
|
+ let obj = {
|
|
|
+ index: i.cells[0].textContent,
|
|
|
+ startTime: i.cells[1].textContent,
|
|
|
+ endTime: i.cells[2].textContent,
|
|
|
+ message: i.cells[3].textContent,
|
|
|
+ time: i.cells[4].textContent,
|
|
|
+ role: i.cells[5].textContent,
|
|
|
+ behavior: i.cells[6].textContent,
|
|
|
+ };
|
|
|
+ _result.push(obj);
|
|
|
+ });
|
|
|
+ if (_result.length == 0) return this.$message.error("未找到表格数据");
|
|
|
+ if (this.data.jsonData.name == "S-T分析:课堂时间分配") {
|
|
|
+ this.getTimeAllocationData(_result);
|
|
|
+ } else if (this.data.jsonData.name == "S-T分析:师生互动分析") {
|
|
|
+ this.getInteractionAnalysisData(_result);
|
|
|
+ } else if (this.data.jsonData.name == "S-T分析:教学模式分析") {
|
|
|
+ this.getTeachingModeData(_result);
|
|
|
+ } else {
|
|
|
+ return this.$message.error("未找到对应的分析");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ this.loadNum = 2;
|
|
|
+ this.loading = false;
|
|
|
+ return this.$message.error("生成分析失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 课堂时间分配
|
|
|
+ getTimeAllocationData(_dataList) {
|
|
|
+ this.loading = true;
|
|
|
+ this.openItem = false;
|
|
|
+ let _data = _dataList.reduce((pre,cur)=>{
|
|
|
+ if(cur.role == '学生'){
|
|
|
+ pre[1].value += this.convertToSeconds(cur.time)
|
|
|
+ }else if(cur.role=='老师'){
|
|
|
+ pre[0].value += this.convertToSeconds(cur.time)
|
|
|
+ }
|
|
|
+ return pre;
|
|
|
+ },[
|
|
|
+ {value:0,name:"老师"},
|
|
|
+ {value:0,name:'学生'}
|
|
|
+ ])
|
|
|
+ const _option = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ top: "5%",
|
|
|
+ left: "center",
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "课堂时间分配",
|
|
|
+ type: "pie",
|
|
|
+ radius: ["40%", "70%"],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ position: "center",
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ fontSize: 40,
|
|
|
+ fontWeight: "bold",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ data: _data
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ _copyData.jsonData.eChartData = _option;
|
|
|
+ _copyData.json_data = JSON.stringify(_copyData.jsonData);
|
|
|
+ if (this.historyResult.length == 0) {
|
|
|
+ this.historyResult.push(_copyData.jsonData);
|
|
|
+ } else {
|
|
|
+ this.historyResult.splice(this.showIndex + 1, 0, _copyData.jsonData);
|
|
|
+ }
|
|
|
+ this.changeShowIndex(1);
|
|
|
+ this.loading = false;
|
|
|
+ },
|
|
|
+ // 师生互动分析
|
|
|
+ getInteractionAnalysisData(_dataList) {
|
|
|
+ this.loading = true;
|
|
|
+ this.openItem = false;
|
|
|
+ let _pushData = [0,0]
|
|
|
+ let _result = []
|
|
|
+ _dataList.forEach(i=>{
|
|
|
+ if(i.role=='老师'){
|
|
|
+ _pushData[0] += this.convertToSeconds(i.time)
|
|
|
+ }else if(i.role=='学生'){
|
|
|
+ _pushData[1] += this.convertToSeconds(i.time)
|
|
|
+ }
|
|
|
+ return _result.push(JSON.parse(JSON.stringify(_pushData)))
|
|
|
+ })
|
|
|
+ const _option = {
|
|
|
+ xAxis: {
|
|
|
+ name: "老师", // X轴标题
|
|
|
+ nameLocation: "end", // 标题位置
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ name: "学生", // Y轴标题
|
|
|
+ nameLocation: "end", // 标题位置
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: _result,
|
|
|
+ type: "line",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+
|
|
|
+ let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ _copyData.jsonData.eChartData = _option;
|
|
|
+ _copyData.json_data = JSON.stringify(_copyData.jsonData);
|
|
|
+ if (this.historyResult.length == 0) {
|
|
|
+ this.historyResult.push(_copyData.jsonData);
|
|
|
+ } else {
|
|
|
+ this.historyResult.splice(this.showIndex + 1, 0, _copyData.jsonData);
|
|
|
+ }
|
|
|
+ this.changeShowIndex(1);
|
|
|
+ this.loading = false;
|
|
|
+
|
|
|
+ },
|
|
|
+ // 教学模式分析
|
|
|
+ getTeachingModeData(_dataList) {
|
|
|
+ this.openItem = false;
|
|
|
+ this.loading = true
|
|
|
+ let _continuousTime = 0;
|
|
|
+ let _totalTime = 0;
|
|
|
+ let _continuousRole = "老师"
|
|
|
+ let _teacherTime = 0;
|
|
|
+ _dataList.forEach((item,index)=>{
|
|
|
+ if(index==0){//第一个
|
|
|
+ _continuousRole = item.role
|
|
|
+ }else if(_dataList.length-1==index){//最后一个
|
|
|
+ if(_continuousRole==item.role){//连续对话了
|
|
|
+ _continuousTime += this.convertToSeconds(_dataList[index-1].time)
|
|
|
+ _continuousTime += this.convertToSeconds(item.time)
|
|
|
+ }else{//没连续对话
|
|
|
+ if(index>=2){
|
|
|
+ if(_dataList[index-2].role==_dataList[index-1].role){
|
|
|
+ _continuousTime += this.convertToSeconds(_dataList[index-1].time)
|
|
|
+ }else{
|
|
|
+ _continuousRole = item.role;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ _continuousRole = item.role;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(_continuousRole==item.role){//连续对话了
|
|
|
+ _continuousTime += this.convertToSeconds(_dataList[index-1].time)
|
|
|
+ }else{//没连续对话
|
|
|
+ if(index>=2){
|
|
|
+ if(_dataList[index-2].role==_dataList[index-1].role){
|
|
|
+ _continuousTime += this.convertToSeconds(_dataList[index-1].time)
|
|
|
+ }else{
|
|
|
+ _continuousRole = item.role;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ _continuousRole = item.role;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(item.role == "老师"){
|
|
|
+ _teacherTime+=this.convertToSeconds(item.time);
|
|
|
+ }
|
|
|
+
|
|
|
+ _totalTime += this.convertToSeconds(item.time);
|
|
|
+ })
|
|
|
+
|
|
|
+ let _RT = (_teacherTime/_totalTime).toFixed(2)
|
|
|
+ let _CH = (_continuousTime/_totalTime).toFixed(2)
|
|
|
+ let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ _copyData.jsonData.RT = _RT;
|
|
|
+ _copyData.jsonData.CH = _CH;
|
|
|
+ _copyData.json_data = JSON.stringify(_copyData.jsonData);
|
|
|
+ if (this.historyResult.length == 0) {
|
|
|
+ this.historyResult.push(_copyData.jsonData);
|
|
|
+ } else {
|
|
|
+ this.historyResult.splice(this.showIndex + 1, 0, _copyData.jsonData);
|
|
|
+ }
|
|
|
+ this.changeShowIndex(1);
|
|
|
+ this.loading = false;
|
|
|
+ },
|
|
|
+ delBtn() {
|
|
|
+ this.$confirm("确定删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "error",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$emit("delItem", this.data.id);
|
|
|
+ })
|
|
|
+ .catch((_) => {
|
|
|
+ console.log("取消");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeShowIndex(value) {
|
|
|
+ if (this.historyResult.length == 0) return;
|
|
|
+ if (value == -1) {
|
|
|
+ if (this.showIndex > 0) this.showIndex--;
|
|
|
+ } else if (value == 1) {
|
|
|
+ if (this.showIndex < this.historyResult.length - 1) this.showIndex++;
|
|
|
+ }
|
|
|
+ let _copyData = JSON.parse(JSON.stringify(this.data));
|
|
|
+ let _oldCopyDate = JSON.parse(JSON.stringify(this.data));
|
|
|
+ _copyData.jsonData = this.historyResult[this.showIndex];
|
|
|
+ _copyData.json_data = JSON.stringify(_copyData.jsonData);
|
|
|
+ _oldCopyDate.json_data = JSON.stringify(_oldCopyDate.jsonData);
|
|
|
+ // 一样就不用更新了
|
|
|
+ if (JSON.stringify(_copyData) == JSON.stringify(_oldCopyDate)) return;
|
|
|
+ // this.data = _copyData;
|
|
|
+ this.$emit("editItem", this.data.id, _copyData);
|
|
|
+ this.$emit("saveItem", this.data.id, _copyData);
|
|
|
+ },
|
|
|
+ convertToSeconds(time) {
|
|
|
+ let parts = time.split(':');
|
|
|
+ let seconds = (+parts[0]) * 3600 + (+parts[1]) * 60 + (+parts[2]);
|
|
|
+ return seconds;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ if (this.data.jsonData.content) {
|
|
|
+ this.historyResult.push(this.data.jsonData);
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.analysisItem {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+
|
|
|
+ margin: 11.7px 0px;
|
|
|
+
|
|
|
+ padding-right: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+.text1 {
|
|
|
+ color: rgba(54, 129, 252, 1);
|
|
|
+}
|
|
|
+.text2 {
|
|
|
+ color: rgba(23, 196, 105, 1);
|
|
|
+}
|
|
|
+.ai-header {
|
|
|
+ width: 100%;
|
|
|
+ height: 50px;
|
|
|
+ display: flex;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 5px;
|
|
|
+}
|
|
|
+.ai-h-left {
|
|
|
+ flex: 1;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-l-icon {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ background: url("../../../../assets/icon/classroomObservation/right.svg")
|
|
|
+ no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ margin-right: 10px;
|
|
|
+ transition: 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-l-iconActive {
|
|
|
+ transform: rotate(90deg);
|
|
|
+}
|
|
|
+.ai-h-l-text {
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-right {
|
|
|
+ width: auto;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-around;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-right > span {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ margin: 0 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-right > span > img {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-r-icon1 {
|
|
|
+ background: url("../../../../assets/icon/classroomObservation/back.svg");
|
|
|
+ /* 镜像 */
|
|
|
+ transform: scaleX(-1);
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-r-icon2 {
|
|
|
+ background: url("../../../../assets/icon/classroomObservation/back.svg");
|
|
|
+}
|
|
|
+
|
|
|
+.ai_h_r_iconOpacity {
|
|
|
+ opacity: 0.5;
|
|
|
+ cursor: not-allowed !important;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-r-icon3 {
|
|
|
+ background: url("../../../../assets/icon/classroomObservation/edit.svg");
|
|
|
+ /* display: none; */
|
|
|
+}
|
|
|
+
|
|
|
+.ai-header:hover .ai-h-r-icon4 {
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-h-r-icon4 {
|
|
|
+ background: url("../../../../assets/icon/classroomObservation/del.svg");
|
|
|
+ /* position: absolute; */
|
|
|
+ /* right: -40px; */
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+
|
|
|
+.analysisItem:hover .ai-h-r-icon4 {
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
+.ai-main {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 0 0 5px 5px;
|
|
|
+ overflow: auto;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 10px 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.a-m-brief {
|
|
|
+ font-size: 16px;
|
|
|
+ /* 斜体 */
|
|
|
+ font-style: italic;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ color: #6b798e;
|
|
|
+}
|
|
|
+
|
|
|
+td,
|
|
|
+th {
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.generate {
|
|
|
+ color: #00000099;
|
|
|
+ font-size: 16px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.generate > img {
|
|
|
+ margin-right: 5px;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.generateSuccess {
|
|
|
+ color: #17c469;
|
|
|
+ font-size: 16px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.generateSuccess > img {
|
|
|
+ margin-right: 5px;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.generateError {
|
|
|
+ color: #e60012;
|
|
|
+ font-size: 16px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.rtCh{
|
|
|
+ width: 100%;
|
|
|
+ height: 300px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.rtCh>img{
|
|
|
+ max-height: 250px;
|
|
|
+}
|
|
|
+
|
|
|
+.rtCh>div{
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.rtCh>div>span{
|
|
|
+ margin: 0 10px;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #1A7AD3;
|
|
|
+ /* 斜体字 */
|
|
|
+ font-style: italic;
|
|
|
+}
|
|
|
+</style>
|