| | |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table v-loading="loading" :data="PetNoteList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;width: 100%;"> |
| | | <el-table v-loading="loading" border :data="PetNoteList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;width: 100%;"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80px"/> |
| | | <el-table-column label="日期" prop="happenTime" sortable width="200px" align="center"> |
| | |
| | | // 数据范围选项 |
| | | // 数据范围选项 |
| | | fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', |
| | | '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'], |
| | | '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng','.M4A'], |
| | | |
| | | fileList:[ |
| | | ], |
| | |
| | | ...this.queryParams |
| | | }; |
| | | |
| | | |
| | | if (Object.keys(queryParams).length === 1 && 'pid' in queryParams) { |
| | | this.download('/family/zfPetNote/export', queryParams, `zfPetNote_${new Date().getTime()}.xlsx`); |
| | | } else { |
| | |
| | | var formData = new FormData(); |
| | | formData.append('excelImport', file); |
| | | formData.append('pid', pid); // 添加导入到哪个 ID 的信息 |
| | | console.log(this.pid); |
| | | // console.log(formData,'formDataformDataformData') |
| | | // alert(this.pid); |
| | | let _this = this; |
| | | |
| | | enload(formData) |
| | | enload(this.pid,formData) |
| | | .then(response => { |
| | | _this.getList(); |
| | | Message({ message: "导入成功", type: 'warning' }); |
| | |
| | | .catch(error => { |
| | | Message({ message: "导入失败", type: 'error' }); |
| | | }); |
| | | } |
| | | }, |
| | | // 弹窗 |
| | | handleShow(scope){ |
| | | |
| | | this.openDataScope = true |
| | | this.getList() |
| | | }, |
| | | |
| | | }, |
| | | |
| | | // 弹窗 |
| | | handleShow(scope){ |
| | | |
| | | this.openDataScope = true |
| | | this.getList() |
| | | } |
| | | |
| | | }; |
| | | </script> |