From 14d29f928b24d203e76f1dcefc1a51182657cd45 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 10 三月 2025 16:29:09 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev

---
 src/views/CNAS/personnel/personalOverview/index.vue |  242 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 242 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/personnel/personalOverview/index.vue b/src/views/CNAS/personnel/personalOverview/index.vue
new file mode 100644
index 0000000..a227788
--- /dev/null
+++ b/src/views/CNAS/personnel/personalOverview/index.vue
@@ -0,0 +1,242 @@
+<style scoped>
+.search {
+  background-color: #fff;
+  height: 80px;
+  display: flex;
+  align-items: center;
+}
+
+.search_thing {
+  width: 350px;
+  display: flex;
+  align-items: center;
+}
+
+.search_label {
+  width: 110px;
+  font-size: 14px;
+  text-align: right;
+}
+
+.search_input {
+  width: calc(100% - 110px);
+}
+
+.table {
+  margin-top: 10px;
+  background-color: #fff;
+  width: calc(100% - 40px);
+  height: calc(100% - 60px - 80px - 10px - 40px);
+  padding: 20px;
+  overflow-y: auto;
+}
+
+.card {
+  list-style-type: none;
+  display: grid;
+  grid-template-columns: repeat(auto-fit, 320px);
+  /* justify-content: center; */
+  grid-gap: 16px;
+  min-height: 200px;
+}
+
+.card li {
+  width: 320px;
+  border-radius: 8px 8px 8px 8px;
+  box-shadow: 4px 4px 8px 0px rgba(51, 51, 51, 0.04);
+  border: 1px solid #EEEEEE;
+  margin: 0 !important;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  box-sizing: border-box;
+  padding: 26px 16px 16px;
+  font-size: 14px;
+  position: relative;
+  overflow: show;
+}
+
+li .title {
+  width: 147px;
+  height: 20px;
+  background: url(../../../../assets/images/renyuan-title.svg) no-repeat;
+  position: absolute;
+  top: -6px;
+  left: 50%;
+  transform: translateX(-50%);
+  text-align: center;
+  line-height: 20px;
+  color: #fff;
+}
+</style>
+
+<template>
+  <div class="role_manage">
+    <div class="search">
+      <div class="search_thing">
+        <div class="search_label">浜哄憳鍚嶇О锛�</div>
+        <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.name"></el-input>
+        </div>
+      </div>
+      <div class="search_thing" style="padding-left: 30px;">
+        <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+        <el-button size="small" type="primary"
+          @click="currentPage = 1, list = [], finishLoding = false, keyMap = {}, refreshTable()">鏌� 璇�</el-button>
+      </div>
+    </div>
+    <div class="table" v-loading="loading">
+      <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list"
+        v-if="list.length > 0 || loading">
+        <ul class="card" style="margin-top: 10px;">
+          <li v-for="(m, i) in list" :key="i">
+            <el-image style="width: 80px;
+            height: 112px;" :src="javaApi + '/img/' + m.pictureUrl">
+              <div slot="error" class="image-error" style="width: 79px;
+            height: 110px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            border: 1px solid #EEEEEE;">
+                <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i>
+              </div>
+            </el-image>
+            <el-image style="width: 195px;
+            height: 112px;" :src="javaApi + '/img/' + m.signatureUrl">
+              <div slot="error" class="image-error" style="width: 194px;
+            height: 110px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            border: 1px solid #EEEEEE;">
+                <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i>
+              </div>
+            </el-image>
+            <div class="title">{{ m.name }}</div>
+          </li>
+        </ul>
+      </scroll-pagination>
+      <div v-if="list.length < 1 && !loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px">
+        鏆傛棤鏁版嵁
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import ScrollPagination from '@/components/index/scroll-paging.vue'
+import {
+  selectPersonnelOverview
+} from '@/api/cnas/personnel/personalOverview'
+export default {
+  components: {
+    ScrollPagination
+  },
+  data() {
+    return {
+      entity: {
+        name: null,
+        state: 1,
+        orderBy: { field: "id", order: "asc" }
+      },
+      list: [],
+      currentPage: 1, // 褰撳墠椤�
+      pageSize: 16, // 涓�椤�16鏉�
+      total: '',
+      loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
+      finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+      keyMap: {}
+    }
+  },
+  created() {
+    this.keyMap = {};
+    this.currentPage = 1;
+    this.list = [];
+    this.refreshTable();
+  },
+  methods: {
+    refreshTable() {
+      const key = `_${this.currentPage}`
+      const value = this.keyMap[key]
+      // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+      if (value) {
+        return
+      }
+      // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+      this.keyMap[key] = 'temp'
+      if (this.currentPage == 1) {
+        this.loading = true
+      }
+      selectPersonnelOverview({
+        current: this.currentPage,
+        size: this.pageSize,
+        ...this.entity
+      }).then(res => {
+        if (res.code == 200) {
+          this.total = res.data.body.total
+          let list = res.data.body.records;
+          if (list.length == 0) {
+            this.finishLoding = true;
+          } else {
+            if (list.length < this.pageSize) {
+              this.finishLoding = true;
+            }
+            this.list = this.list.concat(list)
+            if (this.total == this.list.length) {
+              this.finishLoding = true;
+            }
+            this.currentPage++;
+          }
+        }
+        this.loading = false
+      })
+    },
+    refresh() {
+      this.keyMap = {};
+      this.currentPage = 1;
+      this.list = [];
+      this.finishLoding = false;
+      this.entity = {
+        name: null,
+        state: 1,
+        orderBy: { field: "id", order: "asc" }
+      };
+      this.refreshTable()
+    },
+    // 婊氬姩瑙﹀簳鍔犺浇
+    scrollFn() {
+      let clientHeight = document.documentElement.clientHeight - 18; //鍙鍖哄煙
+      let scrollHeight = document.body.scrollHeight; // 婊氬姩鏂囨。楂樺害
+      let scrollTop = parseInt(document.documentElement.scrollTop); // 宸叉粴鍔ㄧ殑楂樺害
+      let height = 300;
+      if (
+        scrollTop + clientHeight >= scrollHeight - height &&
+        scrollHeight != 0
+      ) {
+        if (!this.finishLoding && this.currentPage * this.pageSize < this.total) {
+          this.currentPage = this.currentPage + 1;
+          this.refreshTable();
+        }
+      } else {
+        return false;
+      }
+    },
+    throttle(fn, wait) {
+      // 灏佽鍑芥暟杩涜鑺傛祦
+      var timer = null;
+      return function () {
+        var context = this;
+        var args = arguments;
+        if (!timer) {
+          timer = setTimeout(function () {
+            fn.apply(context, args);
+            timer = null;
+          }, wait);
+        }
+      };
+    },
+  },
+  destroyed() {
+    window.removeEventListener("scroll", this.throttle(), false);
+  },
+}
+</script>

--
Gitblit v1.9.3