From 3db2c302eb1717a77e8b706b1664ed829767e610 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 09 Jul 2021 08:46:05 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/api/system/user.js                                     |  188 ++++----
 src/router/views/index.js                                  |   54 +
 src/views/securityGuard/securityGuard.vue                  |  469 ++++++++++++---------
 src/views/securityGuard/securityGuardRegistration.vue      |  399 +++++++++++++++++++
 src/views/securityGuard/securityGuardRegistration copy.vue |  105 +++++
 src/views/system/user.vue                                  |   10 
 6 files changed, 926 insertions(+), 299 deletions(-)

diff --git a/src/api/system/user.js b/src/api/system/user.js
index 14e597d..7cb2d0f 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -1,120 +1,140 @@
 import request from '@/router/axios';
 
 export const getList = (current, size, params, deptId) => {
-  return request({
-    url: '/api/blade-user/page',
-    method: 'get',
-    params: {
-      ...params,
-      current,
-      size,
-      deptId,
-    }
-  })
+    return request({
+        url: '/api/blade-user/page',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+            deptId,
+        }
+    })
 }
 
 export const remove = (ids) => {
-  return request({
-    url: '/api/blade-user/remove',
-    method: 'post',
-    params: {
-      ids,
-    }
-  })
+    return request({
+        url: '/api/blade-user/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
 }
 
 export const add = (row) => {
-  return request({
-    url: '/api/blade-user/submit',
-    method: 'post',
-    data: row
-  })
+    return request({
+        url: '/api/blade-user/submit',
+        method: 'post',
+        data: row
+    })
 }
 
 export const update = (row) => {
-  return request({
-    url: '/api/blade-user/update',
-    method: 'post',
-    data: row
-  })
+    return request({
+        url: '/api/blade-user/update',
+        method: 'post',
+        data: row
+    })
+}
+
+
+export const saveOrUpdateUserPractitionersInfo = (row) => {
+    return request({
+        url: '/api/experience/saveOrUpdate',
+        method: 'post',
+        data: row
+    })
 }
 
 export const updatePlatform = (userId, userType, userExt) => {
-  return request({
-    url: '/api/blade-user/update-platform',
-    method: 'post',
-    params: {
-      userId,
-      userType,
-      userExt,
-    }
-  })
+    return request({
+        url: '/api/blade-user/update-platform',
+        method: 'post',
+        params: {
+            userId,
+            userType,
+            userExt,
+        }
+    })
 }
 
 export const getUser = (id) => {
-  return request({
-    url: '/api/blade-user/detail',
-    method: 'get',
-    params: {
-      id,
-    }
-  })
+    return request({
+        url: '/api/blade-user/detail',
+        method: 'get',
+        params: {
+            id,
+        }
+    })
 }
 
 export const getUserPlatform = (id) => {
-  return request({
-    url: '/api/blade-user/platform-detail',
-    method: 'get',
-    params: {
-      id,
-    }
-  })
+    return request({
+        url: '/api/blade-user/platform-detail',
+        method: 'get',
+        params: {
+            id,
+        }
+    })
 }
 
+export const getUserPractitionersInfo = (cardid) => {
+    return request({
+        url: '/api/experience/selectExperienceInfo',
+        method: 'get',
+        params: {
+            cardid,
+        }
+    })
+}
+
+
 export const getUserInfo = () => {
-  return request({
-    url: '/api/blade-user/info',
-    method: 'get',
-  })
+    return request({
+        url: '/api/blade-user/info',
+        method: 'get',
+    })
 }
 
 export const resetPassword = (userIds) => {
-  return request({
-    url: '/api/blade-user/reset-password',
-    method: 'post',
-    params: {
-      userIds,
-    }
-  })
+    return request({
+        url: '/api/blade-user/reset-password',
+        method: 'post',
+        params: {
+            userIds,
+        }
+    })
 }
 
 export const updatePassword = (oldPassword, newPassword, newPassword1) => {
-  return request({
-    url: '/api/blade-user/update-password',
-    method: 'post',
-    params: {
-      oldPassword,
-      newPassword,
-      newPassword1,
-    }
-  })
+    return request({
+        url: '/api/blade-user/update-password',
+        method: 'post',
+        params: {
+            oldPassword,
+            newPassword,
+            newPassword1,
+        }
+    })
 }
 
 export const updateInfo = (row) => {
-  return request({
-    url: '/api/blade-user/update-info',
-    method: 'post',
-    data: row
-  })
+    return request({
+        url: '/api/blade-user/update-info',
+        method: 'post',
+        data: row
+    })
 }
 
 export const grant = (userIds, roleIds) => {
-  return request({
-    url: '/api/blade-user/grant',
-    method: 'post',
-    params: {
-      userIds,
-      roleIds,
-    }
-  })
-}
+    return request({
+        url: '/api/blade-user/grant',
+        method: 'post',
+        params: {
+            userIds,
+            roleIds,
+        }
+    })
+}
\ No newline at end of file
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 7a8290e..3a04bc3 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -11,7 +11,7 @@
             i18n: 'dashboard'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/wel/index')
+            import ( /* webpackChunkName: "views" */ '@/views/wel/index')
     }, {
         path: 'dashboard',
         name: '控制台',
@@ -20,7 +20,7 @@
             menu: false,
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/wel/dashboard')
+            import ( /* webpackChunkName: "views" */ '@/views/wel/dashboard')
     }]
 }, {
     path: '/test',
@@ -33,7 +33,7 @@
             i18n: 'test'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/util/test')
+            import ( /* webpackChunkName: "views" */ '@/views/util/test')
     }]
 }, {
     path: '/dict-horizontal',
@@ -46,7 +46,7 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
+            import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
     }]
 }, {
     path: '/dict-vertical',
@@ -59,7 +59,7 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
+            import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
     }]
 }, {
     path: '/info',
@@ -72,7 +72,7 @@
             i18n: 'info'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
+            import ( /* webpackChunkName: "views" */ '@/views/system/userinfo')
     }]
 }, {
     path: '/work/process/leave',
@@ -85,7 +85,7 @@
             i18n: 'work'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
+            import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
     }, {
         path: 'handle/:taskId/:processInstanceId/:businessId',
         name: '处理请假流程',
@@ -93,7 +93,7 @@
             i18n: 'work'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
+            import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
     }, {
         path: 'detail/:processInstanceId/:businessId',
         name: '请假流程详情',
@@ -101,7 +101,7 @@
             i18n: 'work'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
+            import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
     }]
 }, {
     path: '/securityAnalysis',
@@ -114,7 +114,7 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
+            import ( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
     }]
 }, {
     path: '/recruitmentManagement',
@@ -127,7 +127,7 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
+            import ( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
     }]
 }, {
     path: '/securityUnit',
@@ -140,7 +140,33 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
+            import ( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
+    }]
+}, {
+    path: '/securityGuard',
+    component: Layout,
+    redirect: '/securityGuard/securityGuardRegistration',
+    children: [{
+        path: 'index',
+        name: '保安员入职信息登记',
+        meta: {
+            i18n: 'dict'
+        },
+        component: () =>
+            import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardRegistration')
+    }]
+}, {
+    path: '/securityGuard',
+    component: Layout,
+    redirect: '/securityGuard/securityGuard',
+    children: [{
+        path: 'index',
+        name: '保安员查询',
+        meta: {
+            i18n: 'dict'
+        },
+        component: () =>
+            import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
     }]
 }, {
     path: '/securityUnitChild',
@@ -166,7 +192,7 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
+            import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
     }]
 }, {
     path: '/dispatch',
@@ -179,7 +205,7 @@
             i18n: 'dict'
         },
         component: () =>
-            import( /* webpackChunkName: "views" */ '@/views/dispatch/index')
+            import ( /* webpackChunkName: "views" */ '@/views/dispatch/index')
     }]
 }, {
     path: '/dispatchChild',
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 187d854..9a23823 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -30,7 +30,7 @@
                    @size-change="sizeChange"
                    @refresh-change="refreshChange"
                    @on-load="onLoad">
-          <template slot="menuLeft">
+          <!-- <template slot="menuLeft">
             <el-button type="danger"
                        size="small"
                        plain
@@ -38,7 +38,7 @@
                        v-if="permission.user_delete"
                        @click="handleDelete">删 除
             </el-button>
-          </template>
+          </template> -->
           <template slot-scope="{row}"
                     slot="tenantName">
             <el-tag>{{row.tenantName}}</el-tag>
@@ -55,10 +55,10 @@
                     slot="userTypeName">
             <el-tag>{{row.userTypeName}}</el-tag>
           </template>
-          <template slot-scope="{ row }" slot="online_status">
+          <template slot-scope="{ row }" slot="status">
             <el-tag
             >{{
-              row.online_status == "0" ? "离线" : row.online_status == "1" ? "在线" : "离线"
+              row.status == "0" ? "已离职" : row.status == "1" ? "在职" : "已离职"
               }}
             </el-tag>
           </template>
@@ -120,15 +120,14 @@
   import {
     getUser,
     getUserPlatform,
-    remove,
     update,
     updatePlatform,
     add,
     grant,
-    resetPassword
+    getUserPractitionersInfo
   } from "@/api/system/user";
     import {getList} from "@/api/securityGuard/securityGuard";
-  import {getDeptTree, getDeptLazyTree} from "@/api/system/dept";
+  import {getDeptTree} from "@/api/system/dept";
   import {getRoleTree} from "@/api/system/role";
   import {getPostList} from "@/api/system/post";
   import {mapGetters} from "vuex";
@@ -173,30 +172,6 @@
         roleTreeObj: [],
         treeDeptId: '',
         treeData: [],
-        treeOption: {
-          nodeKey: 'id',
-          lazy: true,
-          treeLoad: function (node, resolve) {
-            const parentId = (node.level === 0) ? 0 : node.data.id;
-            getDeptLazyTree(parentId).then(res => {
-              resolve(res.data.data.map(item => {
-                return {
-                  ...item,
-                  leaf: !item.hasChildren
-                }
-              }))
-            });
-          },
-          addBtn: false,
-          menu: false,
-          size: 'small',
-          props: {
-            labelText: '标题',
-            label: 'title',
-            value: 'value',
-            children: 'children'
-          }
-        },
         option: {
           height: 'auto',
           calcHeight: 54,
@@ -208,17 +183,13 @@
           index: true,
           selection: true,
           viewBtn: true,
-          menuWidth:350,
+          delBtnText:'离职登记',
+          editBtnText:'修改',
+          menuWidth:200,
           //dialogType: 'drawer',
           dialogClickModal: false,
           column: [
-            {
-              label: "登录账号",
-              prop: "account",
-              searchSpan:4,
-              search: true,
-              display: false
-            },
+            
            
             {
               label: "用户姓名",
@@ -234,11 +205,15 @@
               slot:true,
               display: false
             },
+            
              {
               label: "籍贯",
               prop: "nativePlace",
-              search: true,
-              searchSpan:4,
+              display: false
+            },
+             {
+              label: "民族",
+              prop: "nation",
               display: false
             },
             {
@@ -250,17 +225,20 @@
               display: false
             },
             {
-              label: "所属部门",
-              prop: "deptName",
-              slot: true,
+              label: "学历",
+              prop: "education",
               display: false,
-              width:260
-            },
-             {
-              label: "在职状态",
-              prop: "online_status",
-              slot: true,
-              display: false
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              type:"select",
+              rules: [{
+                required: true,
+                message: "请选择学历",
+                trigger: "blur"
+              }],
             },
             {
               label: "联系电话",
@@ -270,23 +248,69 @@
             {
               label: "邮箱",
               prop: "email",
+              display: false,
+              width:150
+            },
+            {
+              label: "入职时间",
+              prop: "rtime",
               display: false
             },
-            
             {
-              label: "创建时间",
-              prop: "createTime",
+              label: "所属部门",
+              prop: "deptName",
+              slot: true,
+              searchSpan:4,
+              display: false,
+              search:true,
+              width:260
+            },
+            {
+              label: "岗位",
+              prop: "postName",
+              slot: true,
               display: false
+            },
+            {
+              label: "入职时间",
+              prop: "rtime",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              searchRange: true,
+              searchSpan: 6,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: false,
+              search: true,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入时间",
+                  trigger: "blur"
+                }
+              ]
+            },
+            
+             {
+              label: "在职状态",
+              prop: "status",
+              slot: true,
+              display: false,
+              searchSpan:3,
+              search:true
             }
           ],
           group: [
             {
               label: '基础信息',
               prop: 'baseInfo',
+              labelWidth:"110",
               icon: 'el-icon-user-solid',
               column: [
                 {
-                  label: "所属客户",
+                  label: "所属保安单位",
                   prop: "tenantId",
                   type: "tree",
                   dicUrl: "/api/blade-system/tenant/select",
@@ -294,59 +318,13 @@
                     label: "tenantName",
                     value: "tenantId"
                   },
-                  hide: !website.tenantMode,
-                  addDisplay: website.tenantMode,
-                  editDisplay: website.tenantMode,
-                  viewDisplay: website.tenantMode,
-                  rules: [{
-                    required: true,
-                    message: "请输入所属租户",
-                    trigger: "click"
-                  }],
+                  disabled:true,
                   span: 24,
                 },
                 {
                   label: "登录账号",
                   prop: "account",
-                  rules: [{
-                    required: true,
-                    message: "请输入登录账号",
-                    trigger: "blur"
-                  }],
-                },
-                {
-                  label: "用户平台",
-                  type: "select",
-                  dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
-                  props: {
-                    label: "dictValue",
-                    value: "dictKey"
-                  },
-                  dataType: "number",
-                  slot: true,
-                  prop: "userType",
-                  rules: [{
-                    required: true,
-                    message: "请选择用户平台",
-                    trigger: "blur"
-                  }]
-                }
-              ]
-            },
-            {
-              label: '详细信息',
-              prop: 'detailInfo',
-              icon: 'el-icon-s-order',
-              column: [
-                {
-                  label: "用户昵称",
-                  prop: "name",
-                  hide: true,
-                  rules: [{
-                    required: true,
-                    message: "请输入用户昵称",
-                    trigger: "blur"
-                  }]
+                  disabled:true
                 },
                 {
                   label: "用户姓名",
@@ -362,13 +340,95 @@
                   }]
                 },
                 {
+                  label: "用户昵称",
+                  prop: "name"
+                },
+                {
                   label: "手机号码",
                   prop: "phone",
-                  overHidden: true
+                  overHidden: true,
+                  rules: [{
+                    required: true,
+                    message: "请输入手机号",
+                    trigger: "blur"
+                  }]
                 },
                 {
                   label: "电子邮箱",
                   prop: "email",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "身份证号",
+                  prop: "cardid",
+                  hide: true,
+                  overHidden: true,
+                  rules: [{
+                    required: true,
+                    message: "请输入身份证号",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: "籍贯",
+                  prop: "nativePlace",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "民族",
+                  prop: "nation",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "最高学历",
+                  prop: "education",
+                  type: "select",
+                  dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+                  props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                  },
+                  dataType: "number",
+                  slot: true,
+                  rules: [{
+                    required: true,
+                    message: "请选择学历",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: "政治面貌",
+                  prop: "politicaloutlook",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "身高",
+                  prop: "height",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "联系地址",
+                  prop: "address",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "户口所在地",
+                  prop: "registered",
+                  hide: true,
+                  overHidden: true
+                },
+                {
+                  label: "入职时间",
+                  prop: "rtime",
+                  type:'date',
+                  format: "yyyy-MM-dd",
+                  valueFormat: "yyyy-MM-dd",
                   hide: true,
                   overHidden: true
                 },
@@ -396,78 +456,82 @@
                   label: "用户生日",
                   type: "date",
                   prop: "birthday",
-                  format: "yyyy-MM-dd hh:mm:ss",
-                  valueFormat: "yyyy-MM-dd hh:mm:ss",
                   hide: true
-                },
-                {
-                  label: "账号状态",
-                  prop: "statusName",
-                  hide: true,
-                  display: false
                 }
               ]
             },
             {
-              label: '职责信息',
-              prop: 'dutyInfo',
-              icon: 'el-icon-s-custom',
+              label: '从业信息',
+              prop: 'detailInfo',
+              icon: 'el-icon-s-order',
               column: [
-                {
-                  label: "用户编号",
-                  prop: "code",
-                },
-                {
-                  label: "所属角色",
-                  prop: "roleId",
-                  multiple: true,
-                  type: "tree",
-                  dicData: [],
-                  props: {
-                    label: "title"
-                  },
-                  checkStrictly: true,
-                  slot: true,
-                  addDisplay:false,
-                  editDisplay:false,
-                  viewDisplay:true,
-                  // rules: [{
-                  //   required: true,
-                  //   message: "请选择所属角色",
-                  //   trigger: "click"
-                  // }]
-                },
-                {
-                  label: "所属部门",
-                  prop: "deptId",
-                  type: "cascader",
-                  //multiple: true,
-                  dicData: [],
-                  props: {
-                    label: "title"
-                  },
-                  checkStrictly: true,
-                  slot: true,
-                  rules: [{
-                    required: true,
-                    message: "请选择所属部门",
-                    trigger: "click"
-                  }]
-                },
-                {
-                  label: "所属岗位",
-                  prop: "postId",
-                  type: "tree",
-                  multiple: true,
-                  dicData: [],
-                  props: {
-                    label: "postName",
-                    value: "id"
-                  },
-
-                },
-              ]
-            },
+                    {
+                    prop: 'UserPractitionersInfo',
+                    type: 'dynamic',
+                    border: false,
+                    span:24,
+                    children: {
+                        align: 'left',
+                        headerAlign: 'center',
+                        type:'form',
+                        rowAdd:(done)=>{
+                            console.log(done,111);
+                            done({
+                                input:'默认值'
+                            });
+                        },
+                        rowDel:(row,done)=>{
+                            console.log(row,222);
+                            done();
+                        },
+                        column: [
+                                {
+                                    width: 200,
+                                    label: '单位名称',
+                                    prop: "companyname",
+                                    formslot: true,
+                                }, {
+                                    width: 200,
+                                    label: '部门',
+                                    prop: "department",
+                                    formslot: true,
+                                }, {
+                                    width: 200,
+                                    label: '岗位',
+                                    prop: "post",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '岗位职责',
+                                    prop: "responsibilities",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '入职时间',
+                                    type:'date',
+                                    format: "yyyy-MM-dd",
+                                    valueFormat: "yyyy-MM-dd",
+                                    prop: "entryTime",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '离职时间',
+                                    type:'date',
+                                    format: "yyyy-MM-dd",
+                                    valueFormat: "yyyy-MM-dd",
+                                    prop: "departureTime",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '离职原因',
+                                    prop: "leaving",
+                                    formslot: true,
+                                }
+                            ]
+                        }
+                    },
+                ]
+            }
           ]
         },
         data: [],
@@ -613,10 +677,11 @@
       ...mapGetters(["userInfo", "permission"]),
       permissionList() {
         return {
-          addBtn: this.vaildData(this.permission.user_add, false),
-          viewBtn: this.vaildData(this.permission.user_view, false),
+          addBtn: this.vaildData(null, false),
+          // addBtn: this.vaildData(this.permission.user_add, false),
+          viewBtn: this.vaildData(null, false),
           delBtn: this.vaildData(this.permission.user_delete, false),
-          editBtn: this.vaildData(this.permission.user_edit, false)
+          editBtn: this.vaildData(null, false)
         };
       },
       platformPermissionList() {
@@ -640,6 +705,7 @@
       if (!website.tenantMode) {
         this.initData(website.tenantId);
       }
+
     },
     methods: {
       nodeClick(data) {
@@ -722,13 +788,14 @@
         });
       },
       rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
+        this.$confirm("确定将选择用户登记离职?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         })
           .then(() => {
-            return remove(row.id);
+            row.status="0";
+            return update(row);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -756,28 +823,28 @@
         this.selectionList = [];
         this.$refs.crud.toggleSelection();
       },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
+      // handleDelete() {
+      //   if (this.selectionList.length === 0) {
+      //     this.$message.warning("请选择至少一条数据");
+      //     return;
+      //   }
+      //   this.$confirm("确定将选择用户登记离职?", {
+      //     confirmButtonText: "确定",
+      //     cancelButtonText: "取消",
+      //     type: "warning"
+      //   })
+      //     .then(() => {
+      //       return remove(this.ids);
+      //     })
+      //     .then(() => {
+      //       this.onLoad(this.page);
+      //       this.$message({
+      //         type: "success",
+      //         message: "操作成功!"
+      //       });
+      //       this.$refs.crud.toggleSelection();
+      //     });
+      // },
       handleGrant() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -798,7 +865,7 @@
       handleImport() {
         this.excelBox = true;
       },
-      uploadAfter(res, done, loading, column) {
+      uploadAfter(done) {
         this.excelBox = false;
         this.refreshChange();
         done();
@@ -816,9 +883,15 @@
         window.open(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`);
       },
       beforeOpen(done, type) {
+        var that = this;
         if (["edit", "view"].includes(type)) {
           getUser(this.form.id).then(res => {
             this.form = res.data.data;
+            var userInfo = res.data.data;
+            //获取用户从业信息
+            getUserPractitionersInfo(userInfo.cardid).then(res1 =>{
+               that.form.UserPractitionersInfo = res1.data.data;
+            })
             if (this.form.hasOwnProperty("deptId")) {
               this.form.deptId = this.form.deptId.split(",");
             }
diff --git a/src/views/securityGuard/securityGuardRegistration copy.vue b/src/views/securityGuard/securityGuardRegistration copy.vue
new file mode 100644
index 0000000..29cbf80
--- /dev/null
+++ b/src/views/securityGuard/securityGuardRegistration copy.vue
@@ -0,0 +1,105 @@
+<template>
+  <el-row>
+    <el-col>
+      <basic-container>
+        <avue-form :option="option" v-model="obj">
+          <template slot-scope="{row}" slot="input">
+            <el-tag>{{row}}</el-tag>
+          </template>
+        </avue-form>
+      </basic-container>
+    </el-col>
+  </el-row>
+</template>
+
+<script>
+  export default {
+  data() {
+      return {
+        obj: {
+            resdata: [
+              {
+                name: 1,
+                post: 1,
+                time: 1,
+              }, 
+              {
+                name: 1,
+                post: 1,
+                time: 1,
+              }
+           ]
+        },
+        option: {
+          labelWidth: 110,
+          column: [
+          {
+            label: '',
+            prop: 'resdata',
+            type: 'dynamic',
+            span:24,
+            children: {
+              align: 'center',
+              headerAlign: 'center',
+              rowAdd:(done)=>{
+                this.$message.success('新增回调');
+                  done({
+                    input:'默认值'
+                  });
+              },
+              rowDel:(row,done)=>{
+                this.$message.success('删除回调'+JSON.stringify(row));
+                done();
+              },
+              column: [
+                    {
+                        width: 200,
+                        label: '单位名称',
+                        prop: "name",
+                        formslot: true,
+                    }, {
+                        width: 200,
+                        label: '部门',
+                        prop: "post",
+                        formslot: true,
+                    }, {
+                        width: 200,
+                        label: '岗位',
+                        prop: "time",
+                        formslot: true,
+                    }
+              ]
+            }
+          },
+
+          ]
+        }
+      }
+  },
+  methods:{
+    // addAll(){
+    //   for(let i=0;i<10;i++){
+    //     this.obj.dynamic.push({
+    //        name: 1,
+    //             post: 1,
+    //             time: 1,
+    //     })
+    //   }
+    // }
+  }
+}
+</script>
+
+<style>
+  .box {
+    height: 800px;
+  }
+
+  .el-scrollbar {
+    height: 100%;
+  }
+
+  .box .el-scrollbar__wrap {
+    overflow: scroll;
+  }
+</style>
\ No newline at end of file
diff --git a/src/views/securityGuard/securityGuardRegistration.vue b/src/views/securityGuard/securityGuardRegistration.vue
new file mode 100644
index 0000000..a87668a
--- /dev/null
+++ b/src/views/securityGuard/securityGuardRegistration.vue
@@ -0,0 +1,399 @@
+<template>
+  <el-row>
+    <el-col>
+      <basic-container>
+        <avue-form :option="option" v-model="form" @submit="update">
+            <template slot-scope="{row}" slot="input">
+                <el-tag>{{row}}</el-tag>
+            </template>
+        </avue-form>
+      </basic-container>
+    </el-col>
+  </el-row>
+</template>
+
+<script>
+  import {
+    getUser,
+    update,
+    getUserPractitionersInfo,
+    saveOrUpdateUserPractitionersInfo
+  } from "@/api/system/user";
+  import {getDeptLazyTree} from "@/api/system/dept";
+
+  export default {
+    data() {
+      return {
+        loading: true,
+        userId:"",
+        init: {
+          deptTree: [],
+        },
+        props: {
+          label: "title",
+          value: "key"
+        },
+        roleGrantList: [],
+        roleTreeObj: [],
+        treeDeptId: '',
+        treeData: [],
+        form:{
+            UserPractitionersInfo:[]
+        },
+        treeOption: {
+          nodeKey: 'id',
+          lazy: true,
+          treeLoad: function (node, resolve) {
+            const parentId = (node.level === 0) ? 0 : node.data.id;
+            getDeptLazyTree(parentId).then(res => {
+              resolve(res.data.data.map(item => {
+                return {
+                  ...item,
+                  leaf: !item.hasChildren
+                }
+              }))
+            });
+          },
+          addBtn: false,
+          menu: false,
+          size: 'small',
+          props: {
+            labelText: '标题',
+            label: 'title',
+            value: 'value',
+            children: 'children'
+          }
+        },
+        option: {
+          height: 'auto',
+          calcHeight: 54,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: false,
+          stripe: true,
+          index: true,
+          selection: true,
+          dialogClickModal: false,
+          group: [
+            {
+              label: '基础信息',
+              labelWidth:"110",
+              prop: 'baseInfo',
+              icon: 'el-icon-user-solid',
+              column: [
+                {
+                  label: "所属保安单位",
+                  prop: "tenantId",
+                  type: "tree",
+                  dicUrl: "/api/blade-system/tenant/select",
+                  props: {
+                    label: "tenantName",
+                    value: "tenantId"
+                  },
+                  disabled:true,
+                  span: 24,
+                },
+                {
+                  label: "登录账号",
+                  prop: "account",
+                  disabled:true
+                },
+                {
+                  label: "用户姓名",
+                  prop: "realName",
+                  rules: [{
+                    required: true,
+                    message: "请输入用户姓名",
+                    trigger: "blur"
+                  }, {
+                    min: 2,
+                    max: 5,
+                    message: '姓名长度在2到5个字符'
+                  }]
+                },
+                {
+                  label: "用户昵称",
+                  prop: "name"
+                },
+                {
+                  label: "手机号码",
+                  prop: "phone",
+                  overHidden: true,
+                  rules: [{
+                    required: true,
+                    message: "请输入手机号",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: "电子邮箱",
+                  prop: "email"
+                },
+                {
+                  label: "身份证号",
+                  prop: "cardid",
+                  hide: true,
+                  overHidden: true,
+                  rules: [{
+                    required: true,
+                    message: "请输入身份证号",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: "籍贯",
+                  prop: "nativeplace"
+                },
+                {
+                  label: "民族",
+                  prop: "nation"
+                },
+                {
+                  label: "最高学历",
+                  prop: "education",
+                  type: "select",
+                  dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+                  props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                  },
+                  dataType: "number",
+                  slot: true,
+                  rules: [{
+                    required: true,
+                    message: "请选择学历",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: "政治面貌",
+                  prop: "politicaloutlook"
+                },
+                {
+                  label: "身高",
+                  prop: "height"
+                },
+                {
+                  label: "联系地址",
+                  prop: "address"
+                },
+                {
+                  label: "户口所在地",
+                  prop: "registered"
+                },
+                {
+                  label: "入职时间",
+                  prop: "rtime",
+                  type:'date',
+                  format: "yyyy-MM-dd",
+                  valueFormat: "yyyy-MM-dd"
+                },
+                {
+                  label: "用户性别",
+                  prop: "sex",
+                  type: "select",
+                  dicData: [
+                    {
+                      label: "男",
+                      value: 1
+                    },
+                    {
+                      label: "女",
+                      value: 2
+                    },
+                    {
+                      label: "未知",
+                      value: 3
+                    }
+                  ]
+                },
+                {
+                  label: "用户生日",
+                  type: "date",
+                  prop: "birthday"
+                }
+              ]
+            },
+            {
+              label: '从业信息',
+              prop: 'detailInfo',
+              icon: 'el-icon-s-order',
+              column: [
+                    {
+                    prop: 'UserPractitionersInfo',
+                    type: 'dynamic',
+                    border: false,
+                    span:24,
+                    children: {
+                        align: 'left',
+                        headerAlign: 'center',
+                        type:'form',
+                        rowAdd:(done)=>{
+                            console.log(done,111);
+                            done({
+                                input:'默认值'
+                            });
+                        },
+                        rowDel:(row,done)=>{
+                            console.log(row,222);
+                            done();
+                        },
+                        column: [
+                                {
+                                    width: 200,
+                                    label: '单位名称',
+                                    prop: "companyname",
+                                    formslot: true,
+                                }, {
+                                    width: 200,
+                                    label: '部门',
+                                    prop: "department",
+                                    formslot: true,
+                                }, {
+                                    width: 200,
+                                    label: '岗位',
+                                    prop: "post",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '岗位职责',
+                                    prop: "responsibilities",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '入职时间',
+                                    type:'date',
+                                    format: "yyyy-MM-dd",
+                                    valueFormat: "yyyy-MM-dd",
+                                    prop: "entryTime",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '离职时间',
+                                    type:'date',
+                                    format: "yyyy-MM-dd",
+                                    valueFormat: "yyyy-MM-dd",
+                                    prop: "departureTime",
+                                    formslot: true,
+                                },  {
+                                    width: 200,
+                                    label: '离职原因',
+                                    prop: "leaving",
+                                    formslot: true,
+                                }
+                            ]
+                        }
+                    },
+
+                ]
+            }
+          ]
+        },
+        data: []
+      };
+    },
+    watch: {
+      'form.tenantId'() {
+        if (this.form.tenantId !== '' && this.initFlag) {
+          this.initData(this.form.tenantId);
+        }
+      },
+      'excelForm.isCovered'() {
+        if (this.excelForm.isCovered !== '') {
+          const column = this.findObject(this.excelOption.column, "excelFile");
+          column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
+        }
+      }
+    },
+    computed: {
+    },
+    mounted() {
+      //获取userId
+      this.userId = JSON.parse(window.localStorage.getItem("saber-userInfo")).content.user_id;
+      //获取用户信息
+      this.getUserDetail();
+    },
+    methods: {
+      //获取用户信息
+      getUserDetail(){
+         var that = this;
+          //获取用户基本信息
+         getUser(this.userId).then(res => {
+            this.form = res.data.data;
+            var userInfo = res.data.data;
+            //获取用户从业信息
+            getUserPractitionersInfo(userInfo.cardid).then(res1 =>{
+               that.form.UserPractitionersInfo = res1.data.data;
+            })
+            if (this.form.hasOwnProperty("deptId")) {
+              this.form.deptId = this.form.deptId.split(",");
+            }
+            if (this.form.hasOwnProperty("postId")) {
+              this.form.postId = this.form.postId.split(",");
+            }
+         });
+      },
+      //新增用户信息(包含从业信息)
+      update(row, index, done, loading) {
+        const userPractitionersList = [];
+        var userPractitionersInfo = row.UserPractitionersInfo;
+        if(userPractitionersInfo.length>0){
+            userPractitionersInfo.forEach(item => {
+                const info = {
+                    companyname: item.companyname,
+                    department: item.department,
+                    departureTime: item.departureTime,
+                    entryTime: item.entryTime,
+                    name:row.realName,
+                    leaving: item.leaving,
+                    cardid:row.cardid,
+                    post: item.post,
+                    responsibilities: item.responsibilities
+                }
+                userPractitionersList.push(info);
+            });
+        }
+        var IdCardNo = row.cardid; 
+        row.deptId = row.deptId.join(",");
+        row.postId = row.postId.join(",");
+        update(row).then(() => {
+           const experience = {
+               cardid:IdCardNo,
+               userPractitionersInfo:userPractitionersList
+           }
+           //更新从业信息
+            saveOrUpdateUserPractitionersInfo(experience).then(()=>{
+                this.$message({
+                    type: "success",
+                    message: "操作成功!"
+                 });
+            })
+           this.loading = false;
+          done();
+        }, error => {
+          window.console.log(error,111);
+          loading();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+  .box {
+    height: 800px;
+  }
+
+  .el-scrollbar {
+    height: 100%;
+  }
+
+  .box .el-scrollbar__wrap {
+    overflow: scroll;
+  }
+
+  /* .el-form-item__content{
+      margin-left: 0px !important;
+  } */
+</style>
\ No newline at end of file
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index a992a28..c38dea5 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -36,7 +36,7 @@
                        plain
                        icon="el-icon-delete"
                        v-if="permission.user_delete"
-                       @click="handleDelete">删 除
+                       @click="handleDelete">注 销
             </el-button>
             <el-button type="info"
                        size="small"
@@ -260,6 +260,7 @@
           searchMenuSpan: 6,
           border: true,
           index: true,
+          delBtnText:'注销',
           selection: true,
           viewBtn: true,
           //dialogType: 'drawer',
@@ -324,6 +325,7 @@
           group: [
             {
               label: '基础信息',
+              labelWidth:"110",
               prop: 'baseInfo',
               icon: 'el-icon-user-solid',
               column: [
@@ -393,6 +395,7 @@
             },
             {
               label: '详细信息',
+              labelWidth:"110",
               prop: 'detailInfo',
               icon: 'el-icon-s-order',
               column: [
@@ -468,6 +471,7 @@
             },
             {
               label: '职责信息',
+              labelWidth:"110",
               prop: 'dutyInfo',
               icon: 'el-icon-s-custom',
               column: [
@@ -766,7 +770,7 @@
         });
       },
       rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
+        this.$confirm("确定将选择用户注销?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -805,7 +809,7 @@
           this.$message.warning("请选择至少一条数据");
           return;
         }
-        this.$confirm("确定将选择数据删除?", {
+        this.$confirm("确定将选择用户注销?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"

--
Gitblit v1.9.3