[update] 修改UAT问题:内部工作组二级额可以新增删除领导,一二级可以查看领导
This commit is contained in:
@@ -70,7 +70,8 @@ module.exports = {
|
|||||||
user: '用户',
|
user: '用户',
|
||||||
pleaseSelectASystem: '请选择左侧体系',
|
pleaseSelectASystem: '请选择左侧体系',
|
||||||
leader: '领导',
|
leader: '领导',
|
||||||
member: '成员'
|
member: '成员',
|
||||||
|
job: '职务'
|
||||||
},
|
},
|
||||||
// 企标级别映射
|
// 企标级别映射
|
||||||
enterpriseLevelMap: {
|
enterpriseLevelMap: {
|
||||||
|
|||||||
@@ -199,6 +199,8 @@
|
|||||||
<tree-node-work-group-modal ref="treeNodeWorkGroupModal" @ok="treeNodeModalOk"></tree-node-work-group-modal>
|
<tree-node-work-group-modal ref="treeNodeWorkGroupModal" @ok="treeNodeModalOk"></tree-node-work-group-modal>
|
||||||
<!-- 新增弹框 -->
|
<!-- 新增弹框 -->
|
||||||
<working-group-modal ref="modalForm" @ok="modalFormOk"></working-group-modal>
|
<working-group-modal ref="modalForm" @ok="modalFormOk"></working-group-modal>
|
||||||
|
<!-- 领导新增弹框 -->
|
||||||
|
<working-group-leader-modal ref="modalFormLeader" @ok="modalFormOk"></working-group-leader-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -213,10 +215,11 @@ import TreeNodeWorkGroupModal from './modules/TreeNodeWorkGroupModal'
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { USER_INFO } from '../../../store/mutation-types'
|
import { USER_INFO } from '../../../store/mutation-types'
|
||||||
import { isHasPermission } from '@/utils/hasPermission'
|
import { isHasPermission } from '@/utils/hasPermission'
|
||||||
|
import WorkingGroupLeaderModal from './modules/WorkingGroupLeaderModal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkingGroupList',
|
name: 'WorkingGroupList',
|
||||||
components: { TreeNodeWorkGroupModal, WorkingGroupModal, TreeNodeModal, JTable },
|
components: { TreeNodeWorkGroupModal, WorkingGroupModal, TreeNodeModal, JTable, WorkingGroupLeaderModal },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
computed: {
|
computed: {
|
||||||
yScrollHeight () {
|
yScrollHeight () {
|
||||||
@@ -346,6 +349,13 @@ export default {
|
|||||||
dataIndex: 'userPostName',
|
dataIndex: 'userPostName',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
|
{ // 职务
|
||||||
|
title: this.$t('system.internalWorkGroup.job'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'job',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
scopedSlots: { customRender: 'leaderAction' },
|
scopedSlots: { customRender: 'leaderAction' },
|
||||||
@@ -570,8 +580,14 @@ export default {
|
|||||||
this.$message.warning(this.$t('system.internalWorkGroup.pleaseSelectASystem'))
|
this.$message.warning(this.$t('system.internalWorkGroup.pleaseSelectASystem'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$refs.modalForm.add(this.currentTreeNode[0], type)
|
if (type === 'leader') {
|
||||||
this.$refs.modalForm.title = this.$t('newlyAdded')
|
// 是领导的新增
|
||||||
|
this.$refs.modalFormLeader.add(this.currentTreeNode[0], type)
|
||||||
|
this.$refs.modalFormLeader.title = this.$t('newlyAdded')
|
||||||
|
} else {
|
||||||
|
this.$refs.modalForm.add(this.currentTreeNode[0], type)
|
||||||
|
this.$refs.modalForm.title = this.$t('newlyAdded')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleDelete: function (id, type) {
|
handleDelete: function (id, type) {
|
||||||
if (!this.url.delete) {
|
if (!this.url.delete) {
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="true"
|
||||||
|
:width="500"
|
||||||
|
:closable="true"
|
||||||
|
switchFullscreen
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@ok="handleOk"
|
||||||
|
:visible="visible">
|
||||||
|
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('system.internalWorkGroup.user')">
|
||||||
|
<user-selection
|
||||||
|
v-decorator.trim="[ 'userId', validatorRules.userId ]"
|
||||||
|
@nameChange="userSelectNameChange"
|
||||||
|
:nameStr="nameStr"
|
||||||
|
type="checkbox"
|
||||||
|
>
|
||||||
|
</user-selection>
|
||||||
|
</a-form-item>
|
||||||
|
<!-- 职务 -->
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('system.internalWorkGroup.job')">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('system.internalWorkGroup.job')"
|
||||||
|
:maxLength="50"
|
||||||
|
v-decorator.trim="[ 'job', validatorRules.job ]" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import UserSelection from '../../../../components/selection/UserSelection'
|
||||||
|
import { postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WorkingGroupLeaderModal',
|
||||||
|
components: { UserSelection },
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 6 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 }
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
userId: {
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.internalWorkGroup.user') }
|
||||||
|
],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
job: {
|
||||||
|
rules: [
|
||||||
|
{ required: false, message: this.$t('pleaseEnter') + this.$t('system.internalWorkGroup.job') }
|
||||||
|
],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: '/sys/lawsWorkingGroupUser/add'
|
||||||
|
},
|
||||||
|
nameStr: '',
|
||||||
|
treeNodeKey: '' // 传入的树节点key值
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add (treeNodeKey) {
|
||||||
|
this.visible = true
|
||||||
|
this.form.resetFields()
|
||||||
|
this.treeNodeKey = treeNodeKey
|
||||||
|
},
|
||||||
|
userSelectNameChange (value) {
|
||||||
|
this.nameStr = value
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.visible = false
|
||||||
|
this.nameStr = ''
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
if (this.confirmLoading) return
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
this.confirmLoading = true
|
||||||
|
const param = Object.assign({}, values)
|
||||||
|
param.workingGroupId = this.treeNodeKey
|
||||||
|
param.searchType = '1' // 标识是领导的新增
|
||||||
|
console.log(param)
|
||||||
|
let url = ''
|
||||||
|
url = this.url.add
|
||||||
|
postAction(url, param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.$emit('ok')
|
||||||
|
this.close()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.confirmLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -59,21 +59,14 @@ export default {
|
|||||||
add: '/sys/lawsWorkingGroupUser/add'
|
add: '/sys/lawsWorkingGroupUser/add'
|
||||||
},
|
},
|
||||||
nameStr: '',
|
nameStr: '',
|
||||||
treeNodeKey: '', // 传入的树节点key值
|
treeNodeKey: '' // 传入的树节点key值
|
||||||
searchType: '' // 1的时候表示领导的新增,没有值说明是成员,新增时需要传给后端
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (treeNodeKey, type) {
|
add (treeNodeKey) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
this.treeNodeKey = treeNodeKey
|
this.treeNodeKey = treeNodeKey
|
||||||
if (type === 'leader') {
|
|
||||||
// 是领导的新增
|
|
||||||
this.searchType = '1'
|
|
||||||
} else {
|
|
||||||
this.searchType = ''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
userSelectNameChange (value) {
|
userSelectNameChange (value) {
|
||||||
this.nameStr = value
|
this.nameStr = value
|
||||||
@@ -92,9 +85,6 @@ export default {
|
|||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const param = Object.assign({}, values)
|
const param = Object.assign({}, values)
|
||||||
param.workingGroupId = this.treeNodeKey
|
param.workingGroupId = this.treeNodeKey
|
||||||
if (this.searchType === '1') {
|
|
||||||
param.searchType = this.searchType
|
|
||||||
}
|
|
||||||
console.log(param)
|
console.log(param)
|
||||||
let url = ''
|
let url = ''
|
||||||
url = this.url.add
|
url = this.url.add
|
||||||
|
|||||||
Reference in New Issue
Block a user