| | |
| | | |
| | | |
| | | </el-container> |
| | | |
| | | |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img w-full :src="dialogImageUrl" alt="Preview Image" /> |
| | | </el-dialog> |
| | |
| | | computed: {}, |
| | | watch: {}, |
| | | created() { |
| | | const id = this.$route.params && this.$route.params.id; |
| | | const id = this.$route.params && this.$route.params.pid; |
| | | let jd; |
| | | if(this.$route.query.detail!=undefined) |
| | | { |
| | |
| | | this.loading = true; |
| | | getPetList(id).then((response) => { |
| | | this.petList = response.data; |
| | | let paths = response.data.url.split(","); |
| | | for(let i = 0; i < paths.length; i++) |
| | | { |
| | | if(paths[i]!="") { |
| | | console.log(response.data) |
| | | |
| | | let pth = paths[i].substr(paths[i].length - 4, paths[i].length) |
| | | |
| | | if (_this.fot.includes(pth) === true) |
| | | _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) |
| | | else { |
| | | // alert(paths[i]) |
| | | let nms = paths[i].split("\/") |
| | | let nm = nms[nms.length - 1] |
| | | _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | this.loading = false; |
| | | |
| | | }); |
| | | this.getCateInfor() |
| | | |
| | | |
| | | }; |
| | | if (id,pid) { |
| | | if (id) { |
| | | this.loading = true; |
| | | getPetownerList(id,pid).then((response) => { |
| | | getPetownerList(id).then((response) => { |
| | | this.petownerList = response.data; |
| | | let paths = response.data.url.split(","); |
| | | for(let i = 0; i < paths.length; i++) |
| | | { |
| | | if(paths[i]!="") { |
| | | console.log(response.data) |
| | | |
| | | let pth = paths[i].substr(paths[i].length - 4, paths[i].length) |
| | | |
| | | if (_this.fot.includes(pth) === true) |
| | | _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) |
| | | else { |
| | | // alert(paths[i]) |
| | | let nms = paths[i].split("\/") |
| | | let nm = nms[nms.length - 1] |
| | | _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) |
| | | } |
| | | } |
| | | } |
| | | this.loading = false; |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | this.getCateInfor() |
| | | |
| | | |
| | | }; |
| | | this.getList(); |
| | | }, |
| | |
| | | saveAs(blob, filename) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | /** 备忘录 */ |
| | | Petnote(pid){ |
| | |
| | | const Base64 = require('js-base64').Base64 |
| | | this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl)); |
| | | myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); |
| | | |
| | | |
| | | }, |
| | | //删除图片 |
| | | handleRemoveFile(file,) { |
| | | |
| | | |
| | | for(let i = 0; i < this.fileListOther.length; i++) |
| | | { |
| | | if(this.fileListOther[i].url==file.url) |