| | |
| | | <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" > |
| | |
| | | </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> |
| | |
| | | <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-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="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> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="5"> |
| | | <el-form-item label="饮食习惯(恶)" prop="disEatHabit" label-width="100px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-form-item label="饮食习惯(恶)" prop="disEatHabit" label-width="120px" style="background: #FAD1E0;border-radius: 6px 6px 0px 6px;opacity: 1;"> |
| | | <el-input v-model="petList.disEatHabit" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-form-item size="large"> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-container> |
| | |
| | | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | |
| | | <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> |
| | | <div class="form-header mt"> |
| | | |
| | | |
| | | </div> |
| | | <div> |
| | | <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改魅宠信息</el-button> |
| | | </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,uploadPic1, download,updatePet} from "@/api/pet/index"; |
| | | import {addRole, updateRole} from "@/api/system/role"; |
| | | import {blobValidate} from "@/utils/ruoyi"; |
| | | import errorCode from "@/utils/errorCode"; |
| | |
| | | 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: '请输入idNum', |
| | | 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: [], |
| | |
| | | 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) |
| | | { |
| | | jd = this.$route.query.detail |
| | | this.btn= jd |
| | | this.dsb = !jd |
| | | document.title = "修改魅宠详细信息"; |
| | | this.isShow = true |
| | | |
| | | // document.title = "修改魅宠详细信息"; |
| | | this.$route.meta.title = "修改魅宠详细信息";//列表的名称 |
| | | } |
| | | else{ |
| | | document.title = "查看魅宠详细信息"; |
| | | // document.title = "查看魅宠详细信息"; |
| | | this.$route.meta.title = "查看魅宠详细信息";//列表的名称 |
| | | this.btn = false; |
| | | this.isShow = 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: { |
| | | 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.formData.url = ul+","+uls |
| | | 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.$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("修改失败"); |
| | | |
| | | } |
| | | 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 |
| | | |
| | | uploadPic1(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("修改失败"); |
| | | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** 查看详细信息 */ |
| | | 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() |
| | | }, |
| | |
| | | }, |
| | | |
| | | |
| | | /** 备忘录 */ |
| | | 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,) { |
| | | |
| | |
| | | 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) |
| | | { |
| | |
| | | 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) |
| | | uploadPic1(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) |
| | | uploadPic1(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; |
| | |
| | | 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; |