From 616ddbd8fbd016a7824f6b6f5b515cb9c89ee163 Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Wed, 17 May 2023 13:48:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9dataId=E4=B8=BAreportId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/OrgTable.vue | 32 +++++++++++++++++++++++--------- src/views/Login.vue | 11 ++++++++++- src/views/System/Org.vue | 7 +++++-- src/views/System/User.vue | 9 ++++++++- 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/components/OrgTable.vue b/src/components/OrgTable.vue index a78da50..f6e3f0e 100644 --- a/src/components/OrgTable.vue +++ b/src/components/OrgTable.vue @@ -794,15 +794,29 @@ export default { handleRemove (user, type) { let delIndex = -1 - this.checkedList.map((checkedItem, chkIndex) => { - if (user.USID === checkedItem.USID) { - delIndex = chkIndex - if (type !== 'table') { - this.checkedRow([checkedItem]) + if(this.isShowOrg){ + + this.checkedList.map((checkedItem, chkIndex) => { + if ( user.id === checkedItem.id ) { + delIndex = chkIndex + if (type !== 'table') { + this.checkedRow([checkedItem]) + } + return false } - return false - } - }) + }) + }else{ + this.checkedList.map((checkedItem, chkIndex) => { + if (user.USID === checkedItem.USID ) { + delIndex = chkIndex + if (type !== 'table') { + this.checkedRow([checkedItem]) + } + return false + } + }) + } + this.checkedList.splice(delIndex, 1) this.checkedIdList.splice(delIndex, 1) }, @@ -826,7 +840,7 @@ export default { if (this.tableData[i].USID == row.USID && !this.isOrg) { // console.log(this.tableData[i], '666') this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i]) - }else if (this.tableData[i].id == row.id&& this.isOrg){ + }else if (this.tableData[i].id == row.id && this.isOrg){ this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i]) } diff --git a/src/views/Login.vue b/src/views/Login.vue index 6103850..1ba2447 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -136,10 +136,19 @@ export default { }) return }else{ + let routeList=menu.map(item=> item.href) + let params + if(routeList.indexOf('/report/list')>-1){ + params={ path: '/report/list', query: { id: 'AEHJB8YNJ3' }} + }else if(routeList.indexOf('/report/manager')>-1){ + params={ path: '/report/manager', query: { id: 'AEHJB8YNJ3' }} + }else if(routeList.indexOf('/userCenter/processCenter')>-1){ + params={ path: '/userCenter/processCenter', query: { id: 'AEHJB8YNJ3' }} + } this.$message.success('登录成功') this.getMarket().then((resx)=>{ this.$store.commit('setMarketpre', resx) - this.$router.push({ path: '/report/list', query: { id: 'AEHJB8YNJ3' } }) + this.$router.push(params) }).catch((resx)=>{ this.$store.commit('setMarketpre', '') this.$router.push({ path: '/report/list', query: { id: 'AEHJB8YNJ3' } }) diff --git a/src/views/System/Org.vue b/src/views/System/Org.vue index 5597077..6e4615b 100644 --- a/src/views/System/Org.vue +++ b/src/views/System/Org.vue @@ -104,7 +104,7 @@ - + @@ -264,7 +264,10 @@ export default { if (!this.form.departmentCode) { return this.$message.warning('请检查部门编码') && false } - if (!this.form.leveL || !(/^[a-zA-Z0-9]*$/.test(this.form.leveL))) { + if(!this.form.leveL ){ + return this.$message.warning('请检查部门级别') && false + } + if ( !(/^[0-9]*$/.test(this.form.leveL))) { return this.$message.warning('部门级别只能为纯数字') && false } return true diff --git a/src/views/System/User.vue b/src/views/System/User.vue index 8688597..2f8434a 100644 --- a/src/views/System/User.vue +++ b/src/views/System/User.vue @@ -86,7 +86,7 @@
- + @@ -176,6 +176,7 @@ export default { }, handleClick(){ + if(this.mode === 'view')return this.orgTableVal=this.form.orgId this.orgTableValName=this.form.orgName this.visibleOrgTable=true @@ -257,7 +258,11 @@ export default { }, // 验证 checkUserForm () { + if (!this.form.account){ + return this.$message.warning('用户名不能为空') && false + } if (this.mode === 'add') { + if (!this.form.account || !(/^[a-zA-Z0-9]*$/.test(this.form.account))) { return this.$message.warning('用户名只能为纯数字、纯字母或字母数字组合') && false } @@ -279,7 +284,9 @@ export default { // return this.$message.warning('请检查密码') && false; // } // } + } + if (this.form.cellPhoneNumber && !(/^1[3|4|5|7|8|9][0-9]{9}$/.test(this.form.cellPhoneNumber))) { return this.$message.warning('请检查手机号') && false }