南昌市物联网技防平台-前端
Administrator
2021-03-21 253d5c40069c42a271d72e0f0294a00889562046
健康码,体温检测详情本日,本周本月按钮新增
3 files modified
102 ■■■■ changed files
src/views/animalHeat/animalHeat.vue 41 ●●●● patch | view | raw | blame | history
src/views/healthcode/healthcode.vue 57 ●●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
src/views/animalHeat/animalHeat.vue
@@ -18,26 +18,26 @@
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <!-- <template slot="menuLeft">
        <template slot="menuLeft">
          <el-button
            v-bind:class="activeClass == 0 ? 'btn-color' : ''"
            size="medium "
            @click="getBZdata(0)"
            @click="getAnimalData(0)"
            >本日
          </el-button>
          <el-button
            v-bind:class="activeClass == 1 ? 'btn-color' : ''"
            size="medium "
            @click="getBZdata(1)"
            @click="getAnimalData(1)"
            >本周
          </el-button>
          <el-button
            v-bind:class="activeClass == 2 ? 'btn-color' : ''"
            size="medium "
            @click="getBYdata(2)"
            @click="getAnimalData(2)"
            >本月
          </el-button>
      </template> -->
        </template>
    </avue-crud>
  </basic-container>
</template>
@@ -202,12 +202,11 @@
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      getBZdata(e) {
        alert(e);
      getAnimalData(e) {
        this.activeClass = e;
        //type 0:本日  1:本月  2:本年   status: 0:正常   1:异常
        var params = {
          beginTime: this.dateTime.week.beginTime,
          endTime: this.dateTime.week.endTime,
          type: e
        };
        this.query = params;
        this.page.currentPage = 1;
@@ -215,10 +214,28 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        params ={
          status:this.$route.query.status,
          type:this.$route.query.type
        if (this.$route.query.type && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
            if (this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status == "" ) {
              this.activeClass = this.$route.query.type;
              this.page.currentPage = 1;
              params = {
                status:this.$route.query.status,
                type:this.$route.query.type
              }
            } else {
              this.activeClass = 0;
              this.page.currentPage = 1;
              params = {
                type:this.$route.query.type
              };
            }
        }else{
            params = {
                status:this.$route.query.status,
                type:this.$route.query.type
            }
        }
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
src/views/healthcode/healthcode.vue
@@ -18,6 +18,26 @@
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <template slot="menuLeft">
          <el-button
            v-bind:class="activeClass == 0 ? 'btn-color' : ''"
            size="medium "
            @click="getHealthcodeData(0)"
            >本日
          </el-button>
          <el-button
            v-bind:class="activeClass == 1 ? 'btn-color' : ''"
            size="medium "
            @click="getHealthcodeData(1)"
            >本周
          </el-button>
          <el-button
            v-bind:class="activeClass == 2 ? 'btn-color' : ''"
            size="medium "
            @click="getHealthcodeData(2)"
            >本月
          </el-button>
        </template>
      
    </avue-crud>
  </basic-container>
@@ -46,6 +66,7 @@
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          activeClass: 3,
          border: true,
          index: true,
          viewBtn: true,
@@ -210,14 +231,40 @@
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      getHealthcodeData(e) {
        this.activeClass = e;
        //status 0:本日  1:本月  2:本年   type: 1:绿色   2:黄色  3:红色
        var params = {
          status: e
        };
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
      },
      onLoad(page, params = {}) {
        this.loading = true;
        console.log("status="+this.$route.query.status);
        params ={
          status:this.$route.query.status,
          type:this.$route.query.type
        if (this.$route.query.status && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
            if (this.$route.query.type != undefined && this.$route.query.type != null && this.$route.query.type == "" ) {
              this.activeClass = this.$route.query.status;
              this.page.currentPage = 1;
              params = {
                status:this.$route.query.status,
                type:this.$route.query.type
              }
            } else {
              this.activeClass = 0;
              this.page.currentPage = 1;
              params = {
                type:this.$route.query.status
              };
            }
        }else{
            params = {
                status:this.$route.query.status,
                type:this.$route.query.type
            }
        }
        console.log("params="+params);
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
vue.config.js
@@ -34,8 +34,8 @@
        proxy: {
            '/api': {
                //本地服务接口地址
                target: 'http://localhost:82/',
                //target: 'https://web.byisf.com:18001/api/',
                //target: 'http://localhost:82/',
                target: 'https://web.byisf.com:18001/api/',
                //远程演示服务地址,可用于直接启动项目
                //target: 'https://saber.bladex.vip/api',
                ws: true,