hookehuyr

详情新增负责人显示

......@@ -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>
......
<!--
* @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: 成员列表选择控件
-->
......