From acaf96424ba04b2ab2b9fa0e1bbfa17ea549cc08 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 02 Jan 2024 11:09:50 +0800
Subject: [PATCH] userid修改

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

diff --git a/src/views/securityGuard/securityGuardDetail.vue b/src/views/securityGuard/securityGuardDetail.vue
index 7b85e62..63c36fe 100644
--- a/src/views/securityGuard/securityGuardDetail.vue
+++ b/src/views/securityGuard/securityGuardDetail.vue
@@ -2,9 +2,11 @@
     <div class="dispatch">
         <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
         <span v-if="typeTABS.prop === 'tab1'" class="a-f-box"
-            style="display:block;width: 1100px;margin: 0 auto;padding: 0 20px;position: relative;background-color: #fff;"
+            style="display:block;width: 1000px;margin: 0 auto;padding: 0 20px;position: relative;background-color: #fff;"
             id="avuePageEle">
             <avue-form ref="form" v-model="obj0" :option="option0"> </avue-form>
+        </span>
+        <span v-if="typeTABS.prop === 'tab1'" class="a-f-box-btn">
             <div class="printBtn">
                 <el-button type="primary" @click="printBAInfo">打印</el-button>
             </div>
@@ -93,6 +95,8 @@
     remove,
     getER,
 } from "@/api/performance/performance"
+
+import { getUser, getUserPractitionersInfo } from "@/api/system/user"
 
 // import vueQr from "vue-qr";
 import securityCertificate from "./securityCertificate.vue"
@@ -729,24 +733,67 @@
     mounted () {
         this.typeTABS = this.optionTABS.column[0]
         var data = JSON.parse(this.$route.query.row)
+        getUser(data.id).then(res => {
+            let form = res.data.data
+            var d = {
+                education1: res.data.data.education
+            }
+            form = {
+                ...form,
+                ...d
+            }
+            if (form.userDetail) {
+                form.userDetailId = form.userDetail.id
+                form.marriageStatus = form.userDetail.marriageStatus
+                form.signLevel = form.userDetail.signLevel
+                form.permanentResidenceAddress = form.userDetail.permanentResidenceAddress
+                form.dwellAddress = form.userDetail.dwellAddress
+                form.memberOfFamily = form.userDetail.memberOfFamily
+                form.educationExperience = form.userDetail.educationExperience
+                form.workExperience = form.userDetail.workExperience
+                form.healthCertificateUrl = form.userDetail.healthCertificateUrl
+                form.noCriminalRecordProveUrl = form.userDetail.noCriminalRecordProveUrl
+                form.acceptancePoliceUnit = form.userDetail.acceptancePoliceUnit
+                form.acceptancePerson = form.userDetail.acceptancePerson
+                form.acceptanceTime = form.userDetail.acceptanceTime
+                form.unitName = form.userDetail.unitName
+            }
+            // this.from["education1"] = res.data.data.education;
+            if (form.hasOwnProperty("deptId")) {
+                form.deptId = form.deptId
+            }
+            if (form.hasOwnProperty("roleId")) {
+                form.roleId = form.roleId.split(",")
+            }
+            // if (form.hasOwnProperty("postId")) {
+            //   form.postId = form.postId.split(",");
+            // }
+            var userInfo = res.data.data
+            //获取用户从业信息
+            getUserPractitionersInfo(data.id).then(res1 => {
+                form.UserPractitionersInfo = res1.data.data
+            })
+            this.obj0 = form
+        })
         // console.log(data);
         if (data) {
-            var row = data
-            // var row = this.$route.query.row;
-            for (var k in row) {
-                this.obj0[k] = row[k]
-            }
-            this.obj0.title = ""
-            this.cardid = row.id
-            this.name = row.name
-            this.dispatcherCompany = row.dispatcherCompany
-            this.id = row.id
-            this.hold = row.hold
-            let year = row.cardid.slice(6, 10)
-            let mouth = row.cardid.slice(10, 12)
-            let day = row.cardid.slice(12, 14)
-            this.obj0.birthdayData = year + '-' + mouth + '-' + day
-            console.log(this.obj0)
+            // var row = data
+            // // var row = this.$route.query.row;
+            // for (var k in row) {
+            //     this.obj0[k] = row[k]
+            // }
+            // this.obj0.title = ""
+            // this.cardid = row.id
+            // this.name = row.name
+            // this.dispatcherCompany = row.dispatcherCompany
+            // this.id = row.id
+            // this.hold = row.hold
+            // let year = row.cardid.slice(6, 10)
+            // let mouth = row.cardid.slice(10, 12)
+            // let day = row.cardid.slice(12, 14)
+            // this.obj0.birthdayData = year + '-' + mouth + '-' + day
+            // console.log(this.obj0)
+
         }
 
         var flag = false,
@@ -783,11 +830,13 @@
         background: #fff;
         position: relative;
 
-        .printBtn {
-            position: absolute;
-            top: 0;
-            right: -100px;
-        }
+
+    }
+
+    .printBtn {
+        position: absolute;
+        top: 108px;
+        right: 200px;
     }
 }
 

--
Gitblit v1.9.3