From dc91db9bb3473c3ed058f86f74359e15c035a8a5 Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Mon, 23 Aug 2021 22:13:10 +0800
Subject: [PATCH] 表查询完善

---
 src/views/qualificationExamination/registrationTrainingQuery.vue |   92 +++++++++++++++++++++++++++------------------
 1 files changed, 55 insertions(+), 37 deletions(-)

diff --git a/src/views/qualificationExamination/registrationTrainingQuery.vue b/src/views/qualificationExamination/registrationTrainingQuery.vue
index 2054152..eded444 100644
--- a/src/views/qualificationExamination/registrationTrainingQuery.vue
+++ b/src/views/qualificationExamination/registrationTrainingQuery.vue
@@ -80,7 +80,7 @@
         delBtn: false,
         editBtn: false,
         addBtn: false,
-        selection: false,
+        selection: true,
         menu: false,
 
         searchShowBtn: false,
@@ -120,8 +120,9 @@
           // },//上面不显示
           {
             label: "姓名",
-            prop: "name",
+            prop: "realName",
             width: 100,
+            searchLabelWidth: 50,
             rules: [
               {
                 required: true,
@@ -130,7 +131,7 @@
               },
             ],
             search: true,
-            searchSpan: 5,
+            searchSpan: 4,
           },
           {
             label: "性别",
@@ -205,34 +206,34 @@
             //     trigger: "blur"
             // }],
           },
-          {
-            label: "体重(kg)",
-            prop: "weight",
-            width: 90,
-            rules: [
-              {
-                required: true,
-                message: "请输入体重",
-                trigger: "blur",
-              },
-            ],
-            // addDisplay: true,
-            // editDisplay: true,
-            // viewDisplay: true,
-            // searchSpan: 5,
-            // dicUrl: "/api/blade-system/dict-biz/dictionary?code=experienceType",
-            // props: {
-            //     label: "dictValue",
-            //     value: "dictKey"
-            // },
-            // search: true,
-            // type: "select",
-            // rules: [{
-            //     required: true,
-            //     message: "请选择工作经验",
-            //     trigger: "blur"
-            // }],
-          },
+          // {
+          //   label: "体重(kg)",
+          //   prop: "weight",
+          //   width: 90,
+          //   rules: [
+          //     {
+          //       required: true,
+          //       message: "请输入体重",
+          //       trigger: "blur",
+          //     },
+          //   ],
+          //   // addDisplay: true,
+          //   // editDisplay: true,
+          //   // viewDisplay: true,
+          //   // searchSpan: 5,
+          //   // dicUrl: "/api/blade-system/dict-biz/dictionary?code=experienceType",
+          //   // props: {
+          //   //     label: "dictValue",
+          //   //     value: "dictKey"
+          //   // },
+          //   // search: true,
+          //   // type: "select",
+          //   // rules: [{
+          //   //     required: true,
+          //   //     message: "请选择工作经验",
+          //   //     trigger: "blur"
+          //   // }],
+          // },
           {
             label: "电话",
             prop: "phone",
@@ -264,9 +265,15 @@
             // overHidden: true
           },
           {
-            label: "学历证书",
-            prop: "academicUrl",
+            label: "学历",
+            prop: "education",
             width: 110,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=xueliType",
+            props: {
+              label: "dictValue",
+              value: "dictKey",
+            },
             rules: [
               {
                 required: true,
@@ -280,7 +287,7 @@
             // searchSpan: 4,
           },
           {
-            label: "组织机构",
+            label: "保安公司",
             prop: "deptId",
             // width: 70,
             // search: true,
@@ -292,7 +299,7 @@
               value: "id",
             },
             // search: true,
-            type: "select",
+            // type: "tree",
             rules: [
               {
                 required: true,
@@ -304,7 +311,7 @@
           },
           {
             label: "培训公司名称",
-            prop: "trainingUnitName",
+            prop: "trainUnitName",
             rules: [
               {
                 required: true,
@@ -500,6 +507,10 @@
     refreshChange() {
       this.onLoad(this.page, this.query);
     },
+    getyears() {
+      var d = new Date();
+      return d.getFullYear();
+    },
     onLoad(page, params = {}) {
       // this.loading = false;
       this.loading = true;
@@ -510,7 +521,14 @@
       ).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
-        this.data = data.records;
+        var d = data.records;
+        for (var k in d) {
+          // if(d[k])
+          var sfz = d[k].idCardNo.substring(6, 10);
+          d[k]["age"] = this.getyears() - sfz;
+          // console.log(this.getyears());
+        }
+        this.data = d;
         console.log(this.data, "getLispereregistrationTrainingQuery");
         this.loading = false;
         // this.selectionClear();

--
Gitblit v1.9.3