From 4bb9f72e6caf2a1a5d54d62cca3bcba2ad2de825 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期四, 24 八月 2023 22:37:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-ui/src/views/pet/petInfo.vue | 136 +++++++++++++++++++++++++++++---------------
1 files changed, 89 insertions(+), 47 deletions(-)
diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue
index 2646546..bca6fee 100644
--- a/ruoyi-ui/src/views/pet/petInfo.vue
+++ b/ruoyi-ui/src/views/pet/petInfo.vue
@@ -1,8 +1,18 @@
<template>
<div class="app-container">
<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>
+ </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 >
@@ -124,7 +134,7 @@
</el-avatar>
</el-col>
</div>
-
+ <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼榄呭疇淇℃伅</el-button>
</el-col>
</div>
</el-container>
@@ -194,12 +204,20 @@
: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-upload class="upload-demo" action="/uploadImage" :on-success="handleUploadSuccess">
+ <el-button slot="trigger">鐐瑰嚮涓婁紶鏂板浘鐗�</el-button>
+ </el-upload>
+
</el-avatar>
</el-col>
</div>
- <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼榄呭疇淇℃伅</el-button>
+ <el-button>淇敼</el-button>
</el-col>
</div>
+
+
+
+
<el-dialog :visible.sync="dialogVisible">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
@@ -317,7 +335,7 @@
</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";
@@ -374,17 +392,7 @@
remark: undefined,
url: undefined,
},
- petownerList: {
- email: undefined,
- name: undefined,
- certificateType: undefined,
- certificateNo: undefined,
- fixedNo:undefined,
- many:undefined,
- phoneNo:undefined,
- address: undefined,
- property: undefined,
- },
+
dialogImageUrl: '',
dialogVisible: false,
disabled: false,
@@ -424,7 +432,7 @@
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)
@@ -446,12 +454,13 @@
this.loading = true;
getPetList(id).then((response) => {
this.petList = response.data;
+ console.log(this.petList)
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;
+ // });
}
@@ -470,39 +479,68 @@
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;
this.loading = false;
}
);
},
- 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
+ requestUpload(params)
+ {
+ var file = params.file;
+ var formData = new FormData();
- this.$refs['elForm'].validate(valid => {
+ 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.fileList1.push({name:response.data.fileName, url:response.data.url})
+ console("ok")
})
+
+ },
+ requestUpload2(params)
+ {
+ var file = params.file;
+ var formData = new FormData();
+
+ 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.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("淇敼澶辫触");
+
+ }
+ }
+ })
},
@@ -545,8 +583,9 @@
/** 澶囧繕褰� */
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;
@@ -625,6 +664,9 @@
display: block;
}
+.form{
+ background:center/11% no-repeat url('../../assets/icons/form.png') ;
+}
.pt{
right: 50px;
top:-3px;
--
Gitblit v1.9.1