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-15 17:53:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4f90d867c46ea66d4d1f2c01e3979b9563adc1e7
4f90d867
1 parent
479fd5da
详情新增负责人显示
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
8 deletions
doc/App.vue
doc/selectUserView.vue
doc/App.vue
View file @
4f90d86
...
...
@@ -88,6 +88,22 @@
</div>
<el-input v-model="state.detailModel.label" />
</el-form-item>
<div>
<div style="font-size: 14px; margin-bottom: 10px;">
节点负责人 <span style="color: red;">*</span>
</div>
<div class="flow-tag__wrapper" @click="openUserForm">
<el-tag
v-if="state.userTags.length"
v-for="tag in state.userTags"
:key="tag.name"
style="margin-left: 0.25rem; margin-right: 0.25rem;"
>
{{ tag.name }}
</el-tag>
<div v-else class="text-empty">请选择成员</div>
</div>
</div>
<el-form-item prop="attr">
<el-radio-group
v-model="state.attr_radio"
...
...
@@ -171,11 +187,11 @@
/>
</el-form-item>
</template> -->
<div style="margin-left: 20px;">
<
!-- <
div style="margin-left: 20px;">
<el-button type="primary" @click="openUserForm">
设置人员配置
</el-button>
</div>
</div>
-->
</template>
<template v-else>
<el-form-item label="活动标题">
...
...
@@ -382,6 +398,7 @@ export default {
},
},
],
userTags: [{ id: "user-1-1", name: "用户1-1" }]
})
onMounted(() => {
...
...
@@ -644,16 +661,17 @@ export default {
// console.log("edges", edges);
// 使用时需要把自定义节点的类型带过去 activity/control
nodes.forEach((node: { [x: string]: string; shape: string }) => {
if (node.shape === 'activity') {
node['shape'] = 'activity_' + node['activity']
}
//
if (node.shape === 'activity') {
//
node['shape'] = 'activity_' + node['activity']
//
}
if (node.shape === 'control') {
node['shape'] = 'control_' + node['control']
// node['shape'] = 'control_' + node['control']
node['control'] = node['control']
}
})
nodes = nodes.map(
({ data, id, label, shape, x, y, text, desc, img }) => ({
({ data, id, label, shape, x, y, text, desc, img
, control
}) => ({
data,
id,
label,
...
...
@@ -663,6 +681,7 @@ export default {
text,
desc,
img,
control,
}),
)
edges = edges.map(({ source, sourceAnchor, target, targetAnchor }) => ({
...
...
@@ -755,4 +774,17 @@ body {
.demo-tabs > .el-tabs__content {
/* padding: 32px; */
}
.flow-tag__wrapper {
border: 1px dashed #dcdfe6;
padding: 10px;
margin-bottom: 10px;
&:hover {
cursor: pointer;
}
.text-empty {
text-align: center;
color: #dcdfe6;
}
}
</style>
...
...
doc/selectUserView.vue
View file @
4f90d86
<!--
* @Date: 2023-11-01 10:18:53
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-11-
02 07:25:50
* @LastEditTime: 2023-11-
15 17:27:42
* @FilePath: /vue-flow-editor/doc/selectUserView.vue
* @Description: 成员列表选择控件
-->
...
...
Please
register
or
login
to post a comment