Browse Source

教师发展

SanHQin 1 month ago
parent
commit
a4688b1f88

+ 9 - 3
src/components/pages/test/add/edit/check/index.vue

@@ -15,6 +15,7 @@
             <timeV :tindex="index" :cJson.sync="item.json" v-if="item.type == 8"></timeV>
             <courseV2 :tindex="index" :cJson.sync="item.json" v-if="item.type == 11"></courseV2>
 						<sweep :tindex="index" :cJson.sync="item.json" v-if="item.type == 12"/>
+            <number :tindex="index" :cJson.sync="item.json" v-if="item.type == 13"/>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -28,6 +29,7 @@
               <timeV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 8"></timeV>
               <courseV2 :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 11"></courseV2>
 							<sweep :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 12"></sweep>
+              <number :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 13"></number>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -45,6 +47,7 @@
             <timeV :tindex="index" :cJson.sync="item.json" v-if="item.type == 8"></timeV>
             <courseV2 :tindex="index" :cJson.sync="item.json" v-if="item.type == 11"></courseV2>
 						<sweep :tindex="index" :cJson.sync="item.json" v-if="item.type == 12"></sweep>
+            <number :tindex="index" :cJson.sync="item.json" v-if="item.type == 13"></number>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -58,6 +61,7 @@
               <timeV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 8"></timeV>
               <courseV2 :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 11"></courseV2>
 							<sweep :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 12"></sweep>
+              <number :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 13"></number>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -83,6 +87,7 @@ import evaV from './eva.vue';
 import timeV from './time.vue';
 import courseV2 from './course2.vue';
 import sweep from './sweep.vue'
+import number from './number.vue';
 export default {
   props: {
     cJson: {
@@ -100,7 +105,8 @@ export default {
     evaV,
     timeV,
     courseV2,
-		sweep
+		sweep,
+    number
   },
   data() {
     return {
@@ -162,7 +168,7 @@ export default {
       },
       deep: true
     },
-    
+
   },
   methods: {
     setPage(index){
@@ -337,4 +343,4 @@ export default {
 
 .p_page {
   margin: 0 10px;
-}</style>
+}</style>

+ 258 - 0
src/components/pages/test/add/edit/check/number.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="c_box">
+      <!-- <div class="mask"></div> -->
+      <div v-if="!checkJson">暂未设置题目</div>
+      <div v-else class="choice_box">
+          <!-- <div class="title"><div>{{ `(${option[checkJson.type].name})` }}</div><div v-html="checkJson.title"></div></div> -->
+          <div class="c_title">
+              <div class="title">
+                  <div  style="display: flex;align-items: center;">
+                      <!-- + `(${option[checkJson.type].name})` -->
+                  <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1}}</span>
+                  <span>{{ checkJson.title }}</span>
+                  <!-- <span style="min-width: fit-content;color: #efa030;">{{ checkJson.score ? '(分值:'+checkJson.score+'分)' : '' }}</span> -->
+              </div>
+              <!-- <span style="color: #efa030;display: flex;margin-top: 5px;line-height: 18px;">
+                  <span style="min-width: fit-content;" v-if="!checkJson.answer && see">暂无参考答案</span>
+                  <span style="min-width: fit-content;display: flex;" v-else-if="see">
+                      <span style="min-width: fit-content;">参考答案:</span>
+                      <span>{{ checkJson.answer }}</span>
+                  </span>
+              </span> -->
+                  <!-- </div><div v-html="checkJson.title"></div> -->
+              </div>
+              <!-- <div class="p_box" v-if="isTeacher == 1 && checkJson.score">
+                  <el-input v-model="checkJson.score2" class="c_input" @change="numberPan" placeholder="请输入得分"></el-input><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+              </div>
+              <div class="p_box" v-if="isTeacher == 2 && checkJson.score2">
+                  <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+              </div> -->
+          </div>
+          <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+              style="color: #00000066;margin-top: 5px;"></div>
+          <div class="choices">
+            <el-input-number :controls="false" v-model="checkJson.answer2" :precision="numberTypePrecision" :placeholder="numberTypePlaceholder[checkJson.type]"></el-input-number>
+            <span v-if="checkJson.type=='4'">%</span>
+              <!-- <textarea  :readonly="checktype == 2" rows="2" v-autoHeight="68" class="binfo_input binfo_textarea" cols v-model="checkJson.answer"
+                  placeholder=""></textarea> -->
+          </div>
+      </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+      tindex:{
+          type: Number
+      },
+      cJson: {
+          type: Object,
+      },
+      checktype: {
+          type: Number,
+          default: 1
+      },
+      see:{
+          type:Boolean,
+          default:false
+      },
+      isTeacher: {
+          type: Number,
+          default: 2
+      }
+  },
+  data() {
+      return {
+          option: {
+              1: { name: '字数' },
+          },
+          userid:this.$route.query.userid,
+          checkJson: undefined,
+          numberTypePlaceholder:{
+            "1":"请输入整数",
+            "2":"请输入数字并保留一位小数",
+            "3":"请输入数字并保留两位小数",
+            "4":"请输入百分比"
+          },
+      }
+  },
+  watch: {
+      checkJson: {
+          handler(newValue) {
+              this.$emit('update:cJson', newValue)
+          },
+          deep: true
+      },
+      cJson: {
+          handler(newValue) {
+              if(newValue.answer2 !== this.checkJson.answer2){
+                  this.checkJson = this.depthCopy(newValue)
+                  this.$forceUpdate()
+              }
+          },
+          deep: true
+      },
+  },
+  computed:{
+    numberTypePrecision(){
+      let _result = 0;
+      if(this.checkJson.type=='1'){
+        _result = 0
+      }else if(this.checkJson.type=='2'){
+        _result = 1
+      }else if(this.checkJson.type=='3'){
+        _result = 2
+      }else if(this.checkJson.type=='4'){
+        _result = 0
+      }
+
+      return _result
+    }
+  },
+  methods: {
+      depthCopy(s) {
+          return JSON.parse(JSON.stringify(s));
+      },
+  },
+  mounted() {
+      this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+      if(this.checkJson.answer2){
+          setTimeout(() => {
+              this.checkJson.answer2 += "*0*%*";
+              setTimeout(() => {
+                  this.checkJson.answer2 = this.checkJson.answer2.replaceAll("*0*%*", "");
+              }, 0);
+          }, 100);
+      }
+  }
+}
+</script>
+
+<style scoped>
+.c_box {
+  width: 100%;
+  position: relative;
+  padding-left: 45px;
+}
+
+.mask {
+  position: absolute;
+  height: 100%;
+  width: 100%;
+  z-index: 2;
+}
+
+.choice_box {
+  white-space: pre-line;
+}
+
+.choice_box> .c_title .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box> .c_title {
+  display: flex;
+  justify-content: space-between;
+}
+
+.choice_box> .c_title .p_box{
+  margin-left: 5px;
+  min-width: fit-content;
+  display: flex;
+  align-items: center;
+}
+
+.choice_box>.choices {
+  margin-top: 10px;
+}
+
+.choices>span{
+  font-size: 20px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: 'Microsoft YaHei';
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #CAD1DC;
+  font-size: 16px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+  border: 1.5px solid #3681FC !important;
+}
+
+.c_input {
+  width: 90px;
+}
+
+.c_input >>> .el-input__inner{
+  padding: 0 5px;
+  text-align: right;
+}
+
+.g_t_index{
+color: #3681FC;
+font-size: 28px;
+font-weight: bold;
+position: relative;
+margin-right: 30px;
+margin-left: -40px;
+}
+
+.g_t_index+span{
+font-weight: bold;
+font-size: 18px;
+}
+
+.g_t_index::after{
+content: "";
+width: 18px;
+height: 2px;
+position: absolute;
+right: -18px;
+top: 50%;
+transform: translateY(-50%);
+background: #3681FC;
+}
+
+.g_t_index::before{
+content: "";
+width: 6px;
+height: 6px;
+border-right: 2px solid #3681FC;
+border-top: 2px solid #3681FC;
+position: absolute;
+right: -15px;
+top: 50%;
+transform: rotate(45deg) translateY(-5px);
+}
+
+.choices>textarea{
+border-color: #E7E7E7;
+border-radius: 8px;
+}
+</style>

+ 24 - 27
src/components/pages/testPerson/test/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="i_body">
-    <div class="i_b_left">
-      <div class="i_b_l_top">
+    <div class="i_b_left" :style="`width:${isFold?'70px':'15%'};min-width:${isFold?'70px':'200px'}`">
+      <div class="i_b_l_top" :style="`padding:${isFold?' 20px 5px':'20px'}`">
         <div @click="checkType(5)" :class="{ i_b_l_t_active: type == 5 }">
           <svg
             width="20"
@@ -23,7 +23,7 @@
             </g>
           </svg>
 
-          <span>教师画像</span>
+          <span v-show="!isFold">教师画像</span>
         </div>
         <div
           @click="checkType(6)"
@@ -50,7 +50,7 @@
             />
           </svg>
 
-          <span>年度考核</span>
+          <span v-show="!isFold">年度考核</span>
         </div>
         <div @click="checkType(1)" :class="{ i_b_l_t_active: type == 1 }">
           <svg
@@ -73,7 +73,7 @@
               </g>
             </g>
           </svg>
-          <span>资料提交</span>
+          <span v-show="!isFold">资料提交</span>
         </div>
         <div
           @click="checkType(2)"
@@ -98,7 +98,7 @@
             </g>
           </svg>
 
-          <span>培训活动</span>
+          <span v-show="!isFold">培训活动</span>
         </div>
         <div @click="checkType(3)" :class="{ i_b_l_t_active: type == 3 }">
           <svg
@@ -118,7 +118,7 @@
             </g>
           </svg>
 
-          <span>教学活动</span>
+          <span v-show="!isFold">教学活动</span>
         </div>
         <div @click="checkType(4)" :class="{ i_b_l_t_active: type == 4 }">
           <svg
@@ -142,7 +142,7 @@
             </g>
           </svg>
 
-          <span>教研活动</span>
+          <span v-show="!isFold">教研活动</span>
         </div>
 
         <!-- <span>更多</span>
@@ -167,16 +167,7 @@
 
       <div class="i_b_l_bottom">
         <span>
-          <svg
-            width="16"
-            height="16"
-            viewBox="0 0 16 16"
-            xmlns="http://www.w3.org/2000/svg"
-          >
-            <path d="M14 4.5H2V3.5H14V4.5Z" fill-opacity="0.9" />
-            <path d="M14 8.5H2V7.5H14V8.5Z" fill-opacity="0.9" />
-            <path d="M2 12.5H14V11.5H2V12.5Z" fill-opacity="0.9" />
-          </svg>
+          <svg @click="isFold = !isFold" :style="`transform: rotate(${isFold?'0':'180'}deg);`"  t="1739254286361" class="icon" viewBox="0 0 1317 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6102" width="200" height="200"><path fill="#868686" d="M1310.815586 480.686203L1055.295 257.418828a14.717485 14.717485 0 0 0-21.293382 4.070794 15.343761 15.343761 0 0 0-3.444518 9.707277v445.282197a14.717485 14.717485 0 0 0 14.717485 14.717485 13.151795 13.151795 0 0 0 9.394139-3.757656l255.520586-223.267374a14.717485 14.717485 0 0 0 0-20.667107zM1242.864646 1023.35431H73.607456A64.506422 64.506422 0 0 1 0.646308 950.393162 64.506422 64.506422 0 0 1 73.607456 877.432014h1169.25719A64.506422 64.506422 0 0 1 1315.825793 950.393162a64.506422 64.506422 0 0 1-72.961147 72.961148zM1242.864646 146.567986H73.607456A64.506422 64.506422 0 0 1 0.646308 73.606838 64.506422 64.506422 0 0 1 73.607456 0.64569h1169.25719A64.506422 64.506422 0 0 1 1315.825793 73.606838a64.506422 64.506422 0 0 1-72.961147 72.961148zM804.471484 584.961148H73.607456A64.506422 64.506422 0 0 1 0.646308 512 64.506422 64.506422 0 0 1 73.607456 439.038852h730.864028A64.506422 64.506422 0 0 1 877.432632 512a64.506422 64.506422 0 0 1-72.961148 72.961148z" p-id="6103"></path></svg>
         </span>
       </div>
     </div>
@@ -196,7 +187,7 @@
         <span @click="checkType(4)" :class="{active:type == 4}">教研活动</span>
       </div>
       <div>
-       
+
       </div>
     </div> -->
     <!-- <el-button type="primary" class="bgColor" @click="returnA()">表单中心</el-button> -->
@@ -214,6 +205,7 @@ import Course from "../../course/index.vue";
 import trActivity from "./trActivity.vue";
 import examine from "../examine/index";
 import portrait from "../portrait/index";
+import { transform } from "lodash";
 export default {
   props: {
     userid: {
@@ -236,7 +228,8 @@ export default {
       type: 5,
       org: this.$route.query.org,
       role: this.$route.query.role,
-      ExamineBase: []
+      ExamineBase: [],
+      isFold:false,
     };
   },
   computed: {
@@ -631,6 +624,8 @@ export default {
 .i_b_l_top > div > svg {
   width: 20px;
   height: 20px;
+  min-width: 20px;
+  min-height: 20px;
   fill: #00000099;
   margin-right: 15px;
   margin-left: 10px;
@@ -646,22 +641,24 @@ export default {
   width: 100%;
   height: 80px;
   box-sizing: border-box;
-  padding: 0 30px;
+  padding: 0 25px;
   display: flex;
   align-items: center;
   border-top: solid 1px #e7e7e7;
 }
 
 .i_b_l_bottom > span {
-  width: 25px;
-  height: 25px;
+  width: 20px;
+  height: 20px;
   cursor: pointer;
+
 }
 
 .i_b_l_bottom > span > svg {
-  fill: #000000;
-  width: 100%;
-  height: 100%;
+  width: 20px;
+  height: 20px;
+  min-width: 20px;
+  min-height: 20px;
 }
 
 .i_b_right {
@@ -671,7 +668,7 @@ export default {
   box-sizing: border-box;
   padding: 0 10px;
 }
-/* 
+/*
 .i_body_title {
   font-size: 20px;
   height: 30px;