Showing
2 changed files
with
40 additions
and
8 deletions
| ... | @@ -88,6 +88,22 @@ | ... | @@ -88,6 +88,22 @@ |
| 88 | </div> | 88 | </div> |
| 89 | <el-input v-model="state.detailModel.label" /> | 89 | <el-input v-model="state.detailModel.label" /> |
| 90 | </el-form-item> | 90 | </el-form-item> |
| 91 | + <div> | ||
| 92 | + <div style="font-size: 14px; margin-bottom: 10px;"> | ||
| 93 | + 节点负责人 <span style="color: red;">*</span> | ||
| 94 | + </div> | ||
| 95 | + <div class="flow-tag__wrapper" @click="openUserForm"> | ||
| 96 | + <el-tag | ||
| 97 | + v-if="state.userTags.length" | ||
| 98 | + v-for="tag in state.userTags" | ||
| 99 | + :key="tag.name" | ||
| 100 | + style="margin-left: 0.25rem; margin-right: 0.25rem;" | ||
| 101 | + > | ||
| 102 | + {{ tag.name }} | ||
| 103 | + </el-tag> | ||
| 104 | + <div v-else class="text-empty">请选择成员</div> | ||
| 105 | + </div> | ||
| 106 | + </div> | ||
| 91 | <el-form-item prop="attr"> | 107 | <el-form-item prop="attr"> |
| 92 | <el-radio-group | 108 | <el-radio-group |
| 93 | v-model="state.attr_radio" | 109 | v-model="state.attr_radio" |
| ... | @@ -171,11 +187,11 @@ | ... | @@ -171,11 +187,11 @@ |
| 171 | /> | 187 | /> |
| 172 | </el-form-item> | 188 | </el-form-item> |
| 173 | </template> --> | 189 | </template> --> |
| 174 | - <div style="margin-left: 20px;"> | 190 | + <!-- <div style="margin-left: 20px;"> |
| 175 | <el-button type="primary" @click="openUserForm"> | 191 | <el-button type="primary" @click="openUserForm"> |
| 176 | 设置人员配置 | 192 | 设置人员配置 |
| 177 | </el-button> | 193 | </el-button> |
| 178 | - </div> | 194 | + </div> --> |
| 179 | </template> | 195 | </template> |
| 180 | <template v-else> | 196 | <template v-else> |
| 181 | <el-form-item label="活动标题"> | 197 | <el-form-item label="活动标题"> |
| ... | @@ -382,6 +398,7 @@ export default { | ... | @@ -382,6 +398,7 @@ export default { |
| 382 | }, | 398 | }, |
| 383 | }, | 399 | }, |
| 384 | ], | 400 | ], |
| 401 | + userTags: [{ id: "user-1-1", name: "用户1-1" }] | ||
| 385 | }) | 402 | }) |
| 386 | 403 | ||
| 387 | onMounted(() => { | 404 | onMounted(() => { |
| ... | @@ -644,16 +661,17 @@ export default { | ... | @@ -644,16 +661,17 @@ export default { |
| 644 | // console.log("edges", edges); | 661 | // console.log("edges", edges); |
| 645 | // 使用时需要把自定义节点的类型带过去 activity/control | 662 | // 使用时需要把自定义节点的类型带过去 activity/control |
| 646 | nodes.forEach((node: { [x: string]: string; shape: string }) => { | 663 | nodes.forEach((node: { [x: string]: string; shape: string }) => { |
| 647 | - if (node.shape === 'activity') { | 664 | + // if (node.shape === 'activity') { |
| 648 | - node['shape'] = 'activity_' + node['activity'] | 665 | + // node['shape'] = 'activity_' + node['activity'] |
| 649 | - } | 666 | + // } |
| 650 | if (node.shape === 'control') { | 667 | if (node.shape === 'control') { |
| 651 | - node['shape'] = 'control_' + node['control'] | 668 | + // node['shape'] = 'control_' + node['control'] |
| 669 | + node['control'] = node['control'] | ||
| 652 | } | 670 | } |
| 653 | }) | 671 | }) |
| 654 | 672 | ||
| 655 | nodes = nodes.map( | 673 | nodes = nodes.map( |
| 656 | - ({ data, id, label, shape, x, y, text, desc, img }) => ({ | 674 | + ({ data, id, label, shape, x, y, text, desc, img, control }) => ({ |
| 657 | data, | 675 | data, |
| 658 | id, | 676 | id, |
| 659 | label, | 677 | label, |
| ... | @@ -663,6 +681,7 @@ export default { | ... | @@ -663,6 +681,7 @@ export default { |
| 663 | text, | 681 | text, |
| 664 | desc, | 682 | desc, |
| 665 | img, | 683 | img, |
| 684 | + control, | ||
| 666 | }), | 685 | }), |
| 667 | ) | 686 | ) |
| 668 | edges = edges.map(({ source, sourceAnchor, target, targetAnchor }) => ({ | 687 | edges = edges.map(({ source, sourceAnchor, target, targetAnchor }) => ({ |
| ... | @@ -755,4 +774,17 @@ body { | ... | @@ -755,4 +774,17 @@ body { |
| 755 | .demo-tabs > .el-tabs__content { | 774 | .demo-tabs > .el-tabs__content { |
| 756 | /* padding: 32px; */ | 775 | /* padding: 32px; */ |
| 757 | } | 776 | } |
| 777 | + | ||
| 778 | +.flow-tag__wrapper { | ||
| 779 | + border: 1px dashed #dcdfe6; | ||
| 780 | + padding: 10px; | ||
| 781 | + margin-bottom: 10px; | ||
| 782 | + &:hover { | ||
| 783 | + cursor: pointer; | ||
| 784 | + } | ||
| 785 | + .text-empty { | ||
| 786 | + text-align: center; | ||
| 787 | + color: #dcdfe6; | ||
| 788 | + } | ||
| 789 | +} | ||
| 758 | </style> | 790 | </style> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-11-01 10:18:53 | 2 | * @Date: 2023-11-01 10:18:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-11-02 07:25:50 | 4 | + * @LastEditTime: 2023-11-15 17:27:42 |
| 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue | 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue |
| 6 | * @Description: 成员列表选择控件 | 6 | * @Description: 成员列表选择控件 |
| 7 | --> | 7 | --> | ... | ... |
-
Please register or login to post a comment