zhc4dev
喻忠伟 2 years ago
parent 22e3eb5bfc
commit c6e6b25d47
  1. 27
      ant-design-vue-jeecg/src/config/router.config.js
  2. 2
      ant-design-vue-jeecg/src/permission.js
  3. 54
      ant-design-vue-jeecg/src/views/system/Depart3List.vue
  4. 10
      ant-design-vue-jeecg/src/views/system/RoleUserList.vue
  5. 4
      ant-design-vue-jeecg/src/views/system/User2List.vue
  6. 15
      ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
  7. 69
      ant-design-vue-jeecg/src/views/system/modules/UserModal.vue
  8. 47
      ant-design-vue-jeecg/src/views/system/modules/UserRecycleBinModal.vue
  9. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

@ -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',//这里是你需要设置新窗口打开的页面的路径s
component: () => import('@views/shopping/shopHome'),
redirect: '/shopping/shopHome',
hidden: true,
children: [
{
path: 'shopHome',
name: 'shopHome',
component: () => import('@views/shopping/shopHome'),
},
{
path: '/shopping/views/clothType',//这里是你需要设置新窗口打开的页面的路径s
path: 'clothType',//这里是你需要设置新窗口打开的页面的路径s
name: 'clothType',
component: () => import('@/views/shopping/pages/clothType'),
},
{
path: '/shopping/views/sirendingzhi',//这里是你需要设置新窗口打开的页面的路径s
path: 'sirendingzhi',//这里是你需要设置新窗口打开的页面的路径s
name: 'sirendingzhi',
component: () => import('@/views/shopping/pages/sirendingzhi'),
},
{
path: '/shopping/views/ClothDetail',//这里是你需要设置新窗口打开的页面的路径s
path: 'ClothDetail',//这里是你需要设置新窗口打开的页面的路径s
name: 'ClothDetail',
component: () => import('@/views/shopping/pages/clothDetail'),
},
{
path: '/shopping/views/person',//这里是你需要设置新窗口打开的页面的路径s
path: 'person',//这里是你需要设置新窗口打开的页面的路径s
name: 'person',
component: () => import('@/views/shopping/pages/gerenzhongxin'),
},
]
},
]

@ -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

@ -104,7 +104,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="缩写">
<a-input placeholder="请输入缩写" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/>
<a-input disabled placeholder="请输入缩写" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/>
</a-form-item>
@ -126,7 +126,7 @@
:wrapperCol="wrapperCol"
label="部门类型">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择部门类型">
<a-radio-group disabled v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择部门类型">
<a-radio value="1">
管理机构
</a-radio>
@ -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
// <!---- author:os_chengtgen -- date:20190827 -- for: =======------>
@ -465,10 +468,10 @@
// <!---- author:os_chengtgen -- date:20190827 -- for: =======------>
},
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
},

@ -40,11 +40,11 @@
<a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>
</div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon">
</i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>
<a style="margin-left: 24px" @click="onClearSelected1">清空</a>
</div>
<!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!--<i class="anticon anticon-info-circle ant-alert-icon">-->
<!--</i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>-->
<!--<a style="margin-left: 24px" @click="onClearSelected1">清空</a>-->
<!--</div>-->
<div style="margin-top: 15px">
<a-table

@ -268,12 +268,12 @@
width: 180,
dataIndex: 'orgCodeTxt'
},
{
/* {
title: '负责部门',
align: "center",
width: 180,
dataIndex: 'departIds_dictText'
},
},*/
{
title: '状态',
align: "center",

@ -44,7 +44,7 @@
<a-input placeholder="请输入手机号" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/>
</a-form-item>
<!--<template v-if="seen">-->
<template v-if="orgCategoryDisabled">
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
@ -70,8 +70,10 @@
</a-radio>
</a-radio-group>
</a-form-item>
<!--</template>-->
</template>
<template v-else>
<a-input v-model="model.orgCategory" value="2" hidden />
</template>
<!--<a-form-item-->
<!--:labelCol="labelCol"-->
<!--:wrapperCol="wrapperCol"-->
@ -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) {

@ -40,13 +40,13 @@
<a-input placeholder="请输入用户姓名" v-model="model.realname" />
</a-form-model-item>
<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
<a-input placeholder="请输入工号" v-model="model.workNo" />
</a-form-model-item>
<!--<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">-->
<!--<a-input placeholder="请输入工号" v-model="model.workNo" />-->
<!--</a-form-model-item>-->
<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
</a-form-model-item>
</a-form-model-item>-->
<a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
<j-multi-select-tag
@ -63,30 +63,32 @@
</a-form-model-item>
<!--租户分配-->
<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.relTenantIds"
:options="tenantsOptions"
placeholder="请选择租户">
</j-multi-select-tag>
</a-form-model-item>
<!--<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">-->
<!--<j-multi-select-tag-->
<!--:disabled="disableSubmit"-->
<!--v-model="model.relTenantIds"-->
<!--:options="tenantsOptions"-->
<!--placeholder="请选择租户">-->
<!--</j-multi-select-tag>-->
<!--</a-form-model-item>-->
<a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-model="model.userIdentity" @change="identityChange">
<a-radio :value="1">普通用户</a-radio>
<a-radio :value="2">上级</a-radio>
<a-radio :value="3">员工</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.departIds"
:options="nextDepartOptions"
placeholder="请选择负责部门">
</j-multi-select-tag>
</a-form-model-item>
<a-input v-model="model.userIdentity" value="1" hidden />
<!--<a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!--<a-radio-group v-model="model.userIdentity" @change="identityChange">-->
<!--<a-radio :value="1">普通用户</a-radio>-->
<!--<a-radio :value="2">上级</a-radio>-->
<!--<a-radio :value="3">员工</a-radio>-->
<!--</a-radio-group>-->
<!--</a-form-model-item>-->
<!--<a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true">-->
<!--<j-multi-select-tag-->
<!--:disabled="disableSubmit"-->
<!--v-model="model.departIds"-->
<!--:options="nextDepartOptions"-->
<!--placeholder="请选择负责部门">-->
<!--</j-multi-select-tag>-->
<!--</a-form-model-item>-->
<a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-image-upload class="avatar-uploader" text="上传" v-model="model.avatar" ></j-image-upload>
@ -120,9 +122,10 @@
<a-input placeholder="请输入座机" v-model="model.telephone" />
</a-form-model-item>
<a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>
</a-form-model-item>
<a-input v-model="model.activitiSync" value="1" hidden />
<!--<a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!--<j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>-->
<!--</a-form-model-item>-->
</a-form-model>
</a-spin>
@ -172,8 +175,8 @@
phone: [{required: true, message: '请输入手机号!'}, {validator: this.validatePhone}],
email: [{validator: this.validateEmail}],
roles:{},
workNo:[ { required: true, message: '请输入工号' },
{ validator: this.validateWorkNo }],
// workNo:[ { required: true, message: '' },
// { validator: this.validateWorkNo }],
telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
},
departIdShow:false,

@ -152,16 +152,36 @@
},
//
handleDelete(userIds) {
this.$confirm({
title: '彻底删除用户',
content: (<div>
<p>您确定要彻底删除这 {userIds.length} 个用户吗</p>
<p style="color:red;">注意彻底删除后将无法恢复请谨慎操作</p>
</div>),
centered: true,
onOk: () => {
// this.$confirm({
// title: '',
// content: (<div>
// <p> {userIds.length} </p>
// <p style="color:red;"></p>
// </div>),
// centered: true,
// onOk: () => {
// var that = this;
// deleteAction(that.url.deleteRecycleBin, {userIds: userIds.join(',')}).then((res) => {
// if (res.success) {
// this.loadData()
// this.handleClearSelection()
// this.$message.success(` ${userIds.length} `)
// } else {
// that.$message.warning(res.message);
// }
// });
// },
// })
let str= "您确定要彻底删除这" +userIds.length +"个用户吗?";
this.$confirm(str, '彻底删除用户', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
var that = this;
deleteAction(that.url.deleteRecycleBin, {userIds: userIds.join(',')}).then((res) => {
deleteAction(that.url.deleteRecycleBin, {userIds: userIds.join(',')}).then((res) =>
{
if (res.success) {
this.loadData()
this.handleClearSelection()
@ -170,8 +190,13 @@
that.$message.warning(res.message);
}
});
},
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
handleRevertBatch() {
this.handleRevert(this.selectedRowKeys)

@ -77,7 +77,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
/**
* queryTreeList 对应 queryTreeList 查询所有的部门数据,以树结构形式响应给前端
*/
@Cacheable(value = CacheConstant.SYS_DEPARTS_CACHE)
// @Cacheable(value = CacheConstant.SYS_DEPARTS_CACHE)//缓存
@Override
public List<SysDepartTreeModel> queryTreeList() {
LambdaQueryWrapper<SysDepart> query = new LambdaQueryWrapper<SysDepart>();

Loading…
Cancel
Save