Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-10-31 18:38:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
acdbcae536452a0a903f08e505a43c294feeadc5
acdbcae5
1 parent
6098993a
fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
19 deletions
doc/App.vue
doc/App.vue
View file @
acdbcae
...
...
@@ -152,10 +152,7 @@
</el-form-item>
</template> -->
<div style="margin-left: 20px;">
<el-button
type="primary"
@click="openUserForm"
>
<el-button type="primary" @click="openUserForm">
设置人员配置
</el-button>
</div>
...
...
@@ -199,6 +196,7 @@
<el-dialog v-model="state.dialogUserFormVisible" title="成员列表">
<div style="border: 1px dashed #DCDFE6; padding: 10px;">
<el-tag
v-if="state.userTags.length"
v-for="tag in state.userTags"
:key="tag.name"
class=""
...
...
@@ -208,6 +206,7 @@
>
{{ tag.name }}
</el-tag>
<div v-else style="text-align: center; color: #DCDFE6;">请选择成员</div>
</div>
<div style="border: 1px solid #DCDFE6; padding: 10px; margin-top: 10px;">
<div style="height: 40px">
...
...
@@ -470,7 +469,7 @@ export default {
userTags: [],
currentNodeKey: [], // 当前展开的节点
activeTabId: "tab-1", // TODO: 需要获取默认第一个ID
activeTabContent:
''
,
activeTabContent:
""
,
userTabs: [],
tabSelectData: [],
userTabType: "tree",
...
...
@@ -634,7 +633,7 @@ export default {
}
]
}
]
]
;
};
const handleTabClick = (tab, event, idx) => {
...
...
@@ -642,7 +641,7 @@ export default {
state.tabSelectData = tab.data; // tab选中数据提供给list类型使用
state.userList = []; // 清空用户列表
state.checkedUserList = []; // 清空选中用户列表
state.activeTabContent =
''
; // 清空侧边栏显示
state.activeTabContent =
""
; // 清空侧边栏显示
state.currentNodeKey = []; // 清空树形的默认展开
// console.log(tab, event);
// 设置当前激活的tab
...
...
@@ -755,8 +754,9 @@ export default {
// 合并成一维数组列表
userList = [...userList.flat()];
// 如果ID相同,需要数据去重
let uniqueArray = userList.filter((value, index, self) =>
index === self.findIndex(obj => obj.id === value.id)
let uniqueArray = userList.filter(
(value, index, self) =>
index === self.findIndex(obj => obj.id === value.id)
);
// 勾选变化后同步到选中列表
state.userTags = uniqueArray
...
...
@@ -793,15 +793,31 @@ export default {
return ele.id;
});
// console.warn(tagsId);
// 获取tags中已删除的, 勾选列表中还勾选的值
let result = state.checkedUserList.filter(
value => !tagsId.includes(value)
);
// 选中列表中不存在勾选列表中项时,需要删除勾选列表中的项
if (result.length) {
result.forEach(ele => {
state.checkedUserList.splice(state.checkedUserList.indexOf(ele), 1);
});
if (state.is_active_search) { // 搜索状态
// 获取tags中已删除的, 勾选列表中还勾选的值
let result = state.checkedSearchUserList.filter(
value => !tagsId.includes(value)
);
// 选中列表中不存在勾选列表中项时,需要删除勾选列表中的项
if (result.length) {
result.forEach(ele => {
state.checkedSearchUserList.splice(
state.checkedSearchUserList.indexOf(ele),
1
);
});
}
} else { // 非搜索状态
// 获取tags中已删除的, 勾选列表中还勾选的值
let result = state.checkedUserList.filter(
value => !tagsId.includes(value)
);
// 选中列表中不存在勾选列表中项时,需要删除勾选列表中的项
if (result.length) {
result.forEach(ele => {
state.checkedUserList.splice(state.checkedUserList.indexOf(ele), 1);
});
}
}
// console.log(result);
// console.log(state.userTags);
...
...
@@ -878,7 +894,7 @@ export default {
label: "用户1-3",
checked: false,
disabled: true
}
,
}
];
// console.log(state.userTags);
checkSearchStatus();
...
...
Please
register
or
login
to post a comment