SanHQin 3 月之前
父节点
当前提交
80400baddf

+ 10 - 1
src/assets/css/button.css

@@ -355,7 +355,8 @@
 .pub_test_btn_course::before,
 .pub_test_btn_eva::before,
 .pub_test_btn_time::before,
-.pub_test_btn_file::before {
+.pub_test_btn_file::before,
+.pub_test_btn_sweep::before {
   content: "";
   width: 18px;
   height: 18px;
@@ -395,6 +396,10 @@
   background-image: url(../icon/test/type_time_icon.png);
 }
 
+.pub_test_btn_sweep::before{
+	background-image: url(../icon/test/type_sweep_icon.png);
+}
+
 .test_icon{
   display: inline-block;
   width: 18px;
@@ -428,6 +433,10 @@
   background-image: url('../icon/test/type_time_icon.png');
 }
 
+.test_icon_sweep{
+  background-image: url('../icon/test/type_sweep_icon.png');
+}
+
 .dataBoard_check_box {
   display: flex;
   align-items: center;

二进制
src/assets/icon/test/type_sweep_icon.png


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

@@ -25,7 +25,8 @@
                   pub_test_btn_course: item.value == 6,
                   pub_test_btn_eva: item.value == 7,
                   pub_test_btn_time: item.value == 8,
-                  pub_test_btn_choose2: item.value == 9
+                  pub_test_btn_choose2: item.value == 9,
+									pub_test_btn_sweep: item.value == 12,
                 }"
               >
                 {{ item.label }}

+ 16 - 3
src/components/pages/test/add/components/checkOrder.vue

@@ -120,6 +120,9 @@
                                         :cJson="cJson" @setJson="setJson">
                                     </courseDialog2>-->
                                 </div>
+																<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>
 														<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}-${index3}` && etype==='edit'" @click.stop="">
 															<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
@@ -163,6 +166,9 @@
                             <!-- <courseDialog2 v-if="item2.type == 11 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></courseDialog2> -->
                         </div>
+												<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>
 										<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}` && etype==='edit'" @click.stop="">
 											<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
@@ -206,6 +212,9 @@
                     <!-- <courseDialog2 v-if="item1.type == 11 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </courseDialog2> -->
                 </div>
+								<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>
 						<div class="addCheckBox" v-if="checkC === `x${index1}` && etype==='edit'" @click.stop="">
 							<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
@@ -249,6 +258,7 @@ import timeX from './timeBox/time.vue'
 import courseDialog2 from './course2/index.vue'
 import courseX2 from './course2/course.vue'
 import addCheckPopover from './addCheckPopover.vue'
+import sweep from './sweep/index'
 export default {
     mixins: [minxinVue],
     components: {
@@ -266,7 +276,8 @@ export default {
         timeX,
         courseDialog2,
         courseX2,
-				addCheckPopover
+				addCheckPopover,
+				sweep
     },
     props: {
         checkJson: {
@@ -287,7 +298,7 @@ export default {
         return {
             manualJson: [],
             isdrag: "",
-            canEdit: [1, 3, 5, 6, 7, 8, 11],
+            canEdit: [1, 3, 5, 6, 7, 8, 11,12],
             ctype: "",
             dragType: "",
             oldIndex: "",
@@ -322,7 +333,9 @@ export default {
                         className += " test_eva_file"
                     } else if (item.type == 8) {
                         className += " test_icon_time"
-                    }
+                    }else if (item.type == 12){
+												className += " test_icon_sweep"
+										}
 										let itemType = item.type;
 										if(itemType===1){
 											if(item.json.type===1){

+ 166 - 0
src/components/pages/test/add/components/sweep/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="choice_box">
+      <div class="title" style="display: flex;">
+        <span v-if="!updateList.title" @click.stop="updateTitle()">{{ cJson.title?cJson.title:"暂无标题" }}</span>
+				<input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="请填写标题"
+          />
+      </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>
+  </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: {},
+			updateList: {
+        title: false,
+        detail: false,
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.$emit("setJson", newVal,this.index);
+      },
+      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));
+    },
+		save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    },
+		updateTitle(){
+			this.updateList.title = true;
+			this.$nextTick(()=>{
+				this.$refs["titleRef"].focus();
+			})
+		},
+		updateDetail(){
+			this.updateList.detail = true;
+			this.$nextTick(()=>{
+				this.$refs["detailRef"].focus();
+			})
+		}
+  },	
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     detail: ""
+    //   };
+    // } else {
+    //   this.checkJson = this.depthCopy(this.cJson2);
+    //   this.courses = this.checkJson.courses;
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .detail {
+  width: 100%;
+  word-break: break-all;
+  color: rgb(136, 139, 146);
+  margin: 10px 0 0;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 5px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input > div {
+  border: 1.5px dashed #dfdfdf;
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(249, 250, 251);
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+}
+</style>

+ 16 - 4
src/components/pages/test/add/edit/check/index.vue

@@ -14,6 +14,7 @@
             <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
             <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"/>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -26,6 +27,7 @@
               <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
               <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>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -42,6 +44,7 @@
             <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
             <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>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -54,6 +57,7 @@
               <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
               <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>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -78,6 +82,7 @@ import courseV from './course.vue';
 import evaV from './eva.vue';
 import timeV from './time.vue';
 import courseV2 from './course2.vue';
+import sweep from './sweep.vue'
 export default {
   props: {
     cJson: {
@@ -94,7 +99,8 @@ export default {
     courseV,
     evaV,
     timeV,
-    courseV2
+    courseV2,
+		sweep
   },
   data() {
     return {
@@ -181,7 +187,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 && item.type != 7 && item.type != 8) {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item.type != 7 && item.type != 8 && item.type != 12) {
                 item2.json.answer2 = [];
               } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
                 item2.json.answer2 = item2.json.courses[0];
@@ -189,10 +195,12 @@ export default {
                 item2.json.answer2 = '';
               } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 8) {
                 item2.json.answer2 = '';
+              }else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 12) {
+                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) {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7 && item3.type != 8 && item3.type != 12) {
                     item3.json.answer2 = [];
                   } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 6) {
                     item3.json.answer2 = item3.json.courses[0];
@@ -200,6 +208,8 @@ export default {
                     item3.json.answer2 = '';
                   } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 8) {
                     item3.json.answer2 = '';
+                  }else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 12) {
+                    item3.json.answer2 = '';
                   }
                   return item3;
                 });
@@ -209,7 +219,7 @@ export default {
               );
             });
           }
-          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8) {
+          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8 && item.type != 12) {
             item.json.answer2 = [];
           } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 6) {
             item.json.answer2 = item.json.courses[0];
@@ -217,6 +227,8 @@ export default {
             item.json.answer2 = '';
           } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 8) {
             item.json.answer2 = '';
+          }else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 12) {
+            item.json.answer2 = '';
           }
           console.log(item.array);
           return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;

+ 261 - 0
src/components/pages/test/add/edit/check/sweep.vue

@@ -0,0 +1,261 @@
+<template>
+  <div class="c_box">
+    <div class="choice_box">
+      <div class="title" style="display: flex;align-items: center;">
+        <span class="g_t_index" style="min-width: fit-content;">{{
+          tindex + 1
+        }}</span>
+        <span>{{ checkJson.title }}</span>
+      </div>
+      <div
+        class="detail"
+        v-if="checkJson.detail"
+        v-html="checkJson.detail"
+        style="color: #00000066;margin-top: 5px;"
+      ></div>
+			<div
+        class="detail"
+         v-if="checkJson.answer2 && typeof checkJson.answer2=='string'"
+        v-html="checkJson.answer2"
+        style="color: #000000;margin-top: 5px;"
+      ></div>
+			<el-button style="margin-top: 10px;" type="primary" size="mini" @click="sweepBtn">扫一扫</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    tindex: {
+      type: Number
+    },
+    cJson: {
+      type: Object
+    },
+    checktype: {
+      type: Number,
+      default: 1
+    },
+    see: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+      },
+      userid: this.$route.query.userid,
+      checkJson: undefined,
+      courseDetail: [],
+    };
+  },
+  computed: {},
+  watch: {
+    checkJson: {
+      handler(newValue) {
+        this.$emit("update:cJson", newValue);
+      },
+      deep: true
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+		sweepBtn(){
+			this.$message.error("请到手机端内扫码")
+		}
+  },
+  mounted() {
+    this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined;
+  }
+};
+</script>
+
+<style scoped>
+.c_box {
+  width: 100%;
+  position: relative;
+  padding-left: 45px;
+  overflow: visible;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+  white-space: pre-line;
+}
+
+.choice_box > .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.choices > .page {
+  margin-top: 10px;
+  display: flex;
+  align-items: center;
+}
+
+.p_page {
+  margin: 0 10px;
+}
+
+.course {
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+
+.course + .course {
+  margin-top: 10px;
+}
+
+.course > .banner {
+  width: 200px;
+  height: 120px;
+  border-radius: 5px;
+  overflow: hidden;
+  border: 1px solid #3896fc;
+  box-sizing: border-box;
+  padding: 5px;
+  margin-right: 15px;
+}
+.course > .banner > img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.course > .content {
+}
+.course > .content > .c_c {
+}
+.course > .content > .c_c + .c_c {
+  margin-top: 5px;
+}
+.course > .content > .c_c span:nth-child(1) {
+}
+.course > .content > .c_c span:nth-child(2) {
+}
+
+.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);
+}
+
+.c_list {
+  width: calc(100% - 10px);
+  min-height: 200px;
+  height: auto;
+  border: 1px solid #e7e7e7;
+  border-radius: 5px;
+  box-sizing: border-box;
+  padding: 10px;
+  display: flex;
+  flex-wrap: wrap;
+  /* overflow: auto; */
+}
+
+.c_l_add1 {
+  width: 100%;
+  height: 200px;
+  background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_add2{
+	width: 230px;
+  height: 200px;
+	background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_item {
+  width: 230px;
+  height: 200px;
+  margin-right: 10px;
+  box-sizing: border-box;
+  border: solid 1px #3896FC;
+  border-radius: 5px;
+	cursor: pointer;
+	box-sizing: border-box;
+	padding: 5px;
+}
+
+.c_l_item > img {
+  width: 100%;
+  height: 110px;
+  object-fit: cover;
+	margin-bottom: 5px;
+}
+
+.c_l_item > div {
+  width: 210px;
+  display: block;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-size: 14px; /* 设置字体大小 */
+  color: #333; /* 设置字体颜色 */
+	box-sizing: border-box;
+}
+</style>

+ 25 - 10
src/components/pages/test/add/edit/edit/index.vue

@@ -45,7 +45,8 @@
                   pub_test_btn_course: item.value == 6,
                   pub_test_btn_eva: item.value == 7,
                   pub_test_btn_time: item.value == 8,
-                  pub_test_btn_choose2: item.value == 9
+                  pub_test_btn_choose2: item.value == 9,
+                  pub_test_btn_sweep: item.value == 12
                 }"
               >
                 {{ item.label }}
@@ -126,7 +127,7 @@
     <div
       class="e_content"
       :style="
-        `margin-right:${showRightMenu ? '20px' : '0'	};margin-left:${
+        `margin-right:${showRightMenu ? '20px' : '0'};margin-left:${
           showLeftMenu ? '20px' : '0'
         };`
       "
@@ -162,12 +163,15 @@
           @changeJson="changeJson"
           etype="edit"
           :cJson.sync="cJson"
-					@addCheck="addCheck"
-					@addQtype="addQtype"
+          @addCheck="addCheck"
+          @addQtype="addQtype"
         >
         </checkOrder>
-				<addCheckPopover v-if="manualJson.length==0 || checkC==''" @addCheck="addCheck" @addQtype="addQtype"/>
-
+        <addCheckPopover
+          v-if="manualJson.length == 0 || checkC == ''"
+          @addCheck="addCheck"
+          @addQtype="addQtype"
+        />
       </div>
     </div>
     <div class="e_order" v-show="showRightMenu">
@@ -473,6 +477,11 @@ export default {
             title: "标题",
             detail: ""
           };
+        } else if (topicType == 12) {
+          json.json = {
+            title: "标题",
+            detail: ""
+          };
         }
         if (_json.array) {
           if (type == 3 && _check.length == 2) {
@@ -524,6 +533,7 @@ export default {
             ttype: 1,
             type: _topicType
           };
+					console.log("👉",topicType)
 
           if (topicType == 1) {
             json1.json = {
@@ -590,6 +600,11 @@ export default {
               title: "标题",
               detail: ""
             };
+          } else if (topicType == 12) {
+            json1.json = {
+              title: "标题",
+              detail: ""
+            };
           }
           this.manualJson.push(json1);
           this.$forceUpdate();
@@ -897,9 +912,9 @@ export default {
   overflow-y: hidden;
 }
 
-.e_addBox{
-	width: 400px;
-	height: 300px;
-	background-color: red;
+.e_addBox {
+  width: 400px;
+  height: 300px;
+  background-color: red;
 }
 </style>

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

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

+ 5 - 0
src/components/pages/test/add/minxins/minxin.js

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

+ 266 - 0
src/components/pages/testStudent/view/component/sweep.vue

@@ -0,0 +1,266 @@
+<template>
+  <div class="c_box">
+    <div class="choice_box">
+      <div class="title" style="display: flex;align-items: center;">
+        <span class="g_t_index" style="min-width: fit-content;">{{
+          tindex + 1
+        }}</span>
+        <span>{{ checkJson.title }}</span>
+      </div>
+      <div
+        class="detail"
+        v-if="checkJson.detail"
+        v-html="checkJson.detail"
+        style="color: #00000066;margin-top: 5px;"
+      ></div>
+
+			<div
+        class="detail"
+        v-if="checkJson.answer2 && typeof checkJson.answer2=='string'"
+        v-html="checkJson.answer2"
+        style="color: #000000;margin-top: 5px;"
+      ></div>
+			<el-button @click="sweepBtn" type="primary" size="mini" style="margin-top: 10px;">扫一扫</el-button>
+    </div>
+
+  </div>
+</template>
+
+<script>
+
+export default {
+  props: {
+    tindex: {
+      type: Number
+    },
+    cJson: {
+      type: Object
+    },
+    checktype: {
+      type: Number,
+      default: 1
+    },
+    see: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+      },
+      userid: this.$route.query.userid,
+      checkJson: {
+				title:"",
+				detail:""
+			},
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newValue) {
+        this.$emit("update:cJson", newValue);
+      },
+      deep: true
+    }
+  },
+  methods: {
+
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+
+		sweepBtn(){
+			this.$message.error("请到手机端内扫码")
+		}
+  },
+  mounted() {
+    this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined;
+  }
+};
+</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 > .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.choices > .page {
+  margin-top: 10px;
+  display: flex;
+  align-items: center;
+}
+
+.p_page {
+  margin: 0 10px;
+}
+
+.course {
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+
+.course + .course {
+  margin-top: 10px;
+}
+
+.course > .banner {
+  width: 200px;
+  height: 120px;
+  border-radius: 5px;
+  overflow: hidden;
+  border: 1px solid #3896fc;
+  box-sizing: border-box;
+  padding: 5px;
+  margin-right: 15px;
+}
+.course > .banner > img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.course > .content {
+}
+.course > .content > .c_c {
+}
+.course > .content > .c_c + .c_c {
+  margin-top: 5px;
+}
+.course > .content > .c_c span:nth-child(1) {
+}
+.course > .content > .c_c span:nth-child(2) {
+}
+
+.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);
+}
+
+.c_list {
+  width: calc(100% - 10px);
+  min-height: 200px;
+  height: auto;
+  border: 1px solid #e7e7e7;
+  border-radius: 5px;
+  box-sizing: border-box;
+  padding: 10px;
+  display: flex;
+  flex-wrap: wrap;
+  /* overflow: auto; */
+}
+
+.c_l_add1 {
+  width: 100%;
+  height: 200px;
+  background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_add2{
+	width: 230px;
+  height: 200px;
+	background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_item {
+  width: 230px;
+  height: 200px;
+  margin-right: 10px;
+  box-sizing: border-box;
+  border: solid 1px #3896FC;
+  border-radius: 5px;
+	cursor: pointer;
+	box-sizing: border-box;
+	padding: 5px;
+}
+
+.c_l_item > img {
+  width: 100%;
+  height: 110px;
+  object-fit: cover;
+	margin-bottom: 5px;
+}
+
+.c_l_item > div {
+  width: 210px;
+  display: block;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-size: 14px; /* 设置字体大小 */
+  color: #333; /* 设置字体颜色 */
+	box-sizing: border-box;
+}
+</style>

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

@@ -27,6 +27,8 @@
               :isTeacher="isTeacher"></timeV>
             <courseV2 :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 11"
               :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>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -45,6 +47,8 @@
                 :see="see" :isTeacher="isTeacher"></evaV>
               <timeV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 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>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -69,6 +73,8 @@
               :isTeacher="isTeacher"></timeV>
             <courseV2 :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 11"
               :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>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -89,6 +95,8 @@
                 :see="see" :isTeacher="isTeacher"></timeV>
               <courseV2 :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 11"
                 :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>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -115,6 +123,7 @@ import courseV from './course.vue';
 import evaV from './eva.vue';
 import timeV from './time.vue';
 import courseV2 from './course2.vue';
+import sweep from './sweep'
 export default {
   props: {
     cJson: {
@@ -159,6 +168,7 @@ export default {
     evaV,
     timeV,
     courseV2,
+		sweep,
   },
   data() {
     return {
@@ -270,18 +280,20 @@ 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) {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7 && item2.type != 8 && item2.type != 12) {
                 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];
               } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 7) {
                 item2.json.answer2 = '';
-              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 8) {
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 8 ) {
+                item2.json.answer2 = '';
+              }else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 12 ) {
                 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) {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7 && item3.type != 8 && item3.type != 12) {
                     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];
@@ -289,7 +301,10 @@ export default {
                     item3.json.answer2 = '';
                   } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.json.answer2 !== 0 && item3.type == 8) {
                     item3.json.answer2 = '';
+                  }else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.json.answer2 !== 0 && item3.type == 12) {
+                    item3.json.answer2 = '';
                   }
+
                   return item3;
                 });
               }
@@ -298,7 +313,7 @@ export default {
               );
             });
           }
-          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8) {
+          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8 && item.type != 12) {
             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];
@@ -306,6 +321,8 @@ export default {
             item.json.answer2 = '';
           } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.json.answer2 !== 0 && item.type == 8) {
             item.json.answer2 = '';
+          }else if (item.ttype == 1 && item.json && !item.json.answer2 && item.json.answer2 !== 0 && item.type == 12) {
+            item.json.answer2 = '';
           }
           console.log(item.array);
           return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;