From 3b3add749840ae9e9930822586ae5cad4a35de0a Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期二, 05 十二月 2023 23:02:02 +0800
Subject: [PATCH] 修改了target
---
ruoyi-ui/src/views/pet/petInfo.vue | 695 +++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 520 insertions(+), 175 deletions(-)
diff --git a/ruoyi-ui/src/views/pet/petInfo.vue b/ruoyi-ui/src/views/pet/petInfo.vue
index 782ece2..3170d8d 100644
--- a/ruoyi-ui/src/views/pet/petInfo.vue
+++ b/ruoyi-ui/src/views/pet/petInfo.vue
@@ -1,17 +1,31 @@
<template>
- <div class="app-container">
+ <div class="app-container" id="printable-content">
<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>
+ <!-- <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>
+ <el-button size="mini" type="text" v-print="'#printable-content'" 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 >
<div >
<el-container >
- <el-col >
+ <el-col >
<el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left"
- v-loading="loading" :data="petList" @selection-change="handleSelectionChange" label-width="120px" >
+ v-loading="loading" :data="petList" label-width="120px" >
<el-row :span="5">
<el-form-item label="璇佷欢鍙风爜" prop="idNum" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
<el-input v-model="petList.idNum" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" >
@@ -25,25 +39,26 @@
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="鍑虹敓鏃ユ湡" prop="birth" label-width="70px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petList.birth" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-form-item label="鍑虹敓鏃ユ湡" prop="birth" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-date-picker v-model="petList.birth" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+ :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd"
+ ></el-date-picker>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="棰滆壊" prop="color" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-form-item label="棰滆壊" prop="color" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
<el-input v-model="petList.color" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="楗涔犳儻(鍠�)" prop="eatHabit" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-form-item label="楗涔犳儻(鍠�)" prop="eatHabit" label-width="110px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
<el-input v-model="petList.eatHabit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="鐢熸椿涔犳儻(鍠�)" prop="lifeHabit" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-form-item label="鐢熸椿涔犳儻(鍠�)" prop="lifeHabit" label-width="110px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
<el-input v-model="petList.lifeHabit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
@@ -64,26 +79,33 @@
<el-col v-loading="loading" :data="petList" @selection-change="handleSelectionChange">
<el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left" >
<el-row :span="5">
- <el-form-item label="绉嶇被" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-form-item label="鍝佺" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
<el-input v-model="petList.type" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="鍚嶅瓧" prop="name" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-form-item label="鍚嶅瓧" prop="name" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
<el-input v-model="petList.name" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="鎬у埆" prop="sex" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petList.sex === 1 ? '闆勬��':'闆屾��' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-form-item label="鎬у埆" prop="sex" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <template v-if="dsb">
+ <el-input v-model="petList.sex === 1 ? '闆勬��':'闆屾��'" :disabled="true"></el-input>
+ </template>
+ <template v-else>
+ <el-select v-model="petList.sex" placeholder="璇烽�夋嫨淇濇磥/鏀剁撼" clearable :style="{width: '100%'}">
+ <el-option label="闆屾��" value="0"></el-option>
+ <el-option label="闆勬��" value="1"></el-option>
+ </el-select>
+ </template>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="鎬ц川" prop="properties" label-width="40px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petList.properties" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
+ <el-form-item label="绉嶇被" prop="animal" label-width="50px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-input v-model="petList.animal" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
@@ -105,6 +127,9 @@
</el-input>
</el-form-item>
</el-row>
+ <el-form-item size="large">
+
+ </el-form-item>
</el-form>
</el-col>
</el-container>
@@ -112,17 +137,36 @@
<div style="padding-left:250px;padding-top:30px">
<el-col :span="6" :data="petList">
- <div class="block" :model="petList" >
- <el-col v-model="petList.url" prop="url">
- <el-avatar shape="square" :size=200 >
+ <div class="block" :model="petList" >
+ <el-col v-model="petList.headPicture" prop="headPicture">
+ <!-- <el-avatar shape="square" :size=200 >
<el-image
- :src="'http://47.93.189.255:8080/'+ petList.url"
- :fit="fit" style="width: 212px;height: 168px;border-radius: 0px 0px 0px 0px;opacity: 1;border: 1px solid rgba(0,0,0,0.5);"
+ :src="'https://www.bendudu.com:8080/'+ petList.headPicture"
+ :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-avatar>
- </el-col>
- </div>
+ </el-avatar> -->
+ <el-upload ref="upload1"
+ action=""
+ :file-list="fileListOther"
+ list-type="picture-card"
+ accept="image/*"
+ :multiple="false"
+ :http-request="requestUpload1"
+ :on-success="handleSucess"
+ :limit="1">
+ <el-avatar shape="square" style="width: 200px;;height: 200px;" >
+ <el-image
+ :src="'https://www.bendudu.com:8080/'+ petList.headPicture"
+ :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-avatar>
+ </el-upload>
+ </el-col>
+ </div>
+<!-- <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼榄呭疇淇℃伅</el-button> -->
</el-col>
</div>
</el-container>
@@ -132,35 +176,20 @@
<el-container >
<div >
<el-container >
- <el-col >
- <el-form ref="elForm" :model="petownerList" :rules="rules" size="medium" label-position="left"
- v-loading="loading" :data="petownerList" @selection-change="handleSelectionChange" label-width="120px" >
+ <el-col >
+ <el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left"
+ v-loading="loading" :data="petList" label-width="120px" >
<el-row :span="5">
- <el-form-item label="楗插吇浜哄鍚�" prop="name" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.name" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" >
+ <el-form-item label="楗插吇浜哄鍚�" prop="masterName" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-input v-model="petList.masterName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" >
</el-input>
</el-form-item>
</el-row>
+
+
<el-row :span="5">
- <el-form-item label="鍥哄畾鐢佃瘽" prop="fixedNo" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.fixedNo" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-row :span="5">
- <el-form-item label="绉诲姩鐢佃瘽" prop="birth" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.birth" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-row :span="5">
- <el-form-item label="浣忔墍鎬ц川" prop="property" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.property" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-form-item label="浣忔墍璇︾粏鍦板潃" prop="address" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.address" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
+ <el-form-item label="浣忔墍璇︾粏鍦板潃" prop="masterAddress" label-width="110px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-input v-model="petList.masterAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
@@ -171,48 +200,188 @@
<div style="padding-left:150px">
<el-container>
- <el-col v-loading="loading" :data="petownerList" @selection-change="handleSelectionChange">
- <el-form ref="elForm" :model="petownerList" :rules="rules" size="medium" label-position="left" >
+ <el-col v-loading="loading" :data="petList" @selection-change="handleSelectionChange">
+ <el-form ref="elForm" :model="petList" :rules="rules" size="medium" label-position="left" >
+
<el-row :span="5">
- <el-form-item label="璇佷欢绫诲瀷" prop="certificateType" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.certificateType" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
+ <el-form-item label="韬唤璇佸彿" prop="masterIdNum" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-input v-model="petList.masterIdNum" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="5">
- <el-form-item label="璇佷欢鍙风爜" prop="certificateNo" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.certificateNo" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-row :span="5">
- <el-form-item label="鎷ユ湁鐘彧鏁伴噺" prop="many" label-width="140px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.many " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item>
- </el-row>
- <el-row :span="5">
- <el-form-item label="鐢靛瓙閭欢" prop="email" label-width="80px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
- <el-input v-model="petownerList.email" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
+ <el-form-item label="绉诲姩鐢佃瘽" prop="phone" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;">
+ <el-input v-model="petList.phone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
+ <el-form-item size="large">
+
+ </el-form-item>
</el-form>
</el-col>
</el-container>
</div>
-
</el-container>
+
+ <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>
+ <div style="padding-left:50px;width: 1000px;;height: 500px;">
+ <el-col :span="6" :data="petList">
+ <div class="block" :model="petList" >
+ <el-col v-model="petList.fullPicture" prop="fullPicture">
+
+ <el-upload ref="upload"
+ action=""
+ :file-list="fileList"
+ list-type="picture-card"
+ accept="image/*"
+ :multiple="false"
+ :http-request="requestUpload"
+ :on-success="handleSucess"
+ :limit="1">
+
+ <el-avatar shape="square" style="width: 1000px;;height: 500px;" >
+ <el-image
+ :src="'https://www.bendudu.com: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-avatar>
+ </el-upload>
+
+
+
+
+ </el-col>
+ </div>
+
+ </el-col>
+ </div>
+
+
+
+
<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-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ plain
+ icon="el-icon-plus"
+ size="mini"
+ @click="handleAdd"
+ v-hasPermi="['system:role:add']"
+ >鏂板</el-button>
+ </el-col>
+
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-delete"
+ size="mini"
+ :disabled="multiple"
+ @click="handleDelete"
+ v-hasPermi="['system:role:remove']"
+ >鍒犻櫎</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExport"
+ v-hasPermi="['family:note:export']"
+ >瀵煎嚭</el-button>
+ </el-col>
+
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExport"
+ v-hasPermi="['family:note:export']"
+ >瀵煎叆妯℃澘涓嬭浇</el-button>
+ </el-col>
+ <el-col :span="1.2">
+ <el-upload
+ action=""
+ class="upload-demo"
+ :show-file-list="false"
+ :http-request="handleEnport"
+ >
+ <el-button size="mini" type="primary"
+ plain
+ icon="el-icon-plus" >瀵煎叆</el-button>
+
+ </el-upload>
+ </el-col>
+
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+ </el-row>
+ <el-table v-loading="loading" :data="PetNoteList" @selection-change="handleSelectionChange" @row-click="handleCheck" :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="鎿嶄綔" 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"
+
+ />
+
+
+ </el-dialog>
+
</div>
</template>
<script>
-import {getPetList, getPetownerList, uploadPic, download} 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";
@@ -225,73 +394,153 @@
return {
cdi:"榄呭疇璇︾粏淇℃伅",
udi:"榄呭疇淇℃伅淇敼",
- fot:[".jpg",".jif"],
+ // 鏁版嵁鑼冨洿閫夐」
+ 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:[
-
],
dsb:true,
btn:false,
+ isShow:true,
+ // 鎬绘潯鏁�
+ total: 0,
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ title:undefined,
+ remindTime:undefined,
+ createTime:undefined,
+ remark:undefined,
+ url:undefined,
+ happenStartTime:undefined,
+ happenEndTime:undefined
+ },
+ pid:undefined,
+ title: '榄呭疇澶囧繕褰�',
+ openDataScope: false,
+ PetNoteList:{
+ pid:undefined,
+ title:undefined,
+ remide_time:undefined,
+ create_time:undefined,
+ remark:undefined,
+ url:undefined,
+ },
petList: {
type: undefined,
- kind: undefined,
- suitable: undefined,
- method: undefined,
- location:undefined,
- place:undefined,
- remark: undefined,
- url: undefined,
- },
- petownerList: {
- email: undefined,
+ idNum: undefined,
name: undefined,
- certificateType: undefined,
- certificateNo: undefined,
- fixedNo:undefined,
- many:undefined,
- address: undefined,
- property: undefined,
+ birth: undefined,
+ sex: undefined,
+ color: undefined,
+ properties: undefined,
+ securityCode: undefined,
+ dialect: undefined,
+ address:undefined,
+ eatHabit:undefined,
+ diseatHabit: undefined,
+ LifeHabit: undefined,
+ disLifeHabit: undefined,
+ url: undefined,
+ headPicture:undefined,
+ fullPicture:undefined,
},
- dialogImageUrl: '',
- dialogVisible: false,
- disabled: false,
+
+ dialogImageUrl: '',
+ dialogVisible: false,
+ disabled: false,
+ btn: false,
+ // 琛ㄥ崟鏍¢獙
rules: {
+ animal: [{
+ required: true,
+ message: '璇疯緭鍏ョ绫�',
+ trigger: 'blue'
+ }],
idNum: [{
required: true,
- message: '璇疯緭鍏dNum',
- trigger: 'blur'
+ message: '璇疯緭鍏ヨ瘉浠跺彿鐮�',
+ trigger: 'blue'
}],
- kind: [{
+ securityCode: [{
+ // required: true,
+ message: '璇疯緭鍏ラ槻浼爜',
+ trigger: 'blue'
+ }],
+ name: [{
required: true,
- message: '璇烽�夋嫨淇濇磥/鏀剁撼',
+ message: '璇疯緭鍏ュ悕瀛�',
+ trigger: 'blue'
+ }],
+ birth: [{
+ required: true,
+ message: '璇疯緭鍏ュ嚭鐢熸棩鏈�',
trigger: 'change'
}],
- type: [{
+ color: [{
required: true,
- message: '璇疯緭鍏ョ被鍒�',
+ message: '璇疯緭鍏ラ鑹�',
+ trigger: 'blue'
+ }],
+ properties: [{
+ // required: true,
+ message: '璇疯緭鍏ユ�ц川',
+ trigger: 'blue'
+ }],
+ sex: [{
+ required: true,
+ message: '璇烽�夋嫨鎬у埆',
+ trigger: 'change'
+ }],
+
+ LifeHabit: [{
+ // required: true,
+ message: '璇疯緭鍏ョ敓娲讳範鎯�(鍠�)',
trigger: 'blur'
}],
- method: [{
- required: true,
- message: '璇疯緭鍏ヤ繚娲佹柟娉�',
+
+ disLifeHabit: [{
+ // required: true,
+ message: '璇疯緭鍏ョ敓娲讳範鎯�(鎭�)',
trigger: 'blur'
}],
- location: [{
+
+ eatHabit: [{
required: true,
- message: '璇疯緭鍏ユ潗鏂欏瓨鏀惧湴',
+ message: '璇疯緭鍏ラギ椋熶範鎯�(鍠�)',
trigger: 'blur'
}],
- place: [{
+
+ diseatHabit: [{
required: true,
- message: '璇疯緭鍏ユ斁缃湴鐐�',
+ message: '璇疯緭鍏ラギ椋熶範鎯�(鍠�)',
trigger: 'blur'
}],
- suitable: [{
+ masterName: [{
required: true,
- message: '璇疯緭鍏ラ�傜敤浜�',
+ message: '璇疯緭鍏ヤ富浜哄鍚�',
trigger: 'blur'
}],
+ masterIdNum: [{
+ required: true,
+ message: '璇疯緭鍏ヤ富浜鸿韩浠借瘉鍙风爜',
+ trigger: 'blur'
+ }],
+ phone: [{
+ required: true,
+ message: '璇疯緭鍏ユ墜鏈哄彿',
+ trigger: 'blur'
+ }],
+ masterAddress: [{
+ required: true,
+ message: '璇疯緭鍏ヤ富浜哄湴鍧�',
+ trigger: 'blur'
+ }],
+
+
},
typeOptions: [],
@@ -300,7 +549,8 @@
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)
{
@@ -313,63 +563,107 @@
else{
document.title = "鏌ョ湅榄呭疇璇︾粏淇℃伅";
this.$route.meta.title = "鏌ョ湅榄呭疇璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+ this.btn = false;
}
let _this = this
+
if (id) {
this.loading = true;
getPetList(id).then((response) => {
this.petList = response.data;
- console.log(response.data)
-
+ console.log(this.petList)
+ alert(this.petList.headPicture)
this.loading = false;
});
- this.getCateInfor()
+ // getPetowner(id).then((response) => {
+ // this.petownerList = response.data;
+ // this.loading = false;
+ // });
- };
- if (id) {
- this.loading = true;
- getPetownerList(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 => {
+ listPetnote(this.queryParams).then(response => {
+ this.PetNoteList = response.data.data;
+
+ this.total = response.data.total;
+ this.loading = false;
+ }
+ );
+ },
+
+ 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.fileList.map(function (elem){
+
+ let ul = this.fileList1.map(function (elem){
return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
}).join(",")
- let uls = this.fileListOther.map(function (elem){
+ let uls = this.fileList2.map(function (elem){
return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
- }).join(",")
- this.formData.url = ul+","+uls
-
- this.$refs['elForm'].validate(valid => {
+ }).join(",")
+ this.petList.headPicture = ul,
+ this.petList.fullPicture = uls,
+ this.$refs['elForm'].validate(valid => {
- if (valid) {
- if (this.formData.id != undefined) {
- updateEconomy(this.formData).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- // this.open = false;
- this.btn=false
- });
- } else {
- this.$modal.msgSuccess("淇敼澶辫触");
+ 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("淇敼澶辫触");
+ }
}
- }
- })
+ })
},
+
+
+ /** 鏌ョ湅璇︾粏淇℃伅 */
+ handleCheck(row){
+ const id = row.id;
+ this.$router.push("/familymodel/pet/petnote/" + id);
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ const id = row.id;
+ let jd = true
+
+ this.$router.push({
+ path:"/familymodel/pet/petnote/" + id,
+ query:{
+ detail:jd
+ }
+ });
+ },
+
resetForm() {
this.$refs['elForm'].resetFields()
},
@@ -388,17 +682,26 @@
},
- /** 澶囧繕褰� */
- Petnote(pid){
- this.$router.push("/familymodel/pet/petnote/" + pid);
+ /** 澶囧繕褰� */
+ Petnote(pid){
+
+ const id = this.$route.params && this.$route.params.id;
+ this.$router.push("/familymodel/pet/petnote/" + id );
+
},
- handlePictureCardPreview(file) {
- this.dialogFileUrl = file.url;
+ 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');
- },
+ },
+ /** 鏂板澶囧繕褰曟寜閽搷浣� */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "娣诲姞澶囧繕褰曡缁嗕俊鎭�";
+ },
//鍒犻櫎鍥剧墖
handleRemoveFile(file,) {
@@ -408,23 +711,28 @@
this.$delete(this.fileListOther,i);
}
},
- handleDownload(url) {
- var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
+ handleDownload(url) {
+ var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
- let lens = formData.path.split(".")
- let suffix = lens[lens.length-1]
- download(formData).then(async (response) => {
- const isLogin = await blobValidate(response);
- let nt = new Date().getTime()
- let filename = 'property_'+nt+'.'+suffix
- const blob = new Blob([response])
- saveAs(blob, filename)
- })
- },
+ let lens = formData.path.split(".")
+ let suffix = lens[lens.length-1]
+ download(formData).then(async (response) => {
+ const isLogin = await blobValidate(response);
+ let nt = new Date().getTime()
+ let filename = 'property_'+nt+'.'+suffix
+ const blob = new Blob([response])
+ saveAs(blob, filename)
+ })
+ },
handleEdit()
{
this.dsb = false
this.btn = true
+ },
+ handleSucess()
+ {
+ // alert(15)
+ this.$refs.upload.clearFiles();
},
requestUpload(params)
{
@@ -433,28 +741,59 @@
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.$refs.upload.clearFiles();
+ // this.uploading1 = true;
+ //alert(100)
+ uploadPic(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})
+ // console("ok")
+ // alert(90)
+ // alert(response.data.url)
+ _this.petList.fullPicture = response.data.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+ updatePet(_this.petList).then(response => {
+ _this.$modal.msgSuccess("鍥惧儚淇敼鎴愬姛");
+ // this.open = false;
+ _this.btn=false
+ });
+ // alert(100)
+ })
+ //alert(90)
+ },
+requestUpload1(params)
+ {
+ var file = params.file;
+ var formData = new FormData();
+ formData.append('uploadFile', file);
+ let _this = this
- if(_this.fot.includes(pth) === true)
- {
- _this.fileList.push({name:response.data.fileName, "url":response.data.url})
-
- }
-
- else{
- _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
-
- }
- })
-
- }
+ this.$refs.upload1.clearFiles();
+ // this.uploading1 = true;
+ //alert(100)
+ uploadPic(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})
+ // console("ok")
+ // alert(90)
+ // alert(response.data.url)
+ _this.petList.headPicture = response.data.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+ updatePet(_this.petList).then(response => {
+ _this.$modal.msgSuccess("淇敼鎴愬姛");
+ // this.open = false;
+ _this.btn=false
+ });
+ // alert(100)
+ })
+ //alert(90)
+ },
}
}
</script>
-<style scoped lang="scss">
+<style scoped>
.mt
{
position: relative;
@@ -463,6 +802,12 @@
display: block;
}
+.hide /deep/ .el-upload--picture-card {
+ display: none;
+}
+.form{
+ background:center/11% no-repeat url('../../assets/icons/form.png') ;
+}
.pt{
right: 50px;
top:-3px;
--
Gitblit v1.9.1