From 893161871417a5c280de5e0a4792d3f43e3d3b40 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 02 Jan 2024 11:07:29 +0800
Subject: [PATCH] 基本信息使用接口值

---
 src/views/securityGuard/securityGuardDetail.vue |   77 ++++++++++++++++++++++++++++++--------
 1 files changed, 61 insertions(+), 16 deletions(-)

diff --git a/src/views/securityGuard/securityGuardDetail.vue b/src/views/securityGuard/securityGuardDetail.vue
index e1993bf..63c36fe 100644
--- a/src/views/securityGuard/securityGuardDetail.vue
+++ b/src/views/securityGuard/securityGuardDetail.vue
@@ -96,6 +96,8 @@
     getER,
 } from "@/api/performance/performance"
 
+import { getUser, getUserPractitionersInfo } from "@/api/system/user"
+
 // import vueQr from "vue-qr";
 import securityCertificate from "./securityCertificate.vue"
 import baoanz from "./baoanz.vue"
@@ -731,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,

--
Gitblit v1.9.3