| | |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | @click="handleExportTemplate" |
| | | v-hasPermi="['family:note:export']" |
| | | >导入模板下载</el-button> |
| | | </el-col> |
| | |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="petList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table v-loading="loading" :data="petList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> |
| | | |
| | | <el-table-column label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> |
| | | |
| | |
| | | <span>{{ parseTime(scope.row.birth) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="宠物id" prop="id" 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 |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getCateInfor() |
| | | // this.getCateInfor() |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | this.loading = true; |
| | | this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] |
| | | this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] |
| | | |
| | | // console.log(this.queryParams) |
| | | // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listPet(this.queryParams).then(response => { |
| | | // alert(123) |
| | | // console.log(response.data) |
| | | this.petList = response.data.data; |
| | | |
| | | this.total = response.data.total; |
| | |
| | | if(this.fileListOther[i].url==file.url) |
| | | this.$delete(this.fileListOther,i); |
| | | } |
| | | }, |
| | | getRowId(row) |
| | | { |
| | | return row.id |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('family/property/export', { |
| | | const Ids = this.ids; |
| | | |
| | | if(Ids.length==0) |
| | | { |
| | | this.download('/family/property/export', { |
| | | ...this.queryParams |
| | | }, `property_${new Date().getTime()}.xlsx`) |
| | | }, `pet_${new Date().getTime()}.xlsx`) |
| | | }else{ |
| | | this.download('/family/property/export1/'+Ids, { |
| | | |
| | | }, `pet_${new Date().getTime()}.xlsx`) |
| | | } |
| | | }, |
| | | handleExportTemplate() |
| | | { |
| | | this.download('/family/property/model', { |
| | | ...this.queryParams |
| | | }, `pet_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | /** 导入操作*/ |
| | | handleEnport(params){ |
| | | var file = params.file; |