From 0c8a1f8aa72e98dd632990047adc490e0209ee14 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期四, 04 五月 2023 11:21:18 +0800
Subject: [PATCH] 主要修改了petInfo里面的查看饲养人的接口,还有修改了查看备忘录接口和显示部分
---
ruoyi-ui/src/api/pet/index.js | 1
ruoyi-ui/src/views/pet/petInfo.vue | 124 +++++++++++++++++++++++++++++++++++------
2 files changed, 107 insertions(+), 18 deletions(-)
diff --git a/ruoyi-ui/src/api/pet/index.js b/ruoyi-ui/src/api/pet/index.js
index 19fb76a..c2a27fe 100644
--- a/ruoyi-ui/src/api/pet/index.js
+++ b/ruoyi-ui/src/api/pet/index.js
@@ -48,6 +48,7 @@
//鏍规嵁瀹犵墿id鏌ヨ涓讳汉淇℃伅
export function getPetowner(id) {
+ alert(id)
return request({
url: '/zfMaster/' + id,
method: 'get',
diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue
index 782ece2..cef38a2 100644
--- a/ruoyi-ui/src/views/pet/petInfo.vue
+++ b/ruoyi-ui/src/views/pet/petInfo.vue
@@ -3,7 +3,7 @@
<div class="form-header mt">
<h4 class="dt h4">鍩烘湰淇℃伅 </h4>
<el-button type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" :disabled="btn">缂栬緫</el-button>
- <el-button type="primary" @click="Petnote(id)" :disabled="btn">榄呭疇澶囧繕褰�</el-button>
+ <el-button type="primary" @click="Petnote(pid)" :disabled="btn">榄呭疇澶囧繕褰�</el-button>
</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 >
@@ -209,10 +209,61 @@
<el-dialog :visible.sync="dialogVisible">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
+
+ <el-dialog :title="title" :visible.sync="openDataScope" width="1000px" append-to-body>
+ <el-table v-loading="loading" :data="PetNoteList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
+ <el-table-column type="selection" width="55" align="center" />
+
+ <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
+
+ <el-table-column label="棰樺悕" prop="title" sortable :show-overflow-tooltip="true" width="150" />
+ <el-table-column label="鎻愰啋鏃堕棿" prop="remindTime" sortable :show-overflow-tooltip="true" width="150" />
+ <el-table-column label="璁板綍鏃堕棿" prop="createTime" sortable :show-overflow-tooltip="true" width="150" />
+
+ <el-table-column label="澶囨敞" prop="remark" sortable width="100" />
+
+ <!-- <el-table-column label="涓讳汉濮撳悕" prop="holder" sortable width="100" /> -->
+
+ <!-- <el-table-column label="瀹跺涵鍙�" prop="familyId" sortable width="100" /> -->
+
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <template slot-scope="scope" v-if="scope.row.roleId !== 1">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleUpdate(scope.row)"
+ v-hasPermi="['familymodel:property:info']"
+ >淇敼</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="handleDelete(scope.row)"
+ v-hasPermi="['system:role:remove']"
+ >鍒犻櫎</el-button>
+ <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:property:info']">
+ <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
+
+ </el-dropdown>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ style="background: #FEF7FC;"
+ />
+ </el-dialog>
+
</div>
</template>
<script>
-import {getPetList, getPetownerList, uploadPic, download} from "@/api/pet/index";
+import {getPetList, getPetowner, listPetnote,getPetnoteList,uploadPic, download} from "@/api/pet/index";
import {addRole, updateRole} from "@/api/system/role";
import {blobValidate} from "@/utils/ruoyi";
import errorCode from "@/utils/errorCode";
@@ -231,8 +282,32 @@
fileListOther:[
],
+ // 鎬绘潯鏁�
+ total: 0,
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ title:undefined,
+ remindTime:undefined,
+ createTime:undefined,
+ remark:undefined,
+ url:undefined,
+ happenStartTime:undefined,
+ happenEndTime:undefined
+ },
+ pid:undefined,
dsb:true,
btn:false,
+ title: '榄呭疇澶囧繕褰�',
+ openDataScope: false,
+ PetNoteList:{
+ pid:undefined,
+ title:undefined,
+ remide_time:undefined,
+ create_time:undefined,
+ remark:undefined,
+ url:undefined,
+ },
petList: {
type: undefined,
kind: undefined,
@@ -301,6 +376,7 @@
watch: {},
created() {
const id = this.$route.params && this.$route.params.pid;
+ this.pid = id;
let jd;
if(this.$route.query.detail!=undefined)
{
@@ -316,34 +392,43 @@
}
let _this = this
+
if (id) {
this.loading = true;
getPetList(id).then((response) => {
this.petList = response.data;
- console.log(response.data)
-
this.loading = false;
});
- this.getCateInfor()
-
- };
- if (id) {
- this.loading = true;
- getPetownerList(id).then((response) => {
+ getPetowner(id).then((response) => {
this.petownerList = response.data;
- console.log(response.data)
-
this.loading = false;
-
-
});
- this.getCateInfor()
- };
- this.getList();
+ }
+
+
},
mounted() {},
methods: {
+ getList() {
+ 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;
+ this.loading = false;
+ }
+ );
+ },
submitForm() {
let ul = this.fileList.map(function (elem){
return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
@@ -390,7 +475,10 @@
/** 澶囧繕褰� */
Petnote(pid){
- this.$router.push("/familymodel/pet/petnote/" + pid);
+
+ this.openDataScope = true
+ this.getList()
+ // this.$router.push("/familymodel/pet/petnote/" + pid);
},
handlePictureCardPreview(file) {
this.dialogFileUrl = file.url;
--
Gitblit v1.9.1