Browse Source

修改点击查看学生无法显示图片问题

zengyicheng 2 years ago
parent
commit
bcd72a0858
2 changed files with 12 additions and 2 deletions
  1. 11 2
      src/components/components/askStatic2.vue
  2. 1 0
      src/components/studyStudent.vue

+ 11 - 2
src/components/components/askStatic2.vue

@@ -45,7 +45,7 @@
                       item.checkList[checkIndex].imgType == 1
                     "
                   >
-                    <div class="inImg">
+                    <div class="inImg" @click.stop="previewImg(item.src)">
                       <img :src="item.checkList[checkIndex].src" alt="" />
                     </div>
                   </div>
@@ -93,7 +93,12 @@
     >
       <div>
         <div v-for="(item, index) in timu" :key="index" class="borderB">
-          <div v-html="item" class="s_title"></div>
+          <div v-if="item && item.imgType && item.imgType == 1">
+            <div class="inImg" @click.stop="previewImg(item.src)">
+              <img :src="item.src" alt="" />
+            </div>
+          </div>
+          <div v-else v-html="item" class="s_title"></div>
           <div class="stuBox" style="margin-top: 20px; align-items: flex-start">
             <div style="margin: 0 0 10px 0; min-width: 70px; color: #adadad">
               选择同学:
@@ -139,6 +144,9 @@ export default {
     handleClose(done) {
       done();
     },
+    previewImg(url) {
+      this.$hevueImgPreview(url);
+    },
     getA(person, timu) {
       this.person = person;
       this.timu = timu;
@@ -374,6 +382,7 @@ export default {
 .inImg {
   width: 100px;
   height: 100px;
+  cursor: pointer;
 }
 .inImg > img {
   width: 100%;

+ 1 - 0
src/components/studyStudent.vue

@@ -14843,6 +14843,7 @@ ol {
 }
 .inImg {
   width: 100px;
+  cursor: pointer;
 }
 .inImg > img {
   width: 100%;