| | |
| | | resetPassword, unlock |
| | | } from "@/api/system/user"; |
| | | import {exportBlob} from "@/api/common"; |
| | | import {getDeptTree, getDeptLazyTree} from "@/api/system/dept"; |
| | | import {getDeptTree, getDeptLazyTree, updateUserStatus} from "@/api/system/dept"; |
| | | import {getRoleTree} from "@/api/system/role"; |
| | | import {getPostList} from "@/api/system/post"; |
| | | import {mapGetters} from "vuex"; |
| | |
| | | } |
| | | }; |
| | | return { |
| | | tenantId:'', |
| | | form: {}, |
| | | seoptions: [], |
| | | sevalue:"", |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | columnBtn:false, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | required: true, |
| | | message: "请选择用户平台", |
| | | trigger: "blur" |
| | | }] |
| | | }], |
| | | }, |
| | | ], |
| | | group: [ |
| | |
| | | trigger: "click" |
| | | }], |
| | | span: 24, |
| | | value:"" |
| | | }, |
| | | { |
| | | label: "登录账号", |
| | |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | value:'1', |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "userType", |
| | |
| | | { |
| | | label: '密码', |
| | | prop: 'password', |
| | | type: "password", |
| | | hide: true, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | |
| | | label: '确认密码', |
| | | prop: 'password2', |
| | | hide: true, |
| | | type: "password", |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{required: true, validator: validatePass2, trigger: 'blur'}] |
| | |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | required: false, |
| | | message: "请选择所属岗位", |
| | | trigger: "click" |
| | | }], |
| | |
| | | 'form.tenantId'() { |
| | | if (this.form.tenantId !== '' && this.initFlag) { |
| | | this.initData(this.form.tenantId); |
| | | console.log('this.form.tenantId',this.form.tenantId) |
| | | } |
| | | }, |
| | | 'excelForm.isCovered'() { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | updateUserStatus({userid:'1702600796324032513',status:true}).then(res=>{ |
| | | console.log(res) |
| | | }) |
| | | this.selecload() |
| | | const arr=JSON.parse(localStorage.getItem("updataid")) |
| | | if(arr.user_id != '0' && arr.tenant_id !== '000000'){ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | beOpen(done,type){ |
| | | console.log(done,type) |
| | | }, |
| | | //esc取消键操作 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | |
| | | }else { |
| | | this.passVisible=true; |
| | | } |
| | | //console.log("selectionList",this.selectionList) |
| | | //console.log(this.UserPwdstrategyVO) |
| | | }, |
| | | // 设置密码策略,传递下拉框的id和多选框的id |
| | | passhandle(){ |
| | |
| | | }); |
| | | }, |
| | | nodeClick(data) { |
| | | console.log(data) |
| | | console.log(this.form.tenantId) |
| | | this.treeDeptId = data.id; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | |
| | | }); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = row.roleId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | add(row).then(() => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = row.roleId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | console.log('3',row) |
| | | add(row).then(() => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | //console.log(type) |
| | | // console.log('this.tenantId',this.tenantId) |
| | | // const column = this.findObject(this.option.group,'tenantId'); |
| | | // column.value=this.tenantId; |
| | | // console.log('column',column) |
| | | // if(this.treeDeptId){ |
| | | if (["edit", "view"].includes(type)) { |
| | | getUser(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | |
| | | } |
| | | }); |
| | | } |
| | | const prop = this.findObject(this.option.group, 'tenantId'); |
| | | //console.log('1',prop) |
| | | this.initFlag = true; |
| | | done(); |
| | | // }else { |
| | | // this.$message.warning('请选择一条所属租户') |
| | | // } |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.tenantId=data.records[0].tenantId |
| | | this.selectionClear(); |
| | | }); |
| | | }, |