zhanghua
2023-11-13 2b6f255b97dba15d22b86319e2f38f6efac417cc
src/views/operate/disposal/casepool/pool/createUser/ill/index.vue
@@ -66,21 +66,33 @@
                    <el-form-item class="optionItems" label="身份证正、反面照片:" prop="positive">
                        <template>
                            <div class="idcard">
                                <el-upload class="upload-demo" :show-file-list="false"
<!--                              <el-upload-->
<!--                                  action="/sccg/file/medias"-->
<!--                                  list-type="picture-card"-->
<!--                                  :show-file-list="false"-->
<!--                                  :headers="getToken()" multiple-->
<!--                                  :limit="50" :on-success="handleSuccess">-->
<!--                                <i class="el-icon-plus"></i>-->
<!--                                <span class="text" v-if="ill.positive === ''">身份证正面</span>-->
<!--                                <img :src="ill.positive" alt="" class="img" v-else>-->
<!--                              </el-upload>-->
                                <el-upload list-type="picture-card" class="upload-demo" :show-file-list="false"
                                    action="/sccg/file/medias" :headers="getToken()" multiple
                                    :limit="50" :on-success="handleSuccess">
                                    <img v-if="ill.positive === ''"
                                        src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg"
                                        alt="">
<!--                                    <img v-if="ill.positive === ''"-->
<!--                                        src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg"-->
<!--                                        alt="">-->
                                     <i v-if="ill.positive === ''" class="el-icon-plus"></i>
                                    <span class="text" v-if="ill.positive === ''">身份证正面</span>
                                    <img :src="ill.positive" alt="" class="img" v-else>
                                </el-upload>
                                <el-upload class="upload-demo" :show-file-list="false"
                                <el-upload list-type="picture-card" class="upload-demo" :show-file-list="false"
                                    action="/sccg/file/medias" :headers="getToken()" multiple
                                    :limit="50" :on-success="handleSuccess2">
                                    <img v-if="ill.negative === '' "
                                        src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg"
                                        alt="">
<!--                                    <img v-if="ill.negative === '' "-->
<!--                                        src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg"-->
<!--                                        alt="">-->
                                   <i v-if="ill.negative === ''" class="el-icon-plus"></i>
                                    <span class="text" v-if="ill.negative === ''">身份证反面</span>
                                    <img :src="ill.negative" alt="" class="img" v-else />
                                </el-upload>
@@ -109,7 +121,7 @@
                        </el-form-item>
                        <el-form-item class="optionItems" label-width='0px' prop="buildingWidth">
                            <el-input placeholder="单位米" v-model="ill.buildingWidth"></el-input>
                        </el-form-item>
                        </el-form-item>
                        <el-form-item class="optionItems" label-width='0px' prop="buildingHigh">
                            <el-input placeholder="单位米" v-model="ill.buildingHigh"></el-input>
                        </el-form-item>
@@ -360,7 +372,7 @@
    created() {
        const { getBigKind, getCommityList,getStreetList } = this;
        getStreetList(0);
        // this.ill.category = this.mytype + 1;
        getBigKind();
        getCommityList();
@@ -427,14 +439,51 @@
            }
        },
        handleSuccess(res, file, filelist) {
            const baseUrl = 'http://140.143.152.226:8410/';
            this.ill.positive = baseUrl + res.data.url1;
            // const baseUrl = 'http://140.143.152.226:8410/';
            // this.ill.positive = baseUrl + res.data.url1;
          // this.ill.positive = res.data
         // let   oll =this.ill.positive
          let that=this
          this.$axios({
            url:'sccg/API/img?fileUrl='+res.data,
            method:"get",
            responseType: 'blob'
          }).then(res=>{
            const blob = new Blob([res])
            var reader = new window.FileReader();
            reader.readAsDataURL(blob);
            reader.onloadend = function () {
              that.ill.positive= reader.result
            }
          })
        },
        handleSuccess2(res, file, filelist) {
            const baseUrl = 'http://140.143.152.226:8410/';
            this.ill.negative = baseUrl + res.data.url1;
            // const baseUrl = 'http://140.143.152.226:8410/';
            // this.ill.negative = baseUrl + res.data.url1;
          // this.ill.negative = res.data
          let that=this
          this.$axios({
            url:'sccg/API/img?fileUrl='+res.data,
            method:"get",
            responseType: 'blob'
          }).then(res=>{
            const blob = new Blob([res])
            var reader = new window.FileReader();
            reader.readAsDataURL(blob);
            reader.onloadend = function () {
              console.log(reader.result)
              that.ill.negative= reader.result
            }
          })
        },
        // 查询社区
        getCommityList() {
            this.$axios({
@@ -537,14 +586,14 @@
            }
        .input-form {
            .upload-demo {
                position: relative;
                margin-right: 20px;
                .text {
                    position: absolute;
                    top: 22%;
                    left: 20%;
                    left: 26%;
                }
            }
@@ -565,8 +614,8 @@
    }
    .img {
        width: 125px;
        height: 80px;
        width: 100%;
        height: 100%;
    }
    .area {
@@ -577,4 +626,4 @@
        flex: 2;
    }
}
</style>
</style>