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-11-30 10:26:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3c053901ab6c5ed79474f97aa2fe6ac12aa5fdf
b3c05390
1 parent
5bb7d57c
fix
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
doc/App.vue
doc/App.vue
View file @
b3c0539
...
...
@@ -675,13 +675,12 @@ export default {
state.current_enable_version = state.version_list[index].code; // 流程版本列表显示启用项
}
if (flow_id) { // 缓存里访问过
let index = _.findIndex(state.version_list, (v) => v.id == flow_id);
if (index > -1) {
state.select_flow_version = state.version_list[index].code; // 选中的版本号
}
let find_index = _.findIndex(state.version_list, (v) => v.id == flow_id);
if (flow_id && find_index > -1) { // 缓存里访问过并且在列表里
state.select_flow_version = state.version_list[find_index].code; // 选中的版本号
} else { // 如果列表里没有启用的版本获取 flow_id 不存在时,默认选中第一个
state.select_flow_version = state.version_list[0].code; // 选中的版本号
state.reloadLoading = true; // 打开loading
updateFlowId(state.version_list[0].id); // 更新 flow_id
getFlowData(state.version_list[0].id);// 新的 flow_id,更新流程图
}
...
...
@@ -746,6 +745,7 @@ export default {
let flow_id = getFlowId(); // flow_id 流程ID
if (flow_id) {
state.reloadLoading = true; // 打开loading
getFlowData(flow_id);
}
...
...
@@ -775,6 +775,7 @@ export default {
/***************** 版本操作 ***************/
const onSelectFlowVersion = (id: number, code: number, note: string) => {
// 切换版本信息
state.reloadLoading = true; // 打开loading
updateFlowId(id); // 更新缓存flow_id
getFlowData(id); // 更新流程图数据
state.select_flow_version = code;
...
...
@@ -799,6 +800,7 @@ export default {
.then(res => {
if (res.data.code) {
flow_id = res.data.data; // 更新flow_id
state.reloadLoading = true; // 打开loading
updateFlowId(flow_id); // 更新缓存flow_id
getFlowData(flow_id);
ElMessage({
...
...
Please
register
or
login
to post a comment