SanHQin 5 mesi fa
parent
commit
995055f1da

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.47e0c08c1acd45aabacca9d429b38bec.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.07725c7cec77f8387748.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.b489cdb3a3a260dcc15ef88a90cc3bf9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.a97fc36efb5ffa0a1add.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.b489cdb3a3a260dcc15ef88a90cc3bf9.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.b489cdb3a3a260dcc15ef88a90cc3bf9.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a97fc36efb5ffa0a1add.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a97fc36efb5ffa0a1add.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 11 - 2
src/assets/css/button.css

@@ -365,7 +365,8 @@
 .pub_test_btn_eva::before,
 .pub_test_btn_time::before,
 .pub_test_btn_file::before,
-.pub_test_btn_sweep::before {
+.pub_test_btn_sweep::before,
+.pub_test_btn_number::before {
   content: "";
   width: 18px;
   height: 18px;
@@ -409,6 +410,10 @@
 	background-image: url(../icon/test/type_sweep_icon.png);
 }
 
+.pub_test_btn_number::before{
+	background-image: url(../icon/test/type_number_icon.png);
+}
+
 .test_icon{
   display: inline-block;
   width: 18px;
@@ -446,6 +451,10 @@
   background-image: url('../icon/test/type_sweep_icon.png');
 }
 
+.test_icon_number{
+  background-image: url('../icon/test/type_number_icon.png');
+}
+
 .dataBoard_check_box {
   display: flex;
   align-items: center;
@@ -568,4 +577,4 @@
 }
 .el-table__column-filter-trigger i::before{
   content: '';
-}
+}

BIN
src/assets/icon/test/type_number_icon.png


BIN
src/assets/icon/test/type_number_icon2.png


+ 1 - 0
src/components/pages/test/add/components/addCheckPopover.vue

@@ -27,6 +27,7 @@
                   pub_test_btn_time: item.value == 8,
                   pub_test_btn_choose2: item.value == 9,
 									pub_test_btn_sweep: item.value == 12,
+                  pub_test_btn_number:item.value == 13
                 }"
               >
                 {{ item.label }}

+ 22 - 9
src/components/pages/test/add/components/checkOrder.vue

@@ -123,13 +123,16 @@
 																<div v-if="item3.type == 12">
 																	<sweep :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 12 && checkC === `x${index1}-${index2}-${index3}`"/>
 																</div>
+                                <div v-if="item3.type == 13">
+																	<number :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 13 && checkC === `x${index1}-${index2}-${index3}`"/>
+																</div>
                             </div>
 														<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}-${index3}` && etype==='edit'" @click.stop="">
 															<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
 														</div>
                         </div>
                     </div>
-                    <div v-else-if="item2.ttype == 1 && canEdit.indexOf(item2.type) !== -1 && etype == 'edit'" 
+                    <div v-else-if="item2.ttype == 1 && canEdit.indexOf(item2.type) !== -1 && etype == 'edit'"
                         class="edit_box">
                         <div v-if="item2.type == 1">
                             <choiceX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 1 && checkC === `x${index1}-${index2}`"></choiceX>
@@ -169,6 +172,9 @@
 												<div v-else-if="item2.type == 12">
 													<sweep :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 12 && checkC === `x${index1}-${index2}`"/>
 												</div>
+                        <div v-else-if="item2.type == 13">
+													<number :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 13 && checkC === `x${index1}-${index2}`"/>
+												</div>
                     </div>
 										<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}` && etype==='edit'" @click.stop="">
 											<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
@@ -178,7 +184,7 @@
             <div v-else-if="item1.ttype == 1 && canEdit.indexOf(item1.type) !== -1 && etype == 'edit'" class="edit_box">
                 <div v-if="item1.type == 1">
                     <choiceX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 1 && checkC === `x${index1}`"></choiceX>
-										
+
                     <!-- <choiceDialog v-if="item1.type == 1 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </choiceDialog> -->
                 </div>
@@ -215,6 +221,9 @@
 								<div v-else-if="item1.type == 12">
 									<sweep :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 12 && checkC === `x${index1}`"/>
 								</div>
+                <div v-else-if="item1.type == 13">
+									<number :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 13 && checkC === `x${index1}`"/>
+								</div>
             </div>
 						<div class="addCheckBox" v-if="checkC === `x${index1}` && etype==='edit'" @click.stop="">
 							<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
@@ -259,6 +268,7 @@ import courseDialog2 from './course2/index.vue'
 import courseX2 from './course2/course.vue'
 import addCheckPopover from './addCheckPopover.vue'
 import sweep from './sweep/index'
+import number from './number/index.vue'
 export default {
     mixins: [minxinVue],
     components: {
@@ -277,7 +287,8 @@ export default {
         courseDialog2,
         courseX2,
 				addCheckPopover,
-				sweep
+				sweep,
+        number
     },
     props: {
         checkJson: {
@@ -298,7 +309,7 @@ export default {
         return {
             manualJson: [],
             isdrag: "",
-            canEdit: [1, 3, 5, 6, 7, 8, 11,12],
+            canEdit: [1, 3, 5, 6, 7, 8, 11,12,13],
             ctype: "",
             dragType: "",
             oldIndex: "",
@@ -335,7 +346,9 @@ export default {
                         className += " test_icon_time"
                     }else if (item.type == 12){
 												className += " test_icon_sweep"
-										}
+										}else if(item.type==13){
+                        className += ' test_icon_number'
+                    }
 										let itemType = item.type;
 										if(itemType===1){
 											if(item.json.type===1){
@@ -484,7 +497,7 @@ export default {
                 name = this.manualJson[_check[0]].array[_check[1]].name ? this.manualJson[_check[0]].array[_check[1]].name : ''
             }
             this.groupName = name
-            this.groupDaliog = true 
+            this.groupDaliog = true
             this.groupIndex = index
         },
         updateGroupName(){
@@ -501,7 +514,7 @@ export default {
             }
             this.$forceUpdate();
             this.$emit("changeJson", this.manualJson);
-            this.groupDaliog = false 
+            this.groupDaliog = false
         },
         editCheck(index, item) {
 
@@ -622,7 +635,7 @@ export default {
 
             /* 修改选中的并且切换的题目 */
             this.setJsonCheck(newItems)
-            
+
 
             this.$emit("changeJson", [...newItems]);
             this.typeIndex = "";
@@ -993,6 +1006,6 @@ export default {
 .addCheckBox{
 	position: absolute;
 	bottom: -50px;
-	
+
 }
 </style>

+ 213 - 0
src/components/pages/test/add/components/number/index.vue

@@ -0,0 +1,213 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-show="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <!-- <div class="set_box" v-if="!cJson">填写者回答区</div> -->
+
+    <div class="choice_box">
+      <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
+      <div class="title">
+        <div style="display: flex;">
+          <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+            `(${option[cJson.type].name})`
+          }}</span> -->
+          <span v-if="!updateList.title" @click.stop="updateTitle()">{{
+            cJson.title ? cJson.title : "输入问题"
+          }}</span>
+					<!-- <span v-if="!cJson.title && !updateList.title" class="t_empty" @click.stop="updateTitle()">请填写标题</span> -->
+          <input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="输入问题"
+          />
+
+        </div>
+        <!-- </div><div v-html="cJson.title"></div> -->
+      </div>
+      <div class="detail" v-if="!updateList.detail" @click.stop="updateDetail()">{{ cJson.detail?cJson.detail:"暂无描述" }}</div>
+			  <input
+          v-if="updateList.detail"
+          ref="detailRef"
+          class="editInput"
+          v-model="checkJson.detail"
+          @blur="save"
+          style="margin-top: 10px;color: rgb(136, 139, 146);"
+          @keyup.enter="save"
+          placeholder="请填写描述说明"
+        />
+      <div class="choices">
+        <el-select v-model="checkJson.type" placeholder="请选择数字类型">
+        <el-option
+          v-for="item in numberTypeList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+        <!-- <el-input-number v-model="num" :precision="numberType" ></el-input-number> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+    cJson2: {
+      type: Object
+    },
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "问答题" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+      number:"",
+      updateList: {
+        title: false,
+        detail:false,
+        brief: false,
+        answer: false
+      },
+      numberTypeList:[
+        {value:"1",label:"整数"},
+        {value:"2",label:"保留一位小数"},
+        {value:"3",label:"保留两位小数"},
+        {value:"4",label:"百分比"}
+      ],
+    };
+  },
+  computed:{
+    numberType(){
+      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;
+    }
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        // console.log("测试测试保存",newVal)
+        this.$emit("setJson", newVal, this.index);
+        console.log("gapW", this.cJson);
+      },
+      deep: true
+    },
+    isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    numberPan() {
+      if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+        this.$message.error("请输入大于0的数字");
+        this.checkJson.score = "";
+      }
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["titleRef"].focus();
+      });
+    },
+    updateDetail(){
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["detailRef"].focus();
+      });
+    },
+    updateAnswer() {
+      this.updateList.answer = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["answerRef"].focus();
+      });
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    }
+  },
+  mounted() {
+    this.checkJson = this.depthCopy(this.cJson)
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.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;
+}
+</style>

+ 13 - 1
src/components/pages/test/add/edit/edit/index.vue

@@ -267,7 +267,6 @@
 import checkOrder from "../../components/checkOrder.vue";
 import minxinVue from "../../minxins/minxin";
 import addCheckPopover from "../../../add/components/addCheckPopover.vue";
-import { ref } from "vue-demi";
 export default {
   components: {
     checkOrder,
@@ -486,6 +485,12 @@ export default {
             title: "",
             detail: ""
           };
+        }else if (topicType == 13) {
+          json.json = {
+            title: "",
+            detail: "",
+            type:'1'
+          };
         }
         if (_json.array) {
           if (type == 3 && _check.length == 2) {
@@ -609,6 +614,13 @@ export default {
               title: "",
               detail: ""
             };
+          } else if (topicType == 13) {
+            json1.json = {
+              title: "",
+              detail: "",
+              answer:'',
+              type:"1",//1:整数、2:保留一位小数、3:保留两位小数 4:百分数
+            };
           }
           this.manualJson.push(json1);
           this.$forceUpdate();

+ 6 - 2
src/components/pages/test/add/minxins/minxin.js

@@ -52,7 +52,10 @@ const minxin = {
 				{
 					value:12,
 					label:"扫一扫"
-				}
+				},{
+          value:13,
+          label:"数字"
+        }
       ]))),
       optionsPin:JSON.parse(converter(JSON.stringify([
        {
@@ -76,7 +79,8 @@ const minxin = {
         9: "单选",
         10: "多选",
         11: "课程",
-				12:"扫一扫"
+				12:"扫一扫",
+        13:"数字"
       }))),
       buttonOptions: JSON.parse(converter(JSON.stringify([
         { name: "分组", type: 1 },

+ 10 - 0
src/components/pages/test/check/docxTemplateDialog.vue

@@ -383,6 +383,16 @@ export default {
             value: _item2.file
           });
           _index++;
+        }else if(_item.type == 13){
+          //数字
+          let _item2 = _item.json;
+          _list.push({
+            name:_item2.title,
+            field:`ti_${_index}`,
+            type:"text",
+            value:`${_item2.answer2}${_item2.type=='4'?'%':''}`
+          })
+          _index++;
         }
       }
       return _list;

+ 60 - 0
src/components/pages/test/check/index.vue

@@ -641,6 +641,42 @@
                   {{ courses }}
                 </div> -->
               </div>
+              <div class="content1" v-if="item.type == 13">
+                <div class="left">
+                  <div class="title">
+                    <span>数字</span>
+                    <span>次数</span>
+                    <span>比例</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>
+                      <span>{{ data.name }}</span>
+                    </span>
+                    <span>{{ data.count }}</span>
+                    <span>
+                      <el-progress
+                        style="display: flex; align-items: center"
+                        :stroke-width="12"
+                        color="#3681fc"
+                        :percentage="
+                          data.count
+                            ? parseFloat(
+                                ((data.count / item.count) * 100).toFixed(2)
+                              )
+                            : 0
+                        "
+                      ></el-progress>
+                    </span>
+                  </div>
+                </div>
+                <div class="right">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+              </div>
             </div>
           </div>
           <!-- 按题目手机端 !isDesktop-->
@@ -1052,6 +1088,7 @@
                   {{ courses }}
                 </div> -->
               </div>
+
             </div>
           </div>
           <div
@@ -1302,6 +1339,12 @@
                   >
                     {{ scope.row.array[index].json.answer2 }}
                   </div>
+                  <div
+                    v-if="scope.row.array[index].type == 13"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ scope.row.array[index].json.answer2 }}<span>{{  scope.row.array[index].json.type=='4'?'%':'' }}</span>
+                  </div>
                 </template>
               </el-table-column>
               <el-table-column
@@ -2475,6 +2518,23 @@ export default {
                 );
                 let _answer = uniqueArray;
                 topic.answer2 = _answer;
+              }else if(topic.type == 13){
+                if (el2.array[i].json.answer2!=='') {
+                  let _answer = String(el2.array[i].json.answer2);
+                  let _type = el2.array[i].json.type;
+                  console.log("👉",el2.array[i].json)
+                  if(_type=='4')_answer+='%';
+                  if(!topic.array)topic.array=[];
+                  if(topic.array.findIndex(i=>i.name==_answer)!=-1){
+                    topic.array.find(i=>i.name==_answer).count++;
+                  }else{
+                    topic.array.push({
+                      name:_answer,
+                      count:1
+                    })
+                  }
+                  topic.count++;
+                }
               }
             }
             console.log("topictopictopictopic", topic);

+ 2 - 2
src/components/pages/testStudent/view/check.vue

@@ -121,7 +121,7 @@ export default {
           console.log(this.testType);
           this.look = res.data[0][0].look
 
-          
+
           this.cJson = JSON.parse(res.data[2][0].courseJson)
           this.loading = false
           this.$forceUpdate();
@@ -243,4 +243,4 @@ export default {
   margin: 0 auto;
   box-sizing: border-box;
 }
-</style>
+</style>

+ 258 - 0
src/components/pages/testStudent/view/component/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>

+ 20 - 4
src/components/pages/testStudent/view/component/topic.vue

@@ -29,6 +29,8 @@
               :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV2>
 							<sweep :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 12"
 							:see="see" :isTeacher="isTeacher"></sweep>
+              <number :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 13"
+							:see="see" :isTeacher="isTeacher"></number>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -49,6 +51,8 @@
                 :see="see" :isTeacher="isTeacher"></timeV>
 								<sweep :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 12"
 								:see="see" :isTeacher="isTeacher"></sweep>
+                <number :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 13"
+								:see="see" :isTeacher="isTeacher"></number>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -75,6 +79,8 @@
               :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV2>
 							<sweep :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 12"
                :see="see" :isTeacher="isTeacher"></sweep>
+               <number :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 13"
+               :see="see" :isTeacher="isTeacher"></number>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -97,6 +103,8 @@
                 :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV2>
 							<sweep :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 12"
                :see="see" :isTeacher="isTeacher"></sweep>
+               <number :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 13"
+               :see="see" :isTeacher="isTeacher"></number>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -124,6 +132,7 @@ import evaV from './eva.vue';
 import timeV from './time.vue';
 import courseV2 from './course2.vue';
 import sweep from './sweep'
+import number from "./number.vue";
 export default {
   props: {
     cJson: {
@@ -169,6 +178,7 @@ export default {
     timeV,
     courseV2,
 		sweep,
+    number
   },
   data() {
     return {
@@ -280,7 +290,7 @@ export default {
         let checkArray = _json.filter((item) => {
           if (item.array) {
             item.array = item.array.filter((item2) => {
-              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7 && item2.type != 8 && item2.type != 12) {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7 && item2.type != 8 && item2.type != 12  && item2.type != 13) {
                 item2.json.answer2 = [];
               } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
                 item2.json.answer2 = this.gcourseid ? this.gcourseid : item2.json.courses[0];
@@ -290,10 +300,12 @@ export default {
                 item2.json.answer2 = '';
               }else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 12 ) {
                 item2.json.answer2 = '';
+              }else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 13 ) {
+                item2.json.answer2 = '';
               }
               if (item2.array) {
                 item2.array = item2.array.filter((item3) => {
-                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7 && item3.type != 8 && item3.type != 12) {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7 && item3.type != 8 && item3.type != 12 && item3.type != 13) {
                     item3.json.answer2 = [];
                   } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 6) {
                     item3.json.answer2 = this.gcourseid ? this.gcourseid : item3.json.courses[0];
@@ -303,6 +315,8 @@ export default {
                     item3.json.answer2 = '';
                   }else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.json.answer2 !== 0 && item3.type == 12) {
                     item3.json.answer2 = '';
+                  }else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.json.answer2 !== 0 && item3.type == 13) {
+                    item3.json.answer2 = '';
                   }
 
                   return item3;
@@ -313,7 +327,7 @@ export default {
               );
             });
           }
-          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8 && item.type != 12) {
+          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8 && item.type != 12 && item.type != 13) {
             item.json.answer2 = [];
           } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 6) {
             item.json.answer2 = this.gcourseid ? this.gcourseid : item.json.courses[0];
@@ -323,6 +337,8 @@ export default {
             item.json.answer2 = '';
           }else if (item.ttype == 1 && item.json && !item.json.answer2 && item.json.answer2 !== 0 && item.type == 12) {
             item.json.answer2 = '';
+          }else if (item.ttype == 1 && item.json && !item.json.answer2 && item.json.answer2 !== 0 && item.type == 13) {
+            item.json.answer2 = '';
           }
           console.log(item.array);
           return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
@@ -448,4 +464,4 @@ export default {
 .p_page {
   margin: 0 10px;
 }
-</style>
+</style>

Some files were not shown because too many files changed in this diff