sunyize hace 2 años
padre
commit
76d2f7e825

+ 84 - 18
src/views/lotCheck/TaskUploadData.vue

@@ -1240,17 +1240,52 @@
     </a-card>
     <a-card  v-if='isPhoneshow'    ref="floatButton"
              class="float-infoPhone">
-      <div class="clearfix">
-        <a-upload
-          list-type="picture-card"
-          :file-list="phoneList"
-          @preview="handlePreview"
-          @change="handleChange"
+      <div class="thumb-example1"  >
+        <!-- swiper1 -->
+        <swiper
+          class="swiper gallery-top"
+          :options="swiperOptionTop"
+          ref="swiperTop"
         >
-        </a-upload>
-        <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
-          <img alt="example" style="width: 100%" :src="previewImage" />
-        </a-modal>
+
+        </swiper>
+        <!-- swiper2 Thumbs -->
+        <swiper
+          class="swiper gallery-thumbs"
+          :options="swiperOptionThumbs"
+          ref="swiperThumbs"
+        >
+          <swiper-slide  v-for="(item, index) in phoneList" :key="item.id"
+                         class="slide"
+                         style="width:290px;height:200px;">
+            <div  v-if="item.urlBase" style="width:290px;height: 96px;background: rgb(68,142,247);color: white">
+              <iframe
+                v-if="item.urlBase"
+                frameborder="1"
+                :src="item.urlBase"
+                ref="ifr"
+                @preview="handlePreview"
+                @change="handleChange"
+                scrolling="auto">
+              </iframe>
+              <div style="display:flex ;justify-content:center;height:100%;">
+                <a-button @click='selfUploadContractView(item)' >使用</a-button>
+                <a-button style='margin-left: 10px' @click="jumpUrl(item.urlBase)">预览</a-button>
+              </div>
+            </div>
+            <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+              <img alt="example" style="width: 100%" :src="previewImage" />
+            </a-modal>
+          </swiper-slide>
+          <div class="swiper-button-next swiper-button-white" slot="button-next">
+            <div>
+            </div>
+          </div>
+          <div class="swiper-button-prev swiper-button-white" slot="button-prev">
+            <div>
+            </div>
+          </div>
+        </swiper>
       </div>
     </a-card>
     <div @click='showPhone'
@@ -1784,19 +1819,22 @@ export default {
       this.fileList = fileList;
     },
     showPhone(){
-      if (this.isPhoneshow===false){
-        this.isPhoneshow = true;
-      }else {
-        this.isPhoneshow = false;
-      }
-
       var data = {
         customerNo:  this.infoModel.customerNo,
+        stepsId: this.steps.stepsNow[this.steps.current].id
       }
       getAction('/smsCheck/customerInfo/phone/customerPhone', data).then((res) => {
         if (res.success) {
           this.phoneList=JSON.parse(res.result);
-
+          if (this.phoneList!==null && this.phoneList.length!==0){
+            if (this.isPhoneshow===false){
+              this.isPhoneshow = true;
+            }else {
+              this.isPhoneshow = false;
+            }
+          }else {
+            this.$message.warning("此类无历史上传");
+          }
         }
       })
     },
@@ -2191,6 +2229,30 @@ export default {
     /**文件上传成功后回调*/
     importHandleChange(info) {
     },
+    selfUploadContractView(item) {
+      this.idCurrent= this.steps.stepsNow[this.steps.current].id;
+      var fileAttribute =this.steps.stepsNow[this.steps.current].id;
+      var that = this;
+
+      that.swiperId = that.swiperId + 1;
+      console.log(that.swiperId)
+      //文件链接
+      let swipData = item;
+      if (that.infoModel[fileAttribute][0].urlBase) {
+        that.infoModel[fileAttribute].push(swipData)
+      } else {
+        that.infoModel[fileAttribute] = []
+        //数据发生变化
+        that.infoModel[fileAttribute][0] = swipData;
+      }
+      // 改变步骤条状态
+      if (that.infoModel[fileAttribute].length > 0) {
+        that.steps.stepsNow[that.steps.current].status = "finish"
+      } else {
+        that.steps.stepsNow[that.steps.current].status = "wait"
+      }
+      this.$message.success("上传成功");
+    },
     /**文件格式限制*/
     importBeforeUpload(file) {
       var fileType = file.type;
@@ -2313,7 +2375,11 @@ h3 {
   margin-top: 20px;
   // background: #000;
 }
-
+.thumb-example1 {
+  width: 1200px;
+  margin-top: 20px;
+  // background: #000;
+}
 .swiper-slide {
   background-size: cover;
   background-position: center;

+ 84 - 18
src/views/smscheck/modules/TaskUploadData.vue

@@ -2264,17 +2264,52 @@
     </a-card>
     <a-card  v-if='isPhoneshow'    ref="floatButton"
              class="float-infoPhone">
-      <div class="clearfix">
-        <a-upload
-          list-type="picture-card"
-          :file-list="phoneList"
-          @preview="handlePreview"
-          @change="handleChange"
+      <div class="thumb-example1"  >
+        <!-- swiper1 -->
+        <swiper
+          class="swiper gallery-top"
+          :options="swiperOptionTop"
+          ref="swiperTop"
         >
-        </a-upload>
-        <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
-          <img alt="example" style="width: 100%" :src="previewImage" />
-        </a-modal>
+
+        </swiper>
+        <!-- swiper2 Thumbs -->
+        <swiper
+          class="swiper gallery-thumbs"
+          :options="swiperOptionThumbs"
+          ref="swiperThumbs"
+        >
+          <swiper-slide  v-for="(item, index) in phoneList" :key="item.id"
+                        class="slide"
+                        style="width:290px;height:200px;">
+            <div  v-if="item.urlBase" style="width:290px;height: 96px;background: rgb(68,142,247);color: white">
+            <iframe
+              v-if="item.urlBase"
+              frameborder="1"
+              :src="item.urlBase"
+              ref="ifr"
+              @preview="handlePreview"
+              @change="handleChange"
+              scrolling="auto">
+            </iframe>
+              <div style="display:flex ;justify-content:center;height:100%;">
+                <a-button @click='selfUploadContractView(item)' >使用</a-button>
+                <a-button style='margin-left: 10px' @click="jumpUrl(item.urlBase)">预览</a-button>
+              </div>
+            </div>
+                    <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+                      <img alt="example" style="width: 100%" :src="previewImage" />
+                    </a-modal>
+          </swiper-slide>
+          <div class="swiper-button-next swiper-button-white" slot="button-next">
+            <div>
+            </div>
+          </div>
+          <div class="swiper-button-prev swiper-button-white" slot="button-prev">
+            <div>
+            </div>
+          </div>
+        </swiper>
       </div>
     </a-card>
     <div @click='showPhone'
@@ -2315,6 +2350,7 @@ export default {
   },
   data() {
     return {
+      idCurrent :'',
       previewVisible: false,
       previewImage: '',
       btnStyle:{
@@ -2854,19 +2890,22 @@ export default {
       this.fileList = fileList;
     },
     showPhone(){
-      if (this.isPhoneshow===false){
-        this.isPhoneshow = true;
-      }else {
-        this.isPhoneshow = false;
-      }
-
       var data = {
         customerNo:  this.infoModel.customerNo,
+        stepsId: this.steps.stepsNow[this.steps.current].id
       }
       getAction('/smsCheck/customerInfo/phone/customerPhone', data).then((res) => {
         if (res.success) {
           this.phoneList=JSON.parse(res.result);
-
+          if (this.phoneList!==null && this.phoneList.length!==0){
+            if (this.isPhoneshow===false){
+              this.isPhoneshow = true;
+            }else {
+              this.isPhoneshow = false;
+            }
+          }else {
+            this.$message.warning("此类无历史上传");
+          }
         }
       })
     },
@@ -3003,7 +3042,30 @@ export default {
         that[fileAttribute] = swiperImg
       }
     },
+    selfUploadContractView(item) {
+      this.idCurrent= this.steps.stepsNow[this.steps.current].id;
+      var fileAttribute =this.steps.stepsNow[this.steps.current].id;
+      var that = this;
 
+      that.swiperId = that.swiperId + 1;
+      console.log(that.swiperId)
+      //文件链接
+      let swipData = item;
+      if (that.infoModel[fileAttribute][0].urlBase) {
+        that.infoModel[fileAttribute].push(swipData)
+      } else {
+        that.infoModel[fileAttribute] = []
+        //数据发生变化
+        that.infoModel[fileAttribute][0] = swipData;
+      }
+      // 改变步骤条状态
+      if (that.infoModel[fileAttribute].length > 0) {
+        that.steps.stepsNow[that.steps.current].status = "finish"
+      } else {
+        that.steps.stepsNow[that.steps.current].status = "wait"
+      }
+      this.$message.success("上传成功");
+    },
     /**自定义的上传文件方法*/
     selfUploadContract(data, fileAttribute) {
       var that = this;
@@ -3408,7 +3470,11 @@ export default {
   margin-top: 20px;
   // background: #000;
 }
-
+.thumb-example1 {
+  width: 1200px;
+  margin-top: 20px;
+  // background: #000;
+}
 .swiper-slide {
   background-size: cover;
   background-position: center;

+ 134 - 19
src/views/truckCheck/TaskUploadData.vue

@@ -2349,17 +2349,52 @@
     </a-card>
     <a-card  v-if='isPhoneshow'    ref="floatButton"
              class="float-infoPhone">
-      <div class="clearfix">
-        <a-upload
-          list-type="picture-card"
-          :file-list="phoneList"
-          @preview="handlePreview"
-          @change="handleChange"
+      <div class="thumb-example1"  >
+        <!-- swiper1 -->
+        <swiper
+          class="swiper gallery-topview"
+          :options="swiperOptionTop"
+          ref="swiperTop"
         >
-        </a-upload>
-        <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
-          <img alt="example" style="width: 100%" :src="previewImage" />
-        </a-modal>
+
+        </swiper>
+        <!-- swiper2 Thumbs -->
+        <swiper
+          class="swiper gallery-thumbsview"
+          :options="swiperOptionThumbs"
+          ref="swiperThumbs"
+        >
+          <swiper-slide  v-for="(item, index) in phoneList" :key="item.id"
+                         class="slide"
+                         style="width:290px;height:200px;">
+            <div  v-if="item.urlBase" style="width:290px;height: 96px;background: rgb(68,142,247);color: white">
+              <iframe
+                v-if="item.urlBase"
+                frameborder="1"
+                :src="item.urlBase"
+                ref="ifr"
+                @preview="handlePreview"
+                @change="handleChange"
+                scrolling="auto">
+              </iframe>
+              <div style="display:flex ;justify-content:center;height:100%;">
+                <a-button @click='selfUploadContractView(item)' >使用</a-button>
+                <a-button style='margin-left: 10px' @click="jumpUrl(item.urlBase)">预览</a-button>
+              </div>
+            </div>
+            <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+              <img alt="example" style="width: 100%" :src="previewImage" />
+            </a-modal>
+          </swiper-slide>
+          <div class="swiper-button-next swiper-button-white" slot="button-next">
+            <div>
+            </div>
+          </div>
+          <div class="swiper-button-prev swiper-button-white" slot="button-prev">
+            <div>
+            </div>
+          </div>
+        </swiper>
       </div>
     </a-card>
     <div @click='showPhone'
@@ -2396,6 +2431,7 @@ export default {
   components: {noDataPng},
   data() {
     return {
+      idCurrent :'',
       isPhoneshow:false,
       phoneList:'',
       btnStyle:{
@@ -3263,19 +3299,22 @@ export default {
       this.fileList = fileList;
     },
     showPhone(){
-      if (this.isPhoneshow===false){
-        this.isPhoneshow = true;
-      }else {
-        this.isPhoneshow = false;
-      }
-
       var data = {
         customerNo:  this.infoModel.customerNo,
+        stepsId: this.steps.stepsNow[this.steps.current].id
       }
       getAction('/smsCheck/customerInfo/phone/customerPhone', data).then((res) => {
         if (res.success) {
           this.phoneList=JSON.parse(res.result);
-
+          if (this.phoneList!==null && this.phoneList.length!==0){
+            if (this.isPhoneshow===false){
+              this.isPhoneshow = true;
+            }else {
+              this.isPhoneshow = false;
+            }
+          }else {
+            this.$message.warning("此类无历史上传");
+          }
         }
       })
     },
@@ -3579,7 +3618,30 @@ export default {
         that[fileAttribute] = swiperImg
       }
     },
+    selfUploadContractView(item) {
+      this.idCurrent= this.steps.stepsNow[this.steps.current].id;
+      var fileAttribute =this.steps.stepsNow[this.steps.current].id;
+      var that = this;
 
+      that.swiperId = that.swiperId + 1;
+      console.log(that.swiperId)
+      //文件链接
+      let swipData = item;
+      if (that.infoModel[fileAttribute][0].urlBase) {
+        that.infoModel[fileAttribute].push(swipData)
+      } else {
+        that.infoModel[fileAttribute] = []
+        //数据发生变化
+        that.infoModel[fileAttribute][0] = swipData;
+      }
+      // 改变步骤条状态
+      if (that.infoModel[fileAttribute].length > 0) {
+        that.steps.stepsNow[that.steps.current].status = "finish"
+      } else {
+        that.steps.stepsNow[that.steps.current].status = "wait"
+      }
+      this.$message.success("上传成功");
+    },
     //分割数组
     spliceArr(data, fileData) {
       let indexOf = data.indexOf(fileData);
@@ -3824,7 +3886,11 @@ h3 {
   margin-top: 20px;
   // background: #000;
 }
-
+.thumb-example1 {
+  width: 1200px;
+  margin-top: 20px;
+  // background: #000;
+}
 .swiper-slide {
   background-size: cover;
   background-position: center;
@@ -3838,7 +3904,13 @@ h3 {
   height: 300px;
   margin-bottom: 50px
 }
-
+.gallery-topview {
+  // height: 80% !important;
+  /*height: 600px;*/
+  width: 100%;
+  left: 15%;
+  margin-bottom: 50px
+}
 .gallery-thumbs {
   height: 20% !important;
   box-sizing: border-box;
@@ -3883,7 +3955,50 @@ h3 {
     background: rgb(189, 186, 186);
   }
 }
+.gallery-thumbsview {
+  height: 20% !important;
+  box-sizing: border-box;
+  padding: 10px 0px;
+  /*  width: 864px;*/
+  margin-left: 2px;
 
+  .swiper-button-next {
+    right: 0px;
+  }
+
+  .swiper-button-prev {
+    left: 0px;
+  }
+
+  .swiper-button-next,
+  .swiper-button-prev {
+    background: #fff;
+    width: 45px;
+    text-align: center;
+    height: 101px;
+    top: 26%;
+
+    div {
+      margin-top: 30px;
+      background: rgb(207, 205, 205);
+      height: 45px;
+      border-radius: 50%;
+
+      img {
+        margin: 7px 0 0 2px;
+        width: 30px;
+      }
+    }
+  }
+
+  .swiper-button-next:hover div {
+    background: rgb(189, 186, 186);
+  }
+
+  .swiper-button-prev:hover div {
+    background: rgb(189, 186, 186);
+  }
+}
 .gallery-thumbs .swiper-slide {
   width: 20%;
   height: 80px;