From 8c6cf205affbbc8ada74f00a7ca25ebca867e9ed Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 27 Sep 2021 11:44:44 +0800
Subject: [PATCH] 图表颜色

---
 src/views/securityGuard/securityGuardDetail.vue |   94 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 71 insertions(+), 23 deletions(-)

diff --git a/src/views/securityGuard/securityGuardDetail.vue b/src/views/securityGuard/securityGuardDetail.vue
index 997a155..82c3bd5 100644
--- a/src/views/securityGuard/securityGuardDetail.vue
+++ b/src/views/securityGuard/securityGuardDetail.vue
@@ -13,7 +13,9 @@
         @row-save="rowSave1"
         @row-update="rowUpdate1"
         @row-del="rowDel1"
-        @refresh-change="refreshChange1"
+        @current-change="CurrentChange1"
+        @refresh-change="refreshchange1"
+        @size-change="SizeChange1"
       >
       </avue-crud>
     </span>
@@ -26,19 +28,21 @@
         @row-update="rowUpdate2"
         @row-del="rowDel2"
         :table-loading="loading2"
-        @refresh-change="refreshChange2"
+        @current-change="CurrentChange2"
+        @size-change="SizeChange2"
+        @refresh-change="refreshchange2"
       >
       </avue-crud>
     </span>
     <span v-else-if="typeTABS.prop === 'tab4'">
       <!-- 保安员证 -->
-      <div class="baoanzheng" id="baoanzheng">
+      <div class="baoanzheng" id="baoanzheng" v-if="hold == 1">
         <div class="baz-main">
           <div class="baz-m-body" ref="baoanzheng">
             <div class="bmb-heard">保安员证</div>
             <div class="img">
-              <div v-if="!obj0.myPicture">暂无照片</div>
-              <img :src="obj0.myPicture" alt="" v-else />
+              <div v-if="!obj0.avatar">暂无照片</div>
+              <img :src="obj0.avatar" alt="" v-else />
             </div>
             <div class="imgs">
               <div v-if="erweima == ''">暂无二维码</div>
@@ -80,6 +84,15 @@
           </span>
         </div>
       </div>
+      <div v-else style="width: 100%; text-align: center; padding-top: 20px">
+        无保安证
+      </div>
+    </span>
+    <span v-else-if="typeTABS.prop === 'tab5'">
+      <securityCertificate :data="obj0" v-if="hold == 1"></securityCertificate>
+      <div v-else style="width: 100%; text-align: center; padding-top: 20px">
+        无保安证书
+      </div>
     </span>
   </div>
 </template> 
@@ -95,21 +108,25 @@
   updateExperience,
   getExperienceDetail,
   experienceRemove,
-  getExperienceList
+  getExperienceList,
 } from "@/api/experience/experience";
 
 import {
   getPerformanceInfo,
   add,
   update,
-  page,
+  getpage,
   remove,
   getER,
 } from "@/api/performance/performance";
 
 // import vueQr from "vue-qr";
+import securityCertificate from "./securityCertificate.vue";
 
 export default {
+  components: {
+    securityCertificate: securityCertificate,
+  },
   data() {
     return {
       typeTABS: {}, //标签页
@@ -118,7 +135,7 @@
         column: [
           {
             // icon: "el-icon-info",
-            label: "保安员入职登记基本信息",
+            label: "保安员基本信息",
             prop: "tab1",
           },
           {
@@ -135,6 +152,11 @@
             // icon: "el-icon-info",
             label: "保安员证",
             prop: "tab4",
+          },
+          {
+            // icon: "el-icon-info",
+            label: "上岗证",
+            prop: "tab5",
           },
         ],
       },
@@ -202,6 +224,7 @@
         column: trackRecordColumn,
       },
       erweima: "",
+      hold: "",
     };
   },
   // components: {
@@ -241,40 +264,43 @@
         this.loading1 = false;
       } else if (column.prop == "tab2") {
         //查询当前保安员的从业记录信息
-        this.getPractitionersPageInfo();
+        this.getPractitionersPageInfo(this.page1);
         this.loading1 = false;
       } else if (column.prop == "tab3") {
         //查询当前保安员的现实表现记录
-        this.getPerformancePageInfo();
+        this.getPerformancePageInfo(this.page2);
         this.loading2 = false;
       } else if (column.prop == "tab4") {
         getER(this.obj0.securitynumber).then((res) => {
           this.erweima = res.data;
-          console.log(res.data);
+          // console.log(res.data);
         });
       }
     },
+    refreshchange1() {
+      this.getPractitionersPageInfo(this.page1, this.query1);
+    },
     //查询当前保安员的从业记录信息
-    getPractitionersPageInfo() {
-      var param = {
-        securityid: this.id,
-      };
+    getPractitionersPageInfo(page, param = {}) {
+      param["securityid"] = this.id;
       //获取用户从业信息
-      console.log(this.id, "cid");
-      getExperienceList(this.current, this.size,param).then((res1) => {
+      // console.log(this.id, "cid");
+
+      getExperienceList(page.currentPage, page.pageSize, param).then((res1) => {
         const data = res1.data.data;
         this.page1.total = data.total;
         this.data1 = data.records;
         this.loading1 = false;
       });
     },
+    refreshchange2() {
+      this.getPerformancePageInfo(this.page2, this.query2);
+    },
     //查询当前保安员的现实表现记录信息
-    getPerformancePageInfo() {
+    getPerformancePageInfo(page, param = {}) {
       //获取现实表现信息
-      var param = {
-        securityid: this.id,
-      };
-      page(this.current, this.size, param).then((res2) => {
+      param["securityid"] = this.id;
+      getpage(page.currentPage, page.pageSize, param).then((res2) => {
         const data = res2.data.data;
         this.page2.total = data.total;
         this.data2 = data.records;
@@ -282,7 +308,28 @@
         this.loading2 = false;
       });
     },
-    
+    CurrentChange1(currentPage) {
+      this.page1.currentPage = currentPage;
+      this.refreshchange1();
+    },
+    SizeChange1(pageSize) {
+      this.page1.pageSize = pageSize;
+      this.refreshchange1();
+    },
+    CurrentChange2(currentPage) {
+      this.page2.currentPage = currentPage;
+      this.refreshchange2();
+    },
+    SizeChange2(pageSize) {
+      this.page2.pageSize = pageSize;
+      this.refreshchange2();
+    },
+    // refreshChange1() {
+    //   this.getPractitionersPageInfo();
+    // },
+    // refreshChange2() {
+    //   this.getPerformancePageInfo();
+    // },
 
     rowSave2(form, done, loading) {
       form.securityid = this.id;
@@ -405,6 +452,7 @@
       this.name = row.name;
       this.dispatcherCompany = row.dispatcherCompany;
       this.id = row.id;
+      this.hold = row.hold;
       console.log(this.obj0);
     }
 

--
Gitblit v1.9.3