| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="app-container" id="printable-content"> |
| | | <div class="form-header mt"> |
| | | <h4 class="dt h4">基本信息 </h4> |
| | | <el-button type="primary" @click="Petnote(pid)" :disabled="btn">魅宠备忘录</el-button> |
| | | <!-- <h4 class="dt h4">基本信息 </h4> |
| | | <el-button type="primary" @click="Petnote(pid)" :disabled="btn">魅宠备忘录</el-button> --> |
| | | <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;"> |
| | | <span>基本信息</span> |
| | | <div style="display: flex; align-items: center;"> |
| | | <el-button size="mini" type="text" @click="Petnote(pid)" v-hasPermi="['person:information:memo']"> |
| | | <div class="form" ><el-icon style="padding-right:110px;"></el-icon> |
| | | <span class="text" style="width: 69px;height: 26px;font-size: 16px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">魅宠备忘录</span></div> |
| | | </el-button> |
| | | <el-button size="mini" type="text" v-print="'#printable-content'" v-hasPermi="['person:information:memo']"> |
| | | <div class="form" ><el-icon style="padding-right:110px;"></el-icon> |
| | | <span class="text" style="width: 69px;height: 26px;font-size: 16px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">打印</span></div> |
| | | </el-button> |
| | | </div> |
| | | </h1> |
| | | </div> |
| | | <h2 style="width: 100px;height: 16px;font-size: 15px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #000000;line-height: 15px;">基本信息</h2> |
| | | <el-container > |
| | |
| | | <el-container > |
| | | <el-col > |
| | | <el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left" |
| | | v-loading="loading" :data="petList" @selection-change="handleSelectionChange" label-width="120px" > |
| | | v-loading="loading" :data="petList" label-width="120px" > |
| | | <el-row :span="5"> |
| | | <el-form-item label="证件号码" prop="idNum" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.idNum" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" > |
| | |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="出生日期" prop="birth" label-width="70px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.birth" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | <el-form-item label="出生日期" prop="birth" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-date-picker v-model="petList.birth" type="date" placeholder="请选择日期" |
| | | :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="颜色" prop="color" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="颜色" prop="color" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.color" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="饮食习惯(喜)" prop="eatHabit" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="饮食习惯(喜)" prop="eatHabit" label-width="110px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.eatHabit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="生活习惯(喜)" prop="lifeHabit" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="生活习惯(喜)" prop="lifeHabit" label-width="110px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.lifeHabit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <el-col v-loading="loading" :data="petList" @selection-change="handleSelectionChange"> |
| | | <el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left" > |
| | | <el-row :span="5"> |
| | | <el-form-item label="种类" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="品种" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.type" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="名字" prop="name" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="名字" prop="name" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.name" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="性别" prop="sex" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.sex === 1 ? '雄性':'雌性' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | <el-form-item label="性别" prop="sex" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <template v-if="dsb"> |
| | | <el-input v-model="petList.sex === 1 ? '雄性':'雌性'" :disabled="true"></el-input> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="petList.sex" placeholder="请选择保洁/收纳" clearable :style="{width: '100%'}"> |
| | | <el-option label="雌性" value="0"></el-option> |
| | | <el-option label="雄性" value="1"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="性质" prop="properties" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.properties" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | <el-form-item label="种类" prop="animal" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.animal" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | |
| | | <el-col :span="6" :data="petList"> |
| | | <div class="block" :model="petList" > |
| | | <el-col v-model="petList.headPicture" prop="headPicture"> |
| | | <el-avatar shape="square" :size=200 > |
| | | <!-- <el-avatar shape="square" :size=200 > |
| | | <el-image |
| | | :src="'http://47.93.189.255:8080/'+ petList.headPicture" |
| | | :src="'https://www.bendudu.com:8080/'+ petList.headPicture" |
| | | :fit="fit" style="width: 100%;height: 100%;border-radius: 0px 0px 0px 0px;opacity: 1;border: 1px solid rgba(0,0,0,0.5);" |
| | | ></el-image> |
| | | </el-avatar> |
| | | </el-avatar> --> |
| | | <el-upload ref="upload1" |
| | | action="" |
| | | :file-list="fileListOther" |
| | | list-type="picture-card" |
| | | accept="image/*" |
| | | :multiple="false" |
| | | :http-request="requestUpload1" |
| | | :on-success="handleSucess" |
| | | :limit="1"> |
| | | |
| | | <el-avatar shape="square" style="width: 200px;;height: 200px;" > |
| | | <el-image |
| | | :src="'https://www.bendudu.com:8080/'+ petList.headPicture" |
| | | :fit="fit" style="width: 100%;height: 100%;border-radius: 0px 0px 0px 0px;opacity: 1;border: 1px solid rgba(0,0,0,0.5);" |
| | | ></el-image> |
| | | |
| | | |
| | | </el-avatar> |
| | | </el-upload> |
| | | </el-col> |
| | | </div> |
| | | |
| | | <!-- <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改魅宠信息</el-button> --> |
| | | </el-col> |
| | | </div> |
| | | </el-container> |
| | |
| | | <el-container > |
| | | <el-col > |
| | | <el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left" |
| | | v-loading="loading" :data="petList" @selection-change="handleSelectionChange" label-width="120px" > |
| | | v-loading="loading" :data="petList" label-width="120px" > |
| | | <el-row :span="5"> |
| | | <el-form-item label="饲养人姓名" prop="masterName" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.masterName" placeholder="" clearable :style="{width: '100%'}" readonly unselectable="on" > |
| | | <el-input v-model="petList.masterName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | |
| | | |
| | | <el-row :span="5"> |
| | | <el-form-item label="住所详细地址" prop="masterAddress" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.masterAddress" placeholder="" clearable :style="{width: '100%'}" readonly unselectable="on"> |
| | | <el-form-item label="住所详细地址" prop="masterAddress" label-width="110px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.masterAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | |
| | | |
| | | <el-row :span="5"> |
| | | <el-form-item label="身份证号" prop="masterIdNum" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.masterIdNum" placeholder="" clearable :style="{width: '100%'}" readonly unselectable="on"> |
| | | <el-input v-model="petList.masterIdNum" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="移动电话" prop="phone" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.phone" placeholder="" clearable :style="{width: '100%'}" readonly unselectable="on"> |
| | | <el-input v-model="petList.phone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | |
| | | <el-col :span="6" :data="petList"> |
| | | <div class="block" :model="petList" > |
| | | <el-col v-model="petList.fullPicture" prop="fullPicture"> |
| | | <el-avatar shape="square" style="width: 1000px;;height: 500px;" > |
| | | <el-image |
| | | :src="'http://47.93.189.255:8080/'+ petList.fullPicture" |
| | | :fit="fit" style="width: 100%;height: 100%;border-radius: 0px 0px 0px 0px;opacity: 1;border: 1px solid rgba(0,0,0,0.5);" |
| | | ></el-image> |
| | | </el-avatar> |
| | | |
| | | <el-upload ref="upload" |
| | | action="" |
| | | :file-list="fileList" |
| | | list-type="picture-card" |
| | | accept="image/*" |
| | | :multiple="false" |
| | | :http-request="requestUpload" |
| | | :on-success="handleSucess" |
| | | :limit="1"> |
| | | |
| | | <el-avatar shape="square" style="width: 1000px;;height: 500px;" > |
| | | <el-image |
| | | :src="'https://www.bendudu.com:8080/'+ petList.fullPicture" |
| | | :fit="fit" style="width: 100%;height: 100%;border-radius: 0px 0px 0px 0px;opacity: 1;border: 1px solid rgba(0,0,0,0.5);" |
| | | ></el-image> |
| | | |
| | | |
| | | </el-avatar> |
| | | </el-upload> |
| | | |
| | | |
| | | |
| | | |
| | | </el-col> |
| | | </div> |
| | | <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改魅宠信息</el-button> |
| | | |
| | | </el-col> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img w-full :src="dialogImageUrl" alt="Preview Image" /> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getPetList, getPetowner, listPetnote,getPetnoteList,uploadPic, download,updatePetowner,updatePet,addPetnote} from "@/api/pet/index"; |
| | | import {getPetList, listPetnote,uploadPic, 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:[ |
| | |
| | | happenEndTime:undefined |
| | | }, |
| | | pid:undefined, |
| | | dsb:true, |
| | | btn:false, |
| | | title: '魅宠备忘录', |
| | | openDataScope: false, |
| | | PetNoteList:{ |
| | |
| | | }, |
| | | petList: { |
| | | type: undefined, |
| | | kind: undefined, |
| | | suitable: undefined, |
| | | method: undefined, |
| | | location:undefined, |
| | | place:undefined, |
| | | remark: undefined, |
| | | url: undefined, |
| | | }, |
| | | petownerList: { |
| | | email: undefined, |
| | | idNum: undefined, |
| | | name: undefined, |
| | | certificateType: undefined, |
| | | certificateNo: undefined, |
| | | fixedNo:undefined, |
| | | many:undefined, |
| | | phoneNo:undefined, |
| | | address: undefined, |
| | | property: undefined, |
| | | birth: undefined, |
| | | sex: undefined, |
| | | color: undefined, |
| | | properties: undefined, |
| | | securityCode: undefined, |
| | | dialect: undefined, |
| | | address:undefined, |
| | | eatHabit:undefined, |
| | | diseatHabit: undefined, |
| | | LifeHabit: undefined, |
| | | disLifeHabit: undefined, |
| | | url: undefined, |
| | | headPicture:undefined, |
| | | fullPicture:undefined, |
| | | }, |
| | | |
| | | dialogImageUrl: '', |
| | | dialogVisible: false, |
| | | disabled: false, |
| | | btn: false, |
| | | // 表单校验 |
| | | rules: { |
| | | animal: [{ |
| | | required: true, |
| | | message: '请输入种类', |
| | | trigger: 'blue' |
| | | }], |
| | | idNum: [{ |
| | | required: true, |
| | | message: '请输入证件号码', |
| | | trigger: 'blue' |
| | | }], |
| | | securityCode: [{ |
| | | // required: true, |
| | | message: '请输入防伪码', |
| | | trigger: 'blue' |
| | | }], |
| | | name: [{ |
| | | required: true, |
| | | message: '请输入名字', |
| | | trigger: 'blue' |
| | | }], |
| | | birth: [{ |
| | | required: true, |
| | | message: '请输入出生日期', |
| | | trigger: 'change' |
| | | }], |
| | | color: [{ |
| | | required: true, |
| | | message: '请输入颜色', |
| | | trigger: 'blue' |
| | | }], |
| | | properties: [{ |
| | | // required: true, |
| | | message: '请输入性质', |
| | | trigger: 'blue' |
| | | }], |
| | | sex: [{ |
| | | required: true, |
| | | message: '请选择性别', |
| | | trigger: 'change' |
| | | }], |
| | | |
| | | LifeHabit: [{ |
| | | // required: true, |
| | | message: '请输入生活习惯(喜)', |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | disLifeHabit: [{ |
| | | // required: true, |
| | | message: '请输入生活习惯(恶)', |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | eatHabit: [{ |
| | | required: true, |
| | | message: '请输入饮食习惯(喜)', |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | diseatHabit: [{ |
| | | required: true, |
| | | message: '请输入饮食习惯(喜)', |
| | | trigger: 'blur' |
| | | }], |
| | | masterName: [{ |
| | | required: true, |
| | | message: '请输入主人姓名', |
| | | trigger: 'blur' |
| | | }], |
| | | masterIdNum: [{ |
| | | required: true, |
| | | message: '请输入主人身份证号码', |
| | | trigger: 'blur' |
| | | }], |
| | | phone: [{ |
| | | required: true, |
| | | message: '请输入手机号', |
| | | trigger: 'blur' |
| | | }], |
| | | masterAddress: [{ |
| | | required: true, |
| | | message: '请输入主人地址', |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | |
| | | type: [{ |
| | | required: true, |
| | | message: '请输入类别', |
| | | trigger: 'blur' |
| | | }], |
| | | method: [{ |
| | | required: true, |
| | | message: '请输入保洁方法', |
| | | trigger: 'blur' |
| | | }], |
| | | location: [{ |
| | | required: true, |
| | | message: '请输入材料存放地', |
| | | trigger: 'blur' |
| | | }], |
| | | place: [{ |
| | | required: true, |
| | | message: '请输入放置地点', |
| | | trigger: 'blur' |
| | | }], |
| | | suitable: [{ |
| | | required: true, |
| | | message: '请输入适用人', |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | }, |
| | | typeOptions: [], |
| | |
| | | computed: {}, |
| | | watch: {}, |
| | | created() { |
| | | const id = this.$route.params && this.$route.params.pid; |
| | | const id = this.$route.params && this.$route.params.id; |
| | | this.pid = id; |
| | | let jd; |
| | | if(this.$route.query.detail!=undefined) |
| | |
| | | jd = this.$route.query.detail |
| | | this.btn= jd |
| | | this.dsb = !jd |
| | | document.title = "修改魅宠详细信息"; |
| | | // document.title = "修改魅宠详细信息"; |
| | | this.$route.meta.title = "修改魅宠详细信息";//列表的名称 |
| | | } |
| | | else{ |
| | | document.title = "查看魅宠详细信息"; |
| | | // document.title = "查看魅宠详细信息"; |
| | | this.$route.meta.title = "查看魅宠详细信息";//列表的名称 |
| | | this.btn = false; |
| | | } |
| | | |
| | | let _this = this |
| | |
| | | this.loading = true; |
| | | getPetList(id).then((response) => { |
| | | this.petList = response.data; |
| | | console.log(this.petList) |
| | | alert(this.petList.headPicture) |
| | | this.loading = false; |
| | | }); |
| | | getPetowner(id).then((response) => { |
| | | this.petownerList = response.data; |
| | | this.loading = false; |
| | | }); |
| | | // getPetowner(id).then((response) => { |
| | | // this.petownerList = response.data; |
| | | // this.loading = false; |
| | | // }); |
| | | |
| | | } |
| | | |
| | |
| | | this.loading = true; |
| | | // this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] |
| | | // this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] |
| | | |
| | | // console.log(this.queryParams) |
| | | this.queryParams.pid = this.pid; |
| | | // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listPetnote(this.queryParams).then(response => { |
| | | // alert(123) |
| | | // console.log(response.data) |
| | | console.log(response.data) |
| | | this.PetNoteList = response.data.data; |
| | | |
| | | this.total = response.data.total; |
| | |
| | | } |
| | | ); |
| | | }, |
| | | submitForm() { |
| | | let ul = this.fileList.map(function (elem){ |
| | | return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | }).join(",") |
| | | let uls = this.fileListOther.map(function (elem){ |
| | | return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | }).join(",") |
| | | this.petList.url = ul+","+uls |
| | | |
| | | this.$refs['elForm'].validate(valid => { |
| | | requestUpload2(params) |
| | | { |
| | | var file = params.file; |
| | | var formData = new FormData(); |
| | | |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | if (valid) { |
| | | if (this.petList.id != undefined) { |
| | | updatePet(this.petList).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | // this.open = false; |
| | | this.btn=false |
| | | }); |
| | | } else { |
| | | this.$modal.msgSuccess("修改失败"); |
| | | |
| | | } |
| | | } |
| | | uploadPic(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, |
| | | this.$refs['elForm'].validate(valid => { |
| | | |
| | | |
| | | if (valid) { |
| | | if (this.petList.id != undefined) { |
| | | updatePet(this.petList).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | // this.open = false; |
| | | this.btn=false |
| | | }); |
| | | } else { |
| | | this.$modal.msgSuccess("修改失败"); |
| | | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | |
| | | /** 备忘录 */ |
| | | Petnote(pid){ |
| | | |
| | | this.openDataScope = true |
| | | this.getList() |
| | | const id = this.$route.params && this.$route.params.id; |
| | | this.$router.push("/familymodel/pet/petnote/" + id ); |
| | | |
| | | }, |
| | | handlePictureCardPreview(file) { |
| | | this.dialogFileUrl = file.url; |
| | |
| | | this.dsb = false |
| | | this.btn = true |
| | | }, |
| | | handleSucess() |
| | | { |
| | | // alert(15) |
| | | this.$refs.upload.clearFiles(); |
| | | }, |
| | | requestUpload(params) |
| | | { |
| | | var file = params.file; |
| | |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | uploadPic(formData).then(response => { |
| | | let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) |
| | | this.$refs.upload.clearFiles(); |
| | | // this.uploading1 = true; |
| | | //alert(100) |
| | | uploadPic(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}) |
| | | // console("ok") |
| | | // alert(90) |
| | | // alert(response.data.url) |
| | | _this.petList.fullPicture = response.data.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | updatePet(_this.petList).then(response => { |
| | | _this.$modal.msgSuccess("图像修改成功"); |
| | | // this.open = false; |
| | | _this.btn=false |
| | | }); |
| | | // alert(100) |
| | | }) |
| | | //alert(90) |
| | | }, |
| | | requestUpload1(params) |
| | | { |
| | | var file = params.file; |
| | | var formData = new FormData(); |
| | | formData.append('uploadFile', file); |
| | | let _this = this |
| | | |
| | | if(_this.fot.includes(pth) === true) |
| | | { |
| | | _this.fileList.push({name:response.data.fileName, "url":response.data.url}) |
| | | |
| | | } |
| | | |
| | | else{ |
| | | _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) |
| | | |
| | | } |
| | | }) |
| | | |
| | | } |
| | | this.$refs.upload1.clearFiles(); |
| | | // this.uploading1 = true; |
| | | //alert(100) |
| | | uploadPic(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}) |
| | | // console("ok") |
| | | // alert(90) |
| | | // alert(response.data.url) |
| | | _this.petList.headPicture = response.data.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | updatePet(_this.petList).then(response => { |
| | | _this.$modal.msgSuccess("修改成功"); |
| | | // this.open = false; |
| | | _this.btn=false |
| | | }); |
| | | // alert(100) |
| | | }) |
| | | //alert(90) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | <style scoped> |
| | | .mt |
| | | { |
| | | position: relative; |
| | |
| | | display: block; |
| | | |
| | | } |
| | | .hide /deep/ .el-upload--picture-card { |
| | | display: none; |
| | | } |
| | | .form{ |
| | | background:center/11% no-repeat url('../../assets/icons/form.png') ; |
| | | } |
| | | .pt{ |
| | | right: 50px; |
| | | top:-3px; |