南昌市物联网技防平台-前端
liuyg
2021-04-13 a944f9e41effdbab16addf349b2de4838c36f0bb
src/views/animalHeat/animalHeat.vue
@@ -23,21 +23,29 @@
        <template slot="menuLeft">
          <el-button
            v-bind:class="activeClass == 0 ? 'btn-color' : ''"
            size="medium "
            size="small "
            @click="getAnimalData(0)"
            >本日
          </el-button>
          <el-button
            v-bind:class="activeClass == 1 ? 'btn-color' : ''"
            size="medium "
            size="small "
            @click="getAnimalData(1)"
            >本周
          </el-button>
          <el-button
            v-bind:class="activeClass == 2 ? 'btn-color' : ''"
            size="medium "
            size="small "
            @click="getAnimalData(2)"
            >本月
          </el-button>
        </template>
        <template slot="menuLeft">
          <el-button type="warning"
                      size="small"
                      plain
                      icon="el-icon-download"
                      @click="handleExport">导出
          </el-button>
        </template>
    </avue-crud>
@@ -229,6 +237,16 @@
           }
           return '';
      },
      //数据导出
      handleExport() {
        this.$confirm("是否导出用户数据?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          window.open(`/api/blade-jfpts/animalHeat/animalHeat/export-animalHeat?begTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&status=${this.$route.query.status}&timeDesc=${this.$route.query.timeDesc}`);
        });
      },
      //修改行颜色
      rowStyle({row, column, rowIndex}){
         if(row.status=="1"){