SanHQin vor 1 Jahr
Ursprung
Commit
de95c0dce2

+ 18 - 0
src/components/pages/classroomObservation/components/mdView.vue

@@ -0,0 +1,18 @@
+<template>
+	<div class="mdView">
+
+	</div>
+</template>
+
+<script>
+	export default {
+		
+	}
+</script>
+
+<style scoped>
+.mdView{
+	width: 100%;
+	height: 100%;
+}
+</style>

+ 26 - 9
src/components/pages/classroomObservation/components/messageArea.vue

@@ -134,7 +134,6 @@
 <script>
 import baseMessage from "./baseMessage.vue"; //基本信息
 import analysisItem from "./analysisItem";
-
 import currencyAnalysis from "./currencyAnalysis.vue"; //通用课堂分析
 import scienceAnalysis from "./scienceAnalysis.vue"; //科学课堂分析
 import extendAnalysis from "./extendAnalysis.vue"; //扩展分析
@@ -146,6 +145,12 @@ export default {
 		extendAnalysis,
 		analysisItem,
 	},
+	props:{
+		tid:{
+			type:String,
+			default:''
+		}
+	},
 	data() {
 		return {
 			showBrief: true, //是否显示模块简介
@@ -859,12 +864,16 @@ BSCS 5E教学模型是一种广泛应用于科学教育的教学策略,它鼓
 		},
 		getCurrencyAndBaseMessageData(){
 			let pram = {
-				tid:"01",
+				// tid:this.tid,
+				tid:'01',
 				type:'0'
 			}
 			this.currencyLoading = true;
 			this.ajax.post("https://gpt4.cocorobo.cn/get_classroom_observation_new",pram).then(res=>{
-				let _data = JSON.parse(res.data.FunctionResponse.result)
+				let _data = res.data.FunctionResponse.result.length?JSON.parse(res.data.FunctionResponse.result):[]
+				if(_data.length==0){
+					return this.currencyLoading = false;
+				}
 				let _bmData = _data[0]
 				// 基础信息
 				_bmData.jsonData = JSON.parse(_bmData.jsonData)
@@ -877,6 +886,7 @@ BSCS 5E教学模型是一种广泛应用于科学教育的教学策略,它鼓
 						_currency.jsonData = JSON.parse(_currency.jsonData)
 						currency.push(_currency)
 				}
+
 				this.dataList[0].push(...currency)
 				this.bmData = _bmData;
 				this.currencyLoading = false;
@@ -884,13 +894,16 @@ BSCS 5E教学模型是一种广泛应用于科学教育的教学策略,它鼓
 		},
 		getScienceData(){
 			let pram = {
-				tid:"01",
+				// tid:this.tid,
+				tid:'01',
 				type:'1'
 			}
 			this.scienceLoading = true;
 			this.ajax.post("https://gpt4.cocorobo.cn/get_classroom_observation_new",pram).then(res=>{
-				console.log('👇科学分析👇')
-				let _data = JSON.parse(res.data.FunctionResponse.result)
+				let _data = res.data.FunctionResponse.result.length?JSON.parse(res.data.FunctionResponse.result):[]
+				if(_data.length==0){
+					return this.scienceLoading = false;
+				}
 				let science = []
 				for(let i = 0;i<_data.length;i++){
 						let _science = _data[i];
@@ -903,13 +916,16 @@ BSCS 5E教学模型是一种广泛应用于科学教育的教学策略,它鼓
 		},
 		getExtendData(){
 			let pram = {
-				tid:"01",
+				// tid:this.tid,
+				tid:'01',
 				type:'2'
 			}
 			this.extendLoading = true;
 			this.ajax.post("https://gpt4.cocorobo.cn/get_classroom_observation_new",pram).then(res=>{
-				console.log('👇扩展分析👇')
-				let _data = JSON.parse(res.data.FunctionResponse.result)
+				let _data = res.data.FunctionResponse.result.length?JSON.parse(res.data.FunctionResponse.result):[]
+				if(_data.length==0){
+					return this.extendLoading = false;
+				}
 				let extent = []
 				for(let i = 0;i<_data.length;i++){
 						let _extent = _data[i];
@@ -959,6 +975,7 @@ BSCS 5E教学模型是一种广泛应用于科学教育的教学策略,它鼓
 		}
 	},
 	mounted(){
+		console.log(this.tid)
 		this.getCurrencyAndBaseMessageData()
 		this.getScienceData()
 		this.getExtendData()

+ 18 - 0
src/components/pages/classroomObservation/components/pieChart.vue

@@ -0,0 +1,18 @@
+<template>
+	<div class='chart'>
+		<h1>饼状图</h1>
+	</div>
+</template>
+
+<script>
+	export default {
+		
+	}
+</script>
+
+<style scoped>
+.chart{
+	width: 100%;
+	height: 100%;
+}
+</style>

+ 29 - 3
src/components/pages/classroomObservation/index.vue

@@ -14,7 +14,16 @@
 			<div class="co-h2-left">
 				<span class="co-h2-l-icon"></span>
 				<span class="co-h2-l-hr"></span>
-				<span class="co-h2-l-text">{{ title }}</span>
+				<span class="co-h2-l-text">
+					<el-select class="co_h2_l_t_select" v-model="tid" placeholder="请选择" @change="changeTid">
+  				  <el-option
+  				    v-for="item in optionData"
+  				    :key="item.value"
+  				    :label="item.label"
+  				    :value="item.value">
+  				  </el-option>
+  				</el-select>
+				</span>
 			</div>
 			<div class="co-h2-right">
 				<div
@@ -45,10 +54,10 @@
 		</div>
 		<div class="co-main">
 			<div class="co-m-left">
-				<chatArea />
+				<chatArea :tid="tid"/>
 			</div>
 			<div class="co-m-right">
-				<messageArea ref="messageAreaRef"/>
+				<messageArea :tid="tid" ref="messageAreaRef"/>
 			</div>
 		</div>
 	</div>
@@ -68,9 +77,19 @@ export default {
 		return {
 			title: "12月19日会议录音",
 			loading: false,
+			tid:'03',
+			optionData:[
+				{label:"03课堂",value:'03'},
+				{label:"04课堂",value:'04'},
+			],
 		};
 	},
 	methods: {
+		//切换了课堂
+		changeTid(){
+			console.log(this.tid)
+			this.$message.info(`切换了课堂:${this.tid}`)
+		},
 		// 跳转
 		goTo(path) {
 			this.$message.info(`去到:${path}`);
@@ -295,4 +314,11 @@ export default {
 
 	overflow: auto;
 }
+
+.co_h2_l_t_select>>>.el-input__inner{
+	border: none;
+}
+.co_h2_l_t_select>>>.el-input__suffix{
+	display: none;
+}
 </style>