From dc2144395dd23896004bf4f7a1ce73b5da4a315d Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期二, 02 四月 2024 15:33:56 +0800
Subject: [PATCH] 修改了3月30这周的所有bug1
---
ruoyi-ui/src/views/pet/petInfo.vue | 53 +++++++++++++++++++++++++++++++----------------------
1 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue
index 3170d8d..cf3fac5 100644
--- a/ruoyi-ui/src/views/pet/petInfo.vue
+++ b/ruoyi-ui/src/views/pet/petInfo.vue
@@ -110,7 +110,7 @@
</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>
@@ -166,8 +166,10 @@
</el-upload>
</el-col>
</div>
+
<!-- <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼榄呭疇淇℃伅</el-button> -->
</el-col>
+
</div>
</el-container>
@@ -259,11 +261,15 @@
</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" />
@@ -381,7 +387,7 @@
</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";
@@ -397,7 +403,7 @@
// 鏁版嵁鑼冨洿閫夐」
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:[
@@ -441,7 +447,7 @@
dialect: undefined,
address:undefined,
eatHabit:undefined,
- diseatHabit: undefined,
+ disEatHabit: undefined,
LifeHabit: undefined,
disLifeHabit: undefined,
url: undefined,
@@ -514,9 +520,9 @@
trigger: 'blur'
}],
- diseatHabit: [{
+ disEatHabit: [{
required: true,
- message: '璇疯緭鍏ラギ椋熶範鎯�(鍠�)',
+ message: '璇疯緭鍏ラギ椋熶範鎯�(鎭�)',
trigger: 'blur'
}],
masterName: [{
@@ -557,13 +563,16 @@
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
@@ -573,7 +582,7 @@
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) => {
@@ -610,7 +619,7 @@
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")
@@ -619,14 +628,14 @@
},
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 => {
@@ -744,7 +753,7 @@
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})
@@ -771,7 +780,7 @@
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})
--
Gitblit v1.9.1