From c6e6b25d476b3e4e1d2c612ed15a28b3d881831f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=88=86=E7=B1=B3=E8=8A=B1?= <417727563@qq.com> Date: Wed, 1 Feb 2023 11:01:00 +0800 Subject: [PATCH] 2023 --- .../src/config/router.config.js | 51 +++++++++----- ant-design-vue-jeecg/src/permission.js | 2 +- .../src/views/system/Depart3List.vue | 54 ++++++++++----- .../src/views/system/RoleUserList.vue | 10 +-- .../src/views/system/User2List.vue | 4 +- .../src/views/system/modules/DepartModal.vue | 15 ++-- .../src/views/system/modules/UserModal.vue | 69 ++++++++++--------- .../system/modules/UserRecycleBinModal.vue | 65 +++++++++++------ .../service/impl/SysDepartServiceImpl.java | 2 +- 9 files changed, 171 insertions(+), 101 deletions(-) diff --git a/ant-design-vue-jeecg/src/config/router.config.js b/ant-design-vue-jeecg/src/config/router.config.js index 9031de02..a7f09faf 100644 --- a/ant-design-vue-jeecg/src/config/router.config.js +++ b/ant-design-vue-jeecg/src/config/router.config.js @@ -621,29 +621,42 @@ export const constantRouterMap = [ path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404') }, - { path: '/atlas', component: () => import(/* webpackChunkName: "fail" */ '@/views/seknowgroup/SeKnowAtlasList') }, { - path: '/shopping/shopHome',//这里是你需要设置新窗口打开的页面的路径s - component: () => import('@/views/shopping/shopHome'), - }, - { - path: '/shopping/views/clothType',//这里是你需要设置新窗口打开的页面的路径s - component: () => import('@/views/shopping/pages/clothType'), - }, - { - path: '/shopping/views/sirendingzhi',//这里是你需要设置新窗口打开的页面的路径s - component: () => import('@/views/shopping/pages/sirendingzhi'), - }, - { - path: '/shopping/views/ClothDetail',//这里是你需要设置新窗口打开的页面的路径s - component: () => import('@/views/shopping/pages/clothDetail'), - }, - { - path: '/shopping/views/person',//这里是你需要设置新窗口打开的页面的路径s - component: () => import('@/views/shopping/pages/gerenzhongxin'), + path: '/shopping',//这里是你需要设置新窗口打开的页面的路径s + component: () => import('@views/shopping/shopHome'), + redirect: '/shopping/shopHome', + hidden: true, + children: [ + { + path: 'shopHome', + name: 'shopHome', + component: () => import('@views/shopping/shopHome'), + }, + { + path: 'clothType',//这里是你需要设置新窗口打开的页面的路径s + name: 'clothType', + component: () => import('@/views/shopping/pages/clothType'), + }, + { + path: 'sirendingzhi',//这里是你需要设置新窗口打开的页面的路径s + name: 'sirendingzhi', + component: () => import('@/views/shopping/pages/sirendingzhi'), + }, + { + path: 'ClothDetail',//这里是你需要设置新窗口打开的页面的路径s + name: 'ClothDetail', + component: () => import('@/views/shopping/pages/clothDetail'), + }, + { + path: 'person',//这里是你需要设置新窗口打开的页面的路径s + name: 'person', + component: () => import('@/views/shopping/pages/gerenzhongxin'), + }, + ] + }, ] diff --git a/ant-design-vue-jeecg/src/permission.js b/ant-design-vue-jeecg/src/permission.js index 255bc2dd..6ddfcb42 100644 --- a/ant-design-vue-jeecg/src/permission.js +++ b/ant-design-vue-jeecg/src/permission.js @@ -18,7 +18,7 @@ const whiteList = ['/user/login','/userequip/loginequip','/user/sgin', '/gygl/gyglzxt','/sykesjk/sykcsjkzxt','/scrysjk/scrysjkzxt','/jxrysjk/jxrysjkzxt','/jxzz/jxzzglsjkzxt','/scys/scyssjkzxt', '/sckz/sckzzxt','/sbjm/sbjmsjkzxt','/jxgl/jxglsjkzxt','/szls/szlssjkzxt','/jxdsj/jxdsjzszxt', '/ybgl/ybglsjkzxt','/mflgl/mflglsjkzxt','/ddcl/ddclzxt','/ddgl/ddglzxt','/dyhsc/dyhsczxt','/znyy/znyysczhgkzzrj', - '/znyyjc/znyycjrjxt','/gdgz/gdgzzxt'] // no redirect whitelist + '/znyyjc/znyycjrjxt','/gdgz/gdgzzxt','/shopping/shopHome','/shopping/clothType','/shopping/sirendingzhi','/shopping/ClothDetail','/shopping/person'] // no redirect whitelist router.beforeEach((to, from, next) => { NProgress.start() // start progress bar diff --git a/ant-design-vue-jeecg/src/views/system/Depart3List.vue b/ant-design-vue-jeecg/src/views/system/Depart3List.vue index a3144667..1a7bb904 100644 --- a/ant-design-vue-jeecg/src/views/system/Depart3List.vue +++ b/ant-design-vue-jeecg/src/views/system/Depart3List.vue @@ -104,7 +104,7 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" label="缩写"> - + @@ -126,7 +126,7 @@ :wrapperCol="wrapperCol" label="部门类型"> - + 管理机构 @@ -277,6 +277,7 @@ departTree: [], rightClickSelectedKey: '', rightClickSelectedOrgCode: '', + rightClickSelectedorgCategory: '', hiding: true, model: {}, dropTrigger: '', @@ -309,7 +310,8 @@ orgCode: {rules: [{required: true, message: '请输入部门编码!'}]}, orgCategory: {rules: [{required: true, message: '请输入部门类型!'}]}, mobile: {rules: [{validator: this.validateMobile}]}, - departNameAbbr: {rules: [{required: true,validator: this.validatedepartNameAbbr}]} + departNameAbbr: {rules: [{required: true, message: '请输入部门编码!'}]}, + //departNameAbbr: {rules: [{required: true,validator: this.validatedepartNameAbbr}]} }, url: { delete: '/sys/sysDepart/delete', @@ -367,12 +369,13 @@ // 右键操作方法 rightHandle(node) { this.dropTrigger = 'contextmenu' - console.log(node.node.eventKey) + //console.log(node.node.eventKey) this.rightClickSelectedKey = node.node.eventKey this.rightClickSelectedOrgCode = node.node.dataRef.orgCode + this.rightClickSelectedorgCategory = node.node.dataRef.orgCategory }, onExpand(expandedKeys) { - console.log('onExpand', expandedKeys) + //console.log('onExpand', expandedKeys) // if not set autoExpandParent to false, if children expanded, parent can not collapse. // or, you can remove all expanded children keys. this.iExpandedKeys = expandedKeys @@ -395,7 +398,7 @@ this.$refs.nodeModal.add(this.currFlowId, '') }, batchDel: function () { - console.log(this.checkedKeys) + //console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { this.$message.warning('请选择一条记录!') } else { @@ -449,11 +452,11 @@ nodeModalClose() { }, hide() { - console.log(111) + //console.log(111) this.visible = false }, onCheck(checkedKeys, info) { - console.log('onCheck', checkedKeys, info) + //console.log('onCheck', checkedKeys, info) this.hiding = false //this.checkedKeys = checkedKeys.checked // @@ -465,10 +468,10 @@ // }, onSelect(selectedKeys, e) { - console.log('selected', selectedKeys, e) + //console.log('selected', selectedKeys, e) this.hiding = false let record = e.node.dataRef - console.log('onSelect-record-3', record) + //console.log('onSelect-record-3', record) this.currSelected = Object.assign({}, record) this.model = this.currSelected this.selectedKeys = [record.key] @@ -491,7 +494,16 @@ } this.$nextTick(() => { - //this.form.getFieldDecorator('departNameAbbr', {initialValue: ''}) + + this.form.getFieldDecorator('departName', {initialValue: ''}) + this.form.getFieldDecorator('departNameEn', {initialValue: ''}) + this.form.getFieldDecorator('orgCode', {initialValue: ''}) + this.form.getFieldDecorator('departNameAbbr', {initialValue: ''}) + this.form.getFieldDecorator('orgCategory', {initialValue: 1}) + this.form.getFieldDecorator('mobile', {initialValue: ''}) + this.form.getFieldDecorator('departOrder', {initialValue: ''}) + this.form.getFieldDecorator('address', {initialValue: ''}) + this.form.getFieldDecorator('memo', {initialValue: ''}) // this.form.getFieldDecorator('fax', {initialValue: ''}) // this.form.getFieldDecorator('fax', {initialValue: ''}) this.form.setFieldsValue(pick(record, 'departName','departNameEn','departNameAbbr','orgCategory', 'orgCode', 'departOrder', 'mobile', 'address', 'memo')) @@ -526,7 +538,7 @@ } let formData = Object.assign(this.currSelected, values) - console.log('Received values of form: ', formData) + //console.log('Received values of form: ', formData) httpAction(this.url.edit, formData, 'put').then((res) => { if (res.success) { this.$message.success('保存成功!') @@ -544,7 +556,7 @@ nodeSettingFormSubmit() { this.form.validateFields((err, values) => { if (!err) { - console.log('Received values of form: ', values) + //console.log('Received values of form: ', values) } }) }, @@ -556,15 +568,25 @@ this.$refs.departModal.add() this.$refs.departModal.title = '新增' } else if (num == 2) { + if(this.currSelected.orgCategory==3||this.currSelected.orgCategory==4||this.currSelected.orgCategory==5||this.currSelected.orgCategory==6||this.currSelected.orgCategory==7) + { + this.$message.warning('该部门不允许添加子部门!') + return false + } let key = this.currSelected.key if (!key) { this.$message.warning('请先点击选中上级部门!') return false } - this.$refs.departModal.add(this.selectedKeys) + this.$refs.departModal.add(this.selectedKeys,this.currSelected.orgCategory) this.$refs.departModal.title = '新增' } else { - this.$refs.departModal.add(this.rightClickSelectedKey) + if(this.rightClickSelectedorgCategory==3||this.rightClickSelectedorgCategory==4||this.rightClickSelectedorgCategory==5||this.rightClickSelectedorgCategory==6||this.rightClickSelectedorgCategory==7) + { + this.$message.warning('该部门不允许添加子部门!') + return false + } + this.$refs.departModal.add(this.rightClickSelectedKey,this.rightClickSelectedorgCategory) this.$refs.departModal.title = '新增' } }, @@ -618,7 +640,7 @@ }, selectDirectiveOk(record) { - console.log('选中指令数据', record) + //console.log('选中指令数据', record) this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode}) this.currSelected.sysCode = record.sysCode }, diff --git a/ant-design-vue-jeecg/src/views/system/RoleUserList.vue b/ant-design-vue-jeecg/src/views/system/RoleUserList.vue index e87b9915..df475c72 100644 --- a/ant-design-vue-jeecg/src/views/system/RoleUserList.vue +++ b/ant-design-vue-jeecg/src/views/system/RoleUserList.vue @@ -40,11 +40,11 @@ 导出 -
- - 已选择 {{ selectedRowKeys1.length }}项 - 清空 -
+ + + + +
- + + @@ -156,6 +158,7 @@ validatedepartNameAbbrUrl: "sys/sysDepart/validatedepartNameAbbr", }, dictDisabled: true, + orgCategoryDisabled: true, } }, created() { @@ -174,7 +177,7 @@ }) }, - add(depart) { + add(depart,orgCategory) { if (depart) { this.seen = false; this.dictDisabled = false; @@ -182,6 +185,10 @@ this.seen = true; this.dictDisabled = true; } + if(orgCategory==2) + { + this.orgCategoryDisabled=false; + } this.edit(depart); }, edit(record) { diff --git a/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue b/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue index 83aed35e..f3458012 100644 --- a/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue +++ b/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue @@ -40,13 +40,13 @@ - - - + + + - + - - - - + + + + + + + + - - - 普通用户 - 上级 - 员工 - - - - - - +