From 2f515e6dc3887f69b407812f596306eddcdcbad2 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 18 Mar 2021 21:49:58 +0800
Subject: [PATCH] healthcode健康码,体温分页页面

---
 vue.config.js                       |    6 
 src/views/animalHeat/animalHeat.vue |  207 +++++++++++++++++++++++++
 src/api/animalHeat/animalHeat.js    |   13 +
 src/views/healthcode/healthcode.vue |  207 +++++++++++++++++++++++++
 src/views/home/home.vue             |   14 +
 src/api/healthcode/healthcode.js    |   13 +
 6 files changed, 453 insertions(+), 7 deletions(-)

diff --git a/src/api/animalHeat/animalHeat.js b/src/api/animalHeat/animalHeat.js
new file mode 100644
index 0000000..cb3d94f
--- /dev/null
+++ b/src/api/animalHeat/animalHeat.js
@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-jfpts/animalHeat/animalHeat/page',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
\ No newline at end of file
diff --git a/src/api/healthcode/healthcode.js b/src/api/healthcode/healthcode.js
new file mode 100644
index 0000000..1d42830
--- /dev/null
+++ b/src/api/healthcode/healthcode.js
@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-jfpts/healthcode/healthcode/page',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
\ No newline at end of file
diff --git a/src/views/animalHeat/animalHeat.vue b/src/views/animalHeat/animalHeat.vue
new file mode 100644
index 0000000..40efa87
--- /dev/null
+++ b/src/views/animalHeat/animalHeat.vue
@@ -0,0 +1,207 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="true"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList} from "@/api/animalHeat/animalHeat";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          labelWidth:120,
+          dialogClickModal: false,
+          headerAlign: 'center',
+          align: 'center',
+          column: [
+            {
+              label: '坐标',
+              prop: 'test',
+              hide: true,
+              span: 24,
+              component: "avueMap",
+              clickChild: (obj) => {
+                this.form.jd = obj.latitude
+                this.form.wd = obj.longitude
+              },
+            },
+            {
+              label: "检测时间",
+              prop: "createTime"
+            },
+            {
+              label: "体温",
+              prop: "tempRed"
+            },
+            {
+              label: '图片',
+              prop: 'picture',
+              type: 'upload',
+              width: 300,
+              listType: 'picture-img',
+              span: 24,
+              propsHttp: {
+                res: 'data'
+              },
+              canvasOption: {
+                text: 'avue',
+                ratio: 0.1
+              }
+            },
+            {
+              label: "检测时间",
+              prop: "dateTime",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              searchRange: true,
+              searchSpan: 5,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: false,
+              search: true,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入时间",
+                  trigger: "blur"
+                }
+              ]
+            },
+            {
+              label: "体温状态",
+              search: true,
+              searchLabelWidth: 120,
+              prop: "status",
+              searchSpan: 5,
+              width:110,
+              type: "select",
+              dicData: [
+                {
+                  label: "正常",
+                  value: 0
+                },
+                {
+                  label: "异常",
+                  value: 1
+                }
+              ],
+            }
+            
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(null, true),
+          viewBtn: this.vaildData(null, true),
+          delBtn: this.vaildData(null, true),
+          editBtn: this.vaildData(null, true)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      beforeOpen(done, type) {
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      },
+      handleHistory(row) {
+        this.$router.push({ path: `/real/history/${row.deviceNumber}` });
+      }
+    }
+  };
+</script>
diff --git a/src/views/healthcode/healthcode.vue b/src/views/healthcode/healthcode.vue
new file mode 100644
index 0000000..977466e
--- /dev/null
+++ b/src/views/healthcode/healthcode.vue
@@ -0,0 +1,207 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="true"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList} from "@/api/healthcode/healthcode";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          labelWidth:120,
+          dialogClickModal: false,
+          headerAlign: 'center',
+          align: 'center',
+          column: [
+            {
+              label: '坐标',
+              prop: 'test',
+              hide: true,
+              span: 24,
+              component: "avueMap",
+              clickChild: (obj) => {
+                this.form.jd = obj.latitude
+                this.form.wd = obj.longitude
+              },
+            },
+            {
+              label: "检测时间",
+              prop: "createTime"
+            },
+            {
+              label: "体温",
+              prop: "tempRed"
+            },
+            {
+              label: '图片',
+              prop: 'picture',
+              type: 'upload',
+              width: 300,
+              listType: 'picture-img',
+              span: 24,
+              propsHttp: {
+                res: 'data'
+              },
+              canvasOption: {
+                text: 'avue',
+                ratio: 0.1
+              }
+            },
+            {
+              label: "检测时间",
+              prop: "dateTime",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              searchRange: true,
+              searchSpan: 5,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: false,
+              search: true,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入时间",
+                  trigger: "blur"
+                }
+              ]
+            },
+            {
+              label: "体温状态",
+              search: true,
+              searchLabelWidth: 120,
+              prop: "status",
+              searchSpan: 5,
+              width:110,
+              type: "select",
+              dicData: [
+                {
+                  label: "正常",
+                  value: 0
+                },
+                {
+                  label: "异常",
+                  value: 1
+                }
+              ],
+            }
+            
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(null, true),
+          viewBtn: this.vaildData(null, true),
+          delBtn: this.vaildData(null, true),
+          editBtn: this.vaildData(null, true)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      beforeOpen(done, type) {
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      },
+      handleHealthcode(row) {
+        this.$router.push({ path: `/healthcode/healthcode/${row.deviceNumber}` });
+      }
+    }
+  };
+</script>
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index f6d30ff..920e80b 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -28,10 +28,16 @@
     },
     methods: {
       handleStart() {
-      this.$router.push({
-        path: `/real/history/000000000003`
-      });
-    }
+        this.$router.push({
+          path: `/real/history/000000000003`
+        });
+      },
+      handleStartHealthcode(){
+        this.$router.push({
+          path: `/healthcode/healthcode/1`
+        });
+      }
+
       // getData() {
       //   var that = this;
       //
diff --git a/vue.config.js b/vue.config.js
index 1a156f1..6164246 100644
--- a/vue.config.js
+++ b/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,
@@ -45,4 +45,4 @@
             }
         }
     }
-};
+};
\ No newline at end of file

--
Gitblit v1.9.3