3 files modified
1 files added
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params, deptId) => { |
| | | return request({ |
| | | url: '/api/blade-user/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | deptId, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | deptId, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-user/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const saveOrUpdateUserPractitionersInfo = (row) => { |
| | | return request({ |
| | | url: '/api/experience/saveOrUpdate', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const updatePlatform = (userId, userType, userExt) => { |
| | | return request({ |
| | | url: '/api/blade-user/update-platform', |
| | | method: 'post', |
| | | params: { |
| | | userId, |
| | | userType, |
| | | userExt, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update-platform', |
| | | method: 'post', |
| | | params: { |
| | | userId, |
| | | userType, |
| | | userExt, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getUser = (id) => { |
| | | return request({ |
| | | url: '/api/blade-user/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getUserPlatform = (id) => { |
| | | return request({ |
| | | url: '/api/blade-user/platform-detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/platform-detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getUserPractitionersInfo = (cardid) => { |
| | | return request({ |
| | | url: '/api/experience/selectExperienceInfo', |
| | | method: 'get', |
| | | params: { |
| | | cardid, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const getUserInfo = () => { |
| | | return request({ |
| | | url: '/api/blade-user/info', |
| | | method: 'get', |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/info', |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export const resetPassword = (userIds) => { |
| | | return request({ |
| | | url: '/api/blade-user/reset-password', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/reset-password', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const updatePassword = (oldPassword, newPassword, newPassword1) => { |
| | | return request({ |
| | | url: '/api/blade-user/update-password', |
| | | method: 'post', |
| | | params: { |
| | | oldPassword, |
| | | newPassword, |
| | | newPassword1, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update-password', |
| | | method: 'post', |
| | | params: { |
| | | oldPassword, |
| | | newPassword, |
| | | newPassword1, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const updateInfo = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/update-info', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update-info', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const grant = (userIds, roleIds) => { |
| | | return request({ |
| | | url: '/api/blade-user/grant', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | roleIds, |
| | | } |
| | | }) |
| | | } |
| | | return request({ |
| | | url: '/api/blade-user/grant', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | roleIds, |
| | | } |
| | | }) |
| | | } |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <!-- <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | plain |
| | |
| | | v-if="permission.user_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | </template> --> |
| | | <template slot-scope="{row}" |
| | | slot="tenantName"> |
| | | <el-tag>{{row.tenantName}}</el-tag> |
| | |
| | | slot="userTypeName"> |
| | | <el-tag>{{row.userTypeName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="online_status"> |
| | | <template slot-scope="{ row }" slot="status"> |
| | | <el-tag |
| | | >{{ |
| | | row.online_status == "0" ? "离线" : row.online_status == "1" ? "在线" : "离线" |
| | | row.status == "0" ? "已离职" : row.status == "1" ? "在职" : "已离职" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | import { |
| | | getUser, |
| | | getUserPlatform, |
| | | remove, |
| | | update, |
| | | updatePlatform, |
| | | add, |
| | | grant, |
| | | resetPassword |
| | | getUserPractitionersInfo |
| | | } from "@/api/system/user"; |
| | | import {getList} from "@/api/securityGuard/securityGuard"; |
| | | import {getDeptTree, getDeptLazyTree} from "@/api/system/dept"; |
| | | import {getDeptTree} from "@/api/system/dept"; |
| | | import {getRoleTree} from "@/api/system/role"; |
| | | import {getPostList} from "@/api/system/post"; |
| | | import {mapGetters} from "vuex"; |
| | |
| | | roleTreeObj: [], |
| | | treeDeptId: '', |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | })) |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 54, |
| | |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | menuWidth:350, |
| | | delBtnText:'离职登记', |
| | | editBtnText:'修改', |
| | | menuWidth:200, |
| | | //dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "登录账号", |
| | | prop: "account", |
| | | searchSpan:4, |
| | | search: true, |
| | | display: false |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "用户姓名", |
| | |
| | | slot:true, |
| | | display: false |
| | | }, |
| | | |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativePlace", |
| | | search: true, |
| | | searchSpan:4, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation", |
| | | display: false |
| | | }, |
| | | { |
| | |
| | | display: false |
| | | }, |
| | | { |
| | | label: "所属部门", |
| | | prop: "deptName", |
| | | slot: true, |
| | | label: "学历", |
| | | prop: "education", |
| | | display: false, |
| | | width:260 |
| | | }, |
| | | { |
| | | label: "在职状态", |
| | | prop: "online_status", |
| | | slot: true, |
| | | display: false |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | type:"select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择学历", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | |
| | | { |
| | | label: "邮箱", |
| | | prop: "email", |
| | | display: false, |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "入职时间", |
| | | prop: "rtime", |
| | | display: false |
| | | }, |
| | | |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | label: "所属部门", |
| | | prop: "deptName", |
| | | slot: true, |
| | | searchSpan:4, |
| | | display: false, |
| | | search:true, |
| | | width:260 |
| | | }, |
| | | { |
| | | label: "岗位", |
| | | prop: "postName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "入职时间", |
| | | prop: "rtime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchRange: true, |
| | | searchSpan: 6, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | { |
| | | label: "在职状态", |
| | | prop: "status", |
| | | slot: true, |
| | | display: false, |
| | | searchSpan:3, |
| | | search:true |
| | | } |
| | | ], |
| | | group: [ |
| | | { |
| | | label: '基础信息', |
| | | prop: 'baseInfo', |
| | | labelWidth:"110", |
| | | icon: 'el-icon-user-solid', |
| | | column: [ |
| | | { |
| | | label: "所属客户", |
| | | label: "所属保安单位", |
| | | prop: "tenantId", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/tenant/select", |
| | |
| | | label: "tenantName", |
| | | value: "tenantId" |
| | | }, |
| | | hide: !website.tenantMode, |
| | | addDisplay: website.tenantMode, |
| | | editDisplay: website.tenantMode, |
| | | viewDisplay: website.tenantMode, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入所属租户", |
| | | trigger: "click" |
| | | }], |
| | | disabled:true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "登录账号", |
| | | prop: "account", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入登录账号", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "用户平台", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "userType", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择用户平台", |
| | | trigger: "blur" |
| | | }] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '详细信息', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | column: [ |
| | | { |
| | | label: "用户昵称", |
| | | prop: "name", |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入用户昵称", |
| | | trigger: "blur" |
| | | }] |
| | | disabled:true |
| | | }, |
| | | { |
| | | label: "用户姓名", |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: "用户昵称", |
| | | prop: "name" |
| | | }, |
| | | { |
| | | label: "手机号码", |
| | | prop: "phone", |
| | | overHidden: true |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入手机号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "电子邮箱", |
| | | prop: "email", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | hide: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入身份证号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativePlace", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "最高学历", |
| | | prop: "education", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择学历", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "政治面貌", |
| | | prop: "politicaloutlook", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "身高", |
| | | prop: "height", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "联系地址", |
| | | prop: "address", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "户口所在地", |
| | | prop: "registered", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "入职时间", |
| | | prop: "rtime", |
| | | type:'date', |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | |
| | | label: "用户生日", |
| | | type: "date", |
| | | prop: "birthday", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "账号状态", |
| | | prop: "statusName", |
| | | hide: true, |
| | | display: false |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '职责信息', |
| | | prop: 'dutyInfo', |
| | | icon: 'el-icon-s-custom', |
| | | label: '从业信息', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | column: [ |
| | | { |
| | | label: "用户编号", |
| | | prop: "code", |
| | | }, |
| | | { |
| | | label: "所属角色", |
| | | prop: "roleId", |
| | | multiple: true, |
| | | type: "tree", |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | addDisplay:false, |
| | | editDisplay:false, |
| | | viewDisplay:true, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择所属角色", |
| | | // trigger: "click" |
| | | // }] |
| | | }, |
| | | { |
| | | label: "所属部门", |
| | | prop: "deptId", |
| | | type: "cascader", |
| | | //multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属部门", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | { |
| | | label: "所属岗位", |
| | | prop: "postId", |
| | | type: "tree", |
| | | multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "postName", |
| | | value: "id" |
| | | }, |
| | | |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | prop: 'UserPractitionersInfo', |
| | | type: 'dynamic', |
| | | border: false, |
| | | span:24, |
| | | children: { |
| | | align: 'left', |
| | | headerAlign: 'center', |
| | | type:'form', |
| | | rowAdd:(done)=>{ |
| | | console.log(done,111); |
| | | done({ |
| | | input:'默认值' |
| | | }); |
| | | }, |
| | | rowDel:(row,done)=>{ |
| | | console.log(row,222); |
| | | done(); |
| | | }, |
| | | column: [ |
| | | { |
| | | width: 200, |
| | | label: '单位名称', |
| | | prop: "companyname", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '部门', |
| | | prop: "department", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '岗位', |
| | | prop: "post", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '岗位职责', |
| | | prop: "responsibilities", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '入职时间', |
| | | type:'date', |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | prop: "entryTime", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '离职时间', |
| | | type:'date', |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | prop: "departureTime", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '离职原因', |
| | | prop: "leaving", |
| | | formslot: true, |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | data: [], |
| | |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user_add, false), |
| | | viewBtn: this.vaildData(this.permission.user_view, false), |
| | | addBtn: this.vaildData(null, false), |
| | | // addBtn: this.vaildData(this.permission.user_add, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(this.permission.user_delete, false), |
| | | editBtn: this.vaildData(this.permission.user_edit, false) |
| | | editBtn: this.vaildData(null, false) |
| | | }; |
| | | }, |
| | | platformPermissionList() { |
| | |
| | | if (!website.tenantMode) { |
| | | this.initData(website.tenantId); |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | this.$confirm("确定将选择用户登记离职?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | row.status="0"; |
| | | return update(row); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | // handleDelete() { |
| | | // if (this.selectionList.length === 0) { |
| | | // this.$message.warning("请选择至少一条数据"); |
| | | // return; |
| | | // } |
| | | // this.$confirm("确定将选择用户登记离职?", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning" |
| | | // }) |
| | | // .then(() => { |
| | | // return remove(this.ids); |
| | | // }) |
| | | // .then(() => { |
| | | // this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!" |
| | | // }); |
| | | // this.$refs.crud.toggleSelection(); |
| | | // }); |
| | | // }, |
| | | handleGrant() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | uploadAfter(done) { |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | |
| | | window.open(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | var that = this; |
| | | if (["edit", "view"].includes(type)) { |
| | | getUser(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | var userInfo = res.data.data; |
| | | //获取用户从业信息 |
| | | getUserPractitionersInfo(userInfo.cardid).then(res1 =>{ |
| | | that.form.UserPractitionersInfo = res1.data.data; |
| | | }) |
| | | if (this.form.hasOwnProperty("deptId")) { |
| | | this.form.deptId = this.form.deptId.split(","); |
| | | } |
| New file |
| | |
| | | <template> |
| | | <el-row> |
| | | <el-col> |
| | | <basic-container> |
| | | <avue-form :option="option" v-model="obj"> |
| | | <template slot-scope="{row}" slot="input"> |
| | | <el-tag>{{row}}</el-tag> |
| | | </template> |
| | | </avue-form> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | obj: { |
| | | resdata: [ |
| | | { |
| | | name: 1, |
| | | post: 1, |
| | | time: 1, |
| | | }, |
| | | { |
| | | name: 1, |
| | | post: 1, |
| | | time: 1, |
| | | } |
| | | ] |
| | | }, |
| | | option: { |
| | | labelWidth: 110, |
| | | column: [ |
| | | { |
| | | label: '', |
| | | prop: 'resdata', |
| | | type: 'dynamic', |
| | | span:24, |
| | | children: { |
| | | align: 'center', |
| | | headerAlign: 'center', |
| | | rowAdd:(done)=>{ |
| | | this.$message.success('新增回调'); |
| | | done({ |
| | | input:'默认值' |
| | | }); |
| | | }, |
| | | rowDel:(row,done)=>{ |
| | | this.$message.success('删除回调'+JSON.stringify(row)); |
| | | done(); |
| | | }, |
| | | column: [ |
| | | { |
| | | width: 200, |
| | | label: '单位名称', |
| | | prop: "name", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '部门', |
| | | prop: "post", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '岗位', |
| | | prop: "time", |
| | | formslot: true, |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | // addAll(){ |
| | | // for(let i=0;i<10;i++){ |
| | | // this.obj.dynamic.push({ |
| | | // name: 1, |
| | | // post: 1, |
| | | // time: 1, |
| | | // }) |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .box { |
| | | height: 800px; |
| | | } |
| | | |
| | | .el-scrollbar { |
| | | height: 100%; |
| | | } |
| | | |
| | | .box .el-scrollbar__wrap { |
| | | overflow: scroll; |
| | | } |
| | | </style> |
| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-07-07 18:01:57 |
| | | * menu-name 保安详细资料 |
| | | */ |
| | | <template> |
| | | <el-row class="morpheus-box"> |
| | | <el-col :span="24"> |
| | | <el-card> |
| | | <div class="card-body"> |
| | | <el-tabs v-model="activeName" |
| | | @tab-click="handleClick"> |
| | | <el-tab-pane label="基本信息" |
| | | name="first"> |
| | | |
| | | <el-form :model="form" |
| | | label-position="right" |
| | | size="mini" |
| | | label-width="100px"> |
| | | |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="姓名"> |
| | | <el-input disabled="true" |
| | | v-model="form.realName" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="性别"> |
| | | <el-input disabled="true" |
| | | :value="form.sex == 1 ? '男' : '女'" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-col span="12"> |
| | | <el-form-item label="电子邮箱"> |
| | | <el-input disabled="true" |
| | | v-model="form.emails" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="联系方式"> |
| | | <el-input disabled="true" |
| | | v-model="form.phone" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="身高"> |
| | | <el-input disabled="true" |
| | | v-model="form.height" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="联系地址"> |
| | | <el-input disabled="true" |
| | | v-model="form.address" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | |
| | | <el-col span="12"> |
| | | <el-form-item label="籍贯"> |
| | | <el-input disabled="true" |
| | | v-model="form.nativePlace" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="户口所在地"> |
| | | <el-input disabled="true" |
| | | v-model="form.registered" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="政治面貌"> |
| | | <el-input disabled="true" |
| | | v-model="form.politicaloutlook" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | |
| | | <el-form-item label="身份证号"> |
| | | <el-input disabled="true" |
| | | v-model="form.cardid" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col span="12"> |
| | | |
| | | <el-form-item label="所属角色"> |
| | | <el-input disabled="true" |
| | | v-model="form.roleName" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="所属公司"> |
| | | <el-input disabled="true" |
| | | v-model="form.deptName" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="入职时间"> |
| | | <el-input disabled="true" |
| | | v-model="form.rtime" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="是否在职"> |
| | | <el-input disabled="true" |
| | | :value="form.sex == 1 ? '是' : '否'" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </el-form> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="人员表现" |
| | | name="second"> |
| | | <el-table :data="manifestationData" |
| | | style="width: 100%"> |
| | | |
| | | <el-table-column prop="name" |
| | | label="姓名" |
| | | align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="securityid" |
| | | label="身份证号" |
| | | align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="workingattitude" |
| | | align="center" |
| | | label="工作态度"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="workingability" |
| | | align="center" |
| | | label="工作能力"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="achievements" |
| | | align="center" |
| | | label="工作成效"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="score" |
| | | align="center" |
| | | label="评分"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="time" |
| | | align="center" |
| | | label="时间"> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="派遣记录" |
| | | name="third"> |
| | | <el-table :data="dispatchData" |
| | | style="width: 100%"> |
| | | |
| | | <el-table-column prop="name" |
| | | label="姓名" |
| | | align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="cardid" |
| | | label="身份证号" |
| | | align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="dispatcher" |
| | | align="center" |
| | | label="派遣人"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="dispatchertime" |
| | | align="center" |
| | | label="派遣时间"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="dispatcheraddress" |
| | | align="center" |
| | | label="派遣地址"> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="相关荣誉" |
| | | name="fourth"> |
| | | <el-table :data="honorchData" |
| | | style="width: 100%"> |
| | | |
| | | <el-table-column prop="name" |
| | | label="姓名" |
| | | align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="cardid" |
| | | label="身份证号" |
| | | align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="honor" |
| | | align="center" |
| | | label="荣誉"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="honortime" |
| | | align="center" |
| | | label="获取时间"> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col> |
| | | <basic-container> |
| | | <avue-form :option="option" v-model="form" @submit="update"> |
| | | <template slot-scope="{row}" slot="input"> |
| | | <el-tag>{{row}}</el-tag> |
| | | </template> |
| | | </avue-form> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | // manifestationList, |
| | | // dispatchList, |
| | | // honorchList |
| | | // } from "@/api/management/peopleDetails"; |
| | | import { |
| | | getUser, |
| | | update, |
| | | getUserPractitionersInfo, |
| | | saveOrUpdateUserPractitionersInfo |
| | | } from "@/api/system/user"; |
| | | import {getDeptLazyTree} from "@/api/system/dept"; |
| | | |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | | form: {}, |
| | | manifestationData: [], |
| | | dispatchData: [], |
| | | honorchData: [], |
| | | } |
| | | }, |
| | | created () { |
| | | var flag = false, i = 0, ind = null |
| | | |
| | | this.$store.state.tags.tagList.forEach((item, index) => { |
| | | if (item.label == "保安详细资料") { |
| | | if (flag == false) { |
| | | ind = index |
| | | flag = true |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | userId:"", |
| | | init: { |
| | | deptTree: [], |
| | | }, |
| | | props: { |
| | | label: "title", |
| | | value: "key" |
| | | }, |
| | | roleGrantList: [], |
| | | roleTreeObj: [], |
| | | treeDeptId: '', |
| | | treeData: [], |
| | | form:{ |
| | | UserPractitionersInfo:[] |
| | | }, |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | i++ |
| | | })) |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | index: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | group: [ |
| | | { |
| | | label: '基础信息', |
| | | labelWidth:"110", |
| | | prop: 'baseInfo', |
| | | icon: 'el-icon-user-solid', |
| | | column: [ |
| | | { |
| | | label: "所属保安单位", |
| | | prop: "tenantId", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/tenant/select", |
| | | props: { |
| | | label: "tenantName", |
| | | value: "tenantId" |
| | | }, |
| | | disabled:true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "登录账号", |
| | | prop: "account", |
| | | disabled:true |
| | | }, |
| | | { |
| | | label: "用户姓名", |
| | | prop: "realName", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入用户姓名", |
| | | trigger: "blur" |
| | | }, { |
| | | min: 2, |
| | | max: 5, |
| | | message: '姓名长度在2到5个字符' |
| | | }] |
| | | }, |
| | | { |
| | | label: "用户昵称", |
| | | prop: "name" |
| | | }, |
| | | { |
| | | label: "手机号码", |
| | | prop: "phone", |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入手机号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "电子邮箱", |
| | | prop: "email" |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | hide: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入身份证号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativeplace" |
| | | }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation" |
| | | }, |
| | | { |
| | | label: "最高学历", |
| | | prop: "education", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择学历", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "政治面貌", |
| | | prop: "politicaloutlook" |
| | | }, |
| | | { |
| | | label: "身高", |
| | | prop: "height" |
| | | }, |
| | | { |
| | | label: "联系地址", |
| | | prop: "address" |
| | | }, |
| | | { |
| | | label: "户口所在地", |
| | | prop: "registered" |
| | | }, |
| | | { |
| | | label: "入职时间", |
| | | prop: "rtime", |
| | | type:'date', |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd" |
| | | }, |
| | | { |
| | | label: "用户性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3 |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "用户生日", |
| | | type: "date", |
| | | prop: "birthday" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '从业信息', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | column: [ |
| | | { |
| | | prop: 'UserPractitionersInfo', |
| | | type: 'dynamic', |
| | | border: false, |
| | | span:24, |
| | | children: { |
| | | align: 'left', |
| | | headerAlign: 'center', |
| | | type:'form', |
| | | rowAdd:(done)=>{ |
| | | console.log(done,111); |
| | | done({ |
| | | input:'默认值' |
| | | }); |
| | | }, |
| | | rowDel:(row,done)=>{ |
| | | console.log(row,222); |
| | | done(); |
| | | }, |
| | | column: [ |
| | | { |
| | | width: 200, |
| | | label: '单位名称', |
| | | prop: "companyname", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '部门', |
| | | prop: "department", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '岗位', |
| | | prop: "post", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '岗位职责', |
| | | prop: "responsibilities", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '入职时间', |
| | | type:'date', |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | prop: "entryTime", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '离职时间', |
| | | type:'date', |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | prop: "departureTime", |
| | | formslot: true, |
| | | }, { |
| | | width: 200, |
| | | label: '离职原因', |
| | | prop: "leaving", |
| | | formslot: true, |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | } |
| | | }) |
| | | if (i > 1) { |
| | | this.$store.state.tags.tagList.splice(ind, 1) |
| | | |
| | | } |
| | | |
| | | |
| | | this.form = this.$route.query; |
| | | |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | mounted () { |
| | | |
| | | // this.$store.state.tags.tag.label = '保安详细资料' |
| | | |
| | | watch: { |
| | | 'form.tenantId'() { |
| | | if (this.form.tenantId !== '' && this.initFlag) { |
| | | this.initData(this.form.tenantId); |
| | | } |
| | | }, |
| | | 'excelForm.isCovered'() { |
| | | if (this.excelForm.isCovered !== '') { |
| | | const column = this.findObject(this.excelOption.column, "excelFile"); |
| | | column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`; |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | }, |
| | | mounted() { |
| | | //获取userId |
| | | this.userId = JSON.parse(window.localStorage.getItem("saber-userInfo")).content.user_id; |
| | | //获取用户信息 |
| | | this.getUserDetail(); |
| | | }, |
| | | methods: { |
| | | handleClick (tab) { |
| | | if (tab.index == 1) { |
| | | this.getManifestationData() |
| | | } else if (tab.index == 2) { |
| | | this.getDispatchData() |
| | | } else if (tab.index == 3) { |
| | | this.getHonorchData() |
| | | //获取用户信息 |
| | | getUserDetail(){ |
| | | var that = this; |
| | | //获取用户基本信息 |
| | | getUser(this.userId).then(res => { |
| | | this.form = res.data.data; |
| | | var userInfo = res.data.data; |
| | | //获取用户从业信息 |
| | | getUserPractitionersInfo(userInfo.cardid).then(res1 =>{ |
| | | that.form.UserPractitionersInfo = res1.data.data; |
| | | }) |
| | | if (this.form.hasOwnProperty("deptId")) { |
| | | this.form.deptId = this.form.deptId.split(","); |
| | | } |
| | | }, |
| | | getManifestationData () { |
| | | manifestationList(this.form.cardid).then(res => { |
| | | this.manifestationData = res.data.data.records |
| | | this.manifestationData.forEach(item => { |
| | | item.name = this.form.realName |
| | | item.time = item.time.substring(0, 10) |
| | | }) |
| | | }) |
| | | }, |
| | | getDispatchData () { |
| | | dispatchList(this.form.cardid).then(res => { |
| | | |
| | | this.dispatchData = res.data.data.records |
| | | |
| | | }) |
| | | }, |
| | | getHonorchData () { |
| | | honorchList(this.form.cardid).then(res => { |
| | | |
| | | this.honorchData = res.data.data.records |
| | | |
| | | }) |
| | | if (this.form.hasOwnProperty("postId")) { |
| | | this.form.postId = this.form.postId.split(","); |
| | | } |
| | | }); |
| | | }, |
| | | //新增用户信息(包含从业信息) |
| | | update(row, index, done, loading) { |
| | | const userPractitionersList = []; |
| | | var userPractitionersInfo = row.UserPractitionersInfo; |
| | | if(userPractitionersInfo.length>0){ |
| | | userPractitionersInfo.forEach(item => { |
| | | const info = { |
| | | companyname: item.companyname, |
| | | department: item.department, |
| | | departureTime: item.departureTime, |
| | | entryTime: item.entryTime, |
| | | name:row.realName, |
| | | leaving: item.leaving, |
| | | cardid:row.cardid, |
| | | post: item.post, |
| | | responsibilities: item.responsibilities |
| | | } |
| | | userPractitionersList.push(info); |
| | | }); |
| | | } |
| | | var IdCardNo = row.cardid; |
| | | row.deptId = row.deptId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | update(row).then(() => { |
| | | const experience = { |
| | | cardid:IdCardNo, |
| | | userPractitionersInfo:userPractitionersList |
| | | } |
| | | //更新从业信息 |
| | | saveOrUpdateUserPractitionersInfo(experience).then(()=>{ |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }) |
| | | this.loading = false; |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error,111); |
| | | loading(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | <style> |
| | | .box { |
| | | height: 800px; |
| | | } |
| | | |
| | | .el-scrollbar { |
| | | height: 100%; |
| | | } |
| | | |
| | | .box .el-scrollbar__wrap { |
| | | overflow: scroll; |
| | | } |
| | | |
| | | /* .el-form-item__content{ |
| | | margin-left: 0px !important; |
| | | } */ |
| | | </style> |