[update] 修改内部工作组新增三节点会把二节点的userId带过去

This commit is contained in:
lideqin
2023-11-08 16:38:18 +08:00
parent e065b6d9b8
commit 68112a6d28
2 changed files with 8 additions and 5 deletions
@@ -47,7 +47,7 @@
</a-tooltip>
<div class="tree-operate-node-btn-box" :class="{'tree-operate-node-btn-box-hide': record.id !== mouseInNodeKey}">
<!-- 新增 -->
<a-button v-if="record.userId === currentUserId" icon="plus" class="tree-operate-node-btn" @click="handleWorkGroupAdd"></a-button>
<a-button v-if="record.userId === currentUserId" icon="plus" class="tree-operate-node-btn" @click="handleWorkGroupAdd(record)"></a-button>
<!-- 编辑 -->
<a-button class="tree-operate-node-btn" @click="handleTreeEdit(record)" v-has="'sys:innerWorkingGroup:tree:edit'">
<i class="iconfont icon-bianji" style="color: @primary-color"></i>
@@ -311,9 +311,9 @@ export default {
this.$refs.treeNodeModal.edit(this.mouseInNodeKey, record)
},
// 左侧树新增(二级节点的新增)
handleWorkGroupAdd () {
handleWorkGroupAdd (record) {
this.$refs.treeNodeWorkGroupModal.title = this.$t('newlyAdded')
this.$refs.treeNodeWorkGroupModal.add(this.mouseInNodeKey)
this.$refs.treeNodeWorkGroupModal.add(this.mouseInNodeKey, record.userId)
},
// 左侧树编辑(三级节点的编辑)
handleWorkGroupEdit (record) {
@@ -56,14 +56,16 @@ export default {
url: {
add: '/sys/lawsWorkingGroup/add',
edit: '/sys/lawsWorkingGroup/edit'
}
},
parentUserId: ''
}
},
methods: {
add (parentNodeKey) {
add (parentNodeKey, userId) {
this.visible = true
this.form.resetFields()
this.model.pid = parentNodeKey
this.parentUserId = userId
},
edit (nodeKey, record) {
this.visible = true
@@ -88,6 +90,7 @@ export default {
this.confirmLoading = true
const param = Object.assign({}, this.model)
param.name = values.name
param.userId = this.parentUserId
let url = ''
if (this.model.id) {
url = this.url.edit