| | |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="饮食习惯(恶)" prop="disEatHabit" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="饮食习惯(恶)" prop="disEatHabit" label-width="120px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.disEatHabit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | </el-upload> |
| | | </el-col> |
| | | </div> |
| | | |
| | | <!-- <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改魅宠信息</el-button> --> |
| | | </el-col> |
| | | |
| | | </div> |
| | | </el-container> |
| | | |
| | |
| | | </div> |
| | | |
| | | </el-col> |
| | | |
| | | </div> |
| | | <div class="form-header mt"> |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div> |
| | | <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改魅宠信息</el-button> |
| | | </div> |
| | | |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img w-full :src="dialogImageUrl" alt="Preview Image" /> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getPetList, listPetnote,uploadPic, download,updatePet} from "@/api/pet/index"; |
| | | import {getPetList, listPetnote,uploadPic1, download,updatePet} from "@/api/pet/index"; |
| | | import {addRole, updateRole} from "@/api/system/role"; |
| | | import {blobValidate} from "@/utils/ruoyi"; |
| | | import errorCode from "@/utils/errorCode"; |
| | |
| | | return { |
| | | cdi:"魅宠详细信息", |
| | | udi:"魅宠信息修改", |
| | | fot:[".jpg",".jif"], |
| | | // 数据范围选项 |
| | | fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', |
| | | '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'], |
| | | |
| | | fileList:[ |
| | | ], |
| | | fileListOther:[ |
| | |
| | | dialect: undefined, |
| | | address:undefined, |
| | | eatHabit:undefined, |
| | | diseatHabit: undefined, |
| | | disEatHabit: undefined, |
| | | LifeHabit: undefined, |
| | | disLifeHabit: undefined, |
| | | url: undefined, |
| | |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | diseatHabit: [{ |
| | | disEatHabit: [{ |
| | | required: true, |
| | | message: '请输入饮食习惯(喜)', |
| | | message: '请输入饮食习惯(恶)', |
| | | trigger: 'blur' |
| | | }], |
| | | masterName: [{ |
| | |
| | | jd = this.$route.query.detail |
| | | this.btn= jd |
| | | this.dsb = !jd |
| | | document.title = "修改魅宠详细信息"; |
| | | this.isShow = true |
| | | |
| | | // document.title = "修改魅宠详细信息"; |
| | | this.$route.meta.title = "修改魅宠详细信息";//列表的名称 |
| | | } |
| | | else{ |
| | | document.title = "查看魅宠详细信息"; |
| | | // document.title = "查看魅宠详细信息"; |
| | | this.$route.meta.title = "查看魅宠详细信息";//列表的名称 |
| | | this.btn = false; |
| | | this.isShow = false; |
| | | } |
| | | |
| | | let _this = this |
| | |
| | | getPetList(id).then((response) => { |
| | | this.petList = response.data; |
| | | console.log(this.petList) |
| | | alert(this.petList.headPicture) |
| | | // alert(this.petList.headPicture) |
| | | this.loading = false; |
| | | }); |
| | | // getPetowner(id).then((response) => { |
| | |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | uploadPic(formData).then(response => { |
| | | uploadPic1(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | _this.fileList2.push({name:response.data.fileName, url:response.data.url}) |
| | | console("ok") |
| | |
| | | }, |
| | | submitForm() { |
| | | |
| | | let ul = this.fileList1.map(function (elem){ |
| | | return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | }).join(",") |
| | | let uls = this.fileList2.map(function (elem){ |
| | | return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | }).join(",") |
| | | this.petList.headPicture = ul, |
| | | this.petList.fullPicture = uls, |
| | | // let ul = this.fileList1.map(function (elem){ |
| | | // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | // }).join(",") |
| | | // let uls = this.fileList2.map(function (elem){ |
| | | // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | // }).join(",") |
| | | // this.petList.headPicture = ul, |
| | | // this.petList.fullPicture = uls, |
| | | this.$refs['elForm'].validate(valid => { |
| | | |
| | | |
| | |
| | | this.$refs.upload.clearFiles(); |
| | | // this.uploading1 = true; |
| | | //alert(100) |
| | | uploadPic(formData).then(response => { |
| | | uploadPic1(formData).then(response => { |
| | | // alert(18) |
| | | // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | // _this.fileList1.push({name:response.data.fileName, url:response.data.url}) |
| | |
| | | this.$refs.upload1.clearFiles(); |
| | | // this.uploading1 = true; |
| | | //alert(100) |
| | | uploadPic(formData).then(response => { |
| | | uploadPic1(formData).then(response => { |
| | | // alert(18) |
| | | // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | // _this.fileList1.push({name:response.data.fileName, url:response.data.url}) |