Parcourir la source

拜访任务添加操作图片和电话

zhujindu il y a 1 an
Parent
commit
8289d76eb5
1 fichiers modifiés avec 52 ajouts et 1 suppressions
  1. 52 1
      src/views/deviceWithin/addStoreVisit.vue

+ 52 - 1
src/views/deviceWithin/addStoreVisit.vue

@@ -323,6 +323,24 @@
                   @click="imgClick(item, 'A', index)" />
               </template>
             </van-cell>
+            <template v-if="item.contactPhone || item.examplePhoto">
+              <div class="tips">
+                <span
+                  class="examples"
+                  v-if="item.examplePhoto"
+                  @click="openExamplesImg(item.examplePhoto)"
+                  >示例</span
+                >
+                <span class="phone">
+                  <van-icon name="phone" size="18px" />
+                  <span
+                    ><a :href="'tel:' + item.contactPhone" class="call">{{
+                      item.contactPhone
+                    }}</a></span
+                  >
+                </span>
+              </div>
+            </template>
             <z-checkbox
               :answerType="item.answerType"
               :checkboxval="item.answerValue"
@@ -1386,6 +1404,7 @@ export default {
       equipmentCode: "",
       deviceCode: "",
       putInCode: "",
+      examplePhotoImg: "", //示例-操作说明图标地址
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -2726,13 +2745,20 @@ export default {
         }
       }
     },
+    // 头部点击返回
     onClickLeft() {
       this.$router.go(-1);
     },
+    // 点击查看示例图片
+    openExamplesImg(examplePhoto) {
+      if (!examplePhoto) return;
+      ImagePreview([examplePhoto]);
+      // this.examplePhotoImg = examplePhoto;
+    },
   },
 };
 </script>
-<style scoped>
+<style scoped lang="scss">
 .container {
   background-color: white;
 }
@@ -2764,6 +2790,31 @@ export default {
 .formLabel {
   margin: 0 16px;
   border-bottom: 1px solid #f1f1f1;
+  position: relative;
+  .tips {
+    position: absolute;
+    right: 0;
+    top: 16px;
+    height: 25px;
+    line-height: 25px;
+    .examples {
+      margin: 0 10px;
+      background: rgb(255, 151, 106);
+      color: #fff;
+      padding: 3px 5px;
+      border-radius: 2px 2px 8px 2px;
+    }
+    .phone {
+      i {
+        vertical-align: -2px;
+      }
+      a {
+        color: #0057ba;
+        // font-weight: bold;
+        text-decoration: underline;
+      }
+    }
+  }
 }
 
 .formLabel .van-cell {