From ebe31a83ee1c76bfc6546e8b60ae5cf90c554346 Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期一, 29 五月 2023 01:05:32 +0800
Subject: [PATCH] 完成家根网详情页面样式
---
ruoyi-ui/src/views/pet/petInfo.vue | 163 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 106 insertions(+), 57 deletions(-)
diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue
index db77c9b..7a4f7f2 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 >
@@ -205,14 +205,65 @@
</el-container>
-
+
<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,
@@ -300,7 +375,8 @@
computed: {},
watch: {},
created() {
- const id = this.$route.params && this.$route.params.id;
+ const id = this.$route.params && this.$route.params.pid;
+ this.pid = id;
let jd;
if(this.$route.query.detail!=undefined)
{
@@ -316,67 +392,37 @@
}
let _this = this
+
if (id) {
this.loading = true;
getPetList(id).then((response) => {
this.petList = response.data;
- let paths = response.data.url.split(",");
- for(let i = 0; i < paths.length; i++)
- {
- if(paths[i]!="") {
-
- let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
-
- if (_this.fot.includes(pth) === true)
- _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
- else {
- // alert(paths[i])
- let nms = paths[i].split("\/")
- let nm = nms[nms.length - 1]
- _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
- }
- }
- }
-
-
this.loading = false;
-
});
- this.getCateInfor()
-
- };
- if (id,pid) {
- this.loading = true;
- getPetownerList(id,pid).then((response) => {
+ getPetowner(id).then((response) => {
this.petownerList = response.data;
- let paths = response.data.url.split(",");
- for(let i = 0; i < paths.length; i++)
- {
- if(paths[i]!="") {
-
- let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
-
- if (_this.fot.includes(pth) === true)
- _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
- else {
- // alert(paths[i])
- let nms = paths[i].split("\/")
- let nm = nms[nms.length - 1]
- _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
- }
- }
- }
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]
+ this.queryParams.pid = this.pid;
+ // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+ getPetnoteList(this.pid).then(response => {
+ this.PetNoteList = response.data;
+ this.total = response.data.length;
+ this.loading = false;
+ }
+ );
+ },
submitForm() {
let ul = this.fileList.map(function (elem){
return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
@@ -419,22 +465,25 @@
saveAs(blob, filename)
})
},
-
+
/** 澶囧繕褰� */
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;
const Base64 = require('js-base64').Base64
this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
-
+
},
//鍒犻櫎鍥剧墖
handleRemoveFile(file,) {
-
+
for(let i = 0; i < this.fileListOther.length; i++)
{
if(this.fileListOther[i].url==file.url)
--
Gitblit v1.9.1