Showing
1 changed file
with
113 additions
and
26 deletions
| ... | @@ -79,7 +79,6 @@ | ... | @@ -79,7 +79,6 @@ |
| 79 | label-width="100px" | 79 | label-width="100px" |
| 80 | style="position: relative;" | 80 | style="position: relative;" |
| 81 | > | 81 | > |
| 82 | - <!-- <template v-if="state.detailModel.activity === undefined"> --> | ||
| 83 | <el-tabs | 82 | <el-tabs |
| 84 | v-model="state.activeName" | 83 | v-model="state.activeName" |
| 85 | class="" | 84 | class="" |
| ... | @@ -88,32 +87,26 @@ | ... | @@ -88,32 +87,26 @@ |
| 88 | > | 87 | > |
| 89 | <el-tab-pane label="节点属性" name="node" style="padding: 0 1rem"> | 88 | <el-tab-pane label="节点属性" name="node" style="padding: 0 1rem"> |
| 90 | <div v-if="state.main_attr_set" class="main-attr-set"> | 89 | <div v-if="state.main_attr_set" class="main-attr-set"> |
| 91 | - <el-form-item prop="label"> | 90 | + <el-form-item prop="label" class="node-name"> |
| 92 | <div slot="label"> | 91 | <div slot="label"> |
| 93 | - 节点名称 <span style="color: red;">*</span> | 92 | + <span class="name">节点名称</span> |
| 94 | - <span style="position: absolute; right: 0; top: 0;"> | 93 | + <span class="node-index"> 节点索引:{{ state.node_idx }} </span> |
| 95 | - <span style="background-color: #f5f6f8; padding: 2px 5px; border: 1px solid #d7d9dc; border-radius: 3px; color: #141e31; font-size: 12px; font-weight: 400; line-height: 22px; text-align: center; width: 100px;"> | ||
| 96 | - 节点索引:{{ state.node_idx }} | ||
| 97 | - </span> | ||
| 98 | - </span> | ||
| 99 | </div> | 94 | </div> |
| 100 | <el-input v-model="state.node_name" style="margin-top: 5px;" /> | 95 | <el-input v-model="state.node_name" style="margin-top: 5px;" /> |
| 101 | </el-form-item> | 96 | </el-form-item> |
| 102 | <div v-if="state.user_attr_set" class="node-user"> | 97 | <div v-if="state.user_attr_set" class="node-user"> |
| 103 | - <div style="font-size: 14px; margin-bottom: 10px;"> | 98 | + <div class="name">节点负责人</div> |
| 104 | - 节点负责人 <span style="color: red;">*</span> | 99 | + <div class="flow-tag__wrapper" @click="openUserForm"> |
| 105 | - </div> | ||
| 106 | - <div class="flow-tag__wrapper" style="max-height: 100px; overflow: auto;" @click="openUserForm"> | ||
| 107 | <el-tag | 100 | <el-tag |
| 108 | v-if="state.userTags.length" | 101 | v-if="state.userTags.length" |
| 109 | v-for="tag in state.userTags" | 102 | v-for="tag in state.userTags" |
| 110 | :key="tag.name" | 103 | :key="tag.name" |
| 111 | style="margin: 0 0.25rem 0.5rem 0.25rem;" | 104 | style="margin: 0 0.25rem 0.5rem 0.25rem;" |
| 112 | > | 105 | > |
| 113 | - <el-icon v-if="tag.type === 'dept'" style="display: inline-block; vertical-align: middle; line-height: 10px;height: 13px;"><House /></el-icon> | 106 | + <el-icon v-if="tag.type === 'dept'" class="icon" style="height: 13px;"><House /></el-icon> |
| 114 | - <el-icon v-if="tag.type === 'user'" style="display: inline-block; vertical-align: middle; line-height: 10px;height: 12px;"><Female /></el-icon> | 107 | + <el-icon v-if="tag.type === 'user'" class="icon" style="height: 12px;"><Female /></el-icon> |
| 115 | - <el-icon v-if="tag.type === 'role'" style="display: inline-block; vertical-align: middle; line-height: 10px;height: 12px;"><User /></el-icon> | 108 | + <el-icon v-if="tag.type === 'role'" class="icon" style="height: 12px;"><User /></el-icon> |
| 116 | - <span style="margin-left: 2px;display: inline-block; vertical-align: middle; line-height: 10px; height: 10px;">{{ tag.name }}</span> | 109 | + <span class="icon" style="margin-left: 2px; height: 10px;">{{ tag.name }}</span> |
| 117 | </el-tag> | 110 | </el-tag> |
| 118 | <div v-else class="text-empty">请选择成员</div> | 111 | <div v-else class="text-empty">请选择成员</div> |
| 119 | </div> | 112 | </div> |
| ... | @@ -316,12 +309,11 @@ | ... | @@ -316,12 +309,11 @@ |
| 316 | <span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">启用</span> | 309 | <span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">启用</span> |
| 317 | </div> | 310 | </div> |
| 318 | </el-tooltip> --> | 311 | </el-tooltip> --> |
| 319 | - <div style="position: absolute; top:20px; right: 15px;"> | 312 | + <div class="select-version-wrapper"> |
| 320 | <el-dropdown trigger="click"> | 313 | <el-dropdown trigger="click"> |
| 321 | - <div style="margin-left: 15px;"> | 314 | + <div class="select-version-show"> |
| 322 | - <div v-if="state.select_flow_version === state.current_enable_version" style="width: 10px; height: 10px; background-color: #009688; border-radius: 50%; display: inline-block; margin-right: 8px;"></div> | 315 | + <div :class="[state.select_flow_version === state.current_enable_version ? 'version-icon-actived' : 'version-icon-selected']"></div> |
| 323 | - <div v-else style="width: 10px; height: 10px; background-color: #f0a800; border-radius: 50%; display: inline-block; margin-right: 8px;"></div> | 316 | + <span class="text">流程版本 (V{{ state.select_flow_version }})</span> |
| 324 | - <span style="font-size: 13px;">流程版本 (V{{ state.select_flow_version }})</span> | ||
| 325 | </div> | 317 | </div> |
| 326 | <template #dropdown> | 318 | <template #dropdown> |
| 327 | <el-dropdown-menu> | 319 | <el-dropdown-menu> |
| ... | @@ -329,12 +321,14 @@ | ... | @@ -329,12 +321,14 @@ |
| 329 | <i v-if="item.code === state.select_flow_version" class="el-icon-check" style="color: #009688; margin-right: 8px;"></i> | 321 | <i v-if="item.code === state.select_flow_version" class="el-icon-check" style="color: #009688; margin-right: 8px;"></i> |
| 330 | <div v-else style="width: 15px; height: 15px;display: inline-block; margin-right: 8px;"></div> | 322 | <div v-else style="width: 15px; height: 15px;display: inline-block; margin-right: 8px;"></div> |
| 331 | <span>流程版本 (V{{ item.code }})</span> | 323 | <span>流程版本 (V{{ item.code }})</span> |
| 332 | - <span v-if="item.code === state.current_enable_version" style="background: #edf9f1; border-color: #46c26f; color: #46c26f;font-size: 10px; padding: 0 5px; border-radius: 3px; margin-left: 8px;">启用中</span> | 324 | + <span v-if="item.code === state.current_enable_version" class="version-status">启用中</span> |
| 333 | <!-- <span @click="showEditFlowVersion(item.id, item.code, item.note)" style="margin-left: 10px;"> | 325 | <!-- <span @click="showEditFlowVersion(item.id, item.code, item.note)" style="margin-left: 10px;"> |
| 334 | <i class="el-icon-edit-outline"></i> | 326 | <i class="el-icon-edit-outline"></i> |
| 335 | </span> --> | 327 | </span> --> |
| 336 | </el-dropdown-item> | 328 | </el-dropdown-item> |
| 337 | - <el-dropdown-item @click.native="addFlowVersion" style="justify-content: center;"><i class="el-icon-circle-plus-outline"></i>新增流程</el-dropdown-item> | 329 | + <el-dropdown-item @click.native="addFlowVersion" style="justify-content: center;"> |
| 330 | + <i class="el-icon-circle-plus-outline"></i>新增流程 | ||
| 331 | + </el-dropdown-item> | ||
| 338 | </el-dropdown-menu> | 332 | </el-dropdown-menu> |
| 339 | </template> | 333 | </template> |
| 340 | </el-dropdown> | 334 | </el-dropdown> |
| ... | @@ -694,15 +688,27 @@ export default { | ... | @@ -694,15 +688,27 @@ export default { |
| 694 | }); | 688 | }); |
| 695 | 689 | ||
| 696 | /***************** 版本操作 ***************/ | 690 | /***************** 版本操作 ***************/ |
| 691 | + | ||
| 692 | + /** | ||
| 693 | + * 切换版本信息 | ||
| 694 | + * @param id | ||
| 695 | + * @param code | ||
| 696 | + * @param note | ||
| 697 | + */ | ||
| 697 | const onSelectFlowVersion = (id: number, code: number, note: string) => { | 698 | const onSelectFlowVersion = (id: number, code: number, note: string) => { |
| 698 | - // 切换版本信息 | ||
| 699 | state.reloadLoading = true; // 打开loading | 699 | state.reloadLoading = true; // 打开loading |
| 700 | updateFlowId(id); // 更新缓存flow_id | 700 | updateFlowId(id); // 更新缓存flow_id |
| 701 | getFlowData(id); // 更新流程图数据 | 701 | getFlowData(id); // 更新流程图数据 |
| 702 | state.select_flow_version = code; | 702 | state.select_flow_version = code; |
| 703 | } | 703 | } |
| 704 | + | ||
| 705 | + /** | ||
| 706 | + * 显示编辑版本信息 | ||
| 707 | + * @param id | ||
| 708 | + * @param code | ||
| 709 | + * @param note | ||
| 710 | + */ | ||
| 704 | const showEditFlowVersion = (id: number, code: number, note: string) => { | 711 | const showEditFlowVersion = (id: number, code: number, note: string) => { |
| 705 | - // 切换版本信息 | ||
| 706 | state.dialogVersionFormVisible = true; | 712 | state.dialogVersionFormVisible = true; |
| 707 | state.versionForm = { // 当前版本信息 | 713 | state.versionForm = { // 当前版本信息 |
| 708 | code, | 714 | code, |
| ... | @@ -712,7 +718,10 @@ export default { | ... | @@ -712,7 +718,10 @@ export default { |
| 712 | } | 718 | } |
| 713 | } | 719 | } |
| 714 | 720 | ||
| 715 | - const addFlowVersion = async () => { // 新增版本 | 721 | + /** |
| 722 | + * 新增版本 | ||
| 723 | + */ | ||
| 724 | + const addFlowVersion = async () => { | ||
| 716 | const { code, data } = await saveFlowAPI({ form_id: +form_id, flow_id: '', data: JSON.stringify(AppData) }); | 725 | const { code, data } = await saveFlowAPI({ form_id: +form_id, flow_id: '', data: JSON.stringify(AppData) }); |
| 717 | if (code) { | 726 | if (code) { |
| 718 | ElMessage({ | 727 | ElMessage({ |
| ... | @@ -1578,6 +1587,8 @@ body { | ... | @@ -1578,6 +1587,8 @@ body { |
| 1578 | border: 1px dashed #dcdfe6; | 1587 | border: 1px dashed #dcdfe6; |
| 1579 | padding: 10px; | 1588 | padding: 10px; |
| 1580 | margin-bottom: 10px; | 1589 | margin-bottom: 10px; |
| 1590 | + max-height: 100px; | ||
| 1591 | + overflow: auto; | ||
| 1581 | &:hover { | 1592 | &:hover { |
| 1582 | cursor: pointer; | 1593 | cursor: pointer; |
| 1583 | } | 1594 | } |
| ... | @@ -1586,6 +1597,82 @@ body { | ... | @@ -1586,6 +1597,82 @@ body { |
| 1586 | text-align: center; | 1597 | text-align: center; |
| 1587 | color: #dcdfe6; | 1598 | color: #dcdfe6; |
| 1588 | } | 1599 | } |
| 1600 | + .icon { | ||
| 1601 | + display: inline-block; vertical-align: middle; line-height: 10px; | ||
| 1602 | + } | ||
| 1603 | +} | ||
| 1604 | + | ||
| 1605 | +.main-attr-set { | ||
| 1606 | + .node-name { | ||
| 1607 | + .name { | ||
| 1608 | + &::after { | ||
| 1609 | + content: '*'; | ||
| 1610 | + color: red; | ||
| 1611 | + } | ||
| 1612 | + } | ||
| 1613 | + } | ||
| 1614 | + .node-index { | ||
| 1615 | + position: absolute; | ||
| 1616 | + right: 0; | ||
| 1617 | + top: 0; | ||
| 1618 | + background-color: #f5f6f8; | ||
| 1619 | + padding: 2px 5px; | ||
| 1620 | + border: 1px solid #d7d9dc; | ||
| 1621 | + border-radius: 3px; | ||
| 1622 | + color: #141e31; | ||
| 1623 | + font-size: 12px; | ||
| 1624 | + font-weight: 400; | ||
| 1625 | + line-height: 22px; | ||
| 1626 | + text-align: center; | ||
| 1627 | + width: 100px; | ||
| 1628 | + } | ||
| 1629 | + .node-user { | ||
| 1630 | + .name { | ||
| 1631 | + font-size: 14px; | ||
| 1632 | + margin-bottom: 10px; | ||
| 1633 | + &::after { | ||
| 1634 | + content: '*'; | ||
| 1635 | + color: red; | ||
| 1636 | + } | ||
| 1637 | + } | ||
| 1638 | + } | ||
| 1639 | +} | ||
| 1640 | + | ||
| 1641 | +.select-version-wrapper { | ||
| 1642 | + position: absolute; | ||
| 1643 | + top:20px; | ||
| 1644 | + right: 15px; | ||
| 1645 | + .select-version-show { | ||
| 1646 | + margin-left: 15px; | ||
| 1647 | + .version-icon-actived { | ||
| 1648 | + width: 10px; | ||
| 1649 | + height: 10px; | ||
| 1650 | + background-color: #009688; | ||
| 1651 | + border-radius: 50%; | ||
| 1652 | + display: inline-block; | ||
| 1653 | + margin-right: 8px; | ||
| 1654 | + } | ||
| 1655 | + .version-icon-selected { | ||
| 1656 | + width: 10px; | ||
| 1657 | + height: 10px; | ||
| 1658 | + background-color: #f0a800; | ||
| 1659 | + border-radius: 50%; | ||
| 1660 | + display: inline-block; | ||
| 1661 | + margin-right: 8px; | ||
| 1662 | + } | ||
| 1663 | + .text { | ||
| 1664 | + font-size: 13px; | ||
| 1665 | + } | ||
| 1666 | + } | ||
| 1667 | + .version-status { | ||
| 1668 | + background: #edf9f1; | ||
| 1669 | + border-color: #46c26f; | ||
| 1670 | + color: #46c26f; | ||
| 1671 | + font-size: 10px; | ||
| 1672 | + padding: 0 5px; | ||
| 1673 | + border-radius: 3px; | ||
| 1674 | + margin-left: 8px; | ||
| 1675 | + } | ||
| 1589 | } | 1676 | } |
| 1590 | 1677 | ||
| 1591 | .more-attr { | 1678 | .more-attr { | ... | ... |
-
Please register or login to post a comment