| | |
| | | } from "@/api/system/user"; |
| | | import { getList } from "@/api/securityGuard/securityGuard"; |
| | | import { getDeptLazyTree } from "@/api/system/dept"; |
| | | import { getRoleTree,getRoleDetail } from "@/api/system/role"; |
| | | import { getRoleTree, getRoleDetail } from "@/api/system/role"; |
| | | import { getPostList } from "@/api/system/post"; |
| | | import { mapGetters } from "vuex"; |
| | | import website from "@/config/website"; |
| | | import { getToken } from "@/util/auth"; |
| | | import { securityFormPageColumn } from "./data"; |
| | | import { mapState } from 'vuex'; |
| | | import { mapState } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | } |
| | | }; |
| | | return { |
| | | securityid:"", |
| | | securityid: "", |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | |
| | | row: true, |
| | | prop: "myPicture", |
| | | }, |
| | | |
| | | |
| | | // { |
| | | // label: "编号", |
| | | // prop: "code", |
| | | // }, |
| | | |
| | | |
| | | { |
| | | label: "所属辖区", |
| | | prop: "jurisdiction", |
| | |
| | | { |
| | | prop: "UserPractitionersInfo", |
| | | type: "dynamic", |
| | | border: false, |
| | | border: true, //liu |
| | | span: 24, |
| | | children: { |
| | | align: "left", |
| | |
| | | return ids.join(","); |
| | | }, |
| | | ...mapState({ |
| | | userInfo: state => state.user.userInfo |
| | | }) |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | }, |
| | | mounted() { |
| | | // this.option.column[0].hide = true |
| | |
| | | |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach(roleId =>{ |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if(roleAlias=="保安公司管理员" || roleAlias=="保安" || roleAlias=="未持证保安"){ |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | column.search = false; |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | ) { |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | column.search = false; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | |
| | | }); |
| | | } |
| | | const user = { |
| | | account: row.account, |
| | | address: row.address, |
| | | birthday: row.birthday, |
| | | cardid: row.cardid, |
| | | deptId: row.deptId, |
| | | education: row.education, |
| | | email: row.email, |
| | | height: row.height, |
| | | hold: row.hold, |
| | | jurisdiction: row.jurisdiction, |
| | | myPicture: row.myPicture, |
| | | name:row.name, |
| | | nation:row.nation, |
| | | nativeplace:row.nativeplace, |
| | | password: row.password, |
| | | password2:row.password2, |
| | | phone: row.phone, |
| | | politicaloutlook:row.politicaloutlook, |
| | | realName: row.realName, |
| | | registered:row.registered, |
| | | rtime: row.rtime, |
| | | securitynumber:row.securitynumber, |
| | | sex: row.sex |
| | | } |
| | | account: row.account, |
| | | address: row.address, |
| | | birthday: row.birthday, |
| | | cardid: row.cardid, |
| | | deptId: row.deptId, |
| | | education: row.education, |
| | | email: row.email, |
| | | height: row.height, |
| | | hold: row.hold, |
| | | jurisdiction: row.jurisdiction, |
| | | myPicture: row.myPicture, |
| | | name: row.name, |
| | | nation: row.nation, |
| | | nativeplace: row.nativeplace, |
| | | password: row.password, |
| | | password2: row.password2, |
| | | phone: row.phone, |
| | | politicaloutlook: row.politicaloutlook, |
| | | realName: row.realName, |
| | | registered: row.registered, |
| | | rtime: row.rtime, |
| | | securitynumber: row.securitynumber, |
| | | sex: row.sex, |
| | | }; |
| | | const userMap = { |
| | | user: user, |
| | | userPractitionersInfo: userPractitionersList, |
| | | }; |
| | | user: user, |
| | | userPractitionersInfo: userPractitionersList, |
| | | }; |
| | | securitySave(userMap).then( |
| | | () => { |
| | | this.$message({ |
| | |
| | | }; |
| | | values = { |
| | | ...params, |
| | | roleAlias:"111", |
| | | roleAlias: "111", |
| | | ...this.query, |
| | | }; |
| | | |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach(roleId =>{ |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if(roleAlias=="保安公司管理员"){ |
| | | values["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if (roleAlias == "保安公司管理员") { |
| | | values["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |