feige
2023-05-17 4efd39b4696db81789d3d92a54d197f1e85ecdf2
ruoyi-ui/src/views/pet/index.vue
@@ -111,7 +111,7 @@
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          @click="handleExportTemplate"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
@@ -132,8 +132,8 @@
      <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"/>
@@ -156,7 +156,7 @@
          <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
@@ -423,7 +423,7 @@
  },
  created() {
    this.getList();
    this.getCateInfor()
  //  this.getCateInfor()
  },
  methods: {
@@ -456,12 +456,9 @@
      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;
@@ -487,6 +484,10 @@
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
    },
    getRowId(row)
    {
      return row.id
    },
    // 取消按钮
    cancel() {
@@ -625,9 +626,24 @@
    },
    /** 导出按钮操作 */
    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){