| | |
| | | <el-input type="textarea" v-model="item.reserved"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="付款凭证" prop="pic"> |
| | | <el-image |
| | | class="preview" |
| | | v-if="item.appendix" |
| | | :src="`/httpImage/${item.appendix}`" |
| | | fit="contain" |
| | | ></el-image> |
| | | <el-upload |
| | | v-else |
| | | class="upload-demo" |
| | | drag |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :http-request="(param) => definedUpload(param, index)" |
| | | :show-file-list="false" |
| | | accept=".jpg, .jpeg, .png" |
| | | > |
| | | <el-image |
| | | class="preview" |
| | | v-if="item.appendix" |
| | | :src="`/httpImage/${item.appendix}`" |
| | | fit="contain" |
| | | ></el-image> |
| | | <div class="el-upload__text"> |
| | | <i class="el-icon-plus"></i> |
| | | <span class="words"> |
| | |
| | | </span> |
| | | </div> |
| | | </el-upload> |
| | | <i |
| | | class="el-icon-error remove" |
| | | v-if="item.appendix" |
| | | @click="item.appendix = ''" |
| | | ></i> |
| | | <div> |
| | | <i |
| | | class="el-icon-error remove" |
| | | v-if="item.appendix" |
| | | @click="item.appendix = ''" |
| | | ></i> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- <div class="text-left" v-if="index!=0"> |
| | | <el-button |
| | |
| | | this.certificateForm.list.splice(index, 1); |
| | | }, |
| | | definedUpload(param, index) { |
| | | const fileName = param.file.name; |
| | | const m = fileName.match(/\.(\w+)(#|\?|$)/); |
| | | const fileType = (m && m[1]).toString().toLowerCase(); |
| | | const validType = ["jpg", "jpeg", "png"].includes(fileType); |
| | | if (!validType) { |
| | | this.$notify({ |
| | | message: "上传格式有误", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let _this = this; |
| | | const fd = new FormData(); |
| | | fd.append("file", param.file); |
| | | console.log(param); |
| | | request({ |
| | | method: "post", |
| | | url: `/saas/api-s/saasFile/upload`, |
| | |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | this.certificateSubmitVisible = false; |
| | | this.close(); |
| | | |
| | | if (this.$route.path === "/personalCenter") { |
| | | this.$emit("closeAll"); |
| | | return; |
| | | } |
| | | |
| | | this.$router.push({ |
| | | path: "/personalCenter", |
| | | query: { |
| | | id: 0, |
| | | }, |
| | | }); |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | |
| | | right: 20px; |
| | | bottom: 20px; |
| | | display: flex; |
| | | justify-content: end; |
| | | justify-content: flex-end; |
| | | text-align: center; |
| | | line-height: 40px; |
| | | |
| | |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | .el-image { |
| | | width: 120px; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss"> |
| | |
| | | border: 1px dashed #c0c5cc !important; |
| | | border-radius: 3px; |
| | | background: #e9ebee; |
| | | |
| | | .el-upload__text { |
| | | margin-top: 35px; |
| | | display: flex; |