Browse Source

教师中心

SanHQin 5 months ago
parent
commit
f005c7dc3d

+ 27 - 11
src/components/pages/testPerson/info/index.vue

@@ -34,7 +34,7 @@
       </div>
     </div>
     <div class="i_b_right">
-      <div>
+      <!-- <div>
         <span>年级</span>
         <div>{{ info.grade ? info.grade : "暂无" }}</div>
       </div>
@@ -43,14 +43,14 @@
 
       <div>
         <span>学科</span>
-        <div>{{ info.subject ? info.subject : "暂无" }}</div>
+        <div>{{info.subject ? info.subject : '暂无'}}</div>
       </div>
 
       <span></span>
 
       <div>
         <span>职务</span>
-        <div>{{ info.job ? info.job : "暂无" }}</div>
+        <div>{{info.job ? info.job : '暂无'}}</div>
       </div>
 
       <span></span>
@@ -65,7 +65,16 @@
       <div>
         <span>学段</span>
         <div>{{ info.stage ? info.stage : "暂无" }}</div>
-      </div>
+      </div> -->
+			<div v-for="(item,index) in teaType" :key="item.id">
+        <div>
+          <span>{{ item.name }}</span>
+          <div>
+           {{ getTypeC(item.child, item.value) }}
+          </div>
+        </div>
+				<span v-if="index!=teaType.length-1"></span>
+			</div>
     </div>
     <!-- <div class="i_top">
       <div class="img">
@@ -189,6 +198,8 @@ export default {
       this.ajax
         .get(this.$store.state.api + "selectPerInfoAllTea", params)
         .then(res => {
+					
+					console.log(res.data)
           this.teaType = res.data[0];
           let typeInfo = res.data[1];
 
@@ -312,7 +323,12 @@ export default {
   align-items: center;
 }
 
-.i_b_right > div {
+.i_b_right>div{
+	display: flex;
+}
+
+
+.i_b_right>div >div {
   display: flex;
   flex-direction: column;
   align-items: center;
@@ -320,22 +336,22 @@ export default {
   height: 60px;
   justify-content: space-between;
   padding: 0px 20px;
-	text-wrap: nowrap;
+  text-wrap: nowrap;
 }
 
-.i_b_right > div > div {
+.i_b_right>div > div>div {
   font-size: 18px;
   font-weight: bold;
-	text-wrap: nowrap;
+  text-wrap: nowrap;
 }
 
-.i_b_right > div > span {
+.i_b_right>div  >div > span {
   font-size: 18px;
   color: #00000099;
-	text-wrap: nowrap;
+  text-wrap: nowrap;
 }
 
-.i_b_right > span {
+.i_b_right>div > span {
   width: 1px;
   height: 50px;
   margin: 0 20px;

+ 16 - 5
src/components/pages/testPerson/portrait/index.vue

@@ -432,6 +432,7 @@ export default {
               }
               _data[index].json[iindex] = {};
               _data[index].json[iindex].name = i.name;
+							console.log(i)
               let _evaScore = parseInt(
                 (i.evaScore * (100 / i.score)).toFixed(0)
               );
@@ -503,12 +504,22 @@ export default {
             }
           ];
 					
-					let person = data.find(i=>i.userid == this.userid);
-					console.log('person',person);
           zongArray.forEach(i => {
-						_eChartsData[0].value.push(zongJson[i].selfEvaScore);
-						_eChartsData[2].value.push(zongJson[i].selfCogScore);
-						_eChartsData[1].value.push(zongJson[i].cogScore)
+						if(zongJson[i].selfEvaScore || zongJson[i].selfEvaScore === 0){
+							_eChartsData[0].value.push(zongJson[i].selfEvaScore);
+						}else{
+							_eChartsData[0].value.push(0);
+						}
+						if(zongJson[i].selfCogScore || zongJson[i].selfCogScore === 0){
+							_eChartsData[2].value.push(zongJson[i].selfCogScore);
+						}else{
+							_eChartsData[2].value.push(0);
+						}
+						if(zongJson[i].cogScore || zongJson[i].cogScore === 0){
+							_eChartsData[1].value.push(zongJson[i].cogScore)
+						}else{
+							_eChartsData[1].value.push(0);
+						}
             // _eChartsData[0].value.push(zongJson[i].selfScore);
             // _eChartsData[1].value.push(zongJson[i].evaScore);
             // _eChartsData[2].value.push(zongJson[i].cogScore);

+ 2 - 1
src/components/pages/testPerson/test/index.vue

@@ -572,7 +572,8 @@ export default {
 }
 
 .i_b_left {
-  width: 400px;
+  width: 15%;
+	min-width: 200px;
   height: 100%;
   display: flex;
   flex-direction: column;

+ 3 - 3
src/components/pages/testPerson/test/test.vue

@@ -283,9 +283,9 @@ export default {
                 .get(this.$store.state.api + "selectTestExamineBase", params)
                 .then(res => {
                     this.ExamineBase = res.data[0]
-                    if ( this.ExamineBase.length > 0) {
-                        this.type=1
-                    }
+                    // if ( this.ExamineBase.length > 0) {
+                    //     this.type=1
+                    // }
                     // console.log("selectTestExamineBase", res.data);
                 })
                 .catch(error => {