From 56e197dde528e4686c78cdb69e7672d69426a283 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 27 二月 2025 09:58:01 +0800
Subject: [PATCH] 人员总览搬迁
---
src/api/cnas/personnel/personnelOverview.js | 9 ++
src/assets/images/renyuan-title.svg | 11 ++
src/views/CNAS/personnel/personnelOverview/index.vue | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 221 insertions(+), 0 deletions(-)
diff --git a/src/api/cnas/personnel/personnelOverview.js b/src/api/cnas/personnel/personnelOverview.js
new file mode 100644
index 0000000..6afa9a1
--- /dev/null
+++ b/src/api/cnas/personnel/personnelOverview.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function selectPersonnelOverview(query) {
+ return request({
+ url: '/user/selectPersonnelOverview',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/assets/images/renyuan-title.svg b/src/assets/images/renyuan-title.svg
new file mode 100644
index 0000000..c69691f
--- /dev/null
+++ b/src/assets/images/renyuan-title.svg
@@ -0,0 +1,11 @@
+<svg width="148" height="21" viewBox="0 0 148 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M7.00437 5.75531V0.0625L0.772461 5.75531H7.00437Z" fill="#B26F00"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M141.709 5.75531V0.0625L147.941 5.75531H141.709Z" fill="#B26F00"/>
+<path d="M6.97192 2.0625C6.97192 0.957931 7.86735 0.0625 8.97192 0.0625H139.676C140.781 0.0625 141.676 0.957931 141.676 2.0625V12.0625C141.676 16.4808 138.095 20.0625 133.676 20.0625H14.9719C10.5537 20.0625 6.97192 16.4808 6.97192 12.0625V2.0625Z" fill="url(#paint0_linear_2026_4)"/>
+<defs>
+<linearGradient id="paint0_linear_2026_4" x1="6.97192" y1="0.0625" x2="6.97192" y2="20.0625" gradientUnits="userSpaceOnUse">
+<stop stop-color="#F9C76F"/>
+<stop offset="1" stop-color="#FEB42F"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/src/views/CNAS/personnel/personnelOverview/index.vue b/src/views/CNAS/personnel/personnelOverview/index.vue
new file mode 100644
index 0000000..c5c8da2
--- /dev/null
+++ b/src/views/CNAS/personnel/personnelOverview/index.vue
@@ -0,0 +1,201 @@
+<template>
+ <div class="capacity-scope">
+ <div>
+ <el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="浜哄憳鍚嶇О">
+ <el-input v-model="entity.name" clearable></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">鏌� 璇�</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="table" v-loading="loading">
+ <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list" v-if="list.length>0||loading">
+ <ul class="card">
+ <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 {selectUserCondition} from "@/api/business/inspectionTask";
+export default {
+ components: {
+ ScrollPagination
+ },
+ data() {
+ return {
+ entity:{
+ name: null,
+ status: 0,
+ },
+ 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
+ }
+ selectUserCondition({...this.entity}).then(res => {
+ this.total = res.data.length
+ let list = res.data
+ 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
+ }).catch(err => {
+ 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>
+<style scoped>
+.table {
+ width: 100%;
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ overflow-y: auto;
+}
+
+.card {
+ list-style-type: none;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, 314px);
+ /* justify-content: center; */
+ grid-gap: 16px;
+ min-height: 200px;
+ padding-left: 0 !important;
+}
+.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;
+}
+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>
--
Gitblit v1.9.3