소스 검색

Merge branch 'master' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc into DK_dev

@dongkboy 3 년 전
부모
커밋
fb3516267a
45개의 변경된 파일과 3569개의 추가작업 그리고 6413개의 파일을 삭제
  1. 3 2
      build/build.js
  2. 2 2
      build/webpack.prod.conf.js
  3. 3 2
      config/dev.env.js
  4. 3 0
      config/index.js
  5. 2 1
      config/prod.env.js
  6. 10 0
      config/test.env.js
  7. 3 1
      package.json
  8. 7 0
      src/api/user.js
  9. 4 2
      src/http/axios.js
  10. 1 1
      src/http/config.js
  11. 54 1
      src/http/moudules/user.js
  12. 3 0
      src/main.js
  13. 0 4
      src/router/index.js
  14. 10 13
      src/store/modules/user.js
  15. 35 0
      src/utils/btnPermission.js
  16. 19 4
      src/views/Core/KtCommonTable.vue
  17. 16 7
      src/views/Core/PersonalPanel.vue
  18. 1 0
      src/views/FinancialManagement/CostVerification/Baosi.vue
  19. 2 2
      src/views/FinancialManagement/ReconciliationSystem/PayableList/Paid.vue
  20. 2 2
      src/views/FinancialManagement/ReconciliationSystem/PayableList/Unpaid.vue
  21. 2 2
      src/views/FinancialManagement/ReconciliationSystem/PayableList/Whole.vue
  22. 2 2
      src/views/FinancialManagement/ReconciliationSystem/ReceivableList/Received.vue
  23. 2 2
      src/views/FinancialManagement/ReconciliationSystem/ReceivableList/Uncollected.vue
  24. 2 2
      src/views/FinancialManagement/ReconciliationSystem/ReceivableList/Whole.vue
  25. 2 2
      src/views/FinancialManagement/ReconciliationSystem/UploadReconciliationList.vue
  26. 38 42
      src/views/HeadBar/HeadBar.vue
  27. 8 6
      src/views/Letter/Letter.vue
  28. 1 1
      src/views/Letter/Orderlist.vue
  29. 34 3
      src/views/Login.vue
  30. 173 1203
      src/views/PeopleManage/Agent/AgentExamine.vue
  31. 101 807
      src/views/PeopleManage/Agent/AgentManage.vue
  32. 165 882
      src/views/PeopleManage/Seo/StaffSeo.vue
  33. 100 92
      src/views/PeopleManage/Seo/TeamSeo.vue
  34. 141 859
      src/views/PeopleManage/Staff/StaffExamine.vue
  35. 107 798
      src/views/PeopleManage/Staff/StaffManage.vue
  36. 2224 0
      src/views/PeopleManage/Staff/StaffManageOld.vue
  37. 142 859
      src/views/PeopleManage/TeamLeader/TeamLeaderExamine.vue
  38. 105 773
      src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue
  39. 4 4
      src/views/Salary/SalaryExamine.vue
  40. 4 4
      src/views/Salary/SalaryQuery.vue
  41. 2 2
      src/views/Salary/SocinsuQuery.vue
  42. 1 1
      src/views/Sys/Appversion.vue
  43. 5 15
      src/views/Sys/Deptall.vue
  44. 23 7
      src/views/Sys/Role.vue
  45. 1 1
      src/views/Sys/User.vue

+ 3 - 2
build/build.js

@@ -1,7 +1,7 @@
 'use strict'
 require('./check-versions')()
 
-process.env.NODE_ENV = 'production'
+// process.env.NODE_ENV = 'production'
 const ora = require('ora')
 const rm = require('rimraf')
 const path = require('path')
@@ -9,7 +9,8 @@ const chalk = require('chalk')
 const webpack = require('webpack')
 const config = require('../config')
 const webpackConfig = require('./webpack.prod.conf')
-const spinner = ora('building for production...')
+// const spinner = ora('building for production...')
+var spinner = ora('building for ' + process.env.NODE_ENV + ' of ' + process.env.env_config+ ' mode...' )
 spinner.start()
 rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
   if (err) throw err

+ 2 - 2
build/webpack.prod.conf.js

@@ -11,8 +11,8 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
 const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
 
-const env = require('../config/prod.env')
-
+// const env = require('../config/prod.env')
+const env = config.build[process.env.env_config+'Env']  
 const webpackConfig = merge(baseWebpackConfig, {
   module: {
     rules: utils.styleLoaders({

+ 3 - 2
config/dev.env.js

@@ -4,7 +4,8 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  // BASE_URL: '"http://39.98.239.48/web-api"',
-  BASE_URL: '"http://192.168.0.111:9001/"' //测试服务器
+  ENV_CONFIG:'"dev"',
+  BASE_URL: '"http://39.98.239.48/web-api"',
+  // BASE_URL: '"http://192.168.0.111:8080/"' //测试服务器
 
 })

+ 3 - 0
config/index.js

@@ -46,6 +46,9 @@ module.exports = {
   },
 
   build: {
+    devEnv: require('./dev.env'),
+    prodEnv: require('./prod.env'),
+    testEnv: require('./test.env'),
     // Template for index.html
     index: path.resolve(__dirname, '../dist/index.html'),
 

+ 2 - 1
config/prod.env.js

@@ -1,5 +1,6 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  BASE_URL:'"http://39.98.239.48/web-api"'
+  ENV_CONFIG:'"prod"',
+  BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"',
 }

+ 10 - 0
config/test.env.js

@@ -0,0 +1,10 @@
+'use strict'
+const merge = require('webpack-merge')
+const prodEnv = require('./prod.env')
+
+module.exports = merge(prodEnv, {
+  NODE_ENV: '"testing"',
+  ENV_CONFIG:'"test"',
+  BASE_URL: '"http://39.98.239.48/web-api"',
+
+})

+ 3 - 1
package.json

@@ -7,7 +7,9 @@
   "scripts": {
     "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0",
     "start": "npm run dev",
-    "build": "node build/build.js"
+    "build": "node build/build.js",
+    "build--test": "cross-env NODE_ENV=production env_config=test node build/build.js",
+    "build--prod": "cross-env NODE_ENV=production env_config=prod node build/build.js"
   },
   "dependencies": {
     "@riophae/vue-treeselect": "^0.4.0",

+ 7 - 0
src/api/user.js

@@ -22,3 +22,10 @@ export function logout() {
     method: 'post'
   })
 }
+
+export function loginUser () {
+  return request({
+      url: '/user/loginUser',
+      method: 'get'
+  })
+}

+ 4 - 2
src/http/axios.js

@@ -2,6 +2,7 @@ import axios from 'axios';
 import config from './config';
 import Cookies from "js-cookie";
 import router from '@/router'
+import { Message } from 'element-ui'
 
 // 使用vuex做全局loading时使用
 // import store from '@/store'
@@ -78,13 +79,14 @@ export default function $axios(options) {
         } else {
           data = response.data
         }
-        if(response.status==401){
-          this.$message({
+        if(response.data.code==401){
+          Message({
             message: '登录信息已过期,请重新登录!!!',
             type: 'error',
             duration: 2000
           })
           Cookies.remove('token')
+          Cookies.remove('user')
           router.push('/login')
         }
         

+ 1 - 1
src/http/config.js

@@ -4,7 +4,7 @@ import { baseUrl } from '@/config/global'
 export default {
   method: 'get',
   // 基础url前缀
-  baseUrl: baseUrl,
+  baseUrl: process.env.BASE_URL,
   // 请求头信息
   headers: {
     // "Content-Type": "application/x-www-form-urlencoded",

+ 54 - 1
src/http/moudules/user.js

@@ -104,7 +104,14 @@ export const queryTeamNum = (data) => {
   })
 }
 
-
+//替换通过部门Id查询团队长
+export const newQueryTeamNum = (data) => {
+  return axios({
+    url: '/esm/user/queryTeamNum',
+    method: 'post',
+    data
+  })
+}
 
 
 
@@ -204,3 +211,49 @@ export const gainUserSynthesisInfo = (params) => {
         method: 'post'
     })
 }
+// 保存用户信息接口
+export const saveOrUpdate = (data) => {
+  return axios({
+      url: '/user/saveOrUpdate',
+      method: 'post',
+      data
+  })
+}
+// 后线人员回显接口
+export const getUserDatail = (params) => {
+  return axios({
+      url: '/user/'+params,
+      method: 'get',
+  })
+}
+// 删除后线人员接口
+export const getDeleteBatch = (data) => {
+  return axios({
+      url: '/user/logicDeleteBatch',
+      method: 'post',
+      data
+  })
+}
+
+// 获取登陆用户信息
+export const getLoginUser= () => {
+  return axios({
+      url: '/user/loginUser',
+      method: 'get',
+  })
+}
+//用户审核通过接口
+export const getApprovalPass= (id) => {
+  return axios({
+      url: '/user/approvalPass?userId='+id,
+      method: 'get',
+  })
+}
+//用户审核通过接口
+export const getApprovalNotPass= (params) => {
+  return axios({
+      url: '/user/approvalNotPass',
+      method: 'get',
+      params
+  })
+}

+ 3 - 0
src/main.js

@@ -10,6 +10,8 @@ import '@/utils/directives.js'
 import VueSplit from 'vue-split-panel'
 import VueDirectiveWindow from 'vue-directive-window';
 import {dateFormat} from '@/utils/dataformat.js'
+import btnPermission from '@/utils/btnPermission'
+
 import 'element-ui/lib/theme-chalk/index.css'
 // import 'element-ui/lib/'
 import 'font-awesome/css/font-awesome.min.css'
@@ -39,6 +41,7 @@ Vue.use(ElementUI)
 Vue.use(api)
 Vue.use(router)
 Vue.use(dateFormat)//日期组件格式化
+Vue.use(btnPermission)
 Vue.prototype.global = global
 
 new Vue({

+ 0 - 4
src/router/index.js

@@ -123,15 +123,11 @@ function addDynamicMenuAndRoutes(userName, to, from) {
     // 保存菜单树
     store.commit('setNavTree', res.data)
   }).then(res => {
-
     api.user.findPermissions({ 'name': userName }).then(res => {
       // 保存用户权限标识集合
       store.commit('setPerms', res.data)
     })
   })
-    .catch(function (res) {
-
-    })
 }
 
 /**

+ 10 - 13
src/store/modules/user.js

@@ -1,12 +1,13 @@
 import { getToken, setToken, removeToken } from '@/utils/auth'
-import { login } from '@/api/user'
+import { login,loginUser } from '@/api/user'
 export default {
     state: {
         perms: [],  // 用户权限标识集合
         token: getToken(),
+        roles:{}
     },
     getters: {
-   
+      // roles: state => state.roles
     },
     mutations: {
         setPerms(state, perms){  // 用户权限标识集合
@@ -15,6 +16,9 @@ export default {
         SET_TOKEN: (state, token) => {
             state.token = token
           },
+        SET_USER: (state, roles) => {
+          state.roles = roles
+        }
     },
     actions: {
         login({ commit }, userInfo) {
@@ -29,21 +33,14 @@ export default {
               })
             })
           },
-          getInfo({ commit, state }) {
+          getInfo({ commit }) {
             return new Promise((resolve, reject) => {
-              getInfo(state.token).then(response => {
+              loginUser().then(response => {
                 const { data } = response
                 if (!data) {
                   reject('Verification failed, please Login again.')
                 }
-                const { roles, name, avatar, introduction } = data
-                if (!roles || roles.length <= 0) {
-                  reject('getInfo: roles must be a non-null array!')
-                }
-                commit('SET_ROLES', roles)
-                commit('SET_NAME', name)
-                commit('SET_AVATAR', avatar)
-                commit('SET_INTRODUCTION', introduction)
+                commit('SET_USER', data)
                 resolve(data)
               }).catch(error => {
                 reject(error)
@@ -54,7 +51,7 @@ export default {
             return new Promise((resolve, reject) => {
               logout(state.token).then(() => {
                 commit('SET_TOKEN', '')
-                commit('SET_ROLES', [])
+                commit('SET_USER', [])
                 removeToken()
                 resolve()
               }).catch(error => {

+ 35 - 0
src/utils/btnPermission.js

@@ -0,0 +1,35 @@
+
+import store from '@/store'
+const permission = {
+    inserted(el, binding, vnode) {
+        // console.log(binding,'binding')
+        /*el: 指令所绑定的元素,可以用来直接操作DOM。
+           binding: 一个对象,包含指令的很多信息。
+           vnode: Vue编译生成的虚拟节点。*/
+        const { value } = binding
+        // 在登录后就可以缓存当前用户的btn权限。
+        // sessionStorage.setItem('ButtonPermissions',JSON.stringify(['role:add']))
+        // 自定义指令的执行函数,,取到登录缓存的按钮权限数组,赋值给全局对象userMsg
+        global.ButtonPermissions = store.state.user.perms
+        console.log(store.state,111111111)
+        // global.ButtonPermissions = JSON.parse(sessionStorage.getItem('ButtonPermissions'))
+        if (global.ButtonPermissions && global.ButtonPermissions.indexOf(value) < 0) {
+            el.style.display = 'none'
+        }
+    }
+}
+// 全局注册自定义指令
+const install = function (Vue) {
+    Vue.directive('permission', permission)
+}
+
+if (window.Vue) {
+    window['permission'] = permission
+    Vue.use(install); // eslint-disable-line
+}
+
+permission.install = install
+export default permission
+
+
+

+ 19 - 4
src/views/Core/KtCommonTable.vue

@@ -2,7 +2,7 @@
   <div style="position: relative" ref="commonTable">
     <!--表格栏-->
     <el-table id="commonTable" :data="data.content" :highlight-current-row="highlightCurrentRow"
-      @selection-change="selectionChange" @row-click="rowClick" @current-change="handleCurrentChange" v-loading="loading"
+      @selection-change="selectionChange" @row-click="rowClick" @current-change="handleCurrentChange"
       :element-loading-text="$t('action.loading')" :border="border" :stripe="stripe"
       :show-overflow-tooltip="showOverflowTooltip" :height="tableHeight" :size="size" :align="align" :header-cell-style="{
         background: '#F2F7FC',
@@ -67,6 +67,12 @@
               color: #ffffff;
             " icon="fa fa-trash" v-if="button1Name" :label="button1Name" :perms="permsButton1" :size="size"
             @click="handleButton1(scope.$index, scope.row)" />
+            <kt-button style="
+              background: #1e87ed;
+              border: 1px solid #1e87ed;
+              color: #ffffff;
+            " v-if="button4Name" :label="button4Name" :perms="permsButton4" :size="size"
+            @click="handleButton4(scope.$index, scope.row)" />
         </template>
       </el-table-column>
     </el-table>
@@ -119,6 +125,9 @@ export default {
     button3Name: {
       type: String,
     },
+    button4Name: {
+      type: String,
+    },
     permsButton1: {
       type: String,
     },
@@ -128,6 +137,9 @@ export default {
     permsButton3: {
       type: String,
     },
+    permsButton4: {
+      type: String,
+    },
     button1Background: {
       type: String,
     },
@@ -315,6 +327,12 @@ export default {
         row: row,
       });
     },
+    handleButton4: function (index, row) {
+      this.$emit("handleButton4", {
+        index: index,
+        row: row,
+      });
+    },
     //删除单个
     handleDeleteFlag: function (index, row) {
       this.$emit("handleDeleteFlag", { index: index, row: row });
@@ -388,7 +406,6 @@ export default {
             obj[_keyName] = idArray[i];
             params.push(obj);
           }
-          this.loading = true;
           let callback = (res) => {
             if (res.code == 200) {
               this.$message({
@@ -408,10 +425,8 @@ export default {
             params: params,
             callback: callback,
           });
-          this.loading = false;
         })
         .catch(() => {
-          this.loading = false;
         });
     },
     //批量结算

+ 16 - 7
src/views/Core/PersonalPanel.vue

@@ -4,27 +4,30 @@
       <div class="avatar-container u-f u-f-ajc">
         <img class="avatar" :src="require('@/assets/user.png')" />
       </div>
-      <div class="name-role">
+      <!-- <div class="name-role">
         <template v-if="user.name == 'admin'">
           <span class="sender">{{ user.name }}</span>
         </template>
         <template v-else>
           <span class="sender">{{ user.id }} - {{ user.name }}</span>
         </template>
-      </div>
+      </div> -->
       <div class="name-role">
-        <template v-if="user.name == 'admin'">
+        <template >
+          <span class="sender">{{ user.deptName }} - {{ user.roleName }}</span>
+        </template>
+        <!-- <template v-if="user.name == 'admin'">
           <span class="sender">超级管理员</span>
         </template>
         <template v-else>
           <span class="sender">{{ user.deptName }} - {{ user.jobName }}</span>
-        </template>
+        </template> -->
       </div>
       <template v-if="user.name != 'admin'">
         <div class="registe-info">
           <span class="registe-info">
             <li class="fa fa-clock-o"></li>
-            {{ user.registeInfo }}
+            {{ user.createTime.substr(0,10) }}
           </span>
         </div>
       </template>
@@ -115,10 +118,15 @@ export default {
     }
   },
   created(){
-   
+      // if (Cookies.get("user") != 'admin') {
+      //   this.userData.registeInfo = "入司时间:" + this.transformTime( this.userData.esmUserInternal.intime);
+      //   this.$api.dept.getDeptById( this.user.deptId).then(deptRes => {
+      //     this.user.deptName = deptRes.data.name;
+      //   });
+      // }
   },
   methods: {
-
+   
     //闪电增员
     recruiting() {
         this.$refs.recruitingDialog.setBackupVisible(true)
@@ -130,6 +138,7 @@ export default {
         type: "warning"
       })
         .then(() => {
+          localStorage.clear()
           sessionStorage.removeItem("user")
           this.deleteCookie("token")
           this.deleteCookie("user")

+ 1 - 0
src/views/FinancialManagement/CostVerification/Baosi.vue

@@ -92,6 +92,7 @@
             size="mini"
             type="primary"
             @click="modifyFun(scope.row)"
+            v-permission="'sys:cost:edit'"
           >修改</el-button>
           <el-button
             v-if="scope.row.importStatus == 1"

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/PayableList/Paid.vue

@@ -579,9 +579,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/PayableList/Unpaid.vue

@@ -578,9 +578,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/PayableList/Whole.vue

@@ -614,9 +614,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/ReceivableList/Received.vue

@@ -611,9 +611,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/ReceivableList/Uncollected.vue

@@ -573,9 +573,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/ReceivableList/Whole.vue

@@ -726,9 +726,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel_query.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 2 - 2
src/views/FinancialManagement/ReconciliationSystem/UploadReconciliationList.vue

@@ -440,9 +440,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel.xlsx" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/app/importExcel.xlsx" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 38 - 42
src/views/HeadBar/HeadBar.vue

@@ -61,9 +61,9 @@
         </el-menu-item>
         <el-menu-item index="5" v-popover:popover-personal>
           <!-- 用户信息 -->
-          <span class="user-info"><img :src="user.avatar" />{{ user.name }}</span>
+          <span class="user-info"><img :src="avatar" />{{ userData.name }}</span>
           <el-popover ref="popover-personal" placement="bottom-end" trigger="click" :visible-arrow="false">
-            <personal-panel :user="user"></personal-panel>
+            <personal-panel :user="userData"></personal-panel>
           </el-popover>
         </el-menu-item>
       </el-menu>
@@ -96,7 +96,7 @@ export default {
       appName: state => state.app.appName,
       themeColor: state => state.app.themeColor,
       collapse: state => state.app.collapse,
-      navTree: state => state.menu.navTree
+      navTree: state => state.menu.navTree,
     }),
     leftNavItems: function () {
       if (this.sum > 0) {
@@ -119,22 +119,19 @@ export default {
       sum: null,
       datawidth: 1920,
       screenWidth: document.body.clientWidth,
-      user: {
-        id: "",
-        name: "Yasepix",
-        avatar: "",
-        deptId: "",
-        deptName: "",
-        jobCode: "",
-        jobName: "",
-        // role: "超级管理员",
-        registeInfo: "入司时间:2018-12-25"
-      },
+      userData: JSON.parse(localStorage.getItem('user_data'))  ,
       activeIndex: '86',
-      langVisible: false
+      langVisible: false,
+      avatar: require("@/assets/user.png")
+
     }
   },
   created() {
+    if(!JSON.parse(localStorage.getItem('user_data'))){
+      this.$api.user.getLoginUser().then((response) => {
+             this.userData=response.data 
+          })
+    }
     if (this.leftNavItems.length > 8) {
       if (this.screenWidth < this.datawidth) {
         this.sum = Math.ceil((this.datawidth - this.screenWidth) / 70)
@@ -174,36 +171,35 @@ export default {
     }
     this.sysName = "Zgdd Platform";
     // var user = sessionStorage.getItem("user")
-    var user = Cookies.get("user")
-    if (user) {
-      this.user.id = user;
-
-      this.$api.user.findById(user).then((personRes) => {
-        this.user.name = personRes.data.sysUser.name;
-        this.user.avatar = require("@/assets/user.png")
-        Cookies.set('name', personRes.data.sysUser.name) // 放置token到Cookie
-        if (user != 'admin') {
+  
+      
+    // if (user) {
+    //   this.user.id = user;
+    //   this.$api.user.findById(user).then((personRes) => {
+    //     this.user.name = personRes.data.sysUser.name;
+    //     this.user.avatar = require("@/assets/user.png")
+    //     Cookies.set('name', personRes.data.sysUser.name) // 放置token到Cookie
+    //     if (user != 'admin') {
 
-          this.user.registeInfo = "入司时间:" + this.transformTime(personRes.data.esmUserInternal.intime);
+    //       this.user.registeInfo = "入司时间:" + this.transformTime(personRes.data.esmUserInternal.intime);
 
-          this.user.deptId = personRes.data.sysUser.deptId;
-          this.user.jobCode = personRes.data.sysUser.jobCode;
-          this.$api.dept.getDeptById(this.user.deptId).then(deptRes => {
-            this.user.deptName = deptRes.data.name;
-          });
+    //       this.user.deptId = personRes.data.sysUser.deptId;
+    //       this.user.jobCode = personRes.data.sysUser.jobCode;
+    //       this.$api.dept.getDeptById(this.user.deptId).then(deptRes => {
+    //         this.user.deptName = deptRes.data.name;
+    //       });
 
-          this.$api.dict.findByLableName("jobcode").then((response) => {
-            var jobList = response.data; // 把获取到的数据赋给this.data
-            for (let i = 0; i < jobList.length; i++) {
-              if (jobList[i].value == this.user.jobCode) {
-                this.user.jobName = jobList[i].label;
-              }
-            }
-          })
-        }
-      })
-      // this.user.avatar = require("@/assets/user.png")
-    }
+    //       this.$api.dict.findByLableName("jobcode").then((response) => {
+    //         var jobList = response.data; // 把获取到的数据赋给this.data
+    //         for (let i = 0; i < jobList.length; i++) {
+    //           if (jobList[i].value == this.user.jobCode) {
+    //             this.user.jobName = jobList[i].label;
+    //           }
+    //         }
+    //       })
+    //     }
+    //   })
+    // }
   },
   methods: {
     openWindow(url) {

+ 8 - 6
src/views/Letter/Letter.vue

@@ -2951,13 +2951,15 @@ export default {
     if (userId == "admin") {
       this.userId = "admin";
     } else {
-      this.userId = userId;
-      this.$api.user.findById(userId).then(res => {
-        let params = res.data;
-        this.userform = params.sysUser;
-        this.$api.dept.getDeptById(params.sysUser.deptId).then(res => {
+      // this.userId = userId;
+      this.$api.user.getLoginUser().then(res => {
+        if(res.code==200){
+          this.userform =res.data
+          this.$api.dept.getDeptById(res.data.deptId).then(res => {
           this.deptName = res.data.name;
         });
+        }
+      
       });
     }
     //--订单编辑回显--
@@ -3972,7 +3974,7 @@ export default {
           this.imageIdList5 = [];
           for (let keys in res.data) {
             res.data[keys].map(ele => {
-              ele.url = this.global.baseUrl + ele.url;
+              ele.url = process.env.BASE_URL + ele.url;
               switch (keys) {
                 case "C01":
                   this.imageIdList1.push(ele.imageId);

+ 1 - 1
src/views/Letter/Orderlist.vue

@@ -1276,7 +1276,7 @@ export default {
                     this.$api.letter.findByQuoteNo(dy.quoteno).then((resImage) => {
                         for (let key in resImage.data) {
                             resImage.data[key].map(ele => {
-                                ele.url = this.global.baseUrl + ele.url;
+                                ele.url = process.env.BASE_URL + ele.url;
                                 return ele;
                             })
                         }

+ 34 - 3
src/views/Login.vue

@@ -95,7 +95,7 @@ export default {
           { required: true, message: '请输入验证码', trigger: 'blur' }
         ]
       },
-      checked: true
+      checked: true,
     }
   },
   created() {
@@ -159,6 +159,13 @@ export default {
           }
           Cookies.set('token', res.data) // 放置token到Cookie
           Cookies.set('user', userInfo.account) // 放置token到Cookie
+          this.getDictItems()
+          this.$api.user.getLoginUser().then((response) => {
+              localStorage.setItem('user_data', JSON.stringify(response.data)) // 保存用户到本地会话
+          })
+          this.$api.role.findAll().then((res) => {
+            localStorage.setItem('find_all', JSON.stringify(res.data)) // 保存用户到本地会话
+          })
           sessionStorage.setItem('user', userInfo.account) // 保存用户到本地会话
           this.$store.commit('menuRouteLoaded', false) // 要求重新加载导航菜单
           this.$router.push('/') // 登录成功,跳转到主页
@@ -200,9 +207,33 @@ export default {
       //   })
       // });
     },
+    getDictItems() {
+      //--数据字典--
+      // 性别
+      this.$api.dict
+        .findByLableName('sex')
+        .then((response) => {
+          localStorage.setItem('sexOptions', JSON.stringify(response.data)) // 保存用户到本地会话
+        })
+        // 状态
+        this.$api.dict
+        .findByLableName('user_status')
+        .then((response) => {
+          localStorage.setItem('user_statusoptions', JSON.stringify(response.data)) // 保存用户到本地会话
+        })
+    },
+    // 用户信息
+    getUser(){
+      this.$api.user.getLoginUser().then((response) => {
+      if(response.code==200){
+        this.$store.commit("SET_USER", response.data)
+        localStorage.setItem('user_data', JSON.stringify(response.data)) // 保存用户到本地会话
+      }
+    })
+    },
     refreshCaptcha() {
-      this.loginForm.src = this.global.baseUrl + "/captcha.jpg?t=" + new Date().getTime();
-      // this.loginForm.src = process.env.BASE_URL + "/captcha.jpg?t=" + new Date().getTime();
+      // this.loginForm.src = this.global.baseUrl + "/captcha.jpg?t=" + new Date().getTime();
+      this.loginForm.src = process.env.BASE_URL + "/captcha.jpg?t=" + new Date().getTime();
     },
     reset() {
       this.$refs.loginForm.resetFields()

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 173 - 1203
src/views/PeopleManage/Agent/AgentExamine.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 101 - 807
src/views/PeopleManage/Agent/AgentManage.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 165 - 882
src/views/PeopleManage/Seo/StaffSeo.vue


+ 100 - 92
src/views/PeopleManage/Seo/TeamSeo.vue

@@ -9,7 +9,7 @@
                 clearable
                 size="small"
                 placeholder="工号"
-                v-model="queryFrom.id"
+                v-model="queryFrom.userId"
               ></el-input>
             </el-form-item>
           </el-col>
@@ -59,10 +59,10 @@
       <el-table-column
         header-align="center"
         align="center"
-        prop="companyname"
+        prop="deptName"
         label="机构名称"
       >
-        <template slot-scope="scope">
+        <!-- <template slot-scope="scope">
           <span
             v-for="(companyItem, companyIndex) in ztreeNodes"
             :key="companyIndex"
@@ -70,18 +70,18 @@
           >
             {{ companyItem.name }}
           </span>
-        </template>
+        </template> -->
       </el-table-column>
       <el-table-column
         header-align="center"
         align="center"
-        prop="deptid"
+        prop="deptId"
         label="部门编码"
         width="180"
       >
       </el-table-column>
       <!-- <el-table-column header-align="center" align="center" prop="depName" label="部门名称"> </el-table-column> -->
-      <el-table-column
+      <!-- <el-table-column
         header-align="center"
         align="center"
         prop="jobcode"
@@ -96,7 +96,7 @@
             {{ jobItem.label }}
           </span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
 
       <el-table-column
         header-align="center"
@@ -743,6 +743,7 @@
 export default {
   data() {
     return {
+      sexoptions: JSON.parse(localStorage.getItem('sexOptions')) ,
       activeTabs: "first",
       dialogVisible: false, // 新增编辑界面是否显示
       deptInfo: {}, //选中机构的基本信息
@@ -827,7 +828,7 @@ export default {
       // 新增或修改的弹出框End
 
       queryFrom: {
-        id: "",
+        userId: "",
         name: "",
         mobile: "",
       },
@@ -905,18 +906,24 @@ export default {
   },
   created() {
     //获取所有下拉框数据(字典)
-    this.getDictItems("comlevel");
-    this.getDictItems("comattribute");
-    this.getDictItems("comtype");
-
-    this.getDictItems("jobcode");
-    this.findLeftTreeData();
+    // this.getDictItems("comlevel");
+    // this.getDictItems("comattribute");
+    // this.getDictItems("comtype");
+    // this.getDictItems("jobcode");
     this.queryTeam();
   },
   methods: {
     queryTeam() {
-      this.$api.user.queryTeamNum(this.queryFrom).then((res) => {
-        this.tableData = res.data;
+      this.$api.user.newQueryTeamNum(this.queryFrom).then((res) => {
+        if(res.code==200){
+          res.data.forEach(val=>{
+            if(val.sex&& val.sex!==''&& val.sex!==null){
+              val.sex=this.sexoptions.find(ele=>ele.value==val.sex).label
+            }
+          })
+          this.tableData = res.data;
+         
+        }
       });
     },
     getDictItems(typeName) {
@@ -931,93 +938,94 @@ export default {
         });
     },
 
-    findLeftTreeData: function () {
-      // 获取数据
-      this.$api.dept.findLeftDeptTree("99").then((res) => {
-        this.ztreeNodes = res.data;
-      });
-    },
+    // findLeftTreeData: function () {
+    //   // 获取数据
+    //   this.$api.dept.findLeftDeptTree("99").then((res) => {
+    //     this.ztreeNodes = res.data;
+    //   });
+    // },
 
     handleTableEdit(params) {
       // 编辑代理人员
       this.activeTabs = "first";
-      if (params.row.deptid != "") {
-        this.$api.dept
-          .getDeptById(params.row.deptid.split("D")[0])
-          .then((deptRes) => {
-            this.deptInfo = deptRes.data;
-            this.departmentList = [];
-            for (var i = 0; i < this.ztreeNodes.length; i++) {
-              if (
-                this.ztreeNodes[i].id.indexOf(
-                  params.row.deptid.split("D")[0] + "D"
-                ) >= 0
-              ) {
-                this.departmentList.push({
-                  label: this.ztreeNodes[i].name,
-                  value: this.ztreeNodes[i].id,
-                });
-              }
-            }
-            if (params.row.deptid != "") {
-              this.$api.user.selectByDeptId(params.row.deptid).then((res2) => {
-                console.log(res2);
-                if (res2.data != null) {
-                  if (res2.code == 200) {
-                    this.teamleaderid = res2.data.id;
-                    this.teamleadername = res2.data.name;
-                  }
-                }
-              });
-            }
+      // if (params.row.deptid != "") {
+      //   this.$api.dept
+      //     .getDeptById(params.row.deptid.split("D")[0])
+      //     .then((deptRes) => {
+      //       this.deptInfo = deptRes.data;
+      //        this.departmentList = [];
+      //        for (var i = 0; i < this.ztreeNodes.length; i++) {
+      //          if (
+      //            this.ztreeNodes[i].id.indexOf(
+      //              params.row.deptid.split("D")[0] + "D"
+      //            ) >= 0
+      //          ) {
+      //            this.departmentList.push({
+      //              label: this.ztreeNodes[i].name,
+      //              value: this.ztreeNodes[i].id,
+      //            });
+      //          }
+      //        }
+      //       if (params.row.deptid != "") {
+      //         this.$api.user.selectByDeptId(params.row.deptid).then((res2) => {
+      //           console.log(res2);
+      //           if (res2.data != null) {
+      //             if (res2.code == 200) {
+      //               this.teamleaderid = res2.data.id;
+      //               this.teamleadername = res2.data.name;
+      //             }
+      //           }
+      //         });
+      //       }
 
-            this.$api.user.findById(params.row.id).then((personRes) => {
-              Object.assign(this.dataForm, personRes.data.sysUser);
-              Object.assign(this.dataForm, personRes.data.esmUserInternal);
-              Object.assign(this.dataForm, personRes.data.esmUserAgent);
-              this.dataForm.status = personRes.data.sysUser.status;
-              this.dataForm.status1 = personRes.data.sysUser.status;
-              if (personRes.data.esmUserAgent != null) {
-                this.$api.user
-                  .findBasePersonById(personRes.data.esmUserAgent.recommenderid)
-                  .then((res1) => {
-                    if (res1.code == 200) {
-                      this.dataForm.recommenderid = res1.data.id;
-                      this.dataForm.recommendername = res1.data.name;
-                    }
-                  });
-              }
+      //       this.$api.user.findById(params.row.id).then((personRes) => {
+      //         Object.assign(this.dataForm, personRes.data.sysUser);
+      //         Object.assign(this.dataForm, personRes.data.esmUserInternal);
+      //         Object.assign(this.dataForm, personRes.data.esmUserAgent);
+      //         this.dataForm.status = personRes.data.sysUser.status;
+      //         this.dataForm.status1 = personRes.data.sysUser.status;
+      //         if (personRes.data.esmUserAgent != null) {
+      //           this.$api.user
+      //             .findBasePersonById(personRes.data.esmUserAgent.recommenderid)
+      //             .then((res1) => {
+      //               if (res1.code == 200) {
+      //                 this.dataForm.recommenderid = res1.data.id;
+      //                 this.dataForm.recommendername = res1.data.name;
+      //               }
+      //             });
+      //         }
 
-              this.dialogVisible = true;
-            });
-          });
-      } else {
-        this.$api.user.findById(params.row.id).then((personRes) => {
-          console.log(personRes.data);
-          Object.assign(this.dataForm, personRes.data.sysUser);
-          Object.assign(this.dataForm, personRes.data.esmUserInternal);
-          Object.assign(this.dataForm, personRes.data.esmUserAgent);
-          this.dataForm.status = personRes.data.sysUser.status;
-          this.dataForm.status1 = personRes.data.sysUser.status;
-          if (personRes.data.esmUserAgent != null) {
-            this.$api.user
-              .findBasePersonById(personRes.data.esmUserAgent.recommenderid)
-              .then((res1) => {
-                console.log(res1.data);
-                if (res1.code == 200) {
-                  this.dataForm.recommenderid = res1.data.id;
-                  this.dataForm.recommendername = res1.data.name;
-                }
-              });
+      //         this.dialogVisible = true;
+      //       });
+      //     });
+      // } else {
+       
+        this.$api.user.getUserDatail(params.row.id).then((result) => {
+          // console.log(personRes.data);
+          // Object.assign(this.dataForm, personRes.data.sysUser);
+          // Object.assign(this.dataForm, personRes.data.esmUserInternal);
+          // Object.assign(this.dataForm, personRes.data.esmUserAgent);
+          // this.dataForm.status = personRes.data.sysUser.status;
+          // this.dataForm.status1 = personRes.data.sysUser.status;
+          // if (personRes.data.esmUserAgent != null) {
+          //   this.$api.user
+          //     .findBasePersonById(personRes.data.esmUserAgent.recommenderid)
+          //     .then((res1) => {
+          //       console.log(res1.data);
+          //       if (res1.code == 200) {
+          //         this.dataForm.recommenderid = res1.data.id;
+          //         this.dataForm.recommendername = res1.data.name;
+          //       }
+          //     });
+          // }
+          if(result.code==200){
+            this.dataForm=result.data
           }
-
           this.dialogVisible = true;
         });
-      }
+      // }
     },
     handleDialogBefore(done) {
-      // 退出对话框之前确认提示
-      var that = this;
       this.$confirm("确认关闭?")
         .then((_) => {
           done();

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 141 - 859
src/views/PeopleManage/Staff/StaffExamine.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 107 - 798
src/views/PeopleManage/Staff/StaffManage.vue


+ 2224 - 0
src/views/PeopleManage/Staff/StaffManageOld.vue

@@ -0,0 +1,2224 @@
+<template>
+  <div>
+    <el-main ref="elMain" style="padding: 0px">
+      <Split :gutterSize="2" style="height: calc(100vh - 120px)">
+        <!-- 左侧树Start -->
+        <SplitArea :size="leftSplitWidth" :minSize="240">
+          <div>
+            <div>
+              <el-checkbox v-model="containsSubDeptChecked"
+                >包含下级机构</el-checkbox
+              >
+
+              <kt-button
+                style="
+                  background-color: #ffc000;
+                  border: #ffc000;
+                  margin-left: 15px;
+                "
+                icon="fa fa-plus"
+                label="添加人员"
+                type="primary"
+                perms="sys:agent:add"
+                @click="handleAddButton"
+              />
+            </div>
+            <el-divider></el-divider>
+            <!-- 左侧树形结构 -->
+            <el-tree
+              :data="ztreeNodes"
+              :props="{ children: 'children', label: 'name' }"
+              node-key="id"
+              :default-expanded-keys="['9']"
+              @node-click="onZTreeClick"
+            ></el-tree>
+          </div>
+        </SplitArea>
+        <!-- 左侧树End -->
+
+        <!-- 右侧列表页面Start -->
+        <SplitArea :size="rightSplitWidth">
+          <!-- 筛选区域Start -->
+          <el-row class="queryFrom">
+            <el-form ref="queryFormRef" :model="queryFrom" label-width="80px">
+              <el-row>
+                <el-col :span="5">
+                  <el-form-item label="工号">
+                    <el-input
+                      clearable
+                      size="small"
+                      placeholder="工号"
+                      v-model="queryFrom.id"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                  <el-form-item label="姓名">
+                    <el-input
+                      clearable
+                      size="small"
+                      placeholder="姓名"
+                      v-model="queryFrom.name"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                  <el-form-item label="手机号">
+                    <el-input
+                      clearable
+                      size="small"
+                      placeholder="手机号"
+                      v-model="queryFrom.tel"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                  <el-form-item label="状态">
+                    <el-select
+                      size="small"
+                      v-model="queryFrom.status"
+                      placeholder="请选择"
+                      @change="statusChange"
+                    >
+                      <el-option label="待审核" value="0"></el-option>
+                      <el-option label="审核通过" value="1"></el-option>
+                      <el-option label="审核驳回" value="2"></el-option>
+                      <el-option label="退回修改" value="3"></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="4">
+                  <el-form-item label="">
+                    <el-button
+                      size="small"
+                      type="primary"
+                      @click="queryStaffInfo"
+                      >查询</el-button
+                    >
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </el-row>
+          <!-- 筛选区域End -->
+          <!-- 审核中 或者 审核驳回-->
+          <template
+            v-if="
+              pageRequest.columnFilters.approvalStatus.value == '0' ||
+              pageRequest.columnFilters.approvalStatus.value == '2'
+            "
+          >
+            <kt-common-table
+              permsEdit="sys:agent:view"
+              :showBatchDelete="false"
+              :data="pageResult"
+              :columns="columns"
+              editButtonName="查看"
+              @findPage="findPage"
+              @handleEdit="handleTableEdit"
+            ></kt-common-table>
+          </template>
+
+          <!-- 审核通过 -->
+          <template
+            v-if="pageRequest.columnFilters.approvalStatus.value == '1'"
+          >
+            <kt-common-table
+              permsEdit="sys:agent:edit"
+              permsDelete="sys:agent:delete"
+              :data="pageResult"
+              :columns="columns"
+              editButtonName="编辑"
+              deleteButtonName="删除"
+              :showBatchDelete="false"
+              @findPage="findPage"
+              @handleEdit="handleTableEdit"
+              @handleDeleteFlag="handleTableDeleteFlag"
+            >
+            </kt-common-table>
+          </template>
+
+          <!-- 退回修改 -->
+          <template
+            v-if="pageRequest.columnFilters.approvalStatus.value == '3'"
+          >
+            <kt-common-table
+              permsEdit="sys:agent:edit"
+              :showBatchDelete="false"
+              :data="pageResult"
+              :columns="columns"
+              editButtonName="修改"
+              @findPage="findPage"
+              @handleEdit="handleTableEdit"
+            ></kt-common-table>
+          </template>
+        </SplitArea>
+        <!-- 右侧列表页面End -->
+      </Split>
+    </el-main>
+
+    <!-- 新增修改界面 -->
+    <el-dialog
+      :title="dialogTitle"
+      width="1000px"
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      :before-close="handleDialogBefore"
+      @close="closeDialog"
+      v-dialogDrag
+    >
+      <el-form
+        :disabled="dataForm.status1 == '0' || dataForm.status1 == '2'"
+        :model="dataForm"
+        :rules="dataFormRules"
+        ref="dataForm"
+        @keyup.enter.native="submitForm('提交审核')"
+        label-width="130px"
+        size="small"
+        style="text-align: left"
+      >
+        <template v-if="dataForm.status1 == '2' || dataForm.status1 == '3'">
+          <div style="color: red">
+            {{ dataForm.status1 == "2" ? "驳回原因:" : "退回修改原因:" }}
+            {{ dataForm.remark }}
+          </div>
+        </template>
+        <el-tabs v-model="activeTabs">
+          <el-tab-pane label="行政信息" name="first">
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="机构名称">
+                  <el-cascader
+                    :options="option"
+                    v-model="zrr"
+                    clearable
+                    :show-all-levels="false"
+                    :props="{
+                      value: 'id',
+                      label: 'name',
+                      checkStrictly: true,
+                      expandTrigger: 'hover',
+                    }"
+                    @change="handleChange"
+                  >
+                  </el-cascader>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="机构编码">
+                  <el-input :value="deptInfo.id" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="上级机构编码">
+                  <el-input :value="deptInfo.parentId" disabled></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="机构类型">
+                  <el-select
+                    disabled
+                    :value="deptInfo.comtype"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in comtypeoptions"
+                      :key="item.label"
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="机构级别">
+                  <el-select
+                    disabled
+                    :value="deptInfo.comlevel"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in comleveloptions"
+                      :key="item.label"
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="机构性质">
+                  <el-select
+                    disabled
+                    :value="deptInfo.comattribute"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in comattributeoptions"
+                      :key="item.label"
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="24">
+                <el-form-item label="机构地址" style="width: 100%">
+                  <el-input
+                    type="textarea"
+                    :rows="3"
+                    :autosize="{ minRows: 3, maxRows: 4 }"
+                    placeholder="请输入内容"
+                    :value="deptInfo.address"
+                    disabled
+                  >
+                  </el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-tab-pane>
+          <el-tab-pane label="基本信息" name="second">
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="员工工号" prop="id">
+                  <el-input v-model="dataForm.id" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="部门" prop="deptId">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.deptId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in departmentList"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="岗位" prop="jobCode">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.jobCode"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in jobcodeoptions"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="薪资等级" prop="salarycode">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.salarycode"
+                    placeholder="请选择"
+                  >
+                    <el-option label="一级" value="一级"></el-option>
+                    <el-option label="二级" value="二级"></el-option>
+                    <el-option label="三级" value="三级"></el-option>
+                    <el-option label="四级" value="四级"></el-option>
+                    <el-option label="五级" value="五级"></el-option>
+                    <el-option label="六级" value="六级"></el-option>
+                    <el-option label="七级" value="七级"></el-option>
+                    <el-option label="八级" value="八级"></el-option>
+                    <el-option label="九级" value="九级"></el-option>
+                    <el-option label="十级" value="十级"></el-option>
+                    <el-option label="十一级" value="十一级"></el-option>
+                    <el-option label="十二级" value="十二级"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="operation">
+                <el-form-item label="修改密码" prop="password">
+                  <el-input v-model="dataForm.password"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="!operation">
+                <el-form-item label="修改密码">
+                  <el-input value="******" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="档案号" prop="documentno">
+                  <el-input v-model="dataForm.documentno"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="姓名" prop="name">
+                  <el-input v-model="dataForm.name"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="性别" prop="sex">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.sex"
+                    placeholder="请选择"
+                  >
+                    <el-option label="男" value="男"></el-option>
+                    <el-option label="女" value="女"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="电话" prop="mobile">
+                  <el-input v-model="dataForm.mobile"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="身份证号" prop="identity">
+                  <el-input v-model="dataForm.identity"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="出生日期" prop="birthday">
+                  <el-date-picker
+                    style="width: 100%"
+                    v-model="dataForm.birthday"
+                    type="date"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="开户银行" prop="bankname">
+                  <el-input v-model="dataForm.bankname" disabled></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="银行账号" prop="accountno">
+                  <el-input v-model="dataForm.accountno"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="民族" prop="nations">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.nations"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      :label="national"
+                      :value="national"
+                      v-for="national in nationalList"
+                      :key="national"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="政治面貌" prop="politicalstatus">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.politicalstatus"
+                    placeholder="请选择"
+                  >
+                    <el-option label="群众" value="群众"></el-option>
+                    <el-option label="共青团员" value="共青团员"></el-option>
+                    <el-option label="中共党员" value="中共党员"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="户口所在地" prop="addressresident">
+                  <el-input v-model="dataForm.addressresident"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="健康状况" prop="health">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.health"
+                    placeholder="请选择"
+                  >
+                    <el-option label="健康" value="健康"></el-option>
+                    <el-option label="亚健康" value="亚健康"></el-option>
+                    <el-option label="疾病" value="疾病"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="邮政编码" prop="postalcode">
+                  <el-input v-model="dataForm.postalcode"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="居住地址" prop="addressnow">
+                  <el-input v-model="dataForm.addressnow"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="邮箱" prop="email">
+                  <el-input v-model="dataForm.email"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="住宅电话" prop="phonehouse">
+                  <el-input v-model="dataForm.phonehouse"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="籍贯" prop="nativeplace">
+                  <el-input v-model="dataForm.nativeplace"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入司时间" prop="intime">
+                  <el-date-picker
+                    style="width: 100%"
+                    v-model="dataForm.intime"
+                    type="date"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="转正时间" prop="regulartm">
+                  <el-date-picker
+                    style="width: 100%"
+                    v-model="dataForm.regulartm"
+                    type="date"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="毕业院校" prop="college">
+                  <el-input v-model="dataForm.college"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="毕业时间" prop="collegetm">
+                  <el-date-picker
+                    style="width: 100%"
+                    v-model="dataForm.collegetm"
+                    type="date"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="专业" prop="speciality">
+                  <el-input v-model="dataForm.speciality"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="婚姻状况" prop="marrycode">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.marrycode"
+                    placeholder="请选择"
+                  >
+                    <el-option label="未婚" value="未婚"></el-option>
+                    <el-option label="已婚" value="已婚"></el-option>
+                    <el-option label="离异" value="离异"></el-option>
+                    <el-option label="再婚" value="再婚"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="学历" prop="education">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.education"
+                    placeholder="请选择"
+                  >
+                    <el-option label="小学" value="小学"></el-option>
+                    <el-option label="初中" value="初中"></el-option>
+                    <el-option label="高中" value="高中"></el-option>
+                    <el-option label="专科" value="专科"></el-option>
+                    <el-option label="本科" value="本科"></el-option>
+                    <el-option label="硕士" value="硕士"></el-option>
+                    <el-option label="博士" value="博士"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="血型" prop="blood">
+                  <el-select
+                    style="width: 100%"
+                    v-model="dataForm.blood"
+                    placeholder="请选择"
+                  >
+                    <el-option label="A型" value="A型"></el-option>
+                    <el-option label="B型" value="B型"></el-option>
+                    <el-option label="O型" value="O型"></el-option>
+                    <el-option label="AB型" value="AB型"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="紧急联系姓名" prop="namespecial">
+                  <el-input v-model="dataForm.namespecial"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="紧急联系电话" prop="phonespecial">
+                  <el-input v-model="dataForm.phonespecial"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="操作员" prop="createBy">
+                  <el-input v-model="dataForm.createBy"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="dataForm.status1 == '0' || dataForm.status1 == '2'">
+              <el-col :span="8">
+                <el-form-item label="录入时间" prop="createTime">
+                  <el-input v-model="dataForm.createTime"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="最后修改时间" prop="lastUpdateTime">
+                  <el-input v-model="dataForm.lastUpdateTime"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="操作员" prop="lastUpdateBy">
+                  <el-input v-model="dataForm.lastUpdateBy"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="原工作单位" prop="orglast">
+                  <el-input v-model="dataForm.orglast"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-tab-pane>
+          <el-tab-pane label="影像资料" name="third">
+            <div class="imageLibraryItem">
+              <el-row class="imageLibraryItemTitle">
+                <label @click="pic1Control = !pic1Control"> 身份证照片 </label>
+              </el-row>
+              <el-row class="imageLibraryItemBody" v-show="pic1Control">
+                <el-col :span="12">
+                  <el-form-item label="身份证正面:" style="width: 50%">
+                    <el-upload
+                      class="avatar-uploader"
+                      action=""
+                      name="photo1"
+                      :show-file-list="false"
+                      :http-request="httpRequest"
+                      :before-upload="beforeAvatarUpload"
+                    >
+                      <img
+                        v-if="dataForm.photo1"
+                        :src="dataForm.photo1"
+                        v-show="!!dataForm.photo1"
+                        class="avatar"
+                      />
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    </el-upload>
+
+                    <viewer :images="photo1List">
+                      <img
+                        style="
+                          width: 50px;
+                          height: 30px;
+                          opacity: 0;
+                          position: absolute;
+                          top: 122px;
+                          left: 0;
+                          right: 0;
+                          bottom: 0;
+                        "
+                        :src="photo1Item"
+                        v-for="(photo1Item, photo1Index) in photo1List"
+                        :key="photo1Index"
+                      />
+                    </viewer>
+                    <button @click.prevent v-show="!!dataForm.photo1">
+                      预览
+                    </button>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="身份证反面:" style="width: 50%">
+                    <el-upload
+                      class="avatar-uploader"
+                      action=""
+                      name="photo2"
+                      :show-file-list="false"
+                      :http-request="httpRequest"
+                      :before-upload="beforeAvatarUpload"
+                    >
+                      <img
+                        v-if="dataForm.photo2"
+                        :src="dataForm.photo2"
+                        v-show="!!dataForm.photo2"
+                        class="avatar"
+                      />
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    </el-upload>
+                    <viewer :images="photo2List">
+                      <img
+                        style="
+                          width: 50px;
+                          height: 30px;
+                          opacity: 0;
+                          position: absolute;
+                          top: 122px;
+                          left: 0;
+                          right: 0;
+                          bottom: 0;
+                        "
+                        :src="photo2Item"
+                        v-for="(photo2Item, photo2Index) in photo2List"
+                        :key="photo2Index"
+                      />
+                    </viewer>
+                    <button @click.prevent v-show="!!dataForm.photo2">
+                      预览
+                    </button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+
+            <div class="imageLibraryItem">
+              <el-row class="imageLibraryItemTitle">
+                <label @click="pic3Control = !pic3Control"> 展业资格证 </label>
+              </el-row>
+              <el-row class="imageLibraryItemBody" v-show="pic3Control">
+                <el-col :span="12">
+                  <el-form-item label="资格证照片:" style="width: 50%">
+                    <el-upload
+                      class="avatar-uploader"
+                      action=""
+                      name="photo3"
+                      :show-file-list="false"
+                      :http-request="httpRequest"
+                      :before-upload="beforeAvatarUpload"
+                    >
+                      <img
+                        v-if="dataForm.photo3"
+                        :src="dataForm.photo3"
+                        v-show="!!dataForm.photo3"
+                        class="avatar"
+                      />
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    </el-upload>
+                    <viewer :images="photo3List">
+                      <img
+                        style="
+                          width: 50px;
+                          height: 30px;
+                          opacity: 0;
+                          position: absolute;
+                          top: 122px;
+                          left: 0;
+                          right: 0;
+                          bottom: 0;
+                        "
+                        :src="photo3Item"
+                        v-for="(photo3Item, photo3Index) in photo3List"
+                        :key="photo3Index"
+                      />
+                    </viewer>
+                    <button @click.prevent v-show="!!dataForm.photo3">
+                      预览
+                    </button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+
+            <div class="imageLibraryItem">
+              <el-row class="imageLibraryItemTitle">
+                <label @click="pic4Control = !pic4Control"> 劳动合同 </label>
+              </el-row>
+              <el-row class="imageLibraryItemBody" v-show="pic4Control">
+                <el-col :span="12">
+                  <el-form-item label="劳动合同照片:" style="width: 50%">
+                    <el-upload
+                      class="avatar-uploader"
+                      action=""
+                      name="photo4"
+                      :show-file-list="false"
+                      :http-request="httpRequest"
+                      :before-upload="beforeAvatarUpload"
+                    >
+                      <img
+                        v-if="dataForm.photo4"
+                        :src="dataForm.photo4"
+                        v-show="!!dataForm.photo4"
+                        class="avatar"
+                      />
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    </el-upload>
+                    <viewer :images="photo4List">
+                      <img
+                        style="
+                          width: 50px;
+                          height: 30px;
+                          opacity: 0;
+                          position: absolute;
+                          top: 122px;
+                          left: 0;
+                          right: 0;
+                          bottom: 0;
+                        "
+                        :src="photo4Item"
+                        v-for="(photo4Item, photo4Index) in photo4List"
+                        :key="photo4Index"
+                      />
+                    </viewer>
+                    <button @click.prevent v-show="!!dataForm.photo4">
+                      预览
+                    </button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+
+            <div class="imageLibraryItem">
+              <el-row class="imageLibraryItemTitle">
+                <label @click="pic5Control = !pic5Control"> 应聘表 </label>
+              </el-row>
+              <el-row class="imageLibraryItemBody" v-show="pic5Control">
+                <el-col :span="12">
+                  <el-form-item label="应聘表照片:" style="width: 50%">
+                    <el-upload
+                      class="avatar-uploader"
+                      action=""
+                      name="photo5"
+                      :show-file-list="false"
+                      :http-request="httpRequest"
+                      :before-upload="beforeAvatarUpload"
+                    >
+                      <img
+                        v-if="dataForm.photo5"
+                        :src="dataForm.photo5"
+                        v-show="!!dataForm.photo5"
+                        class="avatar"
+                      />
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    </el-upload>
+                    <viewer :images="photo5List">
+                      <img
+                        style="
+                          width: 50px;
+                          height: 30px;
+                          opacity: 0;
+                          position: absolute;
+                          top: 122px;
+                          left: 0;
+                          right: 0;
+                          bottom: 0;
+                        "
+                        :src="photo5Item"
+                        v-for="(photo5Item, photo5Index) in photo5List"
+                        :key="photo5Index"
+                      />
+                    </viewer>
+                    <button @click.prevent v-show="!!dataForm.photo5">
+                      预览
+                    </button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+
+            <div class="imageLibraryItem">
+              <el-row class="imageLibraryItemTitle">
+                <label @click="pic6Control = !pic6Control"> 定薪表 </label>
+              </el-row>
+              <el-row class="imageLibraryItemBody" v-show="pic6Control">
+                <el-col :span="12">
+                  <el-form-item label="定薪表照片:" style="width: 50%">
+                    <el-upload
+                      class="avatar-uploader"
+                      action=""
+                      name="photo6"
+                      :show-file-list="false"
+                      :http-request="httpRequest"
+                      :before-upload="beforeAvatarUpload"
+                    >
+                      <img
+                        v-if="dataForm.photo6"
+                        :src="dataForm.photo6"
+                        v-show="!!dataForm.photo6"
+                        class="avatar"
+                      />
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                    </el-upload>
+                    <viewer :images="photo6List">
+                      <img
+                        style="
+                          width: 50px;
+                          height: 30px;
+                          opacity: 0;
+                          position: absolute;
+                          top: 122px;
+                          left: 0;
+                          right: 0;
+                          bottom: 0;
+                        "
+                        :src="photo6Item"
+                        v-for="(photo6Item, photo6Index) in photo6List"
+                        :key="photo6Index"
+                      />
+                    </viewer>
+                    <button @click.prevent v-show="!!dataForm.photo6">
+                      预览
+                    </button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+          </el-tab-pane>
+        </el-tabs>
+      </el-form>
+      <span slot="footer" class="dialog-footer" v-show="activeTabs == 'third'">
+        <el-button
+          size="small"
+          type="primary"
+          style="background-color: #ffc000; border: 1px solid #ffc000"
+          @click="closeDialog"
+          >取消</el-button
+        >
+        <el-button
+          v-if="dataForm.status1 != '0' && dataForm.status1 != '2'"
+          size="small"
+          type="primary"
+          @click="submitForm"
+          >提交</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Cookies from "js-cookie";
+import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
+import tree from "@/components/ztree.vue"; // 机构树组件
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import bankBin from "@/assets/js/bankcardinfo.js";
+import CommonUtil from "@/utils/comutil.js";
+
+export default {
+  components: {
+    KtButton,
+    tree,
+    KtCommonTable,
+  },
+  data() {
+    // 验证银行卡号
+    var validateBankCard = (rule, value, callback) => {
+      let that = this;
+      that.dataForm.bankname = "";
+      if (value == "") {
+        callback(new Error("请输入银行账号"));
+      } else {
+        bankBin
+          .getBankBin(value)
+          .then((data) => {
+            that.dataForm.bankname = data.bankName;
+            callback();
+          })
+          .catch((err) => {
+            callback(new Error("卡号输入有误"));
+          });
+      }
+    };
+
+    //验证身份证
+    var validateIdCard = (rule, value, callback) => {
+      let that = this;
+      var pattern =
+        /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/;
+      if (!pattern.test(value) || value == "") {
+        callback(new Error("身份证输入有误"));
+      } else {
+        let upperCaseValue = value.toUpperCase();
+        var such = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+        var sum = 0;
+        for (var i = 0; i < value.length - 1; i++) {
+          var product = value[i] * such[i];
+          sum += product;
+        }
+        var result = sum % 11;
+        var example = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
+        if (upperCaseValue[17] == example[result]) {
+          that.dataForm.identity = upperCaseValue;
+          that.dataForm.birthday =
+            value.substr(6, 4) +
+            "-" +
+            value.substr(10, 2) +
+            "-" +
+            value.substr(12, 2);
+          that.dataForm.sex = value.substr(16, 1) % 2 == 0 ? "女" : "男";
+          callback();
+        } else {
+          callback(new Error("身份证输入有误"));
+        }
+      }
+    };
+
+    return {
+      jobNameList: [], //岗位下拉框数组
+      filterObject: {},
+      zrr: [],
+      peopleid: "",
+      peopledeptid: "",
+      /**Split 开始 */
+      leftSplitWidth: 20,
+      rightSplitWidth: 80,
+      /**Split 结束 */
+
+      // 控制影像
+      pic1Control: false,
+      pic3Control: false,
+      pic4Control: false,
+      pic5Control: false,
+      pic6Control: false,
+
+      //----ztreeLeft begin---------
+      ztreeObj: null,
+      ztreeSetting: {
+        check: {
+          enable: false,
+        },
+        data: {
+          simpleData: {
+            enable: true,
+            pIdKey: "parentId",
+          },
+        },
+        view: {
+          showIcon: false,
+        },
+      },
+      ztreeNodes: [],
+      currentTreeNode: null,
+      //----ztreeLeft end---------
+
+      recommenderList: [],
+
+      teamleadername: "",
+      teamleaderid: "",
+
+      // 右侧列表查询数据Start
+      queryFrom: {
+        status: "1",
+      },
+      pageResult: {},
+      containsSubDeptChecked: true, //是否包含下级机构
+      pageRequest: {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 20,
+        columnFilters: {
+          deptId: {
+            name: "deptId",
+            value: "99",
+          },
+          containsSubDept: {
+            name: "containsSubDept",
+            value: 1,
+          },
+          usertype: {
+            name: "usertype",
+            value: "1",
+          },
+          approvalStatus: {
+            name: "approvalStatus",
+            value: "1",
+          },
+          isteamleader: {
+            name: "isteamleader",
+            value: "0",
+          },
+          userId: {
+            name: "userId",
+            value: "",
+          },
+          realName: {
+            name: "realName",
+            value: "",
+          },
+          mobile: {
+            name: "mobile",
+            value: "",
+          },
+          delFlag: {
+            name: "delFlag",
+            value: 0,
+          },
+        },
+      },
+      columns: [
+        // 数据列
+        { prop: "deptId", label: "部门编码", minWidth: 80, sortable: false },
+        {
+          prop: "pdeptName",
+          label: "机构名称",
+          minWidth: 120,
+          sortable: false,
+        },
+
+        { prop: "deptName", label: "部门名称", minWidth: 80, sortable: false },
+        {
+          prop: "jobName",
+          label: "岗位",
+          minWidth: 80,
+          sortable: false,
+        },
+        { prop: "userId", label: "工号", minWidth: 80, sortable: false },
+        { prop: "name", label: "姓名", minWidth: 120, sortable: false },
+        {
+          prop: "sex",
+          label: "性别",
+          minWidth: 120,
+          sortable: false,
+          formatter: this.sexFormatter,
+        },
+        { prop: "mobile", label: "联系电话", minWidth: 100, sortable: false },
+        {
+          prop: "approvalStatus",
+          label: "状态",
+          minWidth: 70,
+          sortable: false,
+        },
+      ],
+      // 右侧列表查询数据End
+
+      // 新增或修改的弹出框Start
+      activeTabs: "first",
+      dialogTitle: "",
+      dialogVisible: false, // 新增编辑界面是否显示
+      operation: false, // true:新增, false:编辑
+      departmentList: [], // 选中公司的所有部门的集合
+      deptInfo: {}, //选中机构的基本信息
+      dataForm: {
+        // 人员个人信息
+        id: "",
+        checkid: "",
+        name: "", //用户名
+        password: "", //密码
+        email: "", //邮箱
+        mobile: "", //手机号
+        birthday: "", //出生日期
+        status: "", //状态  1:正常   0:离司
+        marrycode: "", //婚姻状况
+        deptId: "", //机构号或者部门号
+        createBy: "", //创建人
+        createTime: "", //创建时间
+        lastUpdateBy: "", //更新人
+        lastUpdateTime: "", //更新时间
+        delFlag: "", //是否删除  -1:已删除  0:正常
+        usertype: "", //用户类型:0:系统用户 1:后线人员 2:代理人员
+        tenantId: "", //所属租户
+        sex: "", //性别
+        jobName: "", //岗位
+        jobCode: "",
+        esmUserInternalid: "",
+        addressnow: "", //居住地址
+        nations: "", //民族
+        politicalstatus: "", //政治面貌
+        college: "", //毕业院校
+        identity: "", //身份证号
+        education: "", //学历
+        bankname: "", //开户行
+        accountno: "", //开户账号
+        addressresident: "", //户口地址
+        health: "", //健康状态
+        postalcode: "", //邮政编码
+        phonehouse: "", //住宅电话
+        collegetm: "", //毕业时间
+        speciality: "", //专业
+        nativeplace: "", //籍贯
+        worktype: "", //工作性质
+        blood: "", //血型
+        saleno: "", //业务员职业证书号
+        orglast: "", //原工作单位
+        joblast: "", //工作职务
+        hobby: "", //爱好特长
+        namespecial: "", //紧急联系人姓名
+        phonespecial: "", //紧急联系人电话
+        intimes: "", //是否二次入司
+        intime: "", //入司时间
+        contracttime: "", //签约时间(财)
+        isteamleader: "", //是否团队长(财)
+        documentno: "", //后线人员档案号
+        hrcode: "", //后线人员HR编码
+        regulartm: "", //转正时间
+        salarycode: "", //薪资等级
+        esmUserAgentid: "", //主键
+        recommenderid: "", //推荐人代码
+        recommendername: "", //推荐人姓名
+        leaderupid: "", //上级主管代码
+        leaderupname: "", //上级主管姓名
+        grouppersonid: "", //组育成人代码
+        grouppersonname: "", //组育成人姓名
+        deppersonid: "", //部育成人代码
+        deppersonname: "", //部育成人姓名
+        isshowteam: "", //是否显示团队
+        isshowsalesroom: "", //是否显示门店
+
+        photo1: "",
+        photo2: "",
+        photo3: "",
+        photo4: "",
+        photo5: "",
+        photo6: "",
+      },
+      // 新增或修改的弹出框End
+
+      //------------下拉框数据字典   begin-----------------
+      comleveloptions: [],
+      comattributeoptions: [],
+      comtypeoptions: [],
+      jobcodeoptions: [],
+      statusoptions: [
+        { label: "待审核", value: "0" },
+        { label: "审核通过", value: "1" },
+        { label: "审核驳回", value: "2" },
+        { label: "退回修改", value: "3" },
+      ],
+      //------------下拉框数据字典   end----------------
+
+      //56个民族
+      nationalList: [
+        "汉族",
+        "壮族",
+        "满族",
+        "回族",
+        "苗族",
+        "维吾尔族",
+        "土家族",
+        "彝族",
+        "蒙古族",
+        "藏族",
+        "布依族",
+        "侗族",
+        "瑶族",
+        "朝鲜族",
+        "白族",
+        "哈尼族",
+        "哈萨克族",
+        "黎族",
+        "傣族",
+        "畲族",
+        "傈僳族",
+        "仡佬族",
+        "东乡族",
+        "高山族",
+        "拉祜族",
+        "水族",
+        "佤族",
+        "纳西族",
+        "羌族",
+        "土族",
+        "仫佬族",
+        "锡伯族",
+        "柯尔克孜族",
+        "达斡尔族",
+        "景颇族",
+        "毛南族",
+        "撒拉族",
+        "布朗族",
+        "塔吉克族",
+        "阿昌族",
+        "普米族",
+        "鄂温克族",
+        "怒族",
+        "京族",
+        "基诺族",
+        "德昂族",
+        "保安族",
+        "俄罗斯族",
+        "裕固族",
+        "乌兹别克族",
+        "门巴族",
+        "鄂伦春族",
+        "独龙族",
+        "塔塔尔族",
+        "赫哲族",
+        "珞巴族",
+      ],
+
+      dataFormRules: {
+        name: [{ required: true, message: "请输入用户名", trigger: "blur" }],
+        mobile: [
+          { required: true, message: "请输入电话", trigger: "blur" },
+          { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
+          {
+            pattern:
+              /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
+            message: "请输入正确的手机号",
+            trigger: "blur",
+          },
+        ],
+        deptId: [{ required: true, message: "请选择部门", trigger: "change" }],
+        // identity: [{ required: true,message: '请输入身份证',trigger: 'blur'},{ validator: validateIdCard, trigger: 'blur'}],
+      },
+      option: [], //机构列表
+    };
+  },
+  created() {
+    this.peopleid = Cookies.get("user");
+    if (this.peopleid != "admin") {
+      this.peopledeptid = Cookies.get("user").split("D")[0];
+      this.pageRequest.columnFilters.deptId.value = this.peopledeptid;
+    } else {
+      this.peopledeptid = "9";
+      this.pageRequest.columnFilters.deptId.value = this.peopledeptid;
+    }
+
+    //获取所有下拉框数据(字典)
+    this.getDictItems("comlevel");
+    this.getDictItems("comattribute");
+    this.getDictItems("comtype");
+    this.jobCodeList();
+
+    this.findLeftTreeData(); // 获取机构树的数据
+  },
+  mounted() {
+    //用像素初始化左边的split的宽度
+    this.changeTreeWidth(240); // 初始化树的宽度
+  },
+  computed: {
+    photo1List() {
+      if (!!this.dataForm.photo1) {
+        return this.dataForm.photo1.split("___");
+      } else {
+        return [];
+      }
+    },
+    photo2List() {
+      if (!!this.dataForm.photo2) {
+        return this.dataForm.photo2.split("___");
+      } else {
+        return [];
+      }
+    },
+    photo3List() {
+      if (!!this.dataForm.photo3) {
+        return this.dataForm.photo3.split("___");
+      } else {
+        return [];
+      }
+    },
+    photo4List() {
+      if (!!this.dataForm.photo4) {
+        return this.dataForm.photo4.split("___");
+      } else {
+        return [];
+      }
+    },
+    photo5List() {
+      if (!!this.dataForm.photo5) {
+        return this.dataForm.photo5.split("___");
+      } else {
+        return [];
+      }
+    },
+    photo6List() {
+      if (!!this.dataForm.photo6) {
+        return this.dataForm.photo6.split("___");
+      } else {
+        return [];
+      }
+    },
+  },
+
+  watch: {
+    containsSubDeptChecked() {
+      // 监听是否包含下级
+      this.pageRequest.columnFilters.containsSubDept.value = this
+        .containsSubDeptChecked
+        ? "1"
+        : "0";
+      this.findPage();
+    },
+  },
+  methods: {
+    jobCodeList() {
+      let typeName = "jobcode";
+      this.$api.dict.findByLableName(typeName).then((res) => {
+        console.log(res);
+        this.jobcodeoptions = res.data;
+      });
+    },
+    // 查询Start
+    queryStaffInfo() {
+      this.pageRequest.columnFilters.userId.value = this.queryFrom.id;
+      this.pageRequest.columnFilters.realName.value = this.queryFrom.name;
+      this.pageRequest.columnFilters.mobile.value = this.queryFrom.tel;
+      this.pageRequest.columnFilters.approvalStatus.value =
+        this.queryFrom.status;
+      this.pageRequest.pageNum = 1;
+      this.findPage();
+    },
+    statusChange(e) {
+      //状态选择事件
+      // this.pageRequest.columnFilters.approvalStatus.value = e;
+      // this.findPage();
+    },
+    // 查询End
+
+    //改变部门
+    changeDept(value) {
+      console.log(value);
+      let that = this;
+      that.dataForm.recommenderid = "";
+      that.dataForm.recommendername = "";
+      this.$api.user.selectByDeptId(value).then((res2) => {
+        if (res2.code == 200 && res2.data != null) {
+          this.teamleaderid = res2.data.id;
+          this.teamleadername = res2.data.name;
+        } else {
+          this.teamleaderid = "";
+          this.teamleadername = "";
+        }
+      });
+      var personRequest = {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 9999999,
+        columnFilters: {
+          deptId: {
+            name: "deptId",
+            value: value,
+          },
+          containsSubDept: {
+            name: "containsSubDept",
+            value: 0,
+          },
+          usertype: {
+            name: "usertype",
+            value: "1",
+          },
+          status: {
+            name: "status",
+            value: "1",
+          },
+          delFlag: {
+            name: "delFlag",
+            value: 0,
+          },
+        },
+      };
+      this.$api.user.findPage(personRequest).then((res) => {
+        // console.log(res);
+        if (res.code == 200) {
+          if (res.data.content.length > 0) {
+            that.recommenderList = [];
+            Object.assign(that.recommenderList, res.data.content);
+          } else {
+            that.recommenderList = [];
+            that.$message({ message: "该团队下无可推荐人员", type: "info" });
+          }
+        } else {
+          that.recommenderList = [];
+        }
+      });
+    },
+
+    changeRecommender(value) {
+      this.dataForm.recommendername = "";
+      this.$api.user.findBasePersonById(value).then((res) => {
+        if (res.code == 200) {
+          this.dataForm.recommendername = res.data.name;
+        }
+      });
+    },
+
+    //-- formatter begin--
+
+    jobcodeFormatter(row, column) {
+      let jobCode = row.jobCode;
+      return CommonUtil.getDataName({
+        dataList: this.jobcodeoptions,
+        value: "value",
+        label: "label",
+        data: jobCode,
+      });
+    },
+    //-- formatter end--
+
+    /**Split 开始 */
+    changeTreeWidth(widthVal) {
+      // 初始化树的宽度
+      this.leftSplitWidth = Math.ceil(
+        (widthVal / this.$refs.elMain.$el.clientWidth) * 100
+      );
+      this.rightSplitWidth = 100 - this.leftSplitWidth;
+    },
+    /**Split 结束 */
+
+    //--left tree begin-------
+    findLeftTreeData: function () {
+      // 获取数据
+      this.$api.dept.findDeptTree().then((res) => {
+        this.ztreeNodes = res.data;
+      });
+    },
+    onZTreeClick: function (evt, treeId, treeNode) {
+      // 点击事件
+      this.currentTreeNode = evt;
+      this.pageRequest.columnFilters.deptId.value = this.currentTreeNode.id;
+      this.findPage();
+      this.zrr = [];
+      this.platform(treeId);
+      this.$api.dept.getDeptById(evt.id).then((res) => {
+        if (res.data.deptType == "D") {
+          console.log(this.zrr);
+          this.zrr.map((item, index) => {
+            if (res.data.id == item) {
+              this.zrr.splice(index, 1);
+            }
+          });
+        }
+      });
+    },
+    platform(array) {
+      if (!array.parent) {
+        return;
+      }
+      this.zrr.unshift(array.data.id);
+      this.platform(array.parent);
+    },
+    //联级选择器触发事件
+    handleChange(val) {
+      let that = this;
+
+      if (val.length == 0) {
+        that.deptInfo = {};
+        this.departmentList = [];
+      } else {
+        var arr = val;
+        var lastItem = arr.at(-1);
+        this.dataForm.deptId = "";
+        this.$api.dept.getDeptById(lastItem).then((res) => {
+          that.deptInfo = res.data;
+          this.$api.dept.getDeptById(lastItem).then((result) => {
+            this.departmentList = [];
+            this.filterTreeData(this.ztreeNodes, lastItem);
+
+            for (var i = 0; i < this.filterObject.children.length; i++) {
+              if (this.filterObject.children[i].deptType == "D") {
+                this.departmentList.push({
+                  label: this.filterObject.children[i].name,
+                  value: this.filterObject.children[i].id,
+                });
+              }
+            }
+            this.dialogVisible = true;
+          });
+        });
+      }
+    },
+    //--left tree start-------
+
+    // 右侧列表的方法Start
+    findPage(data) {
+      // 获取分页数据
+      if (data && data.pageRequest) {
+        this.pageRequest.pageNum = data.pageRequest.pageNum;
+        this.pageRequest.pageSize = data.pageRequest.pageSize;
+      }
+      this.$api.user
+        .findPage(this.pageRequest)
+        .then((res) => {
+          this.pageResult = res.data;
+        })
+        .then(data != null ? data.callback : "");
+    },
+    getParentId(list, id) {
+      for (let i in list) {
+        if (list[i].id == id) {
+          //递归条件
+          return [list[i].id];
+        }
+        if (list[i].children) {
+          let node = this.getParentId(list[i].children, id);
+          if (node !== undefined) {
+            return node.concat(list[i].id);
+          }
+        }
+      }
+    },
+    handleTableEdit(params) {
+      this.getParentId(this.ztreeNodes, params.row.pdeptId);
+      this.zrr = this.getParentId(
+        this.ztreeNodes,
+        params.row.pdeptId
+      ).reverse();
+
+      this.$api.dept.findDeptTree().then((res) => {
+        this.option = res.data;
+        this.option = this.getDisableList(this.option);
+      });
+      // 编辑代理人员
+      this.pic1Control = false;
+      this.pic3Control = false;
+      this.pic4Control = false;
+      this.pic5Control = false;
+      this.pic6Control = false;
+
+      this.activeTabs = "first";
+      //true:新增 false:编辑
+      this.operation = false;
+      this.dialogTitle = "后线人员信息";
+
+      this.$api.dept
+        .getDeptById(params.row.deptId.split("D")[0])
+        .then((deptRes) => {
+          this.deptInfo = deptRes.data;
+          this.departmentList = [];
+          this.$api.dept.getDeptById(deptRes.data.id).then((result) => {
+            this.departmentList = [];
+            this.filterTreeData(this.ztreeNodes, deptRes.data.id);
+            for (var i = 0; i < this.filterObject.children.length; i++) {
+              if (this.filterObject.children[i].deptType == "D") {
+                this.departmentList.push({
+                  label: this.filterObject.children[i].name,
+                  value: this.filterObject.children[i].id,
+                });
+              }
+            }
+            this.dialogVisible = true;
+          });
+
+          if (this.pageRequest.columnFilters.approvalStatus.value == "1") {
+            this.$api.user.findById(params.row.userId).then((personRes) => {
+              Object.assign(this.dataForm, personRes.data.sysUser);
+              Object.assign(this.dataForm, personRes.data.sysUserInternal);
+              Object.assign(this.dataForm, personRes.data.esmUserAgent);
+              Object.assign(this.dataForm, params.row);
+              // this.dataForm.status = personRes.data.esmUserAgent.approvalStatus;
+              this.dataForm.status1 = personRes.data.sysUser.approvalStatus;
+              this.dialogVisible = true;
+            });
+          } else {
+            this.$api.user.findById(params.row.userId).then((personRes) => {
+              Object.assign(this.dataForm, personRes.data.sysUser);
+              Object.assign(this.dataForm, personRes.data.sysUserInternal);
+              Object.assign(this.dataForm, personRes.data.esmUserAgent);
+              Object.assign(this.dataForm, params.row);
+              // this.dataForm.status = personRes.data.sysUser.status;
+              this.dataForm.status1 = personRes.data.sysUser.approvalStatus;
+              this.dialogVisible = true;
+            });
+          }
+
+          this.$api.user
+            .findPersonImage({
+              taskid: params.row.id,
+              imgtype: "T1",
+            })
+            .then((resImage) => {
+              this.dataForm["photo1"] = resImage.data.imgList[0];
+            });
+          this.$api.user
+            .findPersonImage({
+              taskid: params.row.id,
+              imgtype: "T2",
+            })
+            .then((resImage) => {
+              this.dataForm["photo2"] = resImage.data.imgList[0];
+            });
+          this.$api.user
+            .findPersonImage({
+              taskid: params.row.id,
+              imgtype: "T3",
+            })
+            .then((resImage) => {
+              this.dataForm["photo3"] = resImage.data.imgList[0];
+            });
+          this.$api.user
+            .findPersonImage({
+              taskid: params.row.id,
+              imgtype: "T4",
+            })
+            .then((resImage) => {
+              this.dataForm["photo4"] = resImage.data.imgList[0];
+            });
+          this.$api.user
+            .findPersonImage({
+              taskid: params.row.id,
+              imgtype: "T5",
+            })
+            .then((resImage) => {
+              this.dataForm["photo5"] = resImage.data.imgList[0];
+            });
+          this.$api.user
+            .findPersonImage({
+              taskid: params.row.id,
+              imgtype: "T6",
+            })
+            .then((resImage) => {
+              this.dataForm["photo6"] = resImage.data.imgList[0];
+            });
+        });
+    },
+    // 批量删除人员
+    // handleTableBatchDelete(data) {
+    //   this.$api.user
+    //     .batchDelete(data.params)
+    //     .then(data != null ? data.callback : "");
+    // },
+    // 删除单个人员
+    handleTableDeleteFlag(data) {
+      let params = [
+        {
+          approvalStatus: 1,
+          id: data.row.userId,
+          mobile: data.row.mobile,
+          name: data.row.name,
+          sex: data.row.sex,
+          status: Number(data.row.status),
+          deptId: data.row.deptId,
+          email: this.dataForm.email,
+          createTime: this.dataForm.createTime,
+          jobCode: "17",
+          lastUpdateBy: this.dataForm.lastUpdateBy,
+          lastUpdateTime: this.dataForm.lastUpdateTime,
+          createBy: this.dataForm.createBy,
+          openid: this.dataForm.openid,
+          password: this.dataForm.password,
+          salt: this.dataForm.salt,
+          delFlag: 0,
+          tenantId: this.dataForm.tenantId,
+          usertype: "1",
+        },
+      ];
+
+      this.$confirm("确认删除?")
+        .then(() => {
+          this.$api.user.deleteFlag(params).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                message: "删除成功",
+                type: "success",
+              });
+              this.findPage();
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    filterTreeData(source, target) {
+      for (let i = 0; i < source.length; i++) {
+        if (source[i].id == target) {
+          this.filterObject = source[i];
+          // return data[i]
+          break;
+        } else {
+          this.filterTreeData(source[i].children, target);
+        }
+      }
+    },
+    getDisableList(list) {
+      list.forEach((item) => {
+        if (item.deptType === "D") {
+          item.disabled = true;
+        }
+        if (item.children) {
+          this.getDisableList(item.children);
+        }
+      });
+      return list;
+    },
+    //添加人员
+    handleAddButton() {
+      //级联渲染部门列表
+      this.$api.dept.findDeptTree().then((res) => {
+        this.option = res.data;
+        this.option = this.getDisableList(this.option);
+      });
+
+      var that = this;
+      this.pic1Control = false;
+      this.pic3Control = false;
+      this.pic4Control = false;
+      this.pic5Control = false;
+      this.pic6Control = false;
+      this.filterObject = {};
+      if (this.currentTreeNode == null) {
+        this.$message.info("请选择所属公司或部门");
+        return;
+      }
+      this.activeTabs = "first";
+      this.operation = true; // 表示弹出框为新智能功能
+      this.dialogTitle = "新增后线人员";
+      // this.dataForm.jobName = "核保";
+      // 查询机构信息
+      this.$api.dept.getDeptById(this.currentTreeNode.id).then((res) => {
+        this.departmentList = [];
+        if (res.data.deptType == "D") {
+          //选中的是部门
+          this.dataForm.deptId = res.data.id;
+          this.$api.dept.getDeptById(res.data.parentId).then((result) => {
+            this.deptInfo = result.data;
+
+            this.departmentList = [];
+            this.filterTreeData(this.ztreeNodes, res.data.parentId);
+            for (var i = 0; i < this.filterObject.children.length; i++) {
+              if (this.filterObject.children[i].deptType == "D") {
+                this.departmentList.push({
+                  label: this.filterObject.children[i].name,
+                  value: this.filterObject.children[i].id,
+                });
+              }
+            }
+            this.dialogVisible = true;
+          });
+          //推荐人工号
+          this.$api.user
+            .findPersonByDeptid(this.currentTreeNode.id)
+            .then((res1) => {
+              if (res1.code == 200) {
+                this.recommenderList = [];
+                Object.assign(this.recommenderList, res1.data);
+              }
+            });
+
+          var personRequest = {
+            //查询的默认条件
+            pageNum: 1,
+            pageSize: 9999999,
+            columnFilters: {
+              deptId: {
+                name: "deptId",
+                value: this.currentTreeNode.id,
+              },
+              containsSubDept: {
+                name: "containsSubDept",
+                value: 0,
+              },
+              usertype: {
+                name: "usertype",
+                value: "1",
+              },
+              status: {
+                name: "status",
+                value: "1",
+              },
+            },
+          };
+          this.$api.user.findPage(personRequest).then((res) => {
+            if (res.code == 200) {
+              if (res.data.content.length > 0) {
+                that.recommenderList = [];
+                Object.assign(that.recommenderList, res.data.content);
+              } else {
+                that.recommenderList = [];
+                that.$message({
+                  message: "该团队下无可推荐人员",
+                  type: "info",
+                });
+              }
+            } else {
+              that.recommenderList = [];
+            }
+          });
+
+          // this.$api.user
+          //   .selectByDeptId(this.currentTreeNode.id)
+          //   .then((res2) => {
+          //     if (res2.code == 200) {
+          //       this.teamleaderid = res2.data.id;
+          //       this.teamleadername = res2.data.name;
+          //     }
+          //   });
+        } else {
+          //选中的是公司
+          this.deptInfo = res.data;
+          if (this.currentTreeNode.children) {
+            for (var i = 0; i < this.currentTreeNode.children.length; i++) {
+              if (this.currentTreeNode.children[i].id.indexOf("D") >= 0) {
+                this.departmentList.push({
+                  label: this.currentTreeNode.children[i].name,
+                  value: this.currentTreeNode.children[i].id,
+                });
+              }
+            }
+            this.dialogVisible = true;
+          } else {
+            this.$message.info(
+              "该机构下还没部门,无法添加人员,请先到机构管理为该机构添加部门"
+            );
+            return;
+          }
+        }
+      });
+    },
+    // 右侧工具方法End
+
+    // 新增或修改的弹出框Start
+    getDictItems(typeName) {
+      //--数据字典--
+      this.$api.dict
+        .findByLableName(typeName)
+        .then((response) => {
+          this[typeName + "options"] = response.data; // 把获取到的数据赋给this.data
+        })
+        .catch((error) => {
+          this[typeName + "options"] = [];
+        });
+    },
+    handleDialogBefore(done) {
+      // 退出对话框之前确认提示
+      var that = this;
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
+    closeDialog() {
+      // 清空数据
+      this.deptInfo = {};
+      this.$refs["dataForm"].resetFields();
+      for (let key in this.dataForm) {
+        this.dataForm[key] = "";
+      }
+      this.dialogVisible = false;
+    },
+    //重置
+    clearDialog() {
+      if (!this.dataForm.id) {
+        this.$refs["dataForm"].resetFields();
+      } else {
+        this.$refs["dataForm"].resetFields();
+        this.$api.sysUserInternal
+          .findById(this.dataForm.id)
+          .then((personRes) => {
+            Object.assign(this.dataForm, personRes.data.sysUser);
+            Object.assign(this.dataForm, personRes.data.sysUserInternal);
+            Object.assign(this.dataForm, personRes.data.esmUserAgent);
+            this.dataForm.status = personRes.data.sysUser.status;
+            this.dataForm.status1 = personRes.data.sysUserInternal.status;
+          });
+      }
+    },
+    // 提交
+    submitForm() {
+      if (!this.operation) {
+        this.dataForm.password = "123456";
+      }
+      this.$refs.dataForm.validate((valid) => {
+        if (valid) {
+          this.$confirm("确认提交审核吗?", "提示", {})
+            .then(() => {
+              this.editLoading = true;
+              let params = {
+                sysUser: {},
+                sysUserInternal: {},
+                esmUserAgent: {},
+                sysDept: {},
+              };
+              params.sysDept.address = this.deptInfo.address;
+              params.sysDept.children = this.deptInfo.children;
+              params.sysDept.city = this.deptInfo.city;
+              params.sysDept.comattribute = this.deptInfo.comattribute;
+              params.sysDept.comlevel = this.deptInfo.comlevel;
+              params.sysDept.comtype = this.deptInfo.comtype;
+              params.sysDept.createBy = this.deptInfo.createBy;
+              params.sysDept.createTime = this.deptInfo.createTime;
+              params.sysDept.delFlag = this.deptInfo.delFlag;
+              params.sysDept.deptCode = this.deptInfo.deptCode;
+              params.sysDept.deptType = this.deptInfo.deptType;
+              params.sysDept.house = this.deptInfo.house;
+              params.sysDept.id = this.deptInfo.id;
+              params.sysDept.isstop = this.deptInfo.isstop;
+              params.sysDept.lastUpdateBy = this.deptInfo.lastUpdateBy;
+              params.sysDept.lastUpdateTime = this.deptInfo.lastUpdateTime;
+              params.sysDept.leadername = this.deptInfo.leadername;
+              params.sysDept.leaderphone = this.deptInfo.leaderphone;
+              params.sysDept.level = this.deptInfo.level;
+              params.sysDept.name = this.deptInfo.name;
+              params.sysDept.orderNum = this.deptInfo.orderNum;
+              params.sysDept.parentId = this.deptInfo.parentId;
+              params.sysDept.parentName = this.deptInfo.parentName;
+              params.sysDept.province = this.deptInfo.province;
+
+              params.sysUser.approvalStatus = 0;
+              params.sysUser.id = this.dataForm.id;
+              params.sysUser.checkid = this.dataForm.checkid;
+              params.sysUser.name = this.dataForm.name;
+              params.sysUser.password = this.dataForm.password;
+              params.sysUser.email = this.dataForm.email;
+              params.sysUser.mobile = this.dataForm.mobile;
+              params.sysUser.status = 0;
+              params.sysUser.deptId = this.dataForm.deptId;
+              params.sysUser.createBy = this.dataForm.createBy;
+              params.sysUser.createTime = this.dataForm.createTime;
+              params.sysUser.lastUpdateBy = this.dataForm.lastUpdateBy;
+              params.sysUser.lastUpdateTime = this.dataForm.lastUpdateTime;
+              params.sysUser.delFlag = this.dataForm.delFlag;
+              params.sysUser.usertype = "1";
+              params.sysUser.tenantId = this.dataForm.tenantId;
+              params.sysUser.sex = this.dataForm.sex;
+              params.sysUser.jobCode = this.dataForm.jobCode;
+              params.sysUser.openid = this.dataForm.openid;
+              params.sysUser.salt = this.dataForm.salt;
+              params.sysUserInternal.id = this.dataForm.id;
+              params.sysUserInternal.checkid = this.dataForm.checkid;
+              params.sysUserInternal.marrycode = this.dataForm.marrycode;
+              params.sysUserInternal.addressnow = this.dataForm.addressnow;
+              params.sysUserInternal.birthday = this.dataForm.birthday;
+              params.sysUserInternal.salarycode = this.dataForm.salarycode;
+              params.sysUserInternal.nations = this.dataForm.nations;
+              params.sysUserInternal.politicalstatus =
+                this.dataForm.politicalstatus;
+              params.sysUserInternal.college = this.dataForm.college;
+              params.sysUserInternal.identity = this.dataForm.identity;
+              params.sysUserInternal.education = this.dataForm.education;
+              params.sysUserInternal.bankname = this.dataForm.bankname;
+              params.sysUserInternal.accountno = this.dataForm.accountno;
+              params.sysUserInternal.addressresident =
+                this.dataForm.addressresident;
+              params.sysUserInternal.health = this.dataForm.health;
+              params.sysUserInternal.postalcode = this.dataForm.postalcode;
+              params.sysUserInternal.phonehouse = this.dataForm.phonehouse;
+              params.sysUserInternal.collegetm = this.dataForm.collegetm;
+              params.sysUserInternal.speciality = this.dataForm.speciality;
+              params.sysUserInternal.nativeplace = this.dataForm.nativeplace;
+              params.sysUserInternal.worktype = this.dataForm.worktype;
+              params.sysUserInternal.blood = this.dataForm.blood;
+              params.sysUserInternal.saleno = this.dataForm.saleno;
+              params.sysUserInternal.orglast = this.dataForm.orglast;
+              params.sysUserInternal.joblast = this.dataForm.joblast;
+              params.sysUserInternal.hobby = this.dataForm.hobby;
+              params.sysUserInternal.namespecial = this.dataForm.namespecial;
+              params.sysUserInternal.phonespecial = this.dataForm.phonespecial;
+              params.sysUserInternal.intimes = this.dataForm.intimes;
+              params.sysUserInternal.intime = this.dataForm.intime;
+              params.sysUserInternal.contracttime = this.dataForm.contracttime;
+              params.sysUserInternal.isteamleader = "0";
+              params.sysUserInternal.documentno = this.dataForm.documentno;
+              params.sysUserInternal.hrcode = this.dataForm.hrcode;
+              params.sysUserInternal.regulartm = this.dataForm.regulartm;
+              params.sysUserInternal.status = 0;
+              params.sysUserInternal.remark = this.dataForm.remark;
+              params.sysUserInternal.whichteam = this.dataForm.whichteam;
+
+              params.esmUserAgent.id = this.dataForm.id;
+              params.esmUserAgent.checkid = this.dataForm.checkid;
+              params.esmUserAgent.recommenderid = this.dataForm.recommenderid;
+              params.esmUserAgent.recommendername =
+                this.dataForm.recommendername;
+              params.esmUserAgent.leaderupid = this.dataForm.leaderupid;
+              params.esmUserAgent.leaderupname = this.dataForm.leaderupname;
+              params.esmUserAgent.grouppersonid = this.dataForm.grouppersonid;
+              params.esmUserAgent.grouppersonname =
+                this.dataForm.grouppersonname;
+              params.esmUserAgent.deppersonid = this.dataForm.deppersonid;
+              params.esmUserAgent.deppersonname = this.dataForm.deppersonname;
+              params.esmUserAgent.isshowteam = this.dataForm.isshowteam;
+              params.esmUserAgent.isshowsalesroom =
+                this.dataForm.isshowsalesroom;
+              console.log(params);
+              this.$api.user.saveUser(params).then((res) => {
+                if (res.code == 200) {
+                  let taskid = res.data;
+                  // this.$api.user.savePersonImage({
+                  //   taskid: taskid,
+                  //   imgtype: "T1",
+                  //   imgList: [this.dataForm.photo1],
+                  // });
+                  // this.$api.user.savePersonImage({
+                  //   taskid: taskid,
+                  //   imgtype: "T2",
+                  //   imgList: [this.dataForm.photo2],
+                  // });
+                  // this.$api.user.savePersonImage({
+                  //   taskid: taskid,
+                  //   imgtype: "T3",
+                  //   imgList: [this.dataForm.photo3],
+                  // });
+                  // this.$api.user.savePersonImage({
+                  //   taskid: taskid,
+                  //   imgtype: "T4",
+                  //   imgList: [this.dataForm.photo4],
+                  // });
+                  // this.$api.user.savePersonImage({
+                  //   taskid: taskid,
+                  //   imgtype: "T5",
+                  //   imgList: [this.dataForm.photo5],
+                  // });
+                  // this.$api.user.savePersonImage({
+                  //   taskid: taskid,
+                  //   imgtype: "T6",
+                  //   imgList: [this.dataForm.photo6],
+                  // });
+
+                  this.$message({
+                    message: "操作成功",
+                    type: "success",
+                  });
+                  this.dialogVisible = false;
+                  this.$refs["dataForm"].resetFields();
+                } else {
+                  this.$message({
+                    message: `操作失败,请重新添加,(${res.msg})`,
+                    type: "error",
+                  });
+                }
+                this.findPage();
+              });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消提交",
+              });
+            });
+        } else {
+          this.activeTabs = "second";
+        }
+      });
+    },
+    // 新增或修改的弹出框End
+
+    // 上传图片的方法Start
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === "image/jpeg" || file.type === "image/png";
+      const isLt2M = file.size / 1024 / 1024 < 0.2;
+      if (!isJPG) {
+        this.$message.error("上传图片只能是 JPG 或者 PNG 格式!");
+      }
+      if (!isLt2M) {
+        this.$message.error("上传图片大小不能超过 200KB!");
+      }
+      return isJPG && isLt2M;
+    },
+    httpRequest(options) {
+      let file = options.file;
+      let filename = options.filename;
+      let reader = new FileReader();
+      if (file) {
+        reader.readAsDataURL(file);
+      }
+      reader.onload = () => {
+        let base64Str = reader.result;
+        this.dataForm[options.filename] = base64Str;
+      };
+    },
+  },
+};
+</script>
+
+<style scoped>
+.el-divider--horizontal {
+  margin: 4px 0;
+}
+
+/* 顶部查询条件样式Start */
+.queryFrom .el-row {
+  margin: 10px 0px;
+}
+
+.queryFrom .el-form-item {
+  margin-bottom: 0px;
+}
+
+.queryFrom .queryButton .el-form-item__content {
+  margin-left: 0px !important;
+}
+
+/* 顶部查询条件样式End */
+
+/* 上传图片样式Start */
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+  border: 1px dashed #d9d9d9;
+}
+.avatar {
+  border: 1px dashed #d9d9d9;
+  padding: 5px;
+  border-radius: 6px;
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+/* 上传图片样式End */
+
+.imageLibraryItem {
+  margin-bottom: 10px;
+}
+.imageLibraryItem .imageLibraryItemTitle {
+  display: block;
+  height: 40px;
+  line-height: 40px;
+  width: 100%;
+  background: #f3f3f3;
+  border: 1px solid #dddddd;
+}
+.imageLibraryItem .imageLibraryItemTitle label {
+  margin: 0px 15px;
+  font-weight: bold;
+}
+.imageLibraryItem .imageLibraryItemBody {
+  width: 100%;
+  border: 1px solid #ddd;
+  padding: 15px;
+  border-top: none;
+}
+.el-tree-node__expand-icon {
+  cursor: pointer;
+  color: #aeafb1 !important;
+  font-size: 17px !important;
+}
+</style>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 142 - 859
src/views/PeopleManage/TeamLeader/TeamLeaderExamine.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 105 - 773
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue


+ 4 - 4
src/views/Salary/SalaryExamine.vue

@@ -245,18 +245,18 @@ export default {
         var win = window.open();
         win.document.write(
           '<body style="margin:0px;"><object data="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_A.xls" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_A.xls" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
         );
       } else if (this.formInline.userProp == "B") {
         var win = window.open();
         win.document.write(
           '<body style="margin:0px;"><object data="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_B.xls" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_B.xls" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
         );
       } else {

+ 4 - 4
src/views/Salary/SalaryQuery.vue

@@ -261,18 +261,18 @@ export default {
         var win = window.open();
         win.document.write(
           '<body style="margin:0px;"><object data="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_A.xls" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_A.xls" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
         );
       } else if (this.formInline.userProp == "B") {
         var win = window.open();
         win.document.write(
           '<body style="margin:0px;"><object data="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_B.xls" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-            this.global.baseUrl +
+            process.env.BASE_URL  +
             '/upload/wage_model_B.xls" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
         );
       } else {

+ 2 - 2
src/views/Salary/SocinsuQuery.vue

@@ -290,9 +290,9 @@ export default {
       var win = window.open();
       win.document.write(
         '<body style="margin:0px;"><object data="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/upload/social_model.xls" type="application/xlsx" width="100%" height="100%"><iframe src="' +
-          this.global.baseUrl +
+          process.env.BASE_URL  +
           '/upload/social_model.xls" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
       );
     },

+ 1 - 1
src/views/Sys/Appversion.vue

@@ -319,7 +319,7 @@ export default {
       params.append("type", 'app')
       this.$api.letter.uploadFile(params).then(res => {
         if (res.code == "200") {
-          this.appformLabelAlign.path = this.global.baseUrl + res.data.url;
+          this.appformLabelAlign.path = process.env.BASE_URL  + res.data.url;
         }
       })
     },

+ 5 - 15
src/views/Sys/Deptall.vue

@@ -19,7 +19,7 @@
             fontWeight: '900',
             color: '#606266',
           }" size="small" ref="expandTable" highlight-current-row @row-click="rowClick">
-          <el-table-column prop="name" label="部门管理" width="300" align="center">
+          <el-table-column prop="name" label="部门管理" width="300">
           </el-table-column>
           <el-table-column prop="id" label="ID" width="150" align="center"> </el-table-column>
           <el-table-column prop="comlevel" label="机构级别" :formatter="comlevelFormatter" align="center"
@@ -376,10 +376,7 @@ export default {
       // 部门DialogStart
       deptDialogVisible: false,
       deptDataForm: {
-        id: "",
-        name: "",
-        parentId: "",
-        deptType: "D",
+       deptType: "D",
         orderNum: 0,
       },
       deptDataRule: {
@@ -727,7 +724,6 @@ export default {
       let that = this;
       this.$refs["dataForm"].validate((valid) => {
         if (valid) {
-          this.editLoading = true;
           this.dataForm.orderNum = 1;
           let params = Object.assign({}, this.dataForm);
           if (that.operType === "ADD" || that.operType === "ADDC") {
@@ -747,7 +743,6 @@ export default {
               orderNum: params.orderNum,
             };
             this.$api.dept.add(paramData).then((res) => {
-              this.editLoading = false;
               if (res.code == 200) {
                 this.$message({
                   message: "操作成功",
@@ -765,7 +760,6 @@ export default {
             });
           } else if (that.operType === "EDIT") {
             this.$api.dept.edit(params).then((res) => {
-              this.editLoading = false;
               if (res.code == 200) {
                 this.$message({
                   message: "操作成功",
@@ -792,12 +786,9 @@ export default {
       let that = this;
       this.$refs["deptDataForm"].validate((valid) => {
         if (valid) {
-          this.editLoading = true;
           this.dataForm.orderNum = 0;
-          let params = Object.assign({}, this.deptDataForm);
           if (that.operType === "ADD") {
-            this.$api.dept.add(params).then((res) => {
-              this.editLoading = false;
+            this.$api.dept.add( that.deptDataForm).then((res) => {
               if (res.code == 200) {
                 this.$message({
                   message: "操作成功",
@@ -814,8 +805,7 @@ export default {
               this.findTreeData();
             });
           } else if (that.operType === "EDIT") {
-            this.$api.dept.edit(params).then((res) => {
-              this.editLoading = false;
+            this.$api.dept.edit(that.deptDataForm).then((res) => {
               if (res.code == 200) {
                 this.$message({
                   message: "操作成功",
@@ -892,7 +882,7 @@ export default {
   
     //关闭部门弹框
     closeDeptDialog() {
-      this.$refs.deptDataForm.resetFields();
+      // this.$refs.deptDataForm.resetFields();
       this.deptDialogVisible = false;
     },
   },

+ 23 - 7
src/views/Sys/Role.vue

@@ -261,8 +261,8 @@ export default {
         if (valid) {
           this.$confirm("确认提交吗?", "提示", {}).then(() => {
             this.editLoading = true;
-            let params = Object.assign({}, this.dataForm);
-            this.$api.role.save(params).then((res) => {
+            // let params = Object.assign({}, this.dataForm);
+            this.$api.role.save(this.dataForm).then((res) => {
               this.editLoading = false;
               if (res.code == 200) {
                 this.$message({ message: "操作成功", type: "success" });
@@ -289,15 +289,31 @@ export default {
       });
     },
     // 角色选择改变监听
-    handleRoleSelectChange(val) {
+    async handleRoleSelectChange(val) {
       if (val == null || val.val == null) {
         return;
       }
       this.selectRole = val.val;
-      this.$api.role.findRoleMenus({ roleId: val.val.id }).then((res) => {
-        this.currentRoleMenus = res.data;
-        this.$refs.menuTree.setCheckedNodes(res.data);
-      });
+      if(val.val.id==1&& val.val.name=='admin'){
+        let allMenus = [];
+        this.checkAllMenu(this.menuData, allMenus);
+        this.$refs.menuTree.setCheckedNodes(allMenus);
+        return
+      }
+      let res=await this.$api.role.findRoleMenus({ roleId: val.val.id })
+      if(res.code==200){
+        this.$nextTick(() => {
+        const arr = []
+        res.data.forEach(item => {
+          if (!this.$refs.menuTree.getNode(item.id).childNodes || !this.$refs.menuTree.getNode(item.id).childNodes.length) {
+            arr.push(item)
+          }
+          
+        })
+        this.$refs.menuTree.setCheckedNodes(arr)
+      })
+      }
+      
     },
     // 树节点选择监听
     handleMenuCheckChange(data, check, subCheck) {

+ 1 - 1
src/views/Sys/User.vue

@@ -96,7 +96,7 @@
             <el-col :span="12">
               <el-form-item label="角色权限" prop="email">
                 <el-select size="small"  v-model="dataForm.remark" placeholder="请选择" @change="changeRole($event)" >
-                  <el-option :label="roleItem.remark" :value="roleItem.id" v-for="(roleItem,roleIndex) in roleoptions" :key="roleIndex"></el-option>
+                  <el-option :label="roleItem.name" :value="roleItem.id" v-for="(roleItem,roleIndex) in roleoptions" :key="roleIndex"></el-option>
                 </el-select>
               </el-form-item>
             </el-col>

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.