From fe37beed44df3d9f98aad764f3977b18ef557784 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期五, 26 五月 2023 20:05:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-ui/src/views/pet/petInfo.vue | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 100 insertions(+), 18 deletions(-) diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue index 782ece2..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 > @@ -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,37 @@ } 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] + 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,"") @@ -390,7 +469,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