liangjin
2021-04-01 a734e1028dbc6e91a12ee03b1eeba27cdc94cd26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<template>
  <div class="relatedPictures h-100-g">
    <v-navbar title="相关照片" fixed></v-navbar>
 
    <div class="imageUpload-header">
      <div class="imageUpload-title">
        <h4>营业执照照片</h4>
        <div class="imageUpload-img" @click="clickImg(businessLicense)">
          <img  :src="businessLicense" alt="">
        </div>
      </div>
      <div class="imageUpload-title" v-if="zfbVersion==6 || zfbVersion==7">
        <h4>办学许可证照片</h4>
        <div class="imageUpload-img" @click="clickImg(bxxkPic)">
          <img  :src="bxxkPic" alt="">
        </div>
      </div>
      <div class="imageUpload-title">
        <h4>法人身份证正反面</h4>
        <div  @click="clickImg(idPositive)" class="imageUpload-img" style="width: 48%;margin-right: 1%;height: 100px; display: inline-block;vertical-align: middle">
          <img :src="idPositive" alt="">
        </div>
        <div @click="clickImg(idBack)" class="imageUpload-img" style="width: 48%;display: inline-block;height: 100px;vertical-align: middle">
          <img  :src="idBack" alt="">
        </div>
      </div>
      <div class="imageUpload-title ">
        <h4>门店店内照</h4>
        <div class="image_fix">
          <div class="imageUpload-img" v-for="(i,index) in storeHouse" :key="index">
            <img @click="clickImg(i)" :src="i">
          </div>
        </div>
      </div>
      <div class="imageUpload-title ">
        <h4>门店招牌照</h4>
        <div class="image_fix">
          <div class="imageUpload-img" v-for="(i,index) in storeSign" :key="index">
            <img @click="clickImg(i)" :src="i">
          </div>
        </div>
      </div>
    </div>
 
 
    <van-popup v-model="showToast" class="dialog-demo">
      <div class="img-box" style="font-size: 0">
        <img :src="curSrc" @click="closeDialog()" style="max-width:100%">
      </div>
    </van-popup>
  </div>
</template>
 
<script>
  export default {
    name: "relatedPictures",
    data(){
      return {
        list: [],
        showToast:false,
        curSrc:null,
        businessLicense: '',
        storeOne: [],
        bxxkPic:'',
        idPositive: '',
        idBack: '',
        storeSign:[], // 门店招牌照片
        storeHouse:[] // 门店内照片
      }
    },
    computed:{
      zfbVersion(){
        return this.$route.query.zfbVersion
      }
    },
    created(){
      this.init();
    },
    methods:{
      init() {
        let _orgId = this.$route.query.merId;
        this.$api.merFile({merId: _orgId,zfbVersion:this.$route.query.zfbVersion}).then(res => {
          this.list = res.body;
          for (let i = 0; i < this.list.length; i++) {
            if (this.list[i].fileType == 0) {
              this.businessLicense = this.list[i].fileUrl;
            } else if (this.list[i].fileType == 1) {
              this.storeOne.push(this.list[i].fileUrl);
            } else if (this.list[i].fileType == 2) {
              this.idPositive = this.list[i].fileUrl;
            } else if (this.list[i].fileType == 3) {
              this.idBack = this.list[i].fileUrl;
            }else if (this.list[i].fileType == 6) {
              this.storeHouse.push(this.list[i].fileUrl);
            } else if (this.list[i].fileType == 7) {
              this.storeSign.push(this.list[i].fileUrl);
            } else if(this.list[i].fileType == 24){
              this.bxxkPic = this.list[i].fileUrl
            }
          }
        });
      },
      clickImg(item){
        this.curSrc = null;
        this.curSrc = item;
        this.showToast=true;
      },
      closeDialog(){
        this.curSrc = null;
        this.showToast=false
      }
    }
  }
</script>
 
<style scoped lang="less">
.relatedPictures{
    padding:60px 25px 100px 25px;
 
  height: 100%;
  .imageUpload-header{
    height: 100%;
  }
  .imageUpload-title {
    padding: 12px 24px;
    h4 {
      font-weight: normal;
      padding-bottom: 0.5rem;
    }
    .imageUpload-img {
      border: 1px dashed ;
      width: 100%;
      height: 150px;
      position: relative;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .add-center {
      text-align: center;
      width: 100%;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      i {
        font-size: 30px;
      }
      p {
        span {
          display: inline-block;
        }
      }
    }
  }
  .image_fix {
    display: flex;
    > div {
      width: 102px !important;
      height: 102px !important;
      margin-right: 7px;
    }
    > div:last-child {
      margin-right: 0 !important;
    }
  }
 
 
 
 
 
}
</style>